跳到内容

Nmwdhj

v1.3.4

Nashwan D · 2013年6月25日 上架

Nmwdhj is an API for creating forms elements via code.

正在使用
10 以下
评分
5.0 / 5
累计下载
3,022
最近更新
2015年11月29日
2 条评价需要 WordPress 3.1+已测试到 4.0.38

贡献者

Important Notes:

  1. This plugin requires at least PHP 5.3.x .
  2. This plugin is for developers, not general users.

Nmwdhj is an API for creating, editing and rendering forms programmatically. This plugin doesn’t have a GUI, It’s only a helper library for the PHP & WP developers.

You can use this plugin to create individual form elements in the meta boxes, front-end, or anything else you might want a form for.

Basic Examples

You can use this plugin in many ways depending on your needs, this examples only for learning purposes:

  • Simple WordPress Search Form:

    Nmwdhj\create_element( array( ‘type’ => ‘form’, ‘atts’ => array( ‘method’ => ‘GET’, ‘role’ => ‘search’, ‘action’ => home_url( ‘/’ ), ), ‘elements’ => array( ‘search’ => array( ‘name’ => ‘s’, ‘type’ => ‘input_search’, ‘value’ => get_search_query(), ‘atts’ => array( ‘placeholder’ => _x( ‘Search this site…’, ‘placeholder’ ), ‘class’ => ‘search-text’, ‘required’ => true, ), ), ‘submit’ => array( ‘type’ => ‘input_submit’, ‘value’ => __( ‘Search’ ), ), ), ) )->output();

  • Simple Login Form:

    Nmwdhj\create_element( array( ‘type’ => ‘form’, ‘atts’ => array( ‘method’ => ‘POST’, ), ) ) ->add( array( ‘name’ => ‘user_name’, ‘type’ => ‘input_text’, ‘label’ => __( ‘User Name’ ), ) ) ->add( array( ‘name’ => ‘user_pass’, ‘type’ => ‘input_password’, ‘label’ => __( ‘Password’ ), ) ) ->add( array( ‘name’ => ‘user_submit’, ‘type’ => ‘input_submit’, ‘value’ => __( ‘Submit’ ), ) ) ->output();

Contributing

Developers can contribute to the source code on the Nmwdhj GitHub Repository.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums