Skip to content

Commit

Permalink
Merge pull request #1441 from Automattic/fix/custom-post-type-support
Browse files Browse the repository at this point in the history
Defer adding post type support until post types have been registered
  • Loading branch information
westonruter authored Sep 17, 2018
2 parents 84c1ab1 + 7b4f6d0 commit 239c105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function amp_init() {
AMP_HTTP::handle_xhr_request();
AMP_Theme_Support::init();
AMP_Validation_Manager::init();
AMP_Post_Type_Support::add_post_type_support();
add_action( 'init', array( 'AMP_Post_Type_Support', 'add_post_type_support' ), 1000 ); // After post types have been defined.

if ( defined( 'WP_CLI' ) ) {
WP_CLI::add_command( 'amp', new AMP_CLI() );
Expand Down

0 comments on commit 239c105

Please sign in to comment.