I hereby claim:
- I am faishal on github.
- I am faishal (https://keybase.io/faishal) on keybase.
- I have a public key whose fingerprint is F3B7 DD16 C029 8066 AC92 0164 62E4 69AA 0DF4 86C5
To claim this, I am signing this object:
#!/bin/bash | |
# Run from master to avoid not able to delete current branch error | |
git checkout master --force | |
git submodule update --init --recursive | |
# Update our list of remotes | |
git fetch | |
git remote prune origin |
#!/bin/bash | |
for SITE_URL in $(wp site list --fields=domain,path,archived,deleted --format=csv --url=cmsdev.sc.com | grep ",0,0$" | awk -F ',' '{print $1 $2}') | |
do | |
echo "Indexing $SITE_URL ..." | |
echo "--- BEGIN INDEXING $SITE_URL ---" &>> indexing.log | |
wp elasticpress index --setup --url="$SITE_URL" --show-bulk-errors &>> indexing.log | |
echo "--- END INDEXING $SITE_URL ---" &>> indexing.log | |
done |
I hereby claim:
To claim this, I am signing this object:
<?php | |
global $wpdb; | |
if ( is_array( $ids ) ) { | |
$in_str_arr = array_fill( 0, count( $ids ), '%d' ); | |
$in_str = join( ',', $in_str_arr ); | |
$form_id_where = $wpdb->prepare( "ID IN ($in_str)", $ids ); | |
} else { | |
$form_id_where = $ids> 0 ? $wpdb->prepare( 'ID=%d', $ids ) : ''; | |
} |
add_action( 'template_redirect', 'wpmu_ssl_template_redirect', 1 ); | |
function wpmu_ssl_template_redirect() { | |
if ( is_ssl() && ! is_admin() ) { | |
if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) { | |
wp_redirect( preg_replace( '|^https://|', 'http://', $_SERVER['REQUEST_URI'] ), 301 ); | |
exit(); | |
} else { |
//Calculate frame ratio | |
$frame_ratio = ( float ) $frame_w / ( float ) $frame_h ; | |
//Calculate image ratio | |
$image_ratio = ( float ) $image_w / ( float ) $image_h ; | |
//Checking if both ratio are same | |
if ( round ( $frame_ratio , 2 ) != round ( $image_ratio , 2 ) ) { |
if( ! function_exists ("bp_latest_update_fix" )){ | |
function bp_latest_update_fix () { | |
global $wpdb; | |
$sql = "select * from $wpdb->usermeta where meta_key like 'bp_latest_update'"; | |
$results = $wpdb->get_results ( $sql ); | |
foreach ( $results as $row ) { | |
if ( $meta_value = maybe_unserialize ( $row->meta_value ) ) { | |
if ( is_array ( $meta_value ) ) { | |
if ( isset ( $meta_value[ "content" ] ) && strpos ( $meta_value[ "content" ], "update_txt" ) !== false ) { | |
$data_up = json_decode ( $meta_value[ "content" ] ); |
function check_broken_media () { | |
global $wpdb; | |
$media_model = new RTMediaModel(); | |
$ob_migration = new RTMediaMigration(); | |
$sql = "select * from wp_postmeta m join wp_posts p on p.ID = m.post_id where meta_value like '%rtMedia%'"; | |
$results = $wpdb->get_results ( $sql ); | |
$upload_path = trim ( get_option ( 'upload_path' ) ); | |
if ( empty ( $upload_path ) || 'wp-content/uploads' == $upload_path ) { | |
$dir = WP_CONTENT_DIR . '/uploads'; |
$._data( $("#foo")[0], "events" ); |
<?php | |
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
$repos= array(); |