Giter Site home page Giter Site logo

bonny / wordpress-simple-fields Goto Github PK

View Code? Open in Web Editor NEW
88.0 88.0 23.0 1.72 MB

WordPress plugin that extend Custom Fields to include textareas, WYSIWYG-editor, files, attachments, well basically anything

Home Page: http://wordpress.org/extend/plugins/simple-fields/

Shell 0.20% PHP 67.88% JavaScript 26.25% CSS 5.65% HTML 0.03%

wordpress-simple-fields's Introduction

wordpress-simple-fields's People

Contributors

boberober avatar bonny avatar itspluxstahre avatar jimmyrosen avatar samface avatar studioanino avatar tersmitten avatar

Stargazers

 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress-simple-fields's Issues

New filed type: divider

Not really a field type, but something you can select to have a space or divider between your fields. Useful if you have a long list of fields.

Disable editing of "code-added" fields

In the admin you can edit fields that are added in PHP with the simple_fields_register_field_group(), but when the page is loaded again the values are overwritten. That is fine and correct I think, but it can be confusing for a user. Solution: disable the fields that are added this way.

Support for adding simplefields via code

Hi! Thanks for this awesome plugin, this stuff really saves the day!

I was wondering about a possibile feature, which could lead to an even easier approach to "custom fields for post" problem.

Actually to add simplefields and fields group you need to do that via the admin interface, editing the database. Could it be that to add them you could use a "simple" line of code, as for adding custom posts or custom taxonomies? This would be absolutly marvellous!

Just for example:

add_simple_field_group(string $group_name, string $post_type)
add_simple_field(string $group_name, mixed $field_type, string $field_name, ...)

Feature request: The ability to connect field groups to templates

Today post connectors only supports connecting to post types. It would be really neat if you could connect to theme templates as well. Then one would get the field groups to show on the edit page by simply selecting the associated template in the page attribute metabox.

Add support for field slugs

Add an option to give each field a slug, so we more easily can fetch a specific field. Currently there are to many numbers involved in getting values.

Set default values

It should be possible to set defaults to fields in the GUI. Don't you think?

Also, a little checkbox for "pre-filled" values, so that when the user clicks "add" they get a pre-filled field. Neat, huh? :)

Add support for gettings fields by slug

How to make this as easy as possible, especially new users:

# Get one value
$value = simple_fields_get_value("key");

# Get one value, from a specific post
$value = simple_fields_get_value("key", $post_id);

# Get an array on values (if field group is repeatable)
$values = simple_fields_get_values("key");

# Get an array on values, from a specific post
$values = simple_fields_get_values("key", $post_id);

Validation on text, textareas, file

Add option to require a field to be filled in, and for it to be fileld in according to a regexp or similar.
Useful when a field must be a) simply empty or b) contain a link/email/image.

WPML Support

It would be sweet and awesome to be able to use multiple languages in the GUI while setting the labels / descriptions etc.

Setting to enable debug/developer mode

Add an setting/option to enable a debug/developer mode, where you automatically see the field slugs and values from the front page and back end. To be used during development where you have to check values and slug names a lot.

Export & Import

It's annoying when you are working with a local server and then a production server, to have to manually create the fields again on the production server when you have done something locally.

I would love to have just a textbox with a JSON that I can copy and paste on the other server to add the fields that one. Would be pretty nifty.

Add shortcodes

Something like:

most basic:
[simple_fields_value slug=my_text_field]

with options:
[simple_fields_value slug=my_text_field numInset=0 post_id=341]
though: security issue with getting values from any post_id?

It's easy to do with "simple" fields like textarea, but what about the Google Map extension for example?
Option for "type of output" so different fields can have different outputs?

Add option to "tile" repeating fields

Instead of showing all field groups below each other, perhaps an option to have the field groups in a repeating field group floating left. so like 2-4 fields can fit in each row. slideshows (1 images, 1 caption) would benefit from this.

Add function to create options-pages

  • This could be as easy as creating a custom post type just for this, and then hiding most of the regular/common stuff on that page.
  • Place it lower in the admin nav

Add fields automatically to the_content

Create a smart way to make it possibly to automatically add output to a post/page, like hooking onto the_content. Could be useful for beginners to quickly get them started.

  • Add before and/or after content
  • How to do with loops? Would be awesome if you easily could create a slideshow with images + captions
  • Add options for conditions, so user can select to only output on specific pages etc.

New field type: map

Add support for Google Maps.

Show map, with a default position.

Show a marker that the user can move around.

Probably just one marker. If you want to add several, then make it repeatable, because then you can connect texts and stuff to that marker.

wpautop running on text-area

I may be an unusual case, but I find that having wpautop running on the textarea hugely annoying (line 357 in functions_post.php). I use short codes for layout in my textareas and having this run by the plugin messes this up.

I've changed this to false but that's not a great long term solution obviously..

Is there a need to have this since WP will run it on the_content anyway?

Add accordion functionality

When we have lots and lots of data the page gets incredibly cluttered. The plugin needs accordion functinality!

Also, it would be great with a show / hide all button.

Options page

I'd like the ability to make an options page. :)

Add debug to debug bar

If a user has the developer bar, perhaps show info about the fields on the page there?

Simplify the development!

What do we want?

  • Info about all fields: slugs, saved values, how to get them?
  • For all posts on page or only the main post - nah, only the main post. if a lot of pages is shown that it's just crazy.

Option to choose one post connector for a post and another one that childs will inherit

Why

If you don't want your users to have to select a specific connector, you select a default post connector for that post type, or you select that is should inherit connector from the parent post.

But what if you want all child pages to have a different post connector from the parent, but don't want users to have to select one each time they create a post.

Example 1: you have a page called "Coworkers" and then subpages with the actual coworkers. Each coworker have a title, an image, an email address, and a presentation. None of those fields you want to have on the page coworkers. But you must have a post connector set on the coworker parent page for each sub page to have a default connector.

Example 2: [insert example 2 here!]

That's what this fixes.

Works like this

  • Post connector gets a new option: post connector for child pages
  • Used when child is set to use inherited post connector
  • Child post with inherited post connector then use another connector

Questions

  • What happens if the connector that gets selected also has a child connector? What's valid then?

Add "add" link to bottom of repeatable fields too

On field groups with many selected things you click "add" add then the new group is added at top, but if you want it at bottom you have to drag it = cumbersome and boring.

However: don't show if zero fields added. Only show when 1 or serverail fields are added. With just 1 field added it can also look strange.

Bug: Undefined index.

with wp_debug set to true, I get this this error:

Notice: Undefined index: slug in /var/www/wordpress/public/wp-content/plugins/simple-fields/functions.php on line 526

GUI-generated fields to code-function

It would be mega-super awesome if we could create fields with the GUI and then just get the code to paste. Serious time-saving!

If this is implemented while we have a "this is code-added, you may not edit it"-function, we shouldn't be able to save it - but this should be the default go-to.

Add unit tests

Should add some tests using phpunit so I don't have to check manually that everything works all the time.

Add option to file type to return more information

99 % of the time I use simple fields I use it to attach images to a post. Instead of having to call functions like
wp_get_attachment_image(),
wp_get_attachment_image_src()
wp_get_attachment_metadata()?
and so on it would be great to be able to have it return an array of stuff instead of use the id
so
print_r( simple_fileld_value("my_file_field") )
would return

Array
(
    [file_id] => 123
    [mime] => "image/jpg"
    [image_width] => 1025
    [image_height] => 1025
    [name] => "i am an image.jpg"
    [url] => /wordpress/content/images/i-am-an-image.jpg
    [image_thumbnails] => array(
       [thumbnail] => /wordpress/content/images/i-am-an-image-100x100.jpg
       [another-size] => /wordpress/content/images/i-am-an-image-640x300.jpg,

  )

and so on

this example focuses on images, but it should work on all kinds of course

codename: extended output

Date fields does not work

Just tried Simple Fields for the first time in a year and dang the date field does not seem to work. Hey developer, can't you fix this please!

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.