Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Beans - Atom Snippet Plugin

This package adds support for Beans related snippets in the Atom editor.

Current snippets available:

Add Attribute

Add an attribute on any element with a markup-id.

Shortcut: beans_add_attribute

Output:

beans_add_attribute( 'markup_id', 'attribute_type', 'attribute' );

Examples:

beans_add_attribute( 'beans_primary_nav', 'class', 'tm-nav' );

This example adds the tm-nav class.

beans_remove_attribute( 'beans_header', 'data-uk-sticky' );

This example adds an empty data_uk_sticky attribute, which is used by the UIkit Sticky component.

Remove Attribute

Remove an attribute on any element with a markup-id. Can be used to remove a specific attribute value (like a class) or the attribute itself. See below for an example.

Shortcut: beans_remove_attribute

Output:

beans_remove_attribute( 'markup_id', 'attribute_type', 'attribute' );

Examples:

beans_remove_attribute( 'beans_primary_nav', 'class', 'uk-float-right' );

This example removes the uk-float-right class, while leaving the rest of the classes intact.

beans_remove_attribute( 'beans_primary_nav', 'class' );

This example removes the entire class=" " attribute, along with any assigned classes.

Original:

<nav class="tm-nav uk-float-right">

Remove attribute value:

<nav class="tm-nav">

Remove attribute:

<nav>

Replace Attribute

Replace an attribute on any element with a markup-id. Can be used to replace a specific attribute value (like a class) or the attribute itself. See below examples.

Shortcut: beans_replace_attribute

Output:

beans_replace_attribute( 'markup_id', 'attribute_type', 'old_attribute', 'new_attribute' );

Examples:

Original:

<nav class="tm-nav uk-float-right">

Replace attribute value:

beans_replace_attribute( 'beans_primary_nav', 'class', 'uk-float-right', 'uk-float-left' );
<nav class="uk-left">

Modify Action

Modify the placement of elements controlled by Beans.

Shortcut: beans-modify-action

Set Layout

Set the content / sidebar layout dynamically for a specific layout. Generally used in your page templates.

Shortcut: beans-set-layout

Load Document

Loads the Beans document. This is needed in the page templates, usually at the bottom.

Shortcut: beans-load-doc

Enqueue UIkit Components

Enqueue any of the Core or Add-on components available in UIkit.

Shortcut: beans-enqueue-uikit

Dequeue UIkit Components

Dequeue any of the Core or Add-on components that are not needed. Use the beans-show-uikit to see which components are being loaded.

Shortcut: beans-dequeue-uikit

Show Loaded UIkit Components

Outputs a list of all the UIkit components and styles that are being loaded.

Shortcut: beans-show-uikit

Add Markup

Output custom markup using any of Beans dynamic placement hooks.

Shortcut: beans-add-markup

Register Widget Area

Register a custom widget-area in WordPress.

Shortcut: beans-register-widgetarea

Output Widget Area

Output a widget-area in your theme, using any of Beans dynamic placement hooks.

Shortcut: beans-output-widgetarea

Register & Output Widget Area

Register a new widget-area and output it using any of Beans dynamic placement hooks.

Shortcut: beans-new-widgetarea

Adjust Grid

Modify Beans default layout grid (ie, the sidebars and content) width and placement.

Shortcut: beans-new-widgetarea

About

Beans snippets library for the Atom code editor.

Resources

License

Packages

No packages published