Coder Social home page Coder Social logo

cmb2-admin-extension's People

Contributors

jrfnl avatar pedro-mendonca avatar rmbaumer avatar scrutinizer-auto-fixer avatar sylletka avatar twoelevenjay avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmb2-admin-extension's Issues

Options 'Include a "none" option' for select field types and 'Repeatable' for all repeatable field types not working

Wordpress version: 4.8.3
CMB2 Admin Extension version: 0.1.7

Fresh wordpress install; installed and activated CMB2 plugin and CMB2 Admin Extension, downloaded from Github
Created a Meta box, with two fields. The first is a text field (text fields should be available as repeatable) and marked as repeatable. The second one is a select field with the option 'Include a "none" option' checked. The meta box is applied to to posts.
Creating a new post, I would expect that the text field was repeatable and that would be possible to select a "None" option, while the text field is not repeatable and the "None" option is not available

In the first screenshot the metabox creation; in the second one the post creation

screenshot01

screenshot02

Unnecessary options set in select fields when separating values and names by a comma

Wordpress version: 4.8.3
CMB2 Admin Extension version: 0.1.7

Fresh wordpress install; installed and activated CMB2 plugin and CMB2 Admin Extension, downloaded from Github
Created a Metabox with a select field; added select options as in the example included in the description of the field:

sml,Small
med,Medium
lrg,Large

when adding a post, in the dropdown appear unnecessary options, i.e.

0 => sml,Small
1 => med,Medium
2 => lrg,Large
sml => Small
med => Medium
lrg =>Large

while I was expecting only 3 options to appear
below the screenshots of the metabox creation form and of the post creation form, with the wrong options

screenshot01

screenshot02

Admin not showing

Even though I have activated the extension for CMB2 it is not showing.

Meta key definition

in one of my projects i used CMB2-Admin-Ext to create a gallery filed. then i wanted to extract those images in a separate single.php file, so i used this code :
$images = get_post_meta( $post->ID, '_photos', true);
the meta key _photos was foun in the database, it will be good if you add a field in CMB2-Admin-Ext to allow the admin define the meta key because actually i'm spending a lot of time searching how this plugin defines the meta key

Export Code

Not an issue per say, but a request. It would be awesome if one could export the metabox code like one can do with CPT UI. This allows for fairly rapid prototyping. Great plugin!

Travis

Hi Leon,

I noticed you were trying to get travis working. What are the tasks you would like travis to do ?

If you like I can add a script which will work & do the following:

  • lint the PHP files
  • lint and hint any JS files according to the WP standards
  • run PHPCS with the WP coding standards

If at some point you'd want to add unit tests to the repo as well, I can set that up too (but not before as it's useless running the test suite if you have no tests for the plugin).

Let me know if that would be helpful.

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.