Add Image Alt Text automatic (copy) (copy)

function add_alt_text_to_images( $html ) { // Check if the image has a title attribute if ( preg_match( ‘/(title=[“‘].*?[“‘])/’, $html, $matches ) ) { // Get the title $title = substr( $matches[0], 7, -1 ); // Check if the image has…Continue reading

Add Image Alt Text automatic (copy)

function add_alt_text_to_images( $html ) { // Check if the image has a title attribute if ( preg_match( ‘/(title=[“‘].*?[“‘])/’, $html, $matches ) ) { // Get the title $title = substr( $matches[0], 7, -1 ); // Check if the image has…Continue reading

MemebrPress: Send Membership-Specific Welcome Email Only When Transaction Is Completed

function send_welcome_email_on_transaction_completed($event) { $txn = $event->get_data(); // Get the transaction data $usr = $txn->user(); // Get the user associated with the transaction MeprUtils::maybe_send_product_welcome_notices($txn, $usr); // Send the membership-specific welcome email } add_action(‘mepr-event-transaction-completed’, ‘send_welcome_email_on_transaction_completed’);Continue reading

Basic – Gravity Forms Styling (Orbital Theme)

add_filter( ‘gform_default_styles’, function( $styles ) { return ‘{“theme”:””,”inputSize”:”lg”,”inputBorderColor”:”#686e77″,”inputBackgroundColor”:”#fff”,”inputColor”:”#112337″,”inputPrimaryColor”:”var(–e-global-color-el_color_1)”,”labelColor”:”#112337″,”descriptionColor”:”#585e6a”,”buttonPrimaryBackgroundColor”:”var(–e-global-color-el_color_1)”,”buttonPrimaryColor”:”#fff”}’; } );Continue reading

Show Terms By Default (copy)

function sumobi_edd_show_terms_agreement() { global $edd_options; /*print_r($edd_options);*/ if ( isset( $edd_options[‘show_agree_to_terms’] ) ) { ?> <?php } } remove_action( 'edd_purchase_form_before_submit', 'edd_terms_agreement' ); add_action( 'edd_purchase_form_before_submit', 'sumobi_edd_show_terms_agreement' );Continue reading