ampwp_load_site();
}
/*
* Add "amphtml" in the main theme to target it to the AMP page
*/
add_action( 'wp_head', 'ampwp_rel_info_on_off',2 );
function ampwp_rel_info_on_off() {
global $redux_builder_amp;
$current_page_id = get_queried_object_id();
// Hide AMPHTML on Specific Pages
$amp_pages = $redux_builder_amp['amp-multi-select-pages'];
if ( $amp_pages ) {
foreach($amp_pages as $i => $item) {
$hide_on_pages = $item;
if ( $hide_on_pages == $current_page_id ) {
remove_action( 'wp_head', 'ampwp_add_rel_info' );
}
}
}
// Hide AMPHTML on Specific Posts
$amp_posts = $redux_builder_amp['amp-multi-select-posts'];
if ( $amp_posts ) {
foreach($amp_posts as $i => $item) {
$hide_on_posts = $item;
if ( $hide_on_posts == $current_page_id ) {
remove_action( 'wp_head', 'ampwp_add_rel_info' );
}
}
}
}
add_action( 'wp_head', 'ampwp_add_rel_info' );
function ampwp_add_rel_info() {
$amp_url = trailingslashit( get_permalink() ); ?>
__( 'AMP Menu' ),
)
);
}
add_action( 'init', 'register_amp_menu' );
}
require_once( dirname( __FILE__ ) . '/options/admin-init.php' );
require_once( dirname( __FILE__ ) . '/admin/ampwp-newsletter.php' );
?>