Skip to content

Commit

Permalink
compatible with github updater
Browse files Browse the repository at this point in the history
add changelog and language pot file
  • Loading branch information
navidkashani committed Nov 1, 2014
1 parent 6401ae4 commit a02d1c0
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 58 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
48 changes: 3 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
4. Please refer to the description for more info regarding the field type settings
20 changes: 10 additions & 10 deletions acf-subfield-chooser.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?php

/*
Plugin Name: Advanced Custom Fields: Subfield Chooser
Plugin URI: https://github.com/reyhoun/acf-subfield-chooser.git
Description: Return custom subfield value of a custom repeater field as a select box
Version: 1.1.0
Author: Reyhoun
Author URI: reyhoun.com
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Plugin Name: Advanced Custom Fields: Subfield Chooser
* Plugin URI: https://github.com/reyhoun/acf-subfield-chooser
* Description: Return custom subfield value of a custom repeater field as a select box
* Version: 1.2.0
* Author: Reyhoun
* Author URI: reyhoun.com
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* GitHub Plugin URI: https://github.com/reyhoun/acf-subfield-chooser
* GitHub Branch: master
*/


Expand All @@ -31,6 +33,4 @@ function include_field_types_subfield_chooser( $version ) {

add_action('acf/include_field_types', 'include_field_types_subfield_chooser');



?>
4 changes: 1 addition & 3 deletions lang/README.md
Original file line number Diff line number Diff line change
@@ -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.
87 changes: 87 additions & 0 deletions lang/acf-subfield_chooser.pot
Original file line number Diff line number Diff line change
@@ -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 <span class=\"acf-required\">*</span>"
msgstr ""

#: acf-subfield-chooser-v5.php:98
msgid "enter repeater field name (field_name)"
msgstr ""

#: acf-subfield-chooser-v5.php:105
msgid "Location <span class=\"acf-required\">*</span>"
msgstr ""

#: acf-subfield-chooser-v5.php:106
msgid "enter \"option\" or post ID"
msgstr ""

#: acf-subfield-chooser-v5.php:113
msgid "Sub Field Name <span class=\"acf-required\">*</span>"
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 <span class=\"acf-required\">*</span>"
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 ""

0 comments on commit a02d1c0

Please sign in to comment.