From b10c0fee9ecaf879b2a677f3d9ed1606391e91c2 Mon Sep 17 00:00:00 2001 From: Kaitlyn Date: Mon, 15 Jan 2018 15:52:13 -0400 Subject: [PATCH] Address callback param name. --- includes/class-amp-theme-support.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/includes/class-amp-theme-support.php b/includes/class-amp-theme-support.php index 1f27f13147b..6592e5aa04f 100644 --- a/includes/class-amp-theme-support.php +++ b/includes/class-amp-theme-support.php @@ -62,7 +62,7 @@ public static function init() { * Determines whether paired mode is available. * * When 'amp' theme support has not been added or canonical mode is enabled, then this returns false. - * Returns true when there is a template_dir defined in theme support, and if a defined active_callback + * Returns true when there is a template_dir defined in theme support, and if a defined available_callback * returns true. * * @return bool Whether available. @@ -75,9 +75,8 @@ public static function is_paired_available() { $args = array_shift( $support ); - // @todo We might want to rename active_callback to available_callback.. - if ( isset( $args['active_callback'] ) && is_callable( $args['active_callback'] ) ) { - return $args['active_callback'](); + if ( isset( $args['available_callback'] ) && is_callable( $args['available_callback'] ) ) { + return $args['available_callback'](); } return true; } @@ -157,7 +156,7 @@ public static function filter_paired_template_hierarchy( $templates ) { * Redirect to the non-canonical URL when the template to include is empty. * * This is a failsafe in case an index.php is not located in the AMP template_dir, - * and the active_callback fails to omit a given request from being available in AMP. + * and the available_callback fails to omit a given request from being available in AMP. * * @param string $template Template to include. * @return string Template to include.