Server IP : 170.150.155.74 / Your IP : 3.15.185.186 Web Server : Apache/2.4.53 (Debian) System : Linux b22bf132354b 5.4.0-162-generic #179-Ubuntu SMP Mon Aug 14 08:51:31 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/themes/neve/inc/compatibility/ |
Upload File : |
<?php /** * Web_Stories compatibility. * * @package Neve\Compatibility */ namespace Neve\Compatibility; /** * Class PWA */ class Web_Stories { /** * Init function. * * @return bool */ public function init() { if ( ! $this->should_load() ) { return false; } $this->load_hooks(); return true; } /** * Is plugin available?. */ private function should_load() { return defined( 'WEBSTORIES_VERSION' ); } /** * Load hooks. */ private function load_hooks() { add_action( 'after_setup_theme', array( $this, 'setup' ) ); add_action( 'wp_body_open', array( $this, 'embed' ) ); } /** * Setup theme support for web stories. */ public function setup() { add_theme_support( 'web-stories', [ // 'view-type' => [ 'circles', 'carousel', 'grid', 'list' ] ] ); } /** * Render the theme stories. */ public function embed() { if ( function_exists( '\Google\Web_Stories\render_theme_stories' ) ) { \Google\Web_Stories\render_theme_stories(); } } }