Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.
See #47632. Built from https://develop.svn.wordpress.org/trunk@45590 git-svn-id: http://core.svn.wordpress.org/trunk@45401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -206,7 +206,8 @@ class WP_Widget {
|
||||
* @return string Name attribute for $field_name
|
||||
*/
|
||||
public function get_field_name( $field_name ) {
|
||||
if ( false === $pos = strpos( $field_name, '[' ) ) {
|
||||
$pos = strpos( $field_name, '[' );
|
||||
if ( false === $pos ) {
|
||||
return 'widget-' . $this->id_base . '[' . $this->number . '][' . $field_name . ']';
|
||||
} else {
|
||||
return 'widget-' . $this->id_base . '[' . $this->number . '][' . substr_replace( $field_name, '][', $pos, strlen( '[' ) );
|
||||
|
||||
Reference in New Issue
Block a user