CIEP hide MCE text tab

function ciep_hide_mce_text_tab($settings) { $settings[‘quicktags’] = false; return $settings; } add_filter(‘wp_editor_settings’, ‘ciep_hide_mce_text_tab’);Continue reading

PHP: Backend Logic for Gallery Rendering – v2

// AJAX action to handle gallery rendering add_action(‘wp_ajax_render_user_gallery’, ‘handle_render_user_gallery’); add_action(‘wp_ajax_nopriv_render_user_gallery’, ‘handle_render_user_gallery’); /** * Handle AJAX request to render the user gallery. */ function handle_render_user_gallery() { $gallery_html = get_user_gallery_html(); // Return a JSON response if (!empty($gallery_html)) { wp_send_json_success([‘html’ => $gallery_html]); }…Continue reading

Add Divi Button Styling to GForms Buttons

add_filter( ‘gform_submit_button’, ‘add_divi_button_css_class’, 10, 2 ); add_filter( ‘gform_next_button’, ‘add_divi_button_css_class’, 10, 2 ); add_filter( ‘gform_previous_button’, ‘add_divi_button_css_class’, 10, 2 ); function add_divi_button_css_class( $button, $form ) { $fragment = WP_HTML_Processor::create_fragment( $button ); $fragment->next_token(); $fragment->add_class( ‘et_pb_button’ ); return $fragment->get_updated_html(); }Continue reading

Setting the Default Address Scheme to International

/* * Change the scheme for the address field * * @link https://wpforms.com/developers/how-to-set-the-address-default-scheme-to-international */ function wpf_dev_field_new_default( $field ) { // default scheme set to international if ($field[ ‘type’ ] === ‘address’) { $field[ ‘format’ ] = ‘international’; $field[ ‘scheme_selected’ ]…Continue reading

How to Add Material Design to Your Form Fields Using CSS

/** * Move label position from above form field to below * * @link https://wpforms.com/developers/how-to-add-material-design-to-your-form-fields-using-css/ */ function wpf_dev_display_field_before( $field, $form_data ) { // Only run this snippet on form ID 697 if ( absint( $form_data[ ‘id’ ] ) !== 697…Continue reading