Customize: Define params on WP_Customize_Partial::render_callback()
for the sake of subclasses overriding this method.
Fixes a strict standards notice regarding the method signature needing to be compatible. See #27355. git-svn-id: https://develop.svn.wordpress.org/trunk@36801 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
711b9d9227
commit
0c3716670a
@ -272,9 +272,12 @@ class WP_Customize_Partial {
|
||||
* @since 4.5.0
|
||||
* @access public
|
||||
*
|
||||
* @param WP_Customize_Partial $partial Partial.
|
||||
* @param array $context Context.
|
||||
* @return string|array|false
|
||||
*/
|
||||
public function render_callback() {
|
||||
public function render_callback( WP_Customize_Partial $partial, $context = array() ) {
|
||||
unset( $partial, $context );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -268,8 +268,8 @@ class Test_WP_Customize_Partial extends WP_UnitTestCase {
|
||||
*/
|
||||
function test_render_callback_default() {
|
||||
$partial = new WP_Customize_Partial( $this->selective_refresh, 'foo' );
|
||||
$this->assertFalse( $partial->render_callback() );
|
||||
$this->assertFalse( call_user_func( $partial->render_callback ) );
|
||||
$this->assertFalse( $partial->render_callback( $partial, array() ) );
|
||||
$this->assertFalse( call_user_func( $partial->render_callback, $partial, array() ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user