Skip to content

Commit

Permalink
Note pre_amp_render_post action being not called when amp theme suppo…
Browse files Browse the repository at this point in the history
…rt added
  • Loading branch information
westonruter committed Jun 2, 2018
1 parent a4ba86c commit ab99cd7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,11 @@ function amp_add_post_template_actions() {
* Add action to do post template rendering at template_redirect action.
*
* @since 0.2
* @since 1.0 The amp_render() function is called at template_redirect action priority 11 instead of priority 10.
* @deprecated This function is not used when 'amp' theme support is added.
*/
function amp_prepare_render() {
add_action( 'template_redirect', 'amp_render' );
add_action( 'template_redirect', 'amp_render', 11 );
}

/**
Expand Down Expand Up @@ -390,6 +391,8 @@ function amp_render_post( $post ) {
/**
* Fires before rendering a post in AMP.
*
* This action is not triggered when 'amp' theme support is present. Instead, you should use 'template_redirect' action and check if `is_amp_endpoint()`.
*
* @since 0.2
*
* @param int $post_id Post ID.
Expand Down

0 comments on commit ab99cd7

Please sign in to comment.