Archives: Snippets
Graili shop
Graili shop
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
Login Easily
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
Untitled Snippet
.entry-meta { display: none; }Continue reading
Set a cookie if the URL contains specific UTM parameters.
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
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