| 1 |
<?php |
| 2 |
/** |
| 3 |
* Main StorefrontSupport class Only Work for storefront theme. |
| 4 |
* |
| 5 |
* @package RadiusTheme\SB |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace RadiusTheme\SB\Controllers\ThemesSupport\Storefront; |
| 9 |
|
| 10 |
use RadiusTheme\SB\Helpers\BuilderFns; |
| 11 |
use RadiusTheme\SB\Traits\SingletonTrait; |
| 12 |
|
| 13 |
// Do not allow directly accessing this file. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit( 'This script cannot be accessed directly.' ); |
| 16 |
} |
| 17 |
|
| 18 |
/** |
| 19 |
* Product Description class |
| 20 |
*/ |
| 21 |
class ThemeSupport { |
| 22 |
/** |
| 23 |
* Singleton |
| 24 |
*/ |
| 25 |
use SingletonTrait; |
| 26 |
|
| 27 |
/** |
| 28 |
* Construct function |
| 29 |
*/ |
| 30 |
private function __construct() { |
| 31 |
add_filter( 'rtsb/builder/wrapper/parent_class', [ $this, 'builder_wrapper_class' ] ); |
| 32 |
remove_action( 'storefront_after_footer', 'storefront_sticky_single_add_to_cart', 999 ); |
| 33 |
} |
| 34 |
/** |
| 35 |
* Get class instance. |
| 36 |
* |
| 37 |
* @return object Instance. |
| 38 |
*/ |
| 39 |
public static function init() { |
| 40 |
if ( ! self::$instance ) { |
| 41 |
self::$instance = new self(); |
| 42 |
} |
| 43 |
return self::$instance; |
| 44 |
} |
| 45 |
|
| 46 |
/** |
| 47 |
* Builder wrapper class. |
| 48 |
* |
| 49 |
* @param array $classes Classes. |
| 50 |
* @return array |
| 51 |
*/ |
| 52 |
public function builder_wrapper_class( $classes ) { |
| 53 |
$classes[] = 'site-main'; |
| 54 |
return $classes; |
| 55 |
} |
| 56 |
|
| 57 |
} |
| 58 |
|