Skip to content

Commit

Permalink
Address callback param name.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitnyl committed Jan 15, 2018
1 parent 6285f9f commit b10c0fe
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions includes/class-amp-theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b10c0fe

Please sign in to comment.