Skip to content

Commit

Permalink
Compatible with Github Updater
Browse files Browse the repository at this point in the history
* Compatible with Github Updater
* add language pot file
* add changelog file
* cleanup readme.md
* cleanup readme.txt
navidkashani committed Dec 2, 2014
1 parent 7d00103 commit 4cebca6
Showing 6 changed files with 99 additions and 91 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#### 1.1.0
* Compatible with [Github Updater](https://github.com/afragen/github-updater)
* add language pot file
* add changelog file
* cleanup readme.md

#### 1.0.0
* Initial Release.
56 changes: 1 addition & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,15 @@
# 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.
* `/images`: folder for image files
* `/js`: folder for .js files
* `/lang`: folder for .pot, .po and .mo files
* `acf-animate_parameters.php`: Main plugin file that includes the correct field file based on the ACF version
* `animate_parameters-v5.php`: Field class compatible with ACF version 5
* `animate_parameters-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 `animate_parameters` throughout the file names and code. Use the following list of placeholders to do a 'find and replace':

* `animate_parameters`: Single word, no spaces. Underscores allowed. eg. donate_button
* `Animate Parameters`: 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 `animate_parameters-v5.php` and `animate_parameters-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 Animate Parameters Field

DESCRIPTION

-----------------------

### Description

EXTENDED_DESCRIPTION
Get Animation Parameters from user.

### Compatibility

This ACF field type is compatible with:
* ACF 5
* ACF 4

### Installation

1. Copy the `acf-animate_parameters` folder into your `wp-content/plugins` folder
2. Activate the Animate Parameters plugin via the plugins admin page
3. Create a new field via ACF and select the Animate Parameters type
4. Please refer to the description for more info regarding the field type settings

### Changelog
Please see `readme.txt` for changelog
32 changes: 8 additions & 24 deletions acf-animate-parameters.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/*
Plugin Name: Advanced Custom Fields: Animate Parameters
Plugin URI: PLUGIN_URL
Description: DESCRIPTION
Version: 1.0.0
Author: AUTHOR_NAME
Author URI: AUTHOR_URL
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Plugin Name: Advanced Custom Fields: Animate Parameters
* Plugin URI: https://github.com/reyhoun/acf-animate-parameter
* Description: Get Animation Parameters from user.
* Version: 1.1.0
* Author: Reyhoun Team
* Author URI: http://reyhoun.com/
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/


@@ -30,20 +30,4 @@ function include_field_types_animate_parameters( $version ) {
}

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




// 3. Include field type for ACF4
function register_fields_animate_parameters() {

include_once('acf-animate-parameters-v4.php');

}

add_action('acf/register_fields', 'register_fields_animate_parameters');




?>
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.
75 changes: 75 additions & 0 deletions lang/acf-animate-parameters.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
msgid ""
msgstr ""
"Project-Id-Version: Advanced Custom Fields: Animate Parameters\n"
"POT-Creation-Date: 2014-12-02 11:47+0330\n"
"PO-Revision-Date: 2014-12-02 11:47+0330\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en\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-animate-parameters-v5.php:32
msgid "Animate Parameters"
msgstr ""

#: acf-animate-parameters-v5.php:78
msgid "Error! Please enter a higher value"
msgstr ""

#: acf-animate-parameters-v5.php:114 acf-animate-parameters-v5.php:247
msgid "Effect Name"
msgstr ""

#: acf-animate-parameters-v5.php:121 acf-animate-parameters-v5.php:253
msgid "Enable Effect"
msgstr ""

#: acf-animate-parameters-v5.php:122
msgid "Customise the input font size"
msgstr ""

#: acf-animate-parameters-v5.php:127 acf-animate-parameters-v5.php:255
msgid "Yes"
msgstr ""

#: acf-animate-parameters-v5.php:128 acf-animate-parameters-v5.php:256
msgid "No"
msgstr ""

#: acf-animate-parameters-v5.php:133
msgid "Select Animate Type 1"
msgstr ""

#: acf-animate-parameters-v5.php:142
msgid "Select Animate Type 2"
msgstr ""

#: acf-animate-parameters-v5.php:151
msgid "Select Animate Type 3"
msgstr ""

#: acf-animate-parameters-v5.php:160
msgid "Select Animate Type 4"
msgstr ""

#: acf-animate-parameters-v5.php:169
msgid "Select Animate Type"
msgstr ""

#: acf-animate-parameters-v5.php:181 acf-animate-parameters-v5.php:273
msgid "Animate Delay Time"
msgstr ""

#: acf-animate-parameters-v5.php:189 acf-animate-parameters-v5.php:278
msgid "Increase Delay"
msgstr ""
15 changes: 6 additions & 9 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
=== Advanced Custom Fields: Animate Parameters Field ===
Contributors: AUTHOR_NAME
Tags: PLUGIN_TAGS
Requires at least: 3.5
Tested up to: 3.8.1
Contributors: Reyhoun Team
Tags: acf, animate, parameters
Requires at least: 3.9
Tested up to: 4.1
Stable tag: trunk
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

DESCRIPTION
Get Animation Parameters from user.

== Description ==

EXTENDED_DESCRIPTION
Get Animation Parameters from user.

= Compatibility =

This ACF field type is compatible with:
* ACF 5
* ACF 4

== Installation ==

@@ -26,7 +25,5 @@ This ACF field type is compatible with:
3. Create a new field via ACF and select the Animate Parameters type
4. Please refer to the description for more info regarding the field type settings

== Changelog ==

= 1.0.0 =
* Initial Release.

0 comments on commit 4cebca6

Please sign in to comment.