Add support for AMP legacy theme.
-
Hello Team,
In regard to the support topic created on the AMP support forum, we found out that the Floating buttons plugin is not Compatible (not working) with the legacy theme.
It can be fixed by adding the following single line of code in
public/class-public.php
afterline 50
add_action( 'amp_post_template_footer', array( $this, 'display' ) );
the function will look like this
public function __construct( $info ) { $this->plugin = $info['plugin']; $this->url = $info['url']; $this->rating = $info['rating']; add_shortcode( $this->plugin['shortcode'], array( $this, 'shortcode' ) ); // Display on the site add_action( 'wp_footer', array( $this, 'display' ) ); add_filter( 'script_loader_tag', array( $this, 'add_defer_attribute' ), 10, 2 ); add_action( 'amp_post_template_footer', array( $this, 'display' ) ); }
Hope my suggestion will get adopted in your plugins!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add support for AMP legacy theme.’ is closed to new replies.