classnames_for_block_core_search example

    // wp:search /-->`. Support these by defaulting an undefined label and     // buttonText to `__( 'Search' )`.     $attributes = wp_parse_args(
        $attributes,
        array(
            'label'      => __( 'Search' ),
            'buttonText' => __( 'Search' ),
        )
    );

    $input_id            = wp_unique_id( 'wp-block-search__input-' );
    $classnames          = classnames_for_block_core_search( $attributes );
    $show_label          = ( ! empty( $attributes['showLabel'] ) ) ? true : false;
    $use_icon_button     = ( ! empty( $attributes['buttonUseIcon'] ) ) ? true : false;
    $show_button         = ( ! empty( $attributes['buttonPosition'] ) && 'no-button' === $attributes['buttonPosition'] ) ? false : true;
    $button_position     = $show_button ? $attributes['buttonPosition'] : null;
    $query_params        = ( ! empty( $attributes['query'] ) ) ? $attributes['query'] : array();
    $button_behavior     = ( ! empty( $attributes['buttonBehavior'] ) ) ? $attributes['buttonBehavior'] : 'default';
    $button              = '';
    $query_params_markup = '';
    $inline_styles       = styles_for_block_core_search( $attributes );
    $color_classes       = get_color_classes_for_block_core_search( $attributes );
    $typography_classes  = get_typography_classes_for_block_core_search( $attributes );
    
Home | Imprint | This part of the site doesn't use cookies.