/** * Customize email field properties. * * @link https://wpforms.com/developers/how-to-change-sublabels-for-the-email-field/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_email_field_properties( $properties, $field, $form_data ) { // Change the text for the sublabel $properties[ ‘inputs’ ][ ‘primary’ ][ ‘sublabel’ ][ ‘value’…Continue reading
/** * Customize Stripe credit card field properties. * * @link https://wpforms.com/developers/how-to-change-sublabels-for-the-credit-card-field * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_creditcard_field_properties( $properties, $field, $form_data ) { // Change sub-label text on the Card Number field $properties[ ‘inputs’ ][ ‘number’…Continue reading
/** * Shortcode that displays the number of completed entries for a form. * * Usage: [wpforms_entry_total form_id=”X”] – X is the form ID. * * @link https://wpforms.com/developers/display-entry-submissions-count-for-a-specific-form/ */ function wpf_dev_form_entry_total( $atts ) { $args = shortcode_atts( array( ‘form_id’ =>…Continue reading
function wpb_list_child_pages() { global $post; // Only get child pages of the current page $args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => -1, // get all child pages ‘post_parent’ => $post->ID, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’ ); $child_pages =…Continue reading
/* Plugin Name: Purge Cache Description: Adds a button to the WordPress dashboard to clear the object cache */ add_action( ‘admin_bar_menu’, ‘add_purge_cache_button’, 999 ); function add_purge_cache_button( $wp_admin_bar ) { if ( ! current_user_can( ‘manage_options’ ) ) { return; } $args…Continue reading
/** * Disable the email address suggestion. * * @link https://wpforms.com/developers/how-to-disable-the-email-suggestion-on-the-email-form-field/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ add_filter( ‘wpforms_mailcheck_enabled’, ‘__return_false’ );Continue reading
/** * WPForms Add new address field scheme (Canada) * * @link https://wpforms.com/developers/create-additional-schemes-for-the-address-field/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_new_address_scheme( $schemes ) { $schemes[ ‘canada’ ] = array( ‘label’ => ‘Canada’, ‘address1_label’ => ‘Address Line 1’, ‘address2_label’…Continue reading
add_action( ‘woocommerce_product_options_advanced’, ‘add_is_hidden_for_anonymous_field’ ); function add_is_hidden_for_anonymous_field() { $args = array( ‘id’ => ‘is_hidden_for_anonymous’, ‘label’ => ‘Hide products for non-authorize users’, ); woocommerce_wp_checkbox( $args ); } add_action( ‘woocommerce_process_product_meta’, ‘save_is_hidden_for_anonymous_field’ ); function save_is_hidden_for_anonymous_field( $post_id ) { $product = wc_get_product( $post_id ); $value…Continue reading
// Función que maneja la petición AJAX function load_shortcode_content() { $mapa_id = $_REQUEST[‘mapa_id’]; echo do_shortcode(‘[display-frm-data id=96 filter=limited mapa_id=”‘ . $mapa_id . ‘”]’); wp_die(); } add_action(‘wp_ajax_load_shortcode_content’, ‘load_shortcode_content’); // Si el usuario está logueado add_action(‘wp_ajax_nopriv_load_shortcode_content’, ‘load_shortcode_content’); // Si el usuario no está…Continue reading