| | 248 | function setExpectedDeprecated( $deprecated_element ) { |
| | 249 | array_push( $this->expected_deprecated, $deprecated_element ); |
| | 250 | add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run' ) ); |
| | 251 | add_action( 'deprecated_argument_run', array( $this, 'deprecated_function_run' ) ); |
| | 252 | add_action( 'deprecated_function_trigger_error', '__return_false' ); |
| | 253 | add_action( 'deprecated_argument_trigger_error', '__return_false' ); |
| | 254 | } |
| | 255 | |
| | 256 | function setExpectedIncorrectUsage( $doing_it_wrong ) { |
| | 257 | array_push( $this->expected_doing_it_wrong, $doing_it_wrong ); |
| | 258 | add_action( 'doing_it_wrong_run', array( $this, 'doing_it_wrong_run' ) ); |
| | 259 | add_action( 'doing_it_wrong_trigger_error', '__return_false' ); |
| | 260 | } |
| | 261 | |