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

Customize Action Scheduler Retention Period

/* Customize the Action Scheduler Retention Period * * Original doc: https://wpmailsmtp.com/docs/how-to-troubleshoot-action-scheduler-issues-wp-mail-smtp-2-1-1/ */ function custom_as_retention_period() { // Changes default 30-day retention to 7-days return WEEK_IN_SECONDS; } add_filter( ‘action_scheduler_retention_period’, ‘custom_as_retention_period’ );Continue reading

JetAppointment – Customize the time slot format

// Customize the time slot format for JetAppointment. // This filter modifies the format of time slots to display only the start time. add_filter( ‘jet-apb/time-slots/slots-html/slot-time-format’, function( $format ) { $format = ‘%4$s’; return $format; } );Continue reading

Change Text For Minimum Donation Message

/* * */ function change_min_donation_text( $text, $amount ) { return ‘ ‘ . __( ‘The minimum donation for this campaign is ‘, ‘charitable’ ) . charitable_format_money( $amount, false, true ) . ‘. ‘; } add_filter( ‘charitable_donationa_amount_notice’, ‘change_min_donation_text’, 10, 2 );Continue reading

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

JetFormBuilder – Enable Guest Post Upload

add_action( ‘jet-form-builder/media-field/before-upload’, /** * @var Jet_Form_BuilderRequestFieldsMedia_Field_Parser $parser */ function ( $parser ) { $class_name = $parser->get_context()->get_class_name(); // We need to add ‘allow-insert-attachments’ to the Advanced -> CSS Class Name option if ( ! $class_name || false === strpos( $class_name, ‘allow-insert-attachments’…Continue reading