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
for POST in $(wp post list --post_type=locations --post_parent=0 --format=ids); do wp post create --post_type=locations --post_parent=$POST --from-post=17717 --post_status=publish; done |
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
<?php | |
function get_POI_token($POI_URL_BASE, $POI_URL_TOKEN, $POI_PASS, $POI_USER, $POI_ID, $POI_SECRET){ | |
// do your houseworks.. | |
$url = $POI_URL_BASE.$POI_URL_TOKEN; | |
$username = $POI_USER; | |
$password = $POI_PASS; | |
$client_id = $POI_ID; | |
$client_secret = $POI_SECRET; | |
// some wanted url encoded | |
$args = array( |
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
.delayer(@i) when (@i > 0) { | |
@t: ~":nth-child(@{i})"; | |
li@{t} { | |
a{ | |
transition: transform .6s ease-out @menu_speed+(@i * @menu_speed), opacity .6s ease-out @menu_speed + (@i * @menu_speed); | |
} | |
} | |
.delayer(@i - 1); | |
} |
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
{{ fn('wpcf7_contact_form_tag_func', {'id':view.cform7_id, 'html_class':view.css_class}, null, 'contact-form-7') }} |
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
{ | |
"name": "roots/bedrock", | |
"type": "project", | |
"license": "MIT", | |
"description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure", | |
"homepage": "https://roots.io/bedrock/", | |
"authors": [ | |
{ | |
"name": "Scott Walkinshaw", | |
"email": "[email protected]", |
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
<?php | |
function addMetaId2Relations($post_type, $meta_from, $meta_to){ | |
$arr = [ | |
'post_type' => $post_type, | |
'posts_per_page' => -1, | |
'fields' => 'ids' | |
]; | |
$q = new WP_Query($arr); | |
echo 'poluted:<br><br>'; | |
foreach ($q->posts as $id) { |
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
wp db drop --yes && wp db import $(find db_backup/* -printf '%T+ %p\n' | sort -r | head -n 1) |
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
#recover previous db backup, not last! | |
cd db_backup && wp db import "$(print -lr -- **/*(om[2,2]))" |
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
<?php | |
function gallery_2_galleryInFlexibleLayout(){ | |
$arr = [ | |
'post_type' => 'cp_resident', | |
'posts_per_page' => -1, | |
'fields' => 'ids' | |
]; | |
$q = new WP_Query($arr); | |
foreach ($q->posts as $id) { |
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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^domain.rocks$ [NC,OR] | |
RewriteCond %{HTTP_HOST} ^www.domain.rocks$ | |
RewriteCond %{REQUEST_URI} !bedrock/web/ | |
RewriteRule (.*) /bedrock/web/$1 [L] | |
# or | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^(www.)?domain.rocks$ |