WP Manifestindependent plugin directory
manifest / content / cmb2-image-select-field-type

CMB2 Image Select Field Type WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Image Select field type for CMB2. Adds Visual Interest to your fields by using images.

★ 3stars
1.0.5latest · 8 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/monecchi/cmb2-image-select-field-type/archive/refs/heads/master.zip
Updates itself. It ships its own updater, so new versions appear under Dashboard → Updates.

Enables a custom image_select field type for CMB2.

It acts pretty much the same as a radio input, prettier though, by adding Visual Interest using images instead.

What you're getting: An alternate version of CMB2-Image_Select-Field-Type by improy. It was re-built as a WordPress plugin so you can easily install it & keep it updated.

Installation & Updates

In order to get automatic plugin updates, please follow the WordPress Manual Plugin Installation guide.

This means you'd simply need to download the plugin from Github as a .zip file and install it the WordPress way.

Usage

  • Requires CMB2 to be installed as a standalone plugin or integrated in a theme or plugin.

image_select as a field type.

array(  
    'name' => __('Image Select', 'cmb2'),
    'desc' => __('page layout using image_select', 'cmb2'),
    'id'      => $prefix . 'page_custom_layout',
    'type' => 'image_select',
    'options' => array(
        'disabled' => array('title' => 'Full Width', 'alt' => 'Full Width', 'img' => $image_path . 'img/sidebar-disabled.gif'),
        'sidebar-left' => array('title' => 'Sidebar Left', 'alt' => 'Sidebar Left', 'img' => $image_path . 'img/sidebar-left.gif'),
        'sidebar-right' => array('title' => 'Sidebar Right', 'alt' => 'Sidebar Right', 'img' => $image_path . 'img/sidebar-right.gif'),
        'sidebar-leftright' => array('title' => 'Both Sidebars', 'alt' => 'Both Sidebars', 'img' => $image_path . 'img/sidebar-both.gif'),
    ),
    'default' => 'disabled',    
)

Integrations

Ready to be integrated within any Theme or Plugin. Install it as an ordinary WordPress plugin or include it within your theme's or plugin's code by requiring it as follows.

    // Check for the plugin's class
    if(!( class_exists( 'PR_CMB2_Image_Select_Field' ) ) ) {
        require_once( $plugin_or_theme_path . 'cmb2-image-select-field-type.php' );
    }
}

By choosing this method, it requires you to manually keep the plugin files up to date as you'd no longer get automatic updates.

CMB2 Image_Select Field Type

Tutorial on how to integrate image_select field on a WordPress theme

Original Method - No need to follow it up if you're using it as a standalone plugin. http://www.proy.info/how-to-create-cmb2-image-select-field-type/

Releases

5 releases.

Tag
Published
1.0.5 latest
Jan 21, 2018 8 years ago
Jan 21, 2018 8 years ago
Jan 21, 2018 8 years ago
Jan 21, 2018 8 years ago
Jan 19, 2018 8 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

CMB2 Image Select Field Type 1.0.5 · audited by WP Registry

No security issues found.

Audited release
1.0.5
Findings
none
Worst severity
—
Content hash
ee2c3f1eb251b84db3340627…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.