PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / trunk
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO vtrunk
1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 1.3.47 1.3.46 1.3.45 1.3.44 All 176 releases
disco / frontend / Extras / Body_Class.php

Body_Class.php in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO trunk, at frontend/Extras/Body_Class.php

46 lines 796 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Disco
4 *
5 * @package Disco
6 * @author Ohidul Islam <wahid0003@gmail.com>
7 * @copyright 2022 WebAppick
8 * @license GPL 2.0+
9 * @link http://domain.tld
10 */
11
12 namespace Disco\Frontend\Extras;
13
14 use Disco\Engine\Base;
15
16 /**
17 * Add custom css class to <body>
18 */
19 class Body_Class extends Base {
20
21 /**
22 * Initialize the class.
23 *
24 * @return void|bool
25 */
26 public function initialize() {
27 parent::initialize();
28
29 \add_filter( 'disco_body_class', array( self::class, 'add_d_class' ), 10, 1 );
30 }
31
32 /**
33 * Add class in the body on the frontend
34 *
35 * @param array $classes The array with all the classes of the page.
36 * @since 1.0.0
37 * @return array
38 */
39 public static function add_d_class( array $classes ) {
40 $classes[] = DISCO_TEXTDOMAIN;
41
42 return $classes;
43 }
44
45 }
46