| 1 |
<?php |
| 2 |
/** |
| 3 |
* The Enqueue and Dequeue CSS and JS files setting configurations. |
| 4 |
* |
| 5 |
* @package Smart_Post_Show |
| 6 |
* @subpackage Smart_Post_Show/admin |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
die; } // Cannot access pages directly. |
| 11 |
|
| 12 |
/** |
| 13 |
* The Layout building class. |
| 14 |
*/ |
| 15 |
class SPS_ScriptsAndStyles { |
| 16 |
|
| 17 |
/** |
| 18 |
* Advanced setting section. |
| 19 |
* |
| 20 |
* @param string $prefix The settings. |
| 21 |
* @return void |
| 22 |
*/ |
| 23 |
public static function section( $prefix ) { |
| 24 |
SP_PC::createSection( |
| 25 |
$prefix, |
| 26 |
array( |
| 27 |
'title' => __( 'Scripts & Styles', 'smart-post-show' ), |
| 28 |
'icon' => 'fa fa-file-code-o', |
| 29 |
'fields' => array( |
| 30 |
array( |
| 31 |
'type' => 'subheading', |
| 32 |
'content' => __( 'Enqueue or Dequeue JS', 'smart-post-show' ), |
| 33 |
), |
| 34 |
array( |
| 35 |
'id' => 'pcp_swiper_js', |
| 36 |
'type' => 'switcher', |
| 37 |
'title' => __( 'Swiper JS', 'smart-post-show' ), |
| 38 |
'text_on' => __( 'Enqueued', 'smart-post-show' ), |
| 39 |
'text_off' => __( 'Dequeued', 'smart-post-show' ), |
| 40 |
'text_width' => 95, |
| 41 |
'default' => true, |
| 42 |
), |
| 43 |
array( |
| 44 |
'type' => 'subheading', |
| 45 |
'content' => __( 'Enqueue or Dequeue CSS', 'smart-post-show' ), |
| 46 |
), |
| 47 |
array( |
| 48 |
'id' => 'pcp_swiper_css', |
| 49 |
'type' => 'switcher', |
| 50 |
'title' => __( 'Swiper CSS', 'smart-post-show' ), |
| 51 |
'text_on' => __( 'Enqueued', 'smart-post-show' ), |
| 52 |
'text_off' => __( 'Dequeued', 'smart-post-show' ), |
| 53 |
'text_width' => 95, |
| 54 |
'default' => true, |
| 55 |
), |
| 56 |
array( |
| 57 |
'id' => 'pcp_fontawesome_css', |
| 58 |
'type' => 'switcher', |
| 59 |
'title' => __( 'Font Awesome CSS', 'smart-post-show' ), |
| 60 |
'text_on' => __( 'Enqueued', 'smart-post-show' ), |
| 61 |
'text_off' => __( 'Dequeued', 'smart-post-show' ), |
| 62 |
'text_width' => 95, |
| 63 |
'default' => true, |
| 64 |
), |
| 65 |
), |
| 66 |
) |
| 67 |
); |
| 68 |
} |
| 69 |
} |
| 70 |
|