PHPackages                             nsrosenqvist/cmb2-switch - 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. nsrosenqvist/cmb2-switch

AbandonedArchivedWordpress-plugin

nsrosenqvist/cmb2-switch
========================

1.0.1(7y ago)153MITPHPPHP &gt;=7.0.0

Since Jun 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nsrosenqvist/cmb2-switch)[ Packagist](https://packagist.org/packages/nsrosenqvist/cmb2-switch)[ Docs](https://github.com/nsrosenqvist/cmb2-switch)[ RSS](/packages/nsrosenqvist-cmb2-switch/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

CMB2 Switch Field
=================

[](#cmb2-switch-field)

A boolean switch field type for CMB2.

```
$analytics = new_cmb2_box(array(
    'id'            => 'analytics',
    'title'         => __('Analytics', 'theme'),
));

$analytics_state = $analytics->add_field(array(
    'name' => __( 'Enable Analytics?', 'theme'),
    'id'   => 'analytics_state',
    'type'    => 'switch',
    'default' => cmb2_set_switch_default(true),
));
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~0 days

Total

2

Last Release

2883d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc4837ce5eb1f32142e8aefef1d53e10ae638fcff864e1c7c67c1e5b2b496e85?d=identicon)[nsrosenqvist](/maintainers/nsrosenqvist)

---

Top Contributors

[![nsrosenqvist](https://avatars.githubusercontent.com/u/1303475?v=4)](https://github.com/nsrosenqvist "nsrosenqvist (3 commits)")

### Embed Badge

![Health badge](/badges/nsrosenqvist-cmb2-switch/health.svg)

```
[![Health](https://phpackages.com/badges/nsrosenqvist-cmb2-switch/health.svg)](https://phpackages.com/packages/nsrosenqvist-cmb2-switch)
```

###  Alternatives

[rankmath/seo-by-rank-math

Rank Math is the most powerful way to get BEST WordPress SEO tools added to your website.

1252.0k](/packages/rankmath-seo-by-rank-math)

PHPackages © 2026

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