Category: Admin
Custom Separator
function getSeparator() { return window.location.href.includes(‘?’) ? ‘&’ : ‘?’; } document.addEventListener(‘om.Dtr.init’, function (event) { const separator = getSeparator(); event.detail.Dtr.setCustomVariable(‘separator’, separator); });Continue reading
MemberPress: Add Custom Field Date to Members Table
function custom_admin_members_col($cols) { $cols[‘business_name’] = __(‘Business Name’, ‘memberpress’); // Replace the business_name with the name of the actual custom field key & replace the dummy Business Name text with the name of the actual custom field return $cols; } add_filter(‘mepr-admin-members-cols’,…Continue reading
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
Disable AIOSEO redirect suggestions when trashing posts
add_filter( ‘aioseo_redirects_disable_trashed_posts_suggestions’, ‘__return_true’ );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
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
AhoStackAdapt1 (copy)
!function(s,a,e,v,n,t,z){if(s.saq)return;n=s.saq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!s._saq)s._saq=n;n.push=n;n.loaded=!0;n.version=’1.0′;n.queue=[];t=a.createElement(e);t.async=!0;t.src=v;z=a.getElementsByTagName(e)[0];z.parentNode.insertBefore(t,z)}(window,document,’script’,’https://tags.srv.stackadapt.com/events.js’);saq(‘ts’, ‘xWp5ghNPozwGuFJfi8v4_Q’);Continue reading
AhoStackAdapt1 (copy)
!function(s,a,e,v,n,t,z){if(s.saq)return;n=s.saq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!s._saq)s._saq=n;n.push=n;n.loaded=!0;n.version=’1.0′;n.queue=[];t=a.createElement(e);t.async=!0;t.src=v;z=a.getElementsByTagName(e)[0];z.parentNode.insertBefore(t,z)}(window,document,’script’,’https://tags.srv.stackadapt.com/events.js’);saq(‘ts’, ‘xWp5ghNPozwGuFJfi8v4_Q’);Continue reading