Allow SVG Files Upload

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

Book Rec PHP

/** * Custom shortcode to display WPForms form entries in non-table view. * * Basic usage: [wpforms_entries_table id=”FORMID”]. * * Possible shortcode attributes: * id (required) Form ID of which to show entries. * user User ID, or “current” to…Continue reading

Disable Automatic Updates

// Disable core auto-updates add_filter( ‘auto_update_core’, ‘__return_false’ ); // Disable auto-updates for plugins. add_filter( ‘auto_update_plugin’, ‘__return_false’ ); // Disable auto-updates for themes. add_filter( ‘auto_update_theme’, ‘__return_false’ );Continue reading

Set affiliate role on registration

function affwp_custom_set_role_on_registration( $affiliate_id = 0 ) { $user_id = affwp_get_affiliate_user_id( $affiliate_id ); $user = new WP_User( $user_id ); $user->add_role( ‘affiliate’ ); } add_action( ‘affwp_insert_affiliate’, ‘affwp_custom_set_role_on_registration’ );Continue reading

Custom Rate Limit Maximum

/** * Plugin Name: WP Simple Pay – Custom Rate Limit Maximum * Plugin URI: https://wpsimplepay.com * Author: Sandhills Development, LLC * Author URI: https://sandhillsdev.com * Description: Changes the default rate limit maximum. * Version: 1.0 */ /** * Changes…Continue reading