PHPackages                             quyle91/wp-database-helper - 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. quyle91/wp-database-helper

ActiveLibrary

quyle91/wp-database-helper
==========================

1.0.0(1y ago)0138PHP

Since Oct 10Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/quyle91/wp-database-helper)[ Packagist](https://packagist.org/packages/quyle91/wp-database-helper)[ RSS](/packages/quyle91-wp-database-helper/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

WP MetaField
============

[](#wp-metafield)

**WordPress Meta Field UI** for managing custom meta fields easily.

Introduction
------------

[](#introduction)

The WpDatabaseHelper library provides an easy way to create and manage meta fields in WordPress. This library is designed to help developers enhance their WordPress plugins by adding custom meta fields efficiently.

License
-------

[](#license)

This project is licensed under the GPL (General Public License).

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

[](#installation)

You can install the library via Composer. Run the following command in your terminal:

Release new stable version
--------------------------

[](#release-new-stable-version)

```
composer show quyle91/wp-database-helper --all
composer remove quyle91/wp-database-helper
composer require quyle91/wp-database-helper:dev-main
composer update quyle91/wp-database-helper --prefer-source --no-cache
```

Usage to create a field
-----------------------

[](#usage-to-create-a-field)

```
$args = [
    'field' => 'input', // input, select, textarea, tab_nav, tab, tab_end, repeater, settings
    'label' => 'XXx label',
    'value' => 100, // default value if not set

    'attribute' => [
        'meta_key' => 'xxx_meta_key',
        'type' => 'text', // wp_media, wp_editor, date, time, ...
        'placeholder' => 'xxx',
        'class' => '' // no_select2 for skip select2
    ],
    // 'options' => [1=>"1", 2=>"2"] // for select
    // 'options' => [ '' => "No", '1' => "Yes", ], // input:radio
    // 'post_select' => [ 'post_type' => 'product', ], // only for field: select
    // 'term_select' => [ 'taxonomy' => 'product_cat', ], // only for field: select
    // 'user_select' => ['role__in' => ['any']], // only for field: select
];
$a = \WpDatabaseHelper\Init::WpField();
$a->setup_args($args);
echo $a->init_field();
```

Usage to create a repeater
--------------------------

[](#usage-to-create-a-repeater)

```
$a = \WpDatabaseHelper\Init::WpRepeater();
$a->current = [['key' => '', 'value' => '',],]; // @see: \vendor\quyle91\wp-database-helper\src\WpRepeater.php
$a->prefix = 'prefix'; // also field name
$a->field_configs = [
    '[key]' => [
        'field' => 'select',
        'options' => [
            'xxx' => 'XXX label',
            'yyy' => 'YYY label',
        ]
    ],
    '[value]' => [
        'field' => 'input',
        'attribute' => [
            'placeholder' => 'value',
        ],
    ],
];
echo $a->init_repeater();
```

Usage to register meta fields and metabox
-----------------------------------------

[](#usage-to-register-meta-fields-and-metabox)

```
$args = [
    'post_type' => 'page',
    'metabox_label' => 'Page Metabox',
    'meta_fields' => [
        // input
        [
            'field' => 'input',
            'meta_key' => 'xxx1',
            'before' => '', // 100% width
            'label' => 'checkbox 1',
            'attribute' => [
                'type' => 'checkbox', // text, tel, number, color, wp_media...
            ],
            // 'admin_column' => false
        ],
        // textarea
        [
            'field' => 'textarea',
            'meta_key' => 'xxx2',
            'label' => 'Textarea',
            'attribute' => [
                'type' => '', // wp_editor
            ]
        ],
        // select
        [
            'field' => 'select',
            'meta_key' => 'xxx3',
            'label' => 'Select dropdown',
            'options' => [
                1 => 1,
                2 => 2,
                3 => 3,
            ],
        ],
        // tabs
        [
            'field' => 'tab_nav',
            'labels' => ['en_US', 'nl_BE', 'de_DE'],
            'attribute' => [
                'tab_group' => 'tab_group_1',
            ],
        ],
        [
            'field' => 'tab',
            'label' => 'en_US',
            'attribute' => [
                'tab_group' => 'tab_group_1',
            ],
        ],
        // fields inside tab here
        [
            'field' => 'tab_end',
        ],
        // repeater
        [
            'meta_key' => 'prefix',
            'label' => 'XXx Repeater',
            'field' => 'repeater',
            'default' => [
                [
                    'key' => '',
                    'value' => '',
                ],
            ],
            'field_configs' => [
                '[key]' => [
                    'field' => 'select',
                    'options' => [
                        'xxx' => 'XXX label',
                        'yyy' => 'YYY label',
                    ]
                ],
                '[value]' => [
                    'field' => 'input',
                    'attribute' => [
                        'placeholder' => 'value',
                    ],
                ],
            ]
        ],
    ],
    'register_post_meta' => false, // true: register post meta and show in rest
    'admin_post_columns' => true,
    'admin_post_metabox' => true,
    'quick_edit_post' => true,
];

$meta = \WpDatabaseHelper\Init::WpMeta();
$meta->init($args);
$meta->init_meta();
```

Usage to post type admin columns
--------------------------------

[](#usage-to-post-type-admin-columns)

```
$args = [
    'post_type' => 'post',
    'metabox_label' => 'text',
    'meta_fields' => [
        [
            'meta_key' => 'zzz',
            'field' => 'input',
            'label' => 'ZZZ label',
            'attribute' => [
                'type' => 'text',
            ],
        ],
    ],
    'admin_post_columns' => true,
];
$meta = \WpDatabaseHelper\Init::WpMeta();
$meta->init($args);
$meta->init_admin_columns();
$meta->init_metabox();
// $meta->init_meta();
```

Usage to term taxonomy admin columns
------------------------------------

[](#usage-to-term-taxonomy-admin-columns)

```
$args = [
    'taxonomy' => 'category',
    'metabox_label' => 'text',
    'taxonomy_meta_fields' => [
        [
            'meta_key' => 'xxx',
            'field' => 'input',
            'label' => 'XXX label',
            'attribute' => [
                'type' => 'text',
            ],
        ],
    ],
    'taxonomy_admin_columns' => true,
    'taxonomy_metabox' => true,
];
$meta = \WpDatabaseHelper\Init::WpMeta();
$meta->init($args);
$meta->init_meta_term_taxonomy();
```

Usage to register table
-----------------------

[](#usage-to-register-table)

```
$args = [
    'table_name' => 'table_name',
    'menu_title' => 'table name',
    'fields' => [
        'id INT(11) NOT NULL AUTO_INCREMENT,',
        'post_id INT(11) NOT NULL,',
        'column1 INT(11) NOT NULL,',
        'column2 VARCHAR(255) NOT NULL,',
        'created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,',
        'updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,',
        'PRIMARY KEY (id)',
    ],
];
$table = \WpDatabaseHelper\Init::WpDatabase();
$table->init_table($args);
```

Author
------

[](#author)

Name: quyle91 Email:

###  Health Score

30

—

LowBetter than 67% of packages

Maintenance56

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

528d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0588aa28d679fdf371ade4833edcf0714da98809ea4daf59ce539b509a7ae075?d=identicon)[quyle91](/maintainers/quyle91)

---

Top Contributors

[![quyle91](https://avatars.githubusercontent.com/u/11264710?v=4)](https://github.com/quyle91 "quyle91 (139 commits)")

### Embed Badge

![Health badge](/badges/quyle91-wp-database-helper/health.svg)

```
[![Health](https://phpackages.com/badges/quyle91-wp-database-helper/health.svg)](https://phpackages.com/packages/quyle91-wp-database-helper)
```

PHPackages © 2026

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