PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / 2.7.8
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts v2.7.8
2.7.9 2.7.8 2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 All 30 releases
← All changes | admin/metaboxes/snippet-metabox.php +9 -2 trunk → 2.7.8 View file →
@@ -1242,11 +1242,18 @@
1242 1242 if ( empty( $snippet_code ) ) {
1243 1243 return true;
1244 1244 }
1245 1245
1246 - $redeclaration = WINP_Code_Validator::find_redeclaration( $snippet_code, $snippet_type );
1246 + $redeclaration = WINP_Code_Validator::find_function_redeclaration( $snippet_code, $snippet_type );
1247 1247 if ( null !== $redeclaration ) {
1248 - $this->display_validation_error( $redeclaration['line'], WINP_Code_Validator::get_redeclaration_message( $redeclaration ) );
1248 + $this->display_validation_error(
1249 + $redeclaration['line'],
1250 + sprintf(
1251 + // translators: %s is the fully qualified function name.
1252 + __( 'Cannot redeclare function %s(). Rename the function or guard its declaration with function_exists().', 'insert-php' ),
1253 + $redeclaration['name']
1254 + )
1255 + );
1249 1256 return false;
1250 1257 }
1251 1258
1252 1259 // Set custom error handler to catch warnings and notices.