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
<?php | |
// force the "securely save to account" checkbox to default to checked | |
function wc_auth_net_cim_save_payment_method_default_checked( $html, $form ) { | |
if ( empty( $html ) || $form->tokenization_forced() ) { | |
return $html; | |
} | |
return str_replace( 'type="checkbox"', 'type="checkbox" checked="checked"', $html ); | |
} |
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
<?php | |
// [wp insert user « WordPress Codex](http://codex.wordpress.org/Function_Reference/wp_insert_user) | |
require_once "wordpress/wp-load.php"; | |
$user_info = array( | |
"user_pass" => "test123", | |
"user_login" => "username", | |
"user_nicename" => "username", | |
"user_email" => "email@example.com", |
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
<?php | |
$filename = "sample_filename.zip"; | |
$file_to_be_copied = 'http://url_of_source.com/'.$filename; | |
$local_file_created = $_SERVER['DOCUMENT_ROOT'] . '/' . $filename; | |
if ( copy($file_to_be_copied, $local_file_created) ) { | |
echo 'Copy successfully in: ' .$local_file_created; |
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
SELECT * FROM `stage_options` WHERE `option_name` LIKE '%wp_%'; | |
RENAME TABLE stage_commentmeta to c2g_commentmeta; | |
RENAME TABLE stage_comments to c2g_comments; | |
RENAME TABLE stage_duplicator_packages to c2g_duplicator_packages; | |
RENAME TABLE stage_links to c2g_links; | |
RENAME TABLE stage_nf_objectmeta to c2g_nf_objectmeta; | |
RENAME TABLE stage_nf_objects to c2g_nf_objects; | |
RENAME TABLE stage_nf_relationships to c2g_nf_relationships; | |
RENAME TABLE stage_ninja_forms_fav_fields to c2g_ninja_forms_fav_fields; |
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
<?php | |
// ADD NEW ADMIN USER TO WORDPRESS | |
// ---------------------------------- | |
// Put this file in your Wordpress root directory and run it from your browser. | |
// Delete it when you're done. | |
require_once('wp-blog-header.php'); | |
require_once('wp-includes/registration.php'); | |
// ---------------------------------------------------- |
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
DELETE relations.*, taxes.*, terms.* | |
FROM wp_term_relationships AS relations | |
INNER JOIN wp_term_taxonomy AS taxes | |
ON relations.term_taxonomy_id=taxes.term_taxonomy_id | |
INNER JOIN wp_terms AS terms | |
ON taxes.term_id=terms.term_id | |
WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type='product') | |
DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product'); |
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
<?php | |
function jetpack_carousel_disable_comment( $jpimages, $postid ) { | |
$posts = get_post( $postid ); | |
if( $posts->post_type == 'attachment' ) { | |
return false; | |
} | |
return $jpimages; |
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
//run this to download the latest fontawesome via bower | |
bower install --save fontawesome | |
//this will make sure that you have all necessary dependencies | |
npm install grunt-contrib-copy --save-dev | |
// after running the commands above, you will have this entry in your bower.json file | |
// "dependencies": { | |
// "bootstrap-sass": "3.3.6", | |
// "font-awesome": "fontawesome#^4.6.3" |
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
if (is_front_page()) { | |
wp_dequeue_style( 'flick' ); | |
wp_dequeue_style( 'mailchimpSF_main_css' ); | |
wp_dequeue_style( 'skeleton' ); | |
wp_dequeue_style( 'masonry' ); | |
wp_dequeue_style( 'cff' ); | |
wp_dequeue_script( 'datepicker' ); | |
wp_dequeue_script( 'maxbuttons-front' ); | |
wp_dequeue_script( 'mailchimpSF_main' ); |
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
<?php | |
echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled'; | |
echo 'OpenSSL: ', extension_loaded('openssl') ? 'Enabled' : 'Disabled'; | |
?> |
OlderNewer