Sample Email Template Tag (copy)

/** * 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

Minify HTML

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

/** * 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

Onemoguci mail provjeru – WP Forms

/** * 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

Change Cancel Page URL For Paypal

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