generated from wpbones/WPKirk-Boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.php
68 lines (62 loc) · 1.53 KB
/
deploy.php
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
/**
* This file is included by "bones" command. You'll find
*
* $this Instance of bones command console
* $path Destination path
*
* You'll able to:
*
* Delete a file
* @unlink("{$path}/myfile");
*
* Delete a folder
* $console->deleteDirectory("{$path}/docs");
*
*
*/
/**
* Fired when the deploy command is started
*
* @param object $console Instance of WPBones Console
* @param string $path Destination path
*/
add_action('wpbones_console_deploy_start', function ($console, $path) {
// Do something
}, 10, 2);
/**
* Fired before building assets
*
* @param object $console Instance of WPBones Console
* @param string $path Destination path
*/
add_action('wpbones_console_deploy_before_build_assets', function ($console, $path) {
// Do something
}, 10, 2);
/**
* Fired after building assets
*
* @param object $console Instance of WPBones Console
* @param string $path Destination path
*/
add_action('wpbones_console_deploy_after_build_assets', function ($console, $path) {
// Do something
}, 10, 2);
/**
* Filter the list of the folder to skip for the deploy version
*
* @param array $folders List of folders to skip
* @return array List of folders to skip
*/
add_filter('wpbones_console_deploy_skip_folders', function ($folders) {
return $folders;
});
/**
* Fired when the deploy command is completed
*
* @param object $console Instance of WPBones Console
* @param string $path Destination path
*/
add_action('wpbones_console_deploy_completed', function ($console, $path) {
// Do something
}, 10, 2);