This repository was archived by the owner on Feb 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function codeat_get_by_url( $args ){
2727 $ url = preg_replace ( "/^(.+)-\d+?x\d+?(\.\w+)$/i " ,"$1$2 " , $ url );
2828 $ media = attachment_url_to_postid ( $ url );
2929 if ( $ media !== 0 ) {
30- WP_CLI ::log ( 'media | ' . $ media . ' | attachment ' );
30+ WP_CLI ::log ( 'post | ' . $ media . ' | attachment ' );
3131 return ;
3232 }
3333 }
Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ out=$(wp get-by-url "$1" --skip-plugins --skip-themes)
4545if [[ -n $out ]]; then
4646 command=$(cut -d'|' -f1 <<< "$out" | sed 's/^[[:blank:]]*//;s/[[:blank:]]*$//')
4747 id=$(cut -d'|' -f2 <<< "$out" | sed 's/^[[:blank:]]*//;s/[[:blank:]]*$//')
48- taxonomy =$(cut -d'|' -f3 <<< "$out" | sed 's/^[[:blank:]]*//;s/[[:blank:]]*$//')
49- if [[ "$taxonomy " == 'post' ]]; then
48+ what =$(cut -d'|' -f3 <<< "$out" | sed 's/^[[:blank:]]*//;s/[[:blank:]]*$//')
49+ if [[ "$what " == 'post' ]]; then
5050 wp "$command" delete "$id" --skip-plugins --skip-themes
5151 else
52- wp "$command" delete "$taxonomy " "$id" --skip-plugins --skip-themes
52+ wp "$command" delete "$what " "$id" --skip-plugins --skip-themes
5353 fi
5454fi
5555```
You can’t perform that action at this time.
0 commit comments