Makes wp nav shortcuts work in multisites
This commit is contained in:
parent
a073005423
commit
8aa7aabfe3
2 changed files with 6 additions and 4 deletions
|
@ -97,7 +97,8 @@ function ptheme() {
|
|||
else
|
||||
wpPath=$public_html;
|
||||
fi
|
||||
theme=$(dirname $(wp --path="$wpPath" theme path $(wp --path="$wpPath" theme list | grep "parent" | awk '{print $1}')))
|
||||
domain="$(basename $(dirname $public_html ) ).local.jh"
|
||||
theme=$(dirname $(wp --path="$wpPath" --url="$domain" theme path $(wp --path="$wpPath" --url="$domain" theme list 2> /dev/null | grep "parent" | awk '{print $1}') 2> /dev/null ))
|
||||
if [ -d $theme ]; then
|
||||
if [ -d "$theme" ]; then
|
||||
cd $theme
|
||||
|
@ -120,7 +121,8 @@ function get_theme() {
|
|||
else
|
||||
wpPath=$public_html;
|
||||
fi
|
||||
theme=$(dirname $(wp --path="$wpPath" theme path $(wp --path="$wpPath" theme list | grep "active" | grep -v "inactive" | awk '{print $1}')))
|
||||
domain="$(basename $(dirname $public_html ) ).local.jh"
|
||||
theme=$(dirname $(wp --path="$wpPath" --url="$domain" theme path $(wp --path="$wpPath" --url="$domain" theme list 2> /dev/null | grep "active" | grep -v "inactive" | awk '{print $1}') 2> /dev/null ))
|
||||
if [ -d $theme ]; then
|
||||
echo $theme
|
||||
else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
export LANG="en_GB.UTF-8"
|
||||
export TERMINAL=/usr/local/bin/st
|
||||
export TERM=xterm-256color
|
||||
export PATH=~/.bin:$PATH:/opt/lampp/bin:.
|
||||
export PATH=~/.bin:$PATH:/opt/lampp/bin:~/.config/composer/vendor/bin:.
|
||||
export EDITOR='vim'
|
||||
export READER='zathura'
|
||||
export CDPATH=.:~:~/Sites
|
||||
|
@ -12,4 +12,4 @@ GEM_PATH=$GEM_HOME
|
|||
export PATH=$PATH:$GEM_HOME/bin
|
||||
export GEM_HOME=$(ruby -e 'print Gem.user_dir')
|
||||
|
||||
#echo -e "Please don't sabotage my computer while I'm away \n\nTo turn on the print server, run the command 'cups'\n\nTo update 3d party plugins, run command 'u3p'\n\nTo turn on my servers, run command 'sudo lampp start'" | /usr/bin/cowsay -f tux -W 80
|
||||
#echo -e "Please don't sabotage my computer while I'm away \n\nTo turn on the print server, run the command 'cups'" | /usr/bin/cowsay -f tux -W 80
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue