Customize Ambassador Campaign Fields For Campaign Creators

add_action( ‘charitable_default_campaign_fields’, ‘test_charitable_default_campaign_fields’, 10, 1 ); function test_charitable_default_campaign_fields( $form_fields ) { // make the short description hidden, don’t remove as this make cause problems with legacy code. if ( isset( $form_fields[‘description’][‘campaign_form’] ) ) { $form_fields[‘description’][‘campaign_form’][‘type’] = ‘hidden’; } // change…Continue reading

Hotfix: Free Downloads – Always load assets

/** * Force loading the Free Downloads assets on the frontend. */ function eddwp_free_downloads_scripts() { EDD\FreeDownloads\Assets\Frontend::enqueue( true ); } remove_action( ‘wp_enqueue_scripts’, ‘edd_free_downloads_scripts’ ); add_action( ‘wp_enqueue_scripts’, ‘eddwp_free_downloads_scripts’ );Continue reading

PHP [Vendor Profile]: Notify User with Vendor Profile Approval/Denial Status

// This code snippet sends email notifications to the vendor when their vendor profile is approved, or denied. It ensures users are notified about the status of their vendor profiles. add_action(‘transition_post_status’, ‘send_user_notification_for_approved_profile’, 10, 3); add_action(‘transition_post_status’, ‘send_user_notification_for_denied_profile’, 10, 3); function send_user_notification_for_approved_profile($new_status,…Continue reading

Duplicate Post/Page Link (copy)

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Attributes for aioseo_robots_meta

$attributes = [ ‘noindex’ => ”, ‘nofollow’ => ”, ‘noarchive’ => ”, ‘nosnippet’ => ”, ‘noimageindex’ => ”, ‘noodp’ => ”, ‘notranslate’ => ”, ‘max-snippet’ => ”, ‘max-image-preview’ => ”, ‘max-video-preview’ => ” ];Continue reading