@@ -62,13 +62,11 @@ function ce_filter( $content ) {
6262
6363 if ( strlen ( $ suffix ) - 4 === $ res_pos ) {
6464 $ responsive = true ;
65- } else {
66- if ( '_ ' === substr ( $ suffix , $ res_pos + 4 , 1 ) ) {
67- $ responsive = true ;
68- $ max_width = substr ( $ suffix , $ res_pos + 5 );
69- if ( ! is_numeric ( $ max_width ) ) {
70- $ max_width = '' ;
71- }
65+ } elseif ( '_ ' === substr ( $ suffix , $ res_pos + 4 , 1 ) ) {
66+ $ responsive = true ;
67+ $ max_width = substr ( $ suffix , $ res_pos + 5 );
68+ if ( ! is_numeric ( $ max_width ) ) {
69+ $ max_width = '' ;
7270 }
7371 }
7472
@@ -140,7 +138,7 @@ function ce_quick_replace( $content = '', $options = '', $search = '' ) {
140138 $ end_pos = strpos ( $ content , $ options ['closing_ident ' ], $ start_pos + 1 );
141139
142140 if ( false !== $ end_pos ) {
143- $ url = substr ( $ content , $ start_pos + 1 , $ end_pos - $ start_pos - 1 );
141+ $ url = substr ( $ content , $ start_pos + 2 , $ end_pos - $ start_pos - 2 );
144142 $ file = ce_get_file ( $ url );
145143 if ( false !== $ file ) {
146144 $ content = str_replace ( $ options ['opening_ident ' ] . $ url . $ options ['closing_ident ' ], $ file , $ content );
@@ -284,18 +282,17 @@ function ce_get_file( $filein ) {
284282 *
285283 * @param string $error Error message.
286284 * @param string $plugin_name The name of the plugin.
287- * @param string $echo True or false, depending on whether you wish to return or echo the results.
285+ * @param string $echo_out True or false, depending on whether you wish to return or echo the results.
288286 * @return string True or the output text
289287 */
290- function ce_report_error ( $ error , $ plugin_name , $ echo = true ) {
288+ function ce_report_error ( $ error , $ plugin_name , $ echo_out = true ) {
291289
292290 $ output = '<p style="color: #f00; font-weight: bold;"> ' . $ plugin_name . ': ' . $ error . "</p> \n" ;
293291
294- if ( $ echo ) {
292+ if ( $ echo_out ) {
295293 echo esc_html ( $ output );
296294 return true ;
297295 } else {
298296 return $ output ;
299297 }
300-
301298}
0 commit comments