Метод |
Описание |
|
__construct ( ) |
|
|
add_component_files ( $components, $target_dir, $replacements ) |
Adds component files needed for the build. |
|
add_javascript ( $type, $files, $target_dir ) |
Removes component insertion comments from source. |
|
add_replacement_files ( $type, $files, $target_dir ) |
Replaces files in the build from those specified by type. |
|
add_sass_includes ( $type, $files, $target_dir ) |
Adds sass includes to the build and takes care of file overrides. |
|
add_templates ( $files, $target_dir ) |
Adds templates to the build. |
|
build_type ( $type ) |
Builds a given type from theme components. |
|
copy_build_files ( $source_dir, $target_dir, $exclude = [] ) |
Copy files to temporary build directory. |
|
copy_files ( $src_dir, $files, $target_dir ) |
Copies files to a given directory |
|
create_zippity_zip ( ) |
Let's take the form input, generate and zip of the theme. |
|
delete_directory ( $directory ) |
Delete a directory of files. |
|
delete_file ( $URI ) |
This deletes a file. |
|
do_tracking ( ) |
Track total downloads and type downloads. |
|
download_file ( $URI, $file_name ) |
This downloads a file at a URL. |
|
ensure_directory ( $directory, $delete_if_exists = false ) |
Checks if a directory exists, creates it otherwise. |
|
gen_types_cache ( ) |
Creates an array and a JSON file from type configs to cache type data. |
|
get_build_sources ( $dir ) |
Gets the build sources and associated file data. |
|
get_stylesheet_paths ( $target_dir, $stylesheet, $basedir = null ) |
Gets list of stylesheets to include |
|
get_theme_components ( $destination ) |
This gets our zip from the Github repo. |
|
get_theme_components_init ( ) |
This is an init function to grab theme components so we can control when it's called by the generator. |
|
get_types ( ) |
Returns an array with the available types. |
|
handle_config ( $type, $config, $target_dir ) |
Handles the configuration and coordinates everything. |
|
log_message ( $data ) |
Logs messages to debug.log in wp-content folder |
|
read_base_dir ( $dir ) |
Read files to process from base. Stores files on array for processing. |
|
read_dir ( $path, $fullpath = false ) |
Reads a directory excluding wildcards. |
|
read_dir_recursive ( $path, $regex_filter = null ) |
Recursively reads a directory. |
|
read_json ( $file ) |
Places data in JSON files in an array for later use. |
|
render_types_form ( ) |
Renders the generator type form. |
|
replace_theme_fields ( $contents, $filename ) |
Runs when looping through files contents, does the replacements fun stuff. |
|
set_expiration_and_go ( ) |
Let's set an expiration on the last download and get current time. |
|
unzip_file ( $zip_file ) |
This unzips our zip from the Github repo. |
|