PHPackages                             getolympus/olympus-imageselect-control - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. getolympus/olympus-imageselect-control

ActiveOlympus-control[Framework](/categories/framework)

getolympus/olympus-imageselect-control
======================================

Radio / Checkbox control with image, this component is a part of the Olympus Zeus Core framework.

v0.0.2(6y ago)05MITPHP

Since Aug 14Pushed 6y ago1 watchersCompare

[ Source](https://github.com/GetOlympus/olympus-imageselect-control)[ Packagist](https://packagist.org/packages/getolympus/olympus-imageselect-control)[ Docs](https://github.com/GetOlympus/olympus-imageselect-control)[ RSS](/packages/getolympus-olympus-imageselect-control/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

 [![](https://camo.githubusercontent.com/600aa79796eda11c555412f2b32ed111af0c966904747c09eafdce281a24643f/68747470733a2f2f696d672e69636f6e73382e636f6d2f6e6f6c616e2f32782f636865636b6c6973742e706e67)](https://camo.githubusercontent.com/600aa79796eda11c555412f2b32ed111af0c966904747c09eafdce281a24643f/68747470733a2f2f696d672e69636f6e73382e636f6d2f6e6f6c616e2f32782f636865636b6c6973742e706e67)

Image Select Control
====================

[](#image-select-control)

> This component is a part of the [**Olympus Zeus Core**](https://github.com/GetOlympus/Zeus-Core) **WordPress** framework.

[![Olympus Component](https://camo.githubusercontent.com/f483886a465a9e44005a352c6c1ba6556689a579ecf0d8b984cf60becaaa878c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f666f722d4f6c796d7075732d3434636331312e7376673f7374796c653d666c61742d737175617265)](https://github.com/GetOlympus)[![CodeFactor Grade](https://camo.githubusercontent.com/bbda6065ec201401c195101177c3c4d4feb007cf03898f3db5800a9fde5229c9/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f4765744f6c796d7075732f6f6c796d7075732d696d61676573656c6563742d636f6e74726f6c2f62616467653f7374796c653d666c61742d737175617265)](https://www.codefactor.io/repository/github/getolympus/olympus-imageselect-control)[![Packagist Version](https://camo.githubusercontent.com/46925382b0770d1c34a761f155ff6d0998528eea3bf2a4fb867c3d1ac8bb8b97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765746f6c796d7075732f6f6c796d7075732d696d61676573656c6563742d636f6e74726f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/getolympus/olympus-imageselect-control)

Installation
------------

[](#installation)

Using `composer` in your PHP project:

```
composer require getolympus/olympus-imageselect-control
```

Control initialization
----------------------

[](#control-initialization)

Use the following lines to add a `image select control` in your **WordPress** customizer:

```
$wp_customize->add_setting('my_imageselect_control_id',[
    'default'           => 'dave',
    'transport'         => 'refresh',
    'sanitize_callback' => 'custom_text_sanitization'
]);

$wp_customize->add_control(new ImageSelect($wp_customize, 'my_imageselect_control_id', [
    'label'       => 'Select a Minion that you may know',
    'description' => 'A very important question! Pay attention to it ;)',
    'column'      => 2,
    'multiple'    => false,
    'section'     => 'my_custom_controls_section',
    'choices'     => [
        'kevin' => [
            'label' => 'Kevin',
            'image' => 'https://vignette.wikia.nocookie.net/despicableme/images/1/1d/Kevin_minions.png/revision/latest/scale-to-width-down/350?cb=20170703052012',
        ],
        'mel'   => [
            'label' => 'Mel',
            'image' => 'https://vignette.wikia.nocookie.net/despicableme/images/2/2e/Mel_Minion_01.png/revision/latest/scale-to-width-down/350?cb=20160717135212',
        ],
        'dave'  => [
            'label' => 'Dave',
            'image' => 'https://vignette.wikia.nocookie.net/despicableme/images/7/71/Daveholdingcupcake.png/revision/latest/scale-to-width-down/350?cb=20130717145735',
        ],
        'bob'   => [
            'label' => 'Bob',
            'image' => 'https://vignette.wikia.nocookie.net/despicableme/images/c/ca/Bob-from-the-minions-movie.jpg/revision/latest/scale-to-width-down/350?cb=20151224154354',
        ],
    ],
]));
```

How-to
------

[](#how-to)

### Variables definition

[](#variables-definition)

The variables definition depends on `multiple` value:

- set to `false`, a uniq string value is stored in Database
- set to `true`, an array of key values is stored in Database

### Usages

[](#usages)

`add_control($id, $args);`

### Parameters

[](#parameters)

VariableTypeDefault value if not setDescription`$id`String*empty* (required)The id of the Setting associated with this Control.`$args`Array*empty* (required)An associative array containing arguments for the setting.### `$args` arguments

[](#args-arguments)

VariableTypeDefault value if not setDescription`label`String*empty* (optional)The label that will be displayed.`description`String*empty* (optional)The description to display under the label.`column`Integer`1` (optional)The number of columns to display on each line (can be 1 or 2)`multiple`Boolean`false` (optional)The setting to let user select one or multiple choices.`section`String*empty* (required)The Section where there control should appear.`choices`Array*empty* (required)The list of choices with uniq keys.The `choices` argument is an associative array containing a list of keys.
Each key is associated to an array, composed by:

- `label` (required). Name of the choice
- `image` (required). URL of the image

Release History
---------------

[](#release-history)

- 0.0.2

- ADD: new column and multiple attributes

- 0.0.1

- **INITIAL RELEASE**

Authors and Copyright
---------------------

[](#authors-and-copyright)

Achraf Chouk
[![@crewstyle](https://camo.githubusercontent.com/f5db159b5203a33a8ee9624bf05cf82507678279ab4487846494f56e971ffc10/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f637265777374796c652d626c75652e7376673f7374796c653d736f6369616c266c6f676f3d74776974746572)](http://twitter.com/crewstyle)

Please, read [LICENSE](https://github.com/GetOlympus/olympus-imageselect-control/blob/master/LICENSE) for more information.
[![MIT](https://camo.githubusercontent.com/68035de4b7f69ada20e98e34172f47d361b83a017c8045200fc338660c467897/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49545f4c6963656e73652d626c75652e7376673f7374796c653d666c61742d737175617265)](http://opensource.org/licenses/MIT)

Contributing
------------

[](#contributing)

1. Fork it ()
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

---

**Built with ♥ by [Achraf Chouk](http://github.com/crewstyle "Achraf Chouk") ~ (c) since a long time.**

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

2

Last Release

2506d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1572149?v=4)[Achraf Chouk](/maintainers/crewstyle)[@crewstyle](https://github.com/crewstyle)

---

Top Contributors

[![crewstyle](https://avatars.githubusercontent.com/u/1572149?v=4)](https://github.com/crewstyle "crewstyle (5 commits)")

---

Tags

phpframeworkwordpressimagecontrolselectcustomizerolympus-zeus

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/getolympus-olympus-imageselect-control/health.svg)

```
[![Health](https://phpackages.com/badges/getolympus-olympus-imageselect-control/health.svg)](https://phpackages.com/packages/getolympus-olympus-imageselect-control)
```

###  Alternatives

[dingo-d/wp-pest

A package that will add WordPress integration test suite with Pest framework

13124.6k7](/packages/dingo-d-wp-pest)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
