這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Image Styles for Core Block

描述

This plugin adds a new image styles for the Core Image block.

Read more in one page quick documentation.

Features:

  • Zero configuration
  • Easy to use.
  • 25+ image styles.
    • Triangle
    • Trapezoid
    • Parallelogram
    • Rhombus
    • Pentagon
    • Hexagon
    • Heptagon
    • Octagon
    • Nonagon
    • Decagon
    • Bevel
    • Rabbet
    • Left Arrow
    • Right Arrow
    • Left Point
    • Right Point
    • Left Chevron
    • Right Chevron
    • Star
    • Cross
    • Message
    • Close
    • Frame
    • Inset
    • Custom Polygon
    • Circle
    • Ellipse
  • Add new styles with filter.
  • Remove existing styles with filter.
  • Modify existing styles with filter.
  • Quick support

Welcome for featured requests

If you have any suggestion or any featured request then don’t hesitate to contact.

Add new image style

add_filter( 'k2cbis_get_styles', 'prefix_add_new_style' );

function prefix_add_new_style( $styles = array() ) {
    $styles[] = array(
        'name' => 'prefix-new-style',
        'label' => 'New Style',
        'inline_style' => '.wp-block-image.is-style-prefix-new-style img { clip-path: polygon(40% 10%, 30% 50%, 83%  25%); }',
    );

    return $styles;
}

Bug reports

Bug reports for “K2 Core Block Image Styles” are welcomed in our repository on GitHub. Please note that GitHub is not a support forum, and that issues that are not properly qualified as bugs will be closed.

Further reading

For more info check out the following:

常見問題

Can I use this plugin with any Gutenberg Block

Nope, For now this plugin add the styles only for the Core Image Gutenberg blocks. We may add those styles for other Gutenberg blocks in future.

Can I enable or disable any styles?

Yes. For now you can use the filter k2cbis_get_styles to add, remove or modify styles.

E.g.

add_filter( 'k2cbis_get_styles', 'prefix_add_new_style' );
function prefix_add_new_style( $styles = array() ) {
    $styles[] = array(
        'name' => 'prefix-new-style',
        'label' => 'New Style',
        'inline_style' => '.wp-block-image.is-style-prefix-new-style img { clip-path: polygon(40% 10%, 30% 50%, 83%  25%); }',
    );

    return $styles;
}

評價

There are no reviews for this plugin.

貢獻者及開發者

“Image Styles for Core Block” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Image Styles for Core Block 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0

  • Initial release.