'bootstrap', 'title' => __( 'Bootstrap', 'ee' ), ) ) ); return $welcoop_blocks; } add_filter( 'block_categories', 'ff_block_category', 10, 2); /* register blocks */ add_action('acf/init', 'my_acf_init_block_types'); function my_acf_init_block_types() { if( function_exists('acf_register_block_type') ) { acf_register_block_type(array( 'name' => 'accordion', 'title' => __('Accordéons'), 'description' => __('Un bloc accordéon par exemple pour une FAQ'), 'render_template' => 'blocks/accordion.php', 'category' => 'bootstrap', 'icon' => ' ', 'keywords' => array( 'accordéon', ), 'example' => array( 'attributes' => array( 'mode' => 'preview', 'data' => array( 'preview_image_help' => get_template_directory_uri().'/blocks/accordion.png', ) ) ) )); acf_register_block_type(array( 'name' => 'carousel', 'title' => __('Carousel'), 'description' => __(''), 'render_template' => 'blocks/carousel.php', 'category' => 'bootstrap', 'icon' => 'slides', 'keywords' => array( 'carousel', 'slideshow' ), 'example' => array( 'attributes' => array( 'mode' => 'preview', 'data' => array( 'preview_image_help' => get_template_directory_uri().'/blocks/carousel.png', ) ) ) )); acf_register_block_type(array( 'name' => 'cards', 'title' => __('Cartes'), 'description' => __(''), 'render_template' => 'blocks/cards.php', 'category' => 'bootstrap', 'icon' => ' ', 'keywords' => array( 'Cartes' ), 'example' => array( 'attributes' => array( 'mode' => 'preview', 'data' => array( 'preview_image_help' => get_template_directory_uri().'/blocks/cards.png', ) ) ) )); } } /* Idées à dev : Liste de news Liste de cards + Masonry ? Dropdown List group Modal + Custom layouts https://getbootstrap.com/docs/5.1/examples/ Pricing table Product Heroes Jumbotron... */ ?> type == 'checkbox' ) { $classes .= ' form-check'; } return $classes; } add_filter( 'gform_field_choice_markup_pre_render', 'my_field_choices', 10, 4 ); function my_field_choices($choice_markup, $choice, $field, $value){ $choice_markup = str_replace( 'get_input_type() == 'checkbox') : $choice_markup = str_replace( 'gchoice_', 'form-check gchoice_', $choice_markup ); elseif( $field->get_input_type() == 'radio') : $choice_markup = str_replace( 'gchoice_', 'form-check gchoice_', $choice_markup ); endif; return $choice_markup; } /* function input_to_button( $button, $form ) { $dom = new DOMDocument(); $dom->loadHTML( $button ); $input = $dom->getElementsByTagName( 'input' )->item(0); $new_button = $dom->createElement( 'button' ); $new_button_text = $dom->createElement( 'span' ); $new_button_text->appendChild( $dom->createTextNode( $input->getAttribute( 'value' ) ) ); $new_button->appendChild( $new_button_text ); $input->removeAttribute( 'value' ); $classes = $input->getAttribute( 'class' ); $classes .= " btn btn-primary btn-lg"; $input->setAttribute( 'class', $classes ); foreach( $input->attributes as $attribute ) { $new_button->setAttribute( $attribute->name, $attribute->value ); } $input->parentNode->replaceChild( $new_button, $input ); return $dom->saveHtml( $new_button ); } add_filter( 'gform_next_button', 'input_to_button', 10, 2 ); add_filter( 'gform_previous_button', 'input_to_button', 10, 2 ); add_filter( 'gform_submit_button', 'input_to_button', 10, 2 ); */ endif; /* GF loader */ function spinner_url( $image_src, $form ) { return get_template_directory_uri()."/img/loading.gif"; } add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 ); /* Fix gravityforms tabindex */ function gform_tabindexer( $tab_index, $form = false ) { $starting_index = 1000; // if you need a higher tabindex, update this number if( $form ) add_filter( 'gform_tabindex_' . $form['id'], 'gform_tabindexer' ); return GFCommon::$tab_index >= $starting_index ? GFCommon::$tab_index : $starting_index; } add_filter( 'gform_tabindex', 'gform_tabindexer', 10, 2 ); /* no records in DB add_action( 'gform_after_submission_4', 'remove_form_entry' ); function remove_form_entry( $entry ) { GFAPI::delete_entry( $entry['id'] ); } */ ?>
cart->cart_contents_count, 'mixed'), $woocommerce->cart->cart_contents_count); ?>
get_id() ) !== "publish" ) return false; else return true; } /* Remove Woocommerce Select2 - Woocommerce 3.2.1+ */ function woo_dequeue_select2() { if ( class_exists( 'woocommerce' ) ) { wp_dequeue_style( 'select2' ); wp_deregister_style( 'select2' ); wp_dequeue_script( 'selectWoo'); wp_deregister_script('selectWoo'); } } add_action( 'wp_enqueue_scripts', 'woo_dequeue_select2', 100 ); /* add_action( 'woocommerce_before_main_content', 'show_category_image', 2); function show_category_image() { if ( is_product_category() ) { global $wp_query; $cat = $wp_query->get_queried_object(); $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true ); if($thumbnail_id): echo wp_get_attachment_image( $thumbnail_id, 'full', '', array( 'class' => 'img-fluid' ) ); endif; } } */ ?> class="no-js"> <? wp_title(); ?> >

array('post'), 'posts_per_page' => 4, ); $query = new WP_Query( $args ); if($query->have_posts()): ?>

have_posts()): $query->the_post(); setup_postdata($post); ?>