Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.074.834 Times

Easy Custom Fields 0.1

  Date Added: April 13, 2013  |  Visits: 512

Easy Custom Fields

Report Broken Link
Printer Friendly Version


Product Homepage
Download (40 downloads)



Features: * simply generate post boxes with multiple fields / groups * easily validate/sanitize input and output data * easy access to field data via $easy_cf->field_id->get() or $easy_cf->field_id->get( NULL, $raw=true ); * get error messages for validation failures via admin notices * custom post type aware * extendable to your needs by extending Easy_CF_Field and Easy_CF_Validator classes (see advanced usage)As this script is mainly meant as basis for developers it needs minor coding skills to add this functionality to your theme.In order to make use of this class simply initialize it from the functions.php file of your theme as described below.Simple Usagerequire_once( WP_PLUGIN_DIR . '/easy-custom-fields/easy-custom-fields.php' );$field_data = array ( 'testgroup' => array ( // unique group id 'fields' => array( // array "fields" with field definitions 'field1' => array(), // globally unique field id 'field2' => array(), 'field3' => array(), ), ),);$easy_cf = new Easy_CF($field_data);Advanced Usagerequire_once( WP_PLUGIN_DIR . '/easy-custom-fields/easy-custom-fields.php' );$field_data = array ( 'testgroup' => array ( 'fields' => array( 'field1' => array(), 'field2' => array(), 'field3' => array(), ), ), 'advanced_testgroup' => array ( // unique group id 'fields' => array( // array "fields" with field definitions 'advanced_field' => array( // globally unique field id 'label' => 'Advanced Field Description', // Field Label 'hint' => 'Long Advanced Field description', // A descriptive hint for the field 'type' => 'textarea', // Custom Field Type (see Ref: field_type) 'class' => 'aclass', // CSS Wrapper class for the field 'input_class' => 'theEditor', // CSS class for the input field 'error_msg' => 'The Advanced Field is wrong' ), // Error message to show when validate fails 'validate' => 'validatorname', // Custom Validator (see Ref: validator) 'advanced_email' => array( 'label' => 'Email', 'hint' => 'Enter your email', 'validate' => 'email', ) ), 'title' => 'Product Description', // Group Title 'context' => 'advanced', // context as in http://codex.wordpress.org/Function_Reference/add_meta_box 'pages' => array( 'post', 'page' ), // pages as in http://codex.wordpress.org/Function_Reference/add_meta_box ),);if ( !class_exists( "Easy_CF_Validator_Email" ) ) { class Easy_CF_Validator_Email extends Easy_CF_Validator { public function get( $value='' ) { return esc_attr( $value ); } public function set( $value='' ) { $value = esc_attr( trim( stripslashes( $value ) ) ); return $value; } public function validate( $value='' ) { if ( empty( $value ) || is_email( $value ) ) return true; else return false; } }}if ( !class_exists( "Easy_CF_Field_Textarea" ) ) { class Easy_CF_Field_Textarea extends Easy_CF_Field { public function print_form() { $class = ( empty( $this->_field_data['class'] ) ) ? $this->_field_data['id'] . '_class' : $this->_field_data['class']; $input_class = ( empty( $this->_field_data['input_class'] ) ) ? $this->_field_data['id'] . '_input_class' : $this->_field_data['input_class']; $id = ( empty( $this->_field_data['id'] ) ) ? $this->_field_data['id'] : $this->_field_data['id']; $label = ( empty( $this->_field_data['label'] ) ) ? $this->_field_data['id'] : $this->_field_data['label']; $value = $this->get(); $hint = ( empty( $this->_field_data['hint'] ) ) ? '' : '' . $this->_field_data['hint'] . ''; $label_format = ''. '%s'. '%s'. '%s'. ''; printf( $label_format, $class, $id, $label, $input_class, $id, $value, $hint ); } }}$easy_cf = new Easy_CF($field_data);NoteIf you're not using auto_init then meta boxes need to be added individually using add_meta_box( $group_id, $group_title, array( &$easy_cf, 'meta_box_cb' ), $page, $group_context ); and the save methods need to be initialized after adding all meta boxes using $easy_cf->add_save_method();

Requirements: No special requirements
Platforms: PHP
Keyword: Array Boxes Class Definitions Empty Field Fields Function Globally Public Quotfieldsquot Return Testgroup Thisgt Field Data Unique Value3d039039
Users rating: 0/10

License: Freeware Size: 30.72 KB
USER REVIEWS
More Reviews or Write Review


EASY CUSTOM FIELDS RELATED
Web Browser Tools  -  Form Saver 0.7.0
Form Saver enables you to saves form field data as autofill-bookmarklets. Saves form field data as autofill-bookmarklets. Works with inputs, checkboxes, radio groups, textareas, and selects. As always, feel free to email me with suggestions or...
64.51 KB  
Libraries  -  Class::Struct::FIELDS 1.1
Class::Struct::FIELDS module combine Class::Struct, base and fields. SYNOPSIS (This page documents Class::Struct::FIELDS v.1.1.) use Class::Struct::FIELDS; # declare struct, based on fields, explicit class name: struct (CLASS_NAME => {...
18.43 KB  
Programming  -  StyledTextToHTML 1.1
This project extends the StyledText class to add a new function, .ToHTML(). If you call it on a StyledText, it will return the HTML for that styled text. It only works in RB 5.5 and higher.
10.24 KB  
Programming  -  StyledTextToRTF 1.0
This project extends the StyledText class to add a new function, .ToRTF(). If you call it on a StyledText, it will return the RTF for that styled text. It only works in RB 5.5 and higher.
10.24 KB  
Utilities  -  generateDS.py 1.10a
generateDS.py generates Python data structures (for example, class definitions) from an XML Schema document. These data structures represent the elements in an XML document described by the XML Schema. It also generates parsers that load an XML...
112.64 KB  
Libraries  -  Generic Java Algebra Library 0.0.1
Generic Java Algebra Library is a collection that includes generic class definitions in GJ/Generic Java/JSR-014. It helps to outline algebraic structures such as Monoids, SemiGroups, Groups, Rings, Fields and various Domains. It is very useful for...
 
Database Tools  -  Session Handler Class 1.0
Session Handler Class can store the identifier of a given authenticated user and a session data string in a MySQL database table. A user identifier and the session data string can be retrieved into session variables.Session Handler Class can also...
10 KB  
Modules  -  Initializing variables from __init__ parameters 1.2
This script assigns each parameter to an instance variable of the same name, automating a common pattern of object initialization, and making class definitions more compact.
 
Communication  -  Smartspice binary format RAW file reader with complex capabilities 1.0
this second version support complex data.[data, plot_title] = ssbin2mlab(filename, desired_variable) reads a Binary Smartspice RAW file 'filename' and extract the variable(s) of interest from 'desired_variable' using the file's own variable index...
10 KB  
Database Tools  -  Small MySQL Connection 1.0
This class Small MySQL Connection is a very simple wrapper to access a MySQL database.Functions of Small MySQL Connection:- Establish database connections- Execute manipulation queries and return the number of affected table rows- Execute an SQL...
10 KB  
NEW DOWNLOADS IN SCRIPTS, NETWORKING
Scripts  -  Free Ecommerce website creator 1.2
Free Ecommerce website creator is a free PHP shop creating script. This allows you to put a online shop on your own website. Create your own free ecommerce website for Your Business. Create an online shop using easyGUI online shop creator. The...
1.44 KB  
Scripts  -  MochiGames PHP Script ZDR 1.00
MochiGames PHP Script ZDR is web site, ready for use, for flash games. These flash games are downloaded automatically by "MochiGames PHP Script ZDR" from MochiGames media. The use of the games is free, you can use your own Mochi Publisher ID and...
368.54 KB  
Scripts  -  Php Chat 2.0
Add a free php site, single sign-on and multiple skins, 100% free 1. Server Modes: The chat server has paid mode and free mode. If the free chat mode, a free chat room will be assigned to your website with your domain as the room name. 2....
938.87 KB  
Scripts  -  Nibbleblog 3.0.1
Nibbleblog it's a powerful engine for creation and manipulation of BLOG's completely free. Very simple to install and configure (Only 1 step). The database used is based on XML files and this way it is not necessary to use MySQL or similar DBMS....
371.09 KB  
Scripts  -  PHP File Manager | CloudOsys 2.9b8
CloudOsys is a PHP file manager, a tool that allows your visitors upload files such as media content directly to your website. Your visitors will upload files directly to your website, where they can share and comment on them. Through cloud...
1.41 MB  
Networking  -  Shortcode Autolink 0.1
Lets you create links automatically on the basis of internal research results, and everything through Shortcode !Installation : 1. Upload the plugin folder to your /wp-content/plugins/ folder. 2. Go to the Plugins page and activate the plugin. 3....
10 KB  
Networking  -  Pixel Sitemap 1.0.0
Pixel Sitemap Plugin allows with the use of widget to display in sidebar links on the posts in compact way, namely as a rows of 1 pixel pictures.The main features are: * Support cache for links * Display links in random order or by date * Easy...
10 KB  
Networking  -  Contexture Page Security 0.7.1
Contexture Page Security adds some much-needed "page security" to WordPress, allowing admins to limit or restrict access to individual pages or entire sections of their website. To do this, admins create "groups" of users that can be added to...
10 KB  
Networking  -  Vertical scroll recent post 8.0
This will scroll the recent post title in site side bar or any desired template location.In version 4.0 three new option added. 1. Categories selection. 2. select display Orderbys. 3. select display orderFeature * User can see the newest post at...
10 KB  
Networking  -  Wp-o-Matic-Authors 1.0
"Wp-o-matic-Authors" is an add-on to Wp-o-Matic. It automatically creates a new author for each campaign (even if already fetched). Then, each post imported by Wp-o-Matic will have as author the name given by this plugin instead of a name already...
10 KB