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 | |
/** | |
* $arr all meta in associative array. | |
* $post_id where to insert post. | |
**/ | |
function add_post_meta_all( $arr, $post_id ) { | |
global $wpdb; | |
$inserts = array(); | |
foreach ( $arr as $key => $val ) { | |
if ( is_array( $val ) ) { |
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 | |
/** | |
* call this function before executing your wp-cli(maybe in constructor of wp-cli command file) or php script. | |
*/ | |
function makeitfast() { | |
//no cache | |
wp_suspend_cache_addition( true ); | |
// suspend cache invalidation | |
wp_suspend_cache_invalidation( true ); | |
//don't save queries |
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
#!/bin/bash | |
#set login & password or this will ask everytime | |
#login= | |
#password= | |
#comment this if you set login password on top! | |
read -p "User name or email: " login | |
echo -n Password: |
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 | |
/** $where['date'] = array( | |
'compare' => 'BETWEEN', | |
'value' => array( | |
$start, | |
$end | |
) | |
); | |
$where['27/11/2015'] = 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
#!/bin/bash | |
# Edit your variable here here is url for my project git.rtcamp.com/rtbiz/rtbiz-helpdesk where rtbiz is team and rtbiz-helpdesk is project | |
# This will give you final zip file which you may use as release version. it will remove unnecessary development files from zip. | |
gitLab="http://git.rtcamp.com" | |
team="rtbiz" | |
project="rtbiz-helpdesk" | |
read -p "User name or email: " login | |
echo -n Password: | |
read -s password |
NewerOlder