apply_block_core_search_border_styles

函式
apply_block_core_search_border_styles ( $attributes, $property, $wrapper_styles, $button_styles, $input_styles )
引數
  • (array) $attributes The block attributes.
    Required:
  • (string) $property Border property to generate rule for e.g. width or color.
    Required:
  • (array) $wrapper_styles Current collection of wrapper styles.
    Required:
  • (array) $button_styles Current collection of button styles.
    Required:
  • (array) $input_styles Current collection of input styles.
    Required:
返回值
  • (void)
定義位置
相關方法
apply_block_core_search_border_styleget_block_core_post_featured_image_border_attributesrender_block_core_searchblock_core_gallery_renderget_block_editor_theme_styles
引入
-
棄用
-

apply_block_core_search_border_styles: 這個函式是一個鉤子,當塊編輯器渲染一個搜尋塊時被呼叫,它允許開發者將自定義的邊框樣式應用到搜尋塊上。

這為給定的邊框屬性新增CSS規則,例如寬度或顏色。它將規則注入所提供的包裝器、按鈕和輸入樣式陣列中,用於統一的"平面"邊框或那些配置了單獨邊框的邊框。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function apply_block_core_search_border_styles( $attributes, $property, &$wrapper_styles, &$button_styles, &$input_styles ) {
apply_block_core_search_border_style( $attributes, $property, null, $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_style( $attributes, $property, 'top', $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_style( $attributes, $property, 'right', $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_style( $attributes, $property, 'bottom', $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_style( $attributes, $property, 'left', $wrapper_styles, $button_styles, $input_styles );
}
function apply_block_core_search_border_styles( $attributes, $property, &$wrapper_styles, &$button_styles, &$input_styles ) { apply_block_core_search_border_style( $attributes, $property, null, $wrapper_styles, $button_styles, $input_styles ); apply_block_core_search_border_style( $attributes, $property, 'top', $wrapper_styles, $button_styles, $input_styles ); apply_block_core_search_border_style( $attributes, $property, 'right', $wrapper_styles, $button_styles, $input_styles ); apply_block_core_search_border_style( $attributes, $property, 'bottom', $wrapper_styles, $button_styles, $input_styles ); apply_block_core_search_border_style( $attributes, $property, 'left', $wrapper_styles, $button_styles, $input_styles ); }
function apply_block_core_search_border_styles( $attributes, $property, &$wrapper_styles, &$button_styles, &$input_styles ) {
	apply_block_core_search_border_style( $attributes, $property, null, $wrapper_styles, $button_styles, $input_styles );
	apply_block_core_search_border_style( $attributes, $property, 'top', $wrapper_styles, $button_styles, $input_styles );
	apply_block_core_search_border_style( $attributes, $property, 'right', $wrapper_styles, $button_styles, $input_styles );
	apply_block_core_search_border_style( $attributes, $property, 'bottom', $wrapper_styles, $button_styles, $input_styles );
	apply_block_core_search_border_style( $attributes, $property, 'left', $wrapper_styles, $button_styles, $input_styles );
}

常見問題

FAQs
檢視更多 >