This file contains 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
/** | |
* functions.php or main plugin file | |
**/ | |
function awol_enqueue_modify_title_script() { | |
if (is_single()) { | |
wp_enqueue_script('modify-title', get_stylesheet_directory_uri() . '/js/awol-modify-title.js', array('jquery'), '1.0', true); | |
} | |
} |
This file contains 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 | |
$switch_case = 'something'; // define anything as your variable, doesn't have to be a string can be any type | |
if (isset($switch_case)) { | |
switch ($switch_case) { | |
case 'true': | |
echo "switch_case is true"; | |
break; | |
case 'false': |
This file contains 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 | |
/** | |
* | |
* Author: AWOL-TECH | |
* URL: https://gist.github.com/AWOL-TECH | |
* URL: https://github.com/AWOL-TECH | |
* | |
* Credit: Forminator support | |
* | |
* Function to extend Forminator functionality |
This file contains 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
# AWOL-TECH | |
# | |
# With Git for windows installed (https://gitforwindows.org/) navigate to your desired folder via explorer | |
# now open a Git Bash window from the right click context | |
# | |
# Now you can enter the line below to batch convert your files from CRLF to LF using dos2unix | |
# Dos2unix appears to be installed by default with git for windows. | |
# | |
# Have fun |
This file contains 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
find -type f -name "*.jp*g" -exec jpegoptim --strip-all --force -t {} \; |