Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bricks-hooks

БесплатноБез исполняемых скриптовНе проверен

Use filters and actions available in Bricks Builder for customization.

wpgauravот wpgaurav★ 24 звезды на GitHub

Об этом скилле

Bricks Hooks Skill

This skill covers all filters and actions available in Bricks Builder for customization.

Filter Reference

Element Filters

// Modify any element's controls
add_filter( 'bricks/elements/{element_name}/controls', function( $controls ) {
    // Add, modify, or remove controls
    $controls['myNewControl'] = [
        'tab'   => 'content',
        'label' => 'My Control',
        'type'  => 'text',
    ];
    return $controls;
}, 10, 1 );

// Modify element control groups
add_filter( 'bricks/elements/{element_name}/control_groups', function( $groups ) {
    $groups['myGroup'] = [
        'title' => 'My Group',
        'tab'   => 'content',
    ];
    return $groups;
}, 10, 1 );

// Modify element scripts
add_filter( 'bricks/elements/{element_name}/scripts', function( $scripts ) {
    $scripts[] = 'myCustomScript';
    return $scripts;
}, 10, 1 );

// Filter registered elements
add_filter( 'bricks/builder/elements', function( $element_names ) {
    // Add custom element
    $element_names[] = 'my-custom-element';

    // Remove element
    $key = array_search( 'testimonials', $element_names );
    if ( $key !== false ) {
        unset( $element_names[ $key ] );
    }

    return $element_names;
}, 10, 1 );

// Modify rendered element HTML
add_filter( 'bricks/frontend/render_element', function( $html, $element_instance ) {
    if ( $element_instance->name === 'button' ) {
        // Wrap button in custom container
        $html = '<div class="button-wrapper">' . $html . '</div>';
    }
    return $html;
}, 10, 2 );

// Modify element render attributes
add_filter( 'bricks/element/render_attributes', function( $attributes, $key, $element ) {
    if ( $key === '_root' && $element->name === 'image' ) {
        $attributes['class'][] = 'my-image-class';
    }
    return $attributes;
}, 10, 3 );

Frontend Rendering Filters

// Modify render data output
add_filter( 'bricks/frontend/render_data', function( $content, $post, $area ) {
    // $area: 'header', 'content', 'footer'
    return $content;
}, 10, 3 );

// Disable SEO meta tags
add_filter( 'bricks/frontend/disable_seo', function( $disable ) {
    return true; // Disable Bricks SEO
}, 10, 1 );

// Disable Open Graph tags
add_filter( 'bricks/frontend/disable_opengraph', function( $disable ) {
    return true;
}, 10, 1 );

// Modify header attributes
add_filter( 'bricks/header/attributes', function( $attributes ) {
    $attributes['data-custom'] = 'value';
    return $attributes;
}, 10, 1 );

// Modify content attributes
add_filter( 'bricks/content/attributes', function( $attributes ) {
    return $attributes;
}, 10, 1 );

// Modify content tag
add_filter( 'bricks/content/tag', function( $tag ) {
    return 'main'; // Change from default 'div'
}, 10, 1 );

// Add HTML after content begins
add_filter( 'bricks/content/html_after_begin', function( $html, $data, $attrs, $tag ) {
    return '<div class="content-inner">';
}, 10, 4 );

// Add HTML before content ends
add_filter( 'bricks/content/html_before_end', function( $html, $data, $attrs, $tag ) {
    return '</div><!-- .content-inner -->';
}, 10, 4 );

// Modify header output
add_filter( 'bricks/render_header', function( $html ) {
    return $html;
}, 10, 1 );

// Modify footer output
add_filter( 'bricks/render_footer', function( $html ) {
    return $html;
}, 10, 1 );

// Modify loop output
add_filter( 'bricks/frontend/render_loop', function( $output, $element, $element_instance ) {
    return $output;
}, 10, 3 );

Query Filters

// Modify posts query args
add_filter( 'bricks/posts/query_vars', function( $query_vars, $settings, $element_id ) {
    // Modify query vars
    $query_vars['posts_per_page'] = 12;
    return $query_vars;
}, 10, 3 );

// Modify terms query args
add_filter( 'bricks/terms/query_vars', function( $query_vars, $settings, $element_id ) {
    $query_vars['hide_empty'] = false;
    return $query_vars;
}, 10, 3 );

// Modify users query args
add_filter( 'bricks/users/query_vars', function( $query_vars, $settings, $element_id ) {
    return $query_vars;
}, 10, 3 );

Dynamic Data Filters

// Register custom dynamic data providers
add_filter( 'bricks/dynamic_data/register_providers', function( $providers ) {
    $providers[] = 'my_custom_provider';
    return $providers;
}, 10, 1 );

Template Filters

// Modify templates API data
add_filter( 'bricks/api/get_templates_data', function( $templates_data ) {
    return $templates_data;
}, 10, 1 );

// Filter template access
add_filter( 'bricks/get_templates', function( $templates, $args ) {
    // $args contains 'site', 'licenseKey', 'password'
    return $templates;
}, 10, 2 );

Theme Styles Filters

// Modify theme styles
add_filter( 'bricks/theme_styles', function( $styles ) {
    return $styles;
}, 10, 1 );

// Modify theme style controls
add_filter( 'bricks/theme_styles/controls', function( $controls ) {
    return $controls;
}, 10, 1 );

// M
Полный SKILL.md на GitHub

Установить bricks-hooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл bricks-hooks?

Use filters and actions available in Bricks Builder for customization.

Как установить скилл bricks-hooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bricks-hooks запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bricks-hooks с