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
| # push a local WP database to an existing staging site | |
| # uses current directory as theme path and ssh alias | |
| pushstage() { | |
| START=$(date +%s) | |
| # make a backup of the current local database | |
| # get current directory name, used for database and URL | |
| current=${PWD##*/} | |
| cd ~/Sites/$current || return | |
| # rsync the local database to staging site |
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
| // functions.php // | |
| function custom_post_excerpt_length($post_excerpt, $post) | |
| { | |
| $length = 70; | |
| $excerpt = strlen($post_excerpt) > $length ? mb_substr($post_excerpt, 0, $length - 3, "utf-8") . "..." : $post_excerpt; | |
| return $excerpt; | |
| } | |
| add_filter('get_the_excerpt', 'custom_post_excerpt_length', 20, 2); | |
| // end functions.php // |
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
| # push a local WP database to an existing staging site | |
| # uses current directory as theme path and ssh alias | |
| pushstage() { | |
| START=$(date +%s) | |
| # make a backup of the current local database | |
| # get current directory name, used for database and URL | |
| current=${PWD##*/} | |
| cd ~/Sites/$current || return | |
| # rsync the local database to staging site |
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
| #!/usr/bin/env bash | |
| # =============================================================================== | |
| # Script to install PHPUnit in the Local by Flywheel Mac app | |
| # These packages are installed | |
| # | |
| # PHPUnit, curl wget, rsync, git, subversion and composer. | |
| # | |
| # WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit. | |
| # The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory. |