Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| deployment: | |
| tasks: | |
| - export REPONAME=<repo-name> # folder name of Git repo on server | |
| - export THEMENAME=<theme-name> # folder name of WP theme | |
| - export BACKUPPATH=<path-to-cpanel-bkp>/<theme-name>_$(date +%Y%m%d_%H%M%S) # backup folder with date_time | |
| - export DEPLOYPATH=/home/<account-name>/public_html/wp-content/themes/ # theme folder will be in /dist/ | |
| - export PATH=~/.nvm/versions/node/v24.11.0/bin:$PATH # make sure npm path is set | |
| - mkdir -p $BACKUPPATH # create backup folder | |
| - cd /home/ostkznpw/repos/$REPONAME # move into repo folder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
| #customize-theme-controls .customize-pane-child.current-section-parent { | |
| -webkit-transform: translateX(-100%); | |
| -ms-transform: translateX(-100%); | |
| transform: translateX(-100%); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const el = document.getElementById('id'); | |
| const beforeText = getComputedStyle(el, ':before').getPropertyValue('content'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // convert wp_option_name -> Wp Option Name | |
| $titlecase = ucwords( implode(' ', explode('_', $option->option_name) ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Class to minify HTML | |
| * | |
| * @link https://gist.github.com/sethbergman/d07e879200bef6862131 | |
| */ | |
| class WP_HTML_Compression | |
| { | |
| // Settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('get_header', 'pt_html_minify_start'); | |
| function pt_html_minify_start() { | |
| ob_start( 'pt_html_minyfy_finish' ); | |
| } | |
| function pt_html_minyfy_finish( $html ) { | |
| $html = preg_replace('/<!--(?!s*(?:[if [^]]+]|!|>))(?:(?!-->).)*-->/s', '', $html); | |
| $html = preg_replace('/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/m', "$1", $html); | |
| $html = preg_replace('/^\/\/[^\n\r]+(?:[\n\r]|\*\))$/m', "$1", $html); |
NewerOlder