PHPackages                             vektor-inc/vk-helpers - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. vektor-inc/vk-helpers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vektor-inc/vk-helpers
=====================

WordPress Helpers Class

0.3.0(1mo ago)026.2k—7.6%1GPL-2.0+PHP

Since Jan 27Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/vektor-inc/vk-helpers)[ Packagist](https://packagist.org/packages/vektor-inc/vk-helpers)[ RSS](/packages/vektor-inc-vk-helpers/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (6)Versions (13)Used By (1)

VK Helpers
==========

[](#vk-helpers)

```
composer require vektor-inc/vk-helpers

```

PHPUnit test

```
npm install
npm run phpunit

```

Customizer Controls
-------------------

[](#customizer-controls)

This package ships two global classes for the WordPress Customizer:

- `VK_Custom_Html_Control` — outputs a heading, sub-heading and arbitrary HTML inside a Customizer section.
- `VK_Custom_Text_Control` — text input with optional `input_before` / `input_after` strings and configurable `input_type` / `input_attrs`.

Both classes are declared inside the `customize_register` action with a `class_exists` guard, so they coexist safely with themes / plugins that ship the same class name (Lightning, Katawara, etc.).

### Example

[](#example)

```
add_action(
	'customize_register',
	function ( $wp_customize ) {
		// HTML control (heading + description).
		$wp_customize->add_setting( 'vk_demo_html', array( 'default' => '' ) );
		$wp_customize->add_control(
			new VK_Custom_Html_Control(
				$wp_customize,
				'vk_demo_html',
				array(
					'label'            => __( 'Demo Section', 'your-textdomain' ),
					'label_tag'        => 'h3',
					'custom_title_sub' => __( 'Sub heading', 'your-textdomain' ),
					'custom_html'      => 'Optional explanation HTML.',
					'section'          => 'title_tagline',
				)
			)
		);

		// Text control with number input and "px" suffix.
		$wp_customize->add_setting( 'vk_demo_width', array( 'default' => 100 ) );
		$wp_customize->add_control(
			new VK_Custom_Text_Control(
				$wp_customize,
				'vk_demo_width',
				array(
					'label'        => __( 'Width', 'your-textdomain' ),
					'section'      => 'title_tagline',
					'input_type'   => 'number',
					'input_after'  => 'px',
					'input_attrs'  => array(
						'min'  => 0,
						'max'  => 1000,
						'step' => 1,
					),
				)
			)
		);
	},
	20
);
```

### Available properties

[](#available-properties)

`VK_Custom_Html_Control`:

PropertyTypeDefaultDescription`label_tag`string`h2`Heading tag used to render `label`. Allowed: `h2` / `h3` / `h4` / `h5` / `h6`.`custom_title_sub`string`''`Sub-heading rendered as `h3.admin-custom-h3`.`custom_html`string`''`Arbitrary HTML body. Filtered through `wp_kses_post`.`VK_Custom_Text_Control`:

PropertyTypeDefaultDescription`input_before`string`''`HTML rendered before the input.`input_after`string`''`HTML rendered after the input.`input_type`string`text`HTML5 input type. Allowed: `text` / `number` / `email` / `url` / `tel` / `password` / `search`. Disallowed values fall back to `text`.`input_attrs`array`array()`Extra attributes on the `input`. Attribute names must match the HTML attribute-name token pattern (`/^[a-zA-Z_:][a-zA-Z0-9:._-]*$/`); names containing whitespace or other invalid characters are dropped. `type`, `value`, `style` and any `on*` event handlers are blocked. Boolean values become HTML5 boolean attributes (e.g. `'required' => true`).== Changelog ==

- 0.3.0 \[ Feature \] Add VK\_Custom\_Html\_Control and VK\_Custom\_Text\_Control for the Customizer (with `input_type`, `input_attrs` and `label_tag` support). Previously shipped in `vk-admin` 0.6.0 / 0.6.1 / 0.7.0; consolidated here.
- 0.2.1 \[ Bug fix \] Fix an issue where the correct post type was not retrieved on the post edit screen. \[ Bug fix \] Fix Unit Test
- 0.2.0 \[ Bug fix \] Fix color modifi
- 0.1.0 \[ Other \] Add VK\_Helpers alias
- 0.0.5 \[ Bug fix \] Cope with PHP8.2
- 0.0.4 \[ Bug fix \] Cope with PHP8.1

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance91

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.6% 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 ~225 days

Recently: every ~295 days

Total

8

Last Release

42d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23022129?v=4)[Vektor,Inc.](/maintainers/vektor-inc)[@vektor-inc](https://github.com/vektor-inc)

---

Top Contributors

[![kurudrive](https://avatars.githubusercontent.com/u/3272660?v=4)](https://github.com/kurudrive "kurudrive (40 commits)")[![mtdkei](https://avatars.githubusercontent.com/u/21466284?v=4)](https://github.com/mtdkei "mtdkei (1 commits)")

### Embed Badge

![Health badge](/badges/vektor-inc-vk-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/vektor-inc-vk-helpers/health.svg)](https://phpackages.com/packages/vektor-inc-vk-helpers)
```

PHPackages © 2026

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