-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwordpress-theme-customizer.php
More file actions
68 lines (45 loc) · 1.78 KB
/
wordpress-theme-customizer.php
File metadata and controls
68 lines (45 loc) · 1.78 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
65
66
67
68
<?php
/*
Plugin Name: Codehvaeli Theme Customizer
Plugin URI: https://github.com/codehaveli/wordpress-theme-customizer
Description: Theme Customizer for Custom function,css,js
Version: 1.1.1
Author: Codehaveli
Author URI: https://wwwcodehaveli.com/
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ch-theme-customizer
Domain Path: /languages
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
define( 'CH_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); // returns like /home/user/site/
define( 'CH_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); // returns like https://example.com/wp-content/yourplugin/
/**
* [ch_theme_customizer_assets_enqueue description]
* @return [type] [CH Assets enqueue]
*/
function ch_theme_customizer_assets_enqueue(){
/**
* Enquee All the Css For theme
* [Add your style here with wp_enqueue_style CH_PLUGIN_URL withh return current plugin url withh http or https ]
*/
wp_enqueue_style( 'ch_tc_style', CH_PLUGIN_URL . 'assets/css/style.css', array(), '1.1', 'all');
/**
* Enquee All The scripts for Theme
* [Add your scripts here with wp_enqueue_script CH_PLUGIN_URL withh return current plugin url withh http or https
* @arg 1 = handle
* @arg 2 = url
* @arg 3 = Dependency for Scripts like jquery
* (Find your dependency handel here https://developer.wordpress.org/reference/functions/wp_enqueue_script/)
* @arg 4 = version
* @arg 5 = boolean (in footer or not -- If true in footer)
*/
wp_enqueue_script( 'ch_tc_scripts', CH_PLUGIN_URL . 'assets/js/script.js', array('jquery'), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'ch_theme_customizer_assets_enqueue' );
/**
* Require Custom Functions
*/
require_once (CH_PLUGIN_PATH .'inc/custom-function.php');