Code Embed - Version 2.0.1

Version Description

  • Enhancement: Removed restriction on embed code length
Download this release

Release Info

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

Code changes from version 2.0 to 2.0.1

Files changed (3) hide show
  1. includes/ace-filter.php +16 -18
  2. readme.txt +7 -1
  3. simple-code-embed.php +2 -2
includes/ace-filter.php CHANGED
@@ -77,31 +77,29 @@ function ace_filter( $content ) {
77
 
78
  // Get the custom field data and replace in the post
79
 
80
- if ( $suffix_len < 13 ) {
81
-
82
- $search = $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . $suffix . $options[ 'closing_ident' ];
 
 
 
 
 
 
 
83
 
84
- // Get the meta for the current post
85
- $post_meta = get_post_meta( $post -> ID, $options[ 'keyword_ident' ].$suffix, false );
86
- if ( isset( $post_meta[ 0 ] ) ) {
87
- $html = $post_meta[ 0 ];
88
- } else {
89
- // No meta found, so look for it elsewhere
90
- $html = ace_get_embed_code( $options[ 'keyword_ident' ], $suffix );
91
- }
92
 
93
- // Build the string to search for
94
 
95
- $search = $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . $full_suffix . $options[ 'closing_ident' ];
96
 
97
- // Build the string of code to replace with
98
 
99
- $replace = ace_generate_code( $html, 'Artiss Code Embed', $responsive, $max_width );
100
 
101
- // Now modify all references
102
 
103
- $content = str_replace( $search , $replace, $content );
104
- }
105
  }
106
  $found_pos = strpos( $content, $options[ 'opening_ident' ] . $options[ 'keyword_ident' ], $found_pos + 1 );
107
  }
77
 
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
+ $post_meta = get_post_meta( $post -> ID, $options[ 'keyword_ident' ].$suffix, false );
84
+ if ( isset( $post_meta[ 0 ] ) ) {
85
+ $html = $post_meta[ 0 ];
86
+ } else {
87
+ // No meta found, so look for it elsewhere
88
+ $html = ace_get_embed_code( $options[ 'keyword_ident' ], $suffix );
89
+ }
90
 
91
+ // Build the string to search for
 
 
 
 
 
 
 
92
 
93
+ $search = $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . $full_suffix . $options[ 'closing_ident' ];
94
 
95
+ // Build the string of code to replace with
96
 
97
+ $replace = ace_generate_code( $html, 'Artiss Code Embed', $responsive, $max_width );
98
 
99
+ // Now modify all references
100
 
101
+ $content = str_replace( $search , $replace, $content );
102
 
 
 
103
  }
104
  $found_pos = strpos( $content, $options[ 'opening_ident' ] . $options[ 'keyword_ident' ], $found_pos + 1 );
105
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://artiss.co.uk/donate
4
  Tags: artiss, embed, code, html, javascript, script, simple, video, xhtml, youtube
5
  Requires at least: 2.0
6
  Tested up to: 3.3.1
7
- Stable tag: 2.0
8
 
9
  Artiss Code Embed (formally Simple Code Embed) provides a very easy and efficient way to embed code (JavaScript and HTML) in your posts and pages.
10
 
@@ -167,6 +167,9 @@ Please note, however, that the minimum for WordPress is now PHP 5.2.4. Even thou
167
 
168
  == Changelog ==
169
 
 
 
 
170
  = 2.0 =
171
  * Maintenance: Removed dashboard widget
172
  * Maintenance: Further code tidying
@@ -218,6 +221,9 @@ versions of this plugin
218
 
219
  == Upgrade Notice ==
220
 
 
 
 
221
  = 2.0 =
222
  * Upgrade to improve the administration menus and add further features such as internationalization and responsive video conversion
223
 
4
  Tags: artiss, embed, code, html, javascript, script, simple, video, xhtml, youtube
5
  Requires at least: 2.0
6
  Tested up to: 3.3.1
7
+ Stable tag: 2.0.1
8
 
9
  Artiss Code Embed (formally Simple Code Embed) provides a very easy and efficient way to embed code (JavaScript and HTML) in your posts and pages.
10
 
167
 
168
  == Changelog ==
169
 
170
+ = 2.0.1 =
171
+ * Enhancement: Removed restriction on embed code length
172
+
173
  = 2.0 =
174
  * Maintenance: Removed dashboard widget
175
  * Maintenance: Further code tidying
221
 
222
  == Upgrade Notice ==
223
 
224
+ = 2.0.1 =
225
+ * Upgrade to remove embed code length restriction
226
+
227
  = 2.0 =
228
  * Upgrade to improve the administration menus and add further features such as internationalization and responsive video conversion
229
 
simple-code-embed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Artiss Code Embed
4
  Plugin URI: http://www.artiss.co.uk/code-embed
5
  Description: Allows you to embed code into your posts & pages
6
- Version: 2.0
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
@@ -17,7 +17,7 @@ Author URI: http://www.artiss.co.uk
17
  * @since 1.6
18
  */
19
 
20
- define( 'artiss_code_embed_version', '2.0' );
21
 
22
  function ace_load_plugin_textdomain() {
23
  load_plugin_textdomain( 'simple-embed-code', false, 'simple-embed-code/languages' );
3
  Plugin Name: Artiss Code Embed
4
  Plugin URI: http://www.artiss.co.uk/code-embed
5
  Description: Allows you to embed code into your posts & pages
6
+ Version: 2.0.1
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
17
  * @since 1.6
18
  */
19
 
20
+ define( 'artiss_code_embed_version', '2.0.1' );
21
 
22
  function ace_load_plugin_textdomain() {
23
  load_plugin_textdomain( 'simple-embed-code', false, 'simple-embed-code/languages' );