Valet switch PHP version with these commands
Install PHP 5.6 and switch Valet to PHP 5.6
valet stop
brew unlink php71
brew install php56
brew install php56-mcrypt
brew link php56
valet start
| --- | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners | |
| name : debug | |
| on : | |
| push : | |
| branches : [ "master" ] |
| <?php | |
| /** | |
| * Get the primary term of a post, by taxonomy. | |
| * If Yoast Primary Term is used, return it, | |
| * otherwise fallback to the first term. | |
| * | |
| * @version 1.1.0 | |
| * | |
| * @link https://gist.github.com/JiveDig/5d1518f370b1605ae9c753f564b20b7f |
| <?php | |
| /** | |
| * Session Helper Class | |
| * | |
| * A simple session wrapper class. | |
| * | |
| * Recommended for use with PHP 5.4.0 or higher. (Not required.) | |
| * | |
| * Usage Example: |
Valet switch PHP version with these commands
Install PHP 5.6 and switch Valet to PHP 5.6
valet stop
brew unlink php71
brew install php56
brew install php56-mcrypt
brew link php56
valet start
| <?php | |
| //Automatically login a single WordPress user upon arrival to a specific page. | |
| //Redirect to home page once logged in and prevent viewing of the login page. | |
| //Tested with WP 3.9.1. Used in functions.php | |
| //Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead." | |
| //From http://tourkick.com/2014/wordpress-demo-multisite-db-reset/ | |
| function auto_login() { | |
| //change these 2 items | |
| $loginpageid = '1234'; //Page ID of your login page |
A simple script that resets latest MAMP PRO 4 trial validity, and keeps your data safe.
chmod +x then drag and drop the file on the Terminal. You should have something like chmod +x reset_mamp4.sh. Press Enter to run it.reset_mamp4.sh) then pressing Enter.| function ld_is_topic($postId) { | |
| $tags = wp_get_post_tags($postId); | |
| foreach ($tags as $tag) { | |
| if ($tag->name === 'auto-mark-complete') { | |
| return true; | |
| } | |
| } | |
| return false; | |
| } |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| I use the first | |
| —– BEGIN LICENSE —– | |
| Michael Barnes | |
| Single User License | |
| EA7E-821385 | |
| 8A353C41 872A0D5C DF9B2950 AFF6F667 | |
| C458EA6D 8EA3C286 98D1D650 131A97AB | |
| AA919AEC EF20E143 B361B1E7 4C8B7F04 |
| #!/usr/bin/env php | |
| <?php | |
| /** | |
| * PHP script to replace site url in Wordpress database dump, even with WPML | |
| * @link https://gist.github.com/lavoiesl/2227920 | |
| */ | |
| if (!empty($argv[1]) && $argv[1] == 'update') { | |
| $file = file_get_contents('https://gist.github.com/lavoiesl/2227920/raw/wordpress-change-url.php'); | |
| if ($file === false) { |