This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * format_value() | |
| * | |
| * This filter is appied to the $value after it is loaded from the db and before it is returned to the template | |
| * | |
| * @type filter | |
| * @since 3.6 | |
| * @date 23/01/13 | |
| * | |
| * @param $value (mixed) the value which was loaded from the database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| Web Application with Backbone: BEGINNER TUTORIAL | |
| Backbone.js is a very popular and light(weight) JavaScript library | |
| for building Web Applications. | |
| However, learning it I found frustratingly few simple examples of | |
| true workable applications with all lines of code explained. | |
| Here is my attempt to hack the popular Jerome Gravel-Niquet's Backbone Todo App |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function wp_api_encode_acf($data,$post,$context){ | |
| $data['meta'] = array_merge($data['meta'],get_fields($post['ID'])); | |
| return $data; | |
| } | |
| if( function_exists('get_fields') ){ | |
| add_filter('json_prepare_post', 'wp_api_encode_acf', 10, 3); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Folder Structure: http://d.pr/i/499f | |
| Plugin File - https://gist.github.com/owldesign/28a1101191971aa18987 | |
| Template File - https://gist.github.com/owldesign/c1268dac2d86e2fb61b1 | |
| Controller: https://gist.github.com/owldesign/dab355a633310d25cd4f | |
| Models: https://gist.github.com/owldesign/79bda5f668533ca4c435 | |
| Records: https://gist.github.com/owldesign/6e92e67364e762d68253 | |
| Services: https://gist.github.com/owldesign/545ac8eeb2d8450492a9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Craft; | |
| class FormBuilder_FieldsService extends BaseApplicationComponent | |
| { | |
| public $oldFieldColumnPrefix = 'field_'; | |
| private $_fieldsById; | |
| private $_allFieldsInContext; | |
| private $_fieldsByContextAndHandle; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Craft; | |
| class FormBuilder_FieldRecord extends BaseRecord | |
| { | |
| protected $reservedHandleWords = array( | |
| 'archived', | |
| 'children', | |
| 'dateCreated', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Craft; | |
| class FormBuilder_FieldModel extends BaseComponentModel | |
| { | |
| // Properties | |
| private $_fieldType; | |
| // Public Methods | |
| public function __toString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Craft; | |
| class FormBuilder_FieldsController extends BaseController | |
| { | |
| protected $allowAnonymous = true; | |
| // SAVE FIELD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% extends "_layouts/cp" %} | |
| {% set selectedTab = "fields" %} | |
| {% import "_includes/forms" as forms %} | |
| {% if field is not defined and fieldId is defined %} | |
| {% set field = craft.fields.getFieldById(fieldId) %} | |
| {% if not field %} | |
| {% exit 404 %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Craft; | |
| class FormBuilderPlugin extends BasePlugin | |
| { | |
| ... | |