|
@@ 245-258 (lines=14) @@
|
| 242 |
|
); |
| 243 |
|
} |
| 244 |
|
|
| 245 |
|
foreach ( $this->deprecated_args as $arg => $data ) { |
| 246 |
|
if ( isset( $args[ $arg ] ) ) { |
| 247 |
|
|
| 248 |
|
_deprecated_argument( |
| 249 |
|
esc_html( "{$data['class']}::__construct" ) |
| 250 |
|
, esc_html( $data['version'] ) |
| 251 |
|
, esc_html( "{$arg} is deprecated, use {$data['replacement']} instead" ) |
| 252 |
|
); |
| 253 |
|
|
| 254 |
|
$args[ $data['replacement'] ] = $args[ $arg ]; |
| 255 |
|
|
| 256 |
|
unset( $args[ $arg ] ); |
| 257 |
|
} |
| 258 |
|
} |
| 259 |
|
|
| 260 |
|
$this->args = array_merge( $this->defaults, $args ); |
| 261 |
|
} |
|
@@ 306-319 (lines=14) @@
|
| 303 |
|
*/ |
| 304 |
|
public function set_args( array $args ) { |
| 305 |
|
|
| 306 |
|
foreach ( $this->deprecated_args as $arg => $data ) { |
| 307 |
|
if ( isset( $args[ $arg ] ) ) { |
| 308 |
|
|
| 309 |
|
_deprecated_argument( |
| 310 |
|
esc_html( "{$data['class']}::set_args" ) |
| 311 |
|
, esc_html( $data['version'] ) |
| 312 |
|
, esc_html( "{$arg} is deprecated, use {$data['replacement']} instead" ) |
| 313 |
|
); |
| 314 |
|
|
| 315 |
|
$args[ $data['replacement'] ] = $args[ $arg ]; |
| 316 |
|
|
| 317 |
|
unset( $args[ $arg ] ); |
| 318 |
|
} |
| 319 |
|
} |
| 320 |
|
|
| 321 |
|
$this->args = array_merge( $this->args, $args ); |
| 322 |
|
|