Modify and add to wp nav shortcuts
This commit is contained in:
parent
31bd3654e0
commit
60cb1ea46c
2 changed files with 43 additions and 5 deletions
|
@ -76,7 +76,8 @@ alias home="cd ~/"
|
||||||
alias ~="cd ~/"
|
alias ~="cd ~/"
|
||||||
|
|
||||||
#Goes up to the public_html folder
|
#Goes up to the public_html folder
|
||||||
alias ph='cd ${PWD%/public_html*}/public_html'
|
alias ph='cd ${${PWD%/public_html*}%/wiki*}/public_html'
|
||||||
|
alias wiki='cd ${${PWD%/public_html*}%/wiki*}/wiki'
|
||||||
|
|
||||||
#Edit wp-config.php using $EDITOR
|
#Edit wp-config.php using $EDITOR
|
||||||
alias conf='$EDITOR ${PWD%/public_html*}/public_html/wp-config.php'
|
alias conf='$EDITOR ${PWD%/public_html*}/public_html/wp-config.php'
|
||||||
|
|
|
@ -90,7 +90,7 @@ function createFPLreport(){
|
||||||
|
|
||||||
#Takes you to the parent theme
|
#Takes you to the parent theme
|
||||||
function ptheme() {
|
function ptheme() {
|
||||||
public_html=${PWD%/public_html*}/public_html
|
public_html=${${PWD%/public_html*}%/wiki*}/public_html
|
||||||
if [ -d $public_html ]; then
|
if [ -d $public_html ]; then
|
||||||
if [ -d $public_html/wp ]; then
|
if [ -d $public_html/wp ]; then
|
||||||
wpPath=$public_html/wp;
|
wpPath=$public_html/wp;
|
||||||
|
@ -113,7 +113,7 @@ function ptheme() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_theme() {
|
function get_theme() {
|
||||||
public_html=${PWD%/public_html*}/public_html
|
public_html=${${PWD%/public_html*}%/wiki*}/public_html
|
||||||
if [ -d $public_html ]; then
|
if [ -d $public_html ]; then
|
||||||
if [ -d $public_html/wp ]; then
|
if [ -d $public_html/wp ]; then
|
||||||
wpPath=$public_html/wp;
|
wpPath=$public_html/wp;
|
||||||
|
@ -157,7 +157,7 @@ function css() {
|
||||||
|
|
||||||
#Takes you to the plugin directory
|
#Takes you to the plugin directory
|
||||||
function plugins() {
|
function plugins() {
|
||||||
public_html=${PWD%/public_html*}/public_html
|
public_html=${${PWD%/public_html*}%/wiki*}/public_html
|
||||||
if [ -d $public_html ]; then
|
if [ -d $public_html ]; then
|
||||||
if [ -d $public_html/wp ]; then
|
if [ -d $public_html/wp ]; then
|
||||||
wpPath=$public_html/wp;
|
wpPath=$public_html/wp;
|
||||||
|
@ -170,6 +170,36 @@ function plugins() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#Takes you to the woocommece plugin directory
|
||||||
|
function woo() {
|
||||||
|
public_html=${${PWD%/public_html*}%/wiki*}/public_html
|
||||||
|
if [ -d $public_html ]; then
|
||||||
|
if [ -d $public_html/wp ]; then
|
||||||
|
wpPath=$public_html/wp;
|
||||||
|
else
|
||||||
|
wpPath=$public_html;
|
||||||
|
fi
|
||||||
|
cd $(dirname $(wp --path="$wpPath" plugin path woocommerce))
|
||||||
|
else
|
||||||
|
echo " Can't find public_html folder."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#Takes you to the woocommerce templates plugin directory
|
||||||
|
function wooTemplates() {
|
||||||
|
public_html=${${PWD%/public_html*}%/wiki*}/public_html
|
||||||
|
if [ -d $public_html ]; then
|
||||||
|
if [ -d $public_html/wp ]; then
|
||||||
|
wpPath=$public_html/wp;
|
||||||
|
else
|
||||||
|
wpPath=$public_html;
|
||||||
|
fi
|
||||||
|
cd $(dirname $(wp --path="$wpPath" plugin path woocommerce))/templates
|
||||||
|
else
|
||||||
|
echo " Can't find public_html folder."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#Copies a woo tepmplate file to the theme
|
#Copies a woo tepmplate file to the theme
|
||||||
function woocp() {
|
function woocp() {
|
||||||
public_html=${PWD%/public_html*}/public_html
|
public_html=${PWD%/public_html*}/public_html
|
||||||
|
@ -206,7 +236,7 @@ function woocp() {
|
||||||
|
|
||||||
#Takes you to the theme directory
|
#Takes you to the theme directory
|
||||||
function themes() {
|
function themes() {
|
||||||
public_html=${PWD%/public_html*}/public_html
|
public_html=${${PWD%/public_html*}%/wiki*}/public_html
|
||||||
if [ -d $public_html ]; then
|
if [ -d $public_html ]; then
|
||||||
if [ -d $public_html/wp ]; then
|
if [ -d $public_html/wp ]; then
|
||||||
wpPath=$public_html/wp;
|
wpPath=$public_html/wp;
|
||||||
|
@ -219,6 +249,13 @@ function themes() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function todo() {
|
||||||
|
wikidir=${${PWD%/public_html*}%/wiki*}/wiki
|
||||||
|
if [ -d "$wikidir" ]; then
|
||||||
|
$EDITOR "$wikidir/ToDo.md"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#This function toggles debug in wp-config
|
#This function toggles debug in wp-config
|
||||||
function debugToggle(){
|
function debugToggle(){
|
||||||
public_html=${PWD%/public_html*}/public_html
|
public_html=${PWD%/public_html*}/public_html
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue