mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Docs: Use 3-digit, x.x.x style semantic versioning for $version
argument in do_action_deprecated()
and apply_filters_deprecated()
calls.
Props jrf. Fixes #48255. git-svn-id: https://develop.svn.wordpress.org/trunk@46689 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
67e82bc32a
commit
00aff3a706
@ -611,7 +611,7 @@ function remove_all_actions( $tag, $priority = false ) {
|
||||
* return apply_filters( 'wpdocs_filter', $value, $extra_arg );
|
||||
*
|
||||
* // Deprecated.
|
||||
* return apply_filters_deprecated( 'wpdocs_filter', array( $value, $extra_arg ), '4.9', 'wpdocs_new_filter' );
|
||||
* return apply_filters_deprecated( 'wpdocs_filter', array( $value, $extra_arg ), '4.9.0', 'wpdocs_new_filter' );
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
|
@ -546,7 +546,7 @@ class Tests_Actions extends WP_UnitTestCase {
|
||||
$p = new WP_Post( (object) array( 'post_title' => 'Foo' ) );
|
||||
|
||||
add_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback' ) );
|
||||
do_action_deprecated( 'tests_do_action_deprecated', array( $p ), '4.6' );
|
||||
do_action_deprecated( 'tests_do_action_deprecated', array( $p ), '4.6.0' );
|
||||
remove_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback' ) );
|
||||
|
||||
$this->assertSame( 'Bar', $p->post_title );
|
||||
@ -565,7 +565,7 @@ class Tests_Actions extends WP_UnitTestCase {
|
||||
$p2 = new WP_Post( (object) array( 'post_title' => 'Foo2' ) );
|
||||
|
||||
add_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback_multiple_params' ), 10, 2 );
|
||||
do_action_deprecated( 'tests_do_action_deprecated', array( $p1, $p2 ), '4.6' );
|
||||
do_action_deprecated( 'tests_do_action_deprecated', array( $p1, $p2 ), '4.6.0' );
|
||||
remove_action( 'tests_do_action_deprecated', array( __CLASS__, 'deprecated_action_callback_multiple_params' ), 10, 2 );
|
||||
|
||||
$this->assertSame( 'Bar1', $p1->post_title );
|
||||
|
@ -303,7 +303,7 @@ class Tests_Filters extends WP_UnitTestCase {
|
||||
$p = 'Foo';
|
||||
|
||||
add_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback' ) );
|
||||
$p = apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $p ), '4.6' );
|
||||
$p = apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $p ), '4.6.0' );
|
||||
remove_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback' ) );
|
||||
|
||||
$this->assertSame( 'Bar', $p );
|
||||
@ -323,7 +323,7 @@ class Tests_Filters extends WP_UnitTestCase {
|
||||
$p2 = 'Foo2';
|
||||
|
||||
add_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback_multiple_params' ), 10, 2 );
|
||||
$p1 = apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $p1, $p2 ), '4.6' );
|
||||
$p1 = apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $p1, $p2 ), '4.6.0' );
|
||||
remove_filter( 'tests_apply_filters_deprecated', array( __CLASS__, 'deprecated_filter_callback_multiple_params' ), 10, 2 );
|
||||
|
||||
$this->assertSame( 'Bar1', $p1 );
|
||||
@ -345,7 +345,7 @@ class Tests_Filters extends WP_UnitTestCase {
|
||||
public function test_apply_filters_deprecated_without_filter() {
|
||||
$val = 'Foobar';
|
||||
|
||||
$this->assertSame( $val, apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $val ), '4.6' ) );
|
||||
$this->assertSame( $val, apply_filters_deprecated( 'tests_apply_filters_deprecated', array( $val ), '4.6.0' ) );
|
||||
}
|
||||
|
||||
private $current_priority;
|
||||
|
Loading…
x
Reference in New Issue
Block a user