Giter Site home page Giter Site logo

cmb2-user-select's Introduction

CMB2

Gitter Travis Scrutinizer Code Quality Scrutinizer Coverage Project Stats

CMB2

Contributors: jtsternberg, webdevstudios, zao, humanmade
Homepage: https://cmb2.io
Tags: metaboxes, forms, fields, options, settings
Requires at least: 3.8.0
Requires PHP: 7.4
Tested up to: 6.4
Stable tag: 2.11.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Wordpress plugin Wordpress Wordpress rating

Complete contributors list found here: github.com/CMB2/CMB2/graphs/contributors

Description

CMB2 is a developer's toolkit for building metaboxes, custom fields, and forms for WordPress that will blow your mind. Easily manage meta for posts, terms, users, comments, or create custom option pages.

Download plugin on wordpress.org

CMB2 is a complete rewrite of Custom Metaboxes and Fields for WordPress. To get started, please follow the examples in the included example-functions.php file and have a look at the basic usage instructions.

You can see a list of available field types here.

If you are coming from the original "Custom Metaboxes and Fields for WordPress" plugin, please read this post for the CMB2 background story.

Contribution

Development occurs on Github, and all contributions welcome. Please read the CONTRIBUTING doc for more details.

A complete list of all our awesome contributors found here: github.com/CMB2/CMB2/graphs/contributors

Features:

Translation

If you are looking to provide language translation files, Please do so via WordPress Plugin Translations.

3rd Party Resources

Custom Field Types

Other Helpful Resources

Links

Installation

If installing the plugin from wordpress.org:

  1. Upload the entire /CMB2 directory to the /wp-content/plugins/ directory.
  2. Activate CMB2 through the 'Plugins' menu in WordPress.
  3. Copy (and rename if desired) example-functions.php into to your theme or plugin's directory.
  4. Edit to only include the fields you need and rename the functions.
  5. Profit.

If including the library in your plugin or theme:

  1. Place the CMB2 directory inside of your theme or plugin.
  2. Copy (and rename if desired) example-functions.php into a folder above the CMB2 directory OR copy the entirety of its contents to your theme's functions.php file.
  3. Edit to only include the fields you need and rename the functions (CMB2 directory should be left unedited in order to easily update the library).
  4. Profit.

View CHANGELOG

Known Issues

  • Not all fields work well in a repeatable group.

cmb2-user-select's People

Contributors

anhskohbo avatar gisleburt avatar jtsternberg avatar tw2113 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmb2-user-select's Issues

Bidirectionality

Could this work bidirectionally?

Ie - if a metabox field on a "Company" taxonomy term shows Users for selection, could this also set on the User meta, as well as the term meta?

Example:

  • Term Microsoft -> User Bill Gates
  • User Bill Gates -> Term Microsoft

What is saved and how to access it

Hi

I'm noticing nothing is saved in custom fields?

I'm assuming we're saving the user ID?

If so, how can I access the ID for front-end use sine the custom field appear to be empty.

Thanks

Readme file

Hey,

I guess the readme file have some issues. I think it should looks like this:

$cmb_term->add_field( array(
        'name'  => 'Author',
        'id'    => 'author',
        'desc'  => 'Type the name of the author and select from the options',
        'type'  => 'user_select_text',
        'options' => array(
            'minimum_user_level' => 0, // Enable search for all user levels.. use with caution.
        ),
 ) );

Before wp installation cmb2-user-select error

Fatal error: Uncaught Error: Call to undefined function add_action() in /www/dev.litvurisacxobi.ge/public/mu-plugins/cmb2-user-select/cmb2-user-select.php:106 Stack trace: #0 /www/dev.litvurisacxobi.ge/public/mu-plugins/cmb2-user-select/cmb2-user-select.php(158): WDS_CMB2_User_Select_023->__construct() #1 /www/dev.litvurisacxobi.ge/vendor/composer/autoload_real.php(66): require('/www/dev.litvur...') #2 /www/dev.litvurisacxobi.ge/vendor/composer/autoload_real.php(56): composerRequired8019e99ec0fd9f51454d9a247f6a507('90c7ecedda3d4ff...', '/www/dev.litvur...') #3 /www/dev.litvurisacxobi.ge/vendor/autoload.php(7): ComposerAutoloaderInitd8019e99ec0fd9f51454d9a247f6a507::getLoader() #4 /www/dev.litvurisacxobi.ge/public/wp-config.php(26): require('/www/dev.litvur...') #5 /www/dev.litvurisacxobi.ge/public/wordpress/wp-load.php(42): require_once('/www/dev.litvur...') #6 /www/dev.litvurisacxobi.ge/public/wordpress/wp-blog-header.php(13): require_once('/www/dev.litvur...') #7 /www/dev.litvurisacxobi.ge/public/index.php(37): require( in /www/dev.litvurisacxobi.ge/public/mu-plugins/cmb2-user-select/cmb2-user-select.php on line 106

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.