add_filter( ‘charitable_session_donation_amount’, ‘example_get_donation_amount_in_session’, 999, 2 ); function example_get_donation_amount_in_session( $amount = false, $campaign = false ) { // If the donation amount is not set in the session, return the default amount. // WARNING: Setting a default amount here will override…Continue reading
/* Change Admin Logo */ add_action( ‘login_head’, ‘rd_login_logo’ ); function rd_login_logo() { echo ‘ ‘; } /* Replace Link URL */ add_filter( ‘login_headerurl’, ‘rd_login_url’ ); function rd_login_url(){ return ‘https://rubberduckers.co.uk’; } /* Change login logo hover text */ add_filter( ‘login_headertext’, ‘rd_login_logo_title’…Continue reading
/* Modify the admin footer text */ add_filter( ‘admin_footer_text’, ‘rd_modify_admin_footer’ ); function rd_modify_admin_footer () { echo ‘Website designed and developed by Rubber Duckers | [email protected]‘; }Continue reading
/* Replace logo in admin bar */ add_action(‘wp_before_admin_bar_render’, ‘rd_admin_bar_logo’); function rd_admin_bar_logo() { global $wp_admin_bar; echo ‘ ‘; }Continue reading
/* Add contact info box onto Dashboard */ add_action(‘wp_dashboard_setup’, ‘rd_support_widget’ ); function rd_support_widget() { wp_add_dashboard_widget(‘wp_dashboard_widget’, ‘Support Information’, ‘rd_support_info’); } function rd_support_info() { echo ” Website support For website support, maintenance and further developments contact Rubber Duckers at [email protected] “; }Continue reading
/*’Remember Me’ checked by default */ add_action( ‘init’, ‘rd_login_checked_rememberme’ ); function rd_login_checked_rememberme() { add_filter( ‘login_footer’, ‘rd_check_rememberme’ ); } function rd_check_rememberme() { echo ““; }Continue reading
/* If a user’s login fails, don’t tell them whether the username or password was incorrect */ add_filter ( ‘login_errors’, ‘rd_failed_login’ ); function rd_failed_login () { return ‘Login failed because either your username or password is incorrect. Please try again.’;…Continue reading
/* Remove image link from media uploads */ function wpb_imagelink_setup() { $image_set = get_option( ‘image_default_link_type’ ); if ($image_set !== ‘none’) { update_option(‘image_default_link_type’, ‘none’); } } add_action(‘admin_init’, ‘wpb_imagelink_setup’, 10);Continue reading
// Disable curly quotes remove_filter( ‘the_content’, ‘wptexturize’ );Continue reading
// Disable image compression add_filter( ‘jpeg_quality’, ‘smashing_jpeg_quality’ ); function smashing_jpeg_quality() { return 100; } // Disable image scaling add_filter( ‘big_image_size_threshold’, ‘__return_false’ );Continue reading