-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathra-shortcodes-bundle.php
More file actions
64 lines (50 loc) · 2.23 KB
/
ra-shortcodes-bundle.php
File metadata and controls
64 lines (50 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/*
Plugin Name: RA Shortcodes Bundle
Plugin URI: https://github.com/webdevsuperfast/ra-shortcodes-bundle
Description: A collection of shortcodes for WordPress built using the Shortcodes Ultimate plugin API.
Version: 1.0.0
Author: Rotsen Mark Acob
Author URI: https://rotsenacob.com
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ra-shortcodes-bundle
Domain Path: /languages
*/
class RASB_Shortcodes {
public function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'rasb_enqueue_scripts' ) );
add_filter( 'su/data/groups', array( $this, 'rasb_register_groups' ) );
foreach ( glob( plugin_dir_path( __FILE__ ) . "shortcodes/*.php" ) as $file ) {
include_once $file;
}
//* Mr Image Resize
if ( !function_exists( 'rasb_image_resize' ) ) {
require_once( plugin_dir_path( __FILE__ ) . 'lib/rasb-image-resize.php' );
}
if ( function_exists( 'rasb_image_resize' ) )
require_once( plugin_dir_path( __FILE__ ) . 'lib/misc.php' );
//* Color Luminance
if ( !function_exists( 'rasb_color_luminance' ) ) {
require_once( plugin_dir_path( __FILE__ ) . 'lib/luminance.php' );
}
}
public function rasb_register_groups( $groups ) {
$groups['ra-shortcodes-bundle'] = __( 'RA Shortcodes', 'ra-shortcodes-bundle' );
return $groups;
}
public function rasb_enqueue_scripts() {
if ( ! is_admin() ) {
// Shortcode CSS
wp_register_style( 'rasb-shortcodes', plugin_dir_url( __FILE__ ) . 'public/css/shortcode.css' );
wp_enqueue_style( 'rasb-shortcodes' );
// Vein JS
wp_register_script( 'rasb-vein-js', plugin_dir_url( __FILE__ ) . 'public/js/vein.min.js', array( 'jquery' ), null, true );
// Countdown JS
wp_register_script( 'rasb-countdown-js', plugin_dir_url( __FILE__ ) . 'public/js/jquery.countdown.min.js', array( 'jquery' ), null, true );
// Shortcode JS
wp_register_script( 'rasb-shortcodes-js', plugin_dir_url( __FILE__ ) . 'public/js/shortcode.min.js', array( 'jquery' ), null, true );
}
}
}
new RASB_Shortcodes();