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
/* find all matches for strings starting with 2070 in the fire_date column of the termmeta table */ | |
SELECT * FROM `as9g6f0_termmeta` WHERE `meta_key` LIKE 'fire_date' AND `meta_value` LIKE '2070%'; | |
/* find all matches for strings starting with 2070 in the fire_date column of the termmeta table and replace them with 1970 */ | |
UPDATE as9g6f0_termmeta | |
SET meta_value = REPLACE(meta_value,'2070','1970') | |
WHERE `meta_key` LIKE 'fire_date' AND `meta_value` LIKE '2070%'; |
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
////////////////////////////////// | |
// DELETE ALL TERMS IN TAXONOMY // | |
////////////////////////////////// | |
function landbryo_delete_terms() { | |
if ( is_admin() ) { | |
$tax = 'tax-slug'; | |
$terms = get_terms( $tax, array( 'fields' => 'ids', 'hide_empty' => false ) ); | |
foreach ( $terms as $value ) { | |
wp_delete_term( $value, $tax ); |
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
///////////////////////////////////// | |
// CHANGE THEME OPTIONS MENU TITLE // | |
///////////////////////////////////// | |
add_filter('avia_filter_backend_page_title', 'change_theme_title'); | |
function change_theme_title() { | |
return 'Theme Options'; | |
} |
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
////////////////////////////// | |
// REMOVE ENFOLD POWERED BY // | |
////////////////////////////// | |
function remove_backlink($link) { | |
return ''; | |
} | |
add_filter('kriesi_backlink', 'remove_backlink', 10, 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
///////////////////////// | |
// CUSTOM QUERY FILTER // | |
///////////////////////// | |
function orderby_lastname($orderby_statement) { | |
$orderby_statement = "RIGHT(post_title, LOCATE(' ', REVERSE(post_title)) - 1) ASC"; | |
return $orderby_statement; | |
} | |
// add filter with function before args |
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
////////////////////////////////// | |
// DIABLE PLUGIN UPDATE COUNTER // | |
////////////////////////////////// | |
add_filter('site_transient_update_plugins', '__return_false'); |
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
/* enqueue child script if not in dashboard */ | |
if (!(is_admin())) { | |
function change_aviajs() { | |
wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true ); | |
} | |
add_action( 'wp_print_scripts', 'change_aviajs', 100 ); | |
} | |
/* dequeue child script */ |
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
////////////////// | |
// DEFER JQUERY // | |
////////////////// | |
if (!(is_admin())) { | |
function defer_parsing($url) { | |
if (FALSE === strpos($url, '.js')) return $url; | |
if (strpos($url, 'jquery.js')) return $url; | |
return "$url' defer onload='"; |
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
/////////////////////// | |
// CHANGE IMG EDITOR // | |
/////////////////////// | |
function landbryo_img_edit($array) { | |
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); | |
} | |
add_filter( 'wp_image_editors', 'landbryo_img_edit' ); |
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
jQuery('img').removeAttr('title'); |