Add an audio field to the sign up form (copy)

// Add the audio field to the signup form. add_action( ‘wcv_form_input_after__wcv_store_name’, ‘wcv_audio_uploader’); function wcv_audio_uploader( ){ // Remove this check to have it show on sign up and settings pages. if (‘signup’ == WCVendors_Pro_Store_Form::$form_type ){ echo ‘ Audio Uploader ‘; $value…Continue reading

WC Vendors Activate All Inactive Vendors

/** Activates all Vendor Stores **/ function wcv_activate_all_vendors() { global $wpdb; $vendors = get_users( array( ‘fields’ => array( ‘ID’ ), ‘role’ => ‘Vendor’ ) ); $meta_key = ‘_wcv_vendor_status’; foreach($vendors as $vendor){ $wpdb->query($wpdb->prepare(“UPDATE wp_usermeta SET meta_value=’active’ WHERE user_id=$vendor->ID AND (meta_key=’$meta_key’ AND…Continue reading

Completely Disable Comments

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Cover photo limit increased to 10MB

/* Adjust PROFILE COVER upload limit */ function bbp_cover_image_max_upload_file_size( $fileupload_maxk, $type ) { if ( ‘cover_image’ == $type ) { $fileupload_maxk = 10485760; // in bytes, 10MB } return $fileupload_maxk; } add_filter( ‘bp_attachments_get_max_upload_file_size’, ‘bbp_cover_image_max_upload_file_size’, 10,2 ); /* Adjust PROFILE AVATAR…Continue reading

My Insert widget in header (copy)

/* Add a WordPress Widget to Your Website Header by Adding Code to WordPress */ function wpb_widgets_init() { register_sidebar( array( ‘name’ => ‘Custom Header Widget Area’, ‘id’ => ‘custom-header-widget’, ‘before_widget’ => ‘ ‘, ‘after_widget’ => ‘ ‘, ‘before_title’ => ‘…Continue reading

AS Upsell – March 28 2024

function as_upsell_shortcode() { $product_ids = array(18516, 31026, 31016,33988,34011,34017,51689,5179,51682,51684); // Updated product IDs ob_start(); echo ‘ ‘; echo ‘ ‘; foreach ($product_ids as $product_id) { $product = wc_get_product($product_id); if ($product) { echo ‘ ‘; // Image container echo ‘ ‘; echo…Continue reading

Prevent Willers from being updated

function prevent_plugin_update( $value ) { if ( isset( $value ) && is_object( $value ) ) { unset( $value->response[‘willers/willers.php’] ); } return $value; } add_filter( ‘site_transient_update_plugins’, ‘prevent_plugin_update’ );Continue reading