diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0d0b0b2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +#### 1.2.0 +* Compatible with [Github Updater](https://github.com/afragen/github-updater) +* add language pot file +* add changelog file + +#### 1.1.0 +* add: Allow null +* Better Description + +#### 1.0.0 +* Initial Release. \ No newline at end of file diff --git a/README.md b/README.md index 31a4af7..93d76af 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,5 @@ # ACF Field Type Template -Welcome to the Advanced Custom Fields field type template repository. -Here you will find a starter-kit for creating a new ACF field type. This start-kit will work as a normal WP plugin. - -For more information about creating a new field type, please read the following article: -http://www.advancedcustomfields.com/resources/tutorials/creating-a-new-field-type/ - ### Structure * `/css`: folder for .css files. @@ -14,59 +8,23 @@ http://www.advancedcustomfields.com/resources/tutorials/creating-a-new-field-typ * `/lang`: folder for .pot, .po and .mo files * `acf-subfield_chooser.php`: Main plugin file that includes the correct field file based on the ACF version * `subfield_chooser-v5.php`: Field class compatible with ACF version 5 -* `subfield_chooser-v4.php`: Field class compatible with ACF version 4 * `readme.txt`: WordPress readme file to be used by the wordpress repository -### step 1. - -This template uses `PLACEHOLDERS` such as `subfield_chooser` throughout the file names and code. Use the following list of placeholders to do a 'find and replace': - -* `subfield_chooser`: Single word, no spaces. Underscores allowed. eg. donate_button -* `Subfield Chooser`: Multiple words, can include spaces, visible when selecting a field type. eg. Donate Button -* `PLUGIN_URL`: Url to the github or WordPress repository -* `PLUGIN_TAGS`: Comma seperated list of relevant tags -* `DESCRIPTION`: Brief description of the field type, no longer than 2 lines -* `EXTENDED_DESCRIPTION`: Extended description of the field type -* `AUTHOR_NAME`: Name of field type author -* `AUTHOR_URL`: URL to author's website - -### step 2. - -Edit the `subfield_chooser-v5.php` and `subfield_chooser-v4.php` files (now renamed using your field name) and include your custom code in the appropriate functions. -Please note that v4 and v5 field classes have slightly different functions. For more information, please read: -* http://www.advancedcustomfields.com/resources/tutorials/creating-a-new-field-type/ - -### step 3. - -Edit this `README.md` file with the appropriate information and delete all content above and including the following line. - ------------------------ # ACF Subfield Chooser Field -DESCRIPTION +Return custom subfield value of a custom repeater field as a select box ----------------------- -### Description - -EXTENDED_DESCRIPTION - ### Compatibility This ACF field type is compatible with: * ACF 5 -* ACF 4 ### Installation -1. Copy the `acf-subfield_chooser` folder into your `wp-content/plugins` folder +1. Copy the `acf-subfield-chooser` folder into your `wp-content/plugins` folder 2. Activate the Subfield Chooser plugin via the plugins admin page 3. Create a new field via ACF and select the Subfield Chooser type -4. Please refer to the description for more info regarding the field type settings - -### Changelog - -## 1.1.0 -* add: Allow null -* Better Description \ No newline at end of file +4. Please refer to the description for more info regarding the field type settings \ No newline at end of file diff --git a/acf-subfield-chooser.php b/acf-subfield-chooser.php index beb73ef..c52efdc 100644 --- a/acf-subfield-chooser.php +++ b/acf-subfield-chooser.php @@ -1,14 +1,16 @@ \ No newline at end of file diff --git a/lang/README.md b/lang/README.md index aaeee58..0d5316c 100644 --- a/lang/README.md +++ b/lang/README.md @@ -1,5 +1,3 @@ # Translations directory -Use this directory to store .po and .mo files. - -This directory can be removed if not used. +Use this directory to store .po and .mo files. \ No newline at end of file diff --git a/lang/acf-subfield_chooser.pot b/lang/acf-subfield_chooser.pot new file mode 100644 index 0000000..dec6f22 --- /dev/null +++ b/lang/acf-subfield_chooser.pot @@ -0,0 +1,87 @@ +msgid "" +msgstr "" +"Project-Id-Version: Advanced Custom Fields: Subfield Chooser\n" +"POT-Creation-Date: 2014-11-01 17:53+0330\n" +"PO-Revision-Date: 2014-11-01 17:53+0330\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.6.9\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" +"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-SearchPath-0: .\n" + +#: acf-subfield-chooser-v5.php:32 +msgid "Subfield Chooser" +msgstr "" + +#: acf-subfield-chooser-v5.php:61 +msgid "Error! Please enter a higher value" +msgstr "" + +#: acf-subfield-chooser-v5.php:97 +msgid "Repeater Name *" +msgstr "" + +#: acf-subfield-chooser-v5.php:98 +msgid "enter repeater field name (field_name)" +msgstr "" + +#: acf-subfield-chooser-v5.php:105 +msgid "Location *" +msgstr "" + +#: acf-subfield-chooser-v5.php:106 +msgid "enter \"option\" or post ID" +msgstr "" + +#: acf-subfield-chooser-v5.php:113 +msgid "Sub Field Name *" +msgstr "" + +#: acf-subfield-chooser-v5.php:114 +msgid "Choose sub field name for show in select field" +msgstr "" + +#: acf-subfield-chooser-v5.php:121 +msgid "Return Value" +msgstr "" + +#: acf-subfield-chooser-v5.php:122 +msgid "Specify the returned value on front end" +msgstr "" + +#: acf-subfield-chooser-v5.php:126 +msgid "Row ID" +msgstr "" + +#: acf-subfield-chooser-v5.php:127 +msgid "Subfield Value" +msgstr "" + +#: acf-subfield-chooser-v5.php:133 +msgid "Return Sub Field Value *" +msgstr "" + +#: acf-subfield-chooser-v5.php:134 +msgid "enter sub field name for return value in select field" +msgstr "" + +#: acf-subfield-chooser-v5.php:141 +msgid "Allow Null ?" +msgstr "" + +#: acf-subfield-chooser-v5.php:145 +msgid "Yes" +msgstr "" + +#: acf-subfield-chooser-v5.php:146 +msgid "No" +msgstr ""