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 | |
add_action("wpcf7_before_send_mail", "zz_wpcf7_change_pwd"); | |
function zz_wpcf7_change_pwd($WPCF7_ContactForm) { | |
$wpcf7 = WPCF7_ContactForm::get_current(); | |
if (3496 == $WPCF7_ContactForm->id()) { | |
$submission = WPCF7_Submission::get_instance(); | |
if ($submission) { | |
$data = $submission->get_posted_data(); |
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 | |
add_filter('wpcf7_skip_mail', '__return_true'); |
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-admin/options.php | |
medium_large_size_w | |
function dco_remove_default_image_sizes( $sizes) { | |
return array_diff( $sizes, array( | |
'thumbnail', | |
'medium', | |
'medium_large', | |
'large', |
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
/** | |
* Enqueues script with WordPress and adds version number that is a timestamp of the file modified date. | |
* | |
* @param string $handle Name of the script. Should be unique. | |
* @param string|bool $src Path to the script from the theme directory of WordPress. Example: '/js/myscript.js'. | |
* @param array $deps Optional. An array of registered script handles this script depends on. Default empty array. | |
* @param bool $in_footer Optional. Whether to enqueue the script before </body> instead of in the <head>. | |
* Default 'false'. | |
*/ | |
function enqueue_versioned_script( $handle, $src = false, $deps = array(), $in_footer = 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
<?php | |
remove_action("admin_color_scheme_picker", "admin_color_scheme_picker"); |
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 | |
add_action('admin_init', 'no_mo_dashboard'); | |
function no_mo_dashboard() { | |
if (!current_user_can('manage_options') && $_SERVER['DOING_AJAX'] != '/wp-admin/admin-ajax.php') { | |
wp_redirect(home_url()); exit; | |
} | |
} | |
?> |
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 ee($s) { | |
echo '<pre>'; | |
print_r($s); | |
echo '</pre>'; | |
} | |
function vd($s) { | |
echo '<pre>'; | |
var_dump($s); |
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
function (f_debug) { | |
if (is_admin()) { | |
define('WP_DEBUG', true ) | |
} else { | |
define('WP_DEBUG', false ) | |
} | |
} | |
add_action(init,f_debug); |