Created
March 19, 2020 12:33
-
-
Save coderaaron/4630d9e686fc1f49931a42ad18e8c373 to your computer and use it in GitHub Desktop.
This file contains 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
mysql -e "SELECT c.post_title, c.post_content FROM wp_posts a, wp_postmeta b LEFT JOIN wp_posts c ON c.ID = b.meta_value WHERE a.post_type = 'nav_menu_item' AND b.meta_key = '_menu_item_object_id' AND a.ID = b.post_id ORDER BY a.menu_order" -u wp -pwp diso --xml > test.xml | |
sed -i -e $'s/</\</g' test.xml | |
sed -i -e $'s/>/\>/g' test.xml | |
sed -i -e $'s/"/\'/g' test.xml | |
sed -i -e $'s/&/\&/g' test.xml | |
sed -i -e $'s/<!--[^>]*>//g' test.xml | |
sed -i -e $'s/<a[^>]*>//g' test.xml | |
sed -i -e $'s/<img[^>]*>//g' test.xml | |
sed -i -e $'s/<\/a>//g' test.xml | |
sed -i -e $'s/ id=\'[^\']*\'//g' test.xml | |
sed -i -e $'s/ class=\'[^\']*\'//g' test.xml | |
sed -i -e $'s/ style=\'[^\']*\'//g' test.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment