');
- }
- }
-
- }
-
-
- /*--------------------------------------------------------------------------------------
- *
- * admin_head
- * - this function is called in the admin_head of the edit screen where your field
- * is created. Use this function to create css and javascript to assist your
- * create_field() function.
- *
- * @author Elliot Condon
- * @since 2.2.0
- *
- *-------------------------------------------------------------------------------------*/
-
- function admin_head()
- {
- // Note: This function can be removed if not used
- }
-
-
- /*--------------------------------------------------------------------------------------
- *
- * admin_print_scripts / admin_print_styles
- * - this function is called in the admin_print_scripts / admin_print_styles where
- * your field is created. Use this function to register css and javascript to assist
- * your create_field() function.
- *
- * @author Elliot Condon
- * @since 3.0.0
- *
- *-------------------------------------------------------------------------------------*/
-
- function admin_print_scripts()
- {
- // Note: This function can be removed if not used
-
-
-
- wp_register_script( 'acf-limiter', $this->settings['dir'] . 'js/limiter.js', array('acf-input'), $this->settings['version'] );
-
-
- //jquery-ui-progressbar
- wp_enqueue_script( 'jquery-ui-progressbar');
-
-
- // scripts
- wp_enqueue_script(array(
- 'acf-limiter',
- ));
-
- // styles
-
-
-
-
-
-
-
- }
-
- function admin_print_styles()
- {
- // Note: This function can be removed if not used
-
-
-
- wp_register_style( 'jquery-ui-progressbar.min', $this->settings['dir'] . 'css/jquery-ui-progressbar.min.css', array('acf-input'), $this->settings['version'] );
-
- wp_register_style( 'limiterCSS', $this->settings['dir'] . 'css/limiter.css', array('acf-input'), $this->settings['version'] );
-
- //jquery-ui-progressbar
- // styles
- wp_enqueue_style(array(
- 'jquery-ui-progressbar.min','limiterCSS'
- ));
-
-
-
-
-
- }
-
-
- /*--------------------------------------------------------------------------------------
- *
- * update_value
- * - this function is called when saving a post object that your field is assigned to.
- * the function will pass through the 3 parameters for you to use.
- *
- * @params
- * - $post_id (int) - usefull if you need to save extra data or manipulate the current
- * post object
- * - $field (array) - usefull if you need to manipulate the $value based on a field option
- * - $value (mixed) - the new value of your field.
- *
- * @author Elliot Condon
- * @since 2.2.0
- *
- *-------------------------------------------------------------------------------------*/
-
- function update_value($post_id, $field, $value)
- {
- // Note: This function can be removed if not used
-
- // do stuff with value
-
- // save value
- parent::update_value($post_id, $field, $value);
- }
-
-
-
-
-
- /*--------------------------------------------------------------------------------------
- *
- * get_value
- * - called from the edit page to get the value of your field. This function is useful
- * if your field needs to collect extra data for your create_field() function.
- *
- * @params
- * - $post_id (int) - the post ID which your value is attached to
- * - $field (array) - the field object.
- *
- * @author Elliot Condon
- * @since 2.2.0
- *
- *-------------------------------------------------------------------------------------*/
-
- function get_value($post_id, $field)
- {
- // Note: This function can be removed if not used
-
- // get value
- $value = parent::get_value($post_id, $field);
-
- // format value
-
- // return value
- return $value;
- }
-
-
- /*--------------------------------------------------------------------------------------
- *
- * get_value_for_api
- * - called from your template file when using the API functions (get_field, etc).
- * This function is useful if your field needs to format the returned value
- *
- * @params
- * - $post_id (int) - the post ID which your value is attached to
- * - $field (array) - the field object.
- *
- * @author Elliot Condon
- * @since 3.0.0
- *
- *-------------------------------------------------------------------------------------*/
-
- function get_value_for_api($post_id, $field)
- {
- // Note: This function can be removed if not used
-
- // get value
- $value = $this->get_value($post_id, $field);
-
- // format value
-
- // return value
- return $value;
-
- }
-
-}
-
-?>
\ No newline at end of file
diff --git a/limiter-v4.php b/limiter-v4.php
deleted file mode 100755
index 71c7d0e..0000000
--- a/limiter-v4.php
+++ /dev/null
@@ -1,416 +0,0 @@
-name = 'limiter';
- $this->label = __('Limiter');
- $this->category = __("Basic",'acf'); // Basic, Content, Choice, etc
- $this->defaults = array(
- // add default here to merge into your field.
- // This makes life easy when creating the field options as you don't need to use any if( isset('') ) logic. eg:
- //'preview_size' => 'thumbnail'
- );
-
-
- // do not delete!
- parent::__construct();
-
-
- // settings
- $this->settings = array(
- 'path' => apply_filters('acf/helpers/get_path', __FILE__),
- 'dir' => apply_filters('acf/helpers/get_dir', __FILE__),
- 'version' => '1.0.0'
- );
-
- }
-
-
- /*
- * create_options()
- *
- * Create extra options for your field. This is rendered when editing a field.
- * The value of $field['name'] can be used (like bellow) to save extra data to the $field
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - an array holding all the field's data
- */
-
- function create_options( $field )
- {
- // defaults?
- /*
- $field = array_merge($this->defaults, $field);
- */
-
- $field['character_number'] = isset($field['character_number']) ? $field['character_number'] : '';
-
- ?>
-
');
- };
- }
-
- }
-
-
- /*
- * input_admin_enqueue_scripts()
- *
- * This action is called in the admin_enqueue_scripts action on the edit screen where your field is created.
- * Use this action to add css + javascript to assist your create_field() action.
- *
- * $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function input_admin_enqueue_scripts()
- {
-
-
- // register acf scripts
- wp_register_script( 'acf-limiter', $this->settings['dir'] . 'js/limiter.js', array('acf-input'), $this->settings['version'] );
-
- wp_register_style( 'jquery-ui-progressbar.min', $this->settings['dir'] . 'css/jquery-ui-progressbar.min.css', array('acf-input'), $this->settings['version'] );
-
- wp_register_style( 'limiterCSS', $this->settings['dir'] . 'css/limiter.css', array('acf-input'), $this->settings['version'] );
-
-
- //jquery-ui-progressbar
- wp_enqueue_script( 'jquery-ui-progressbar');
-
-
- // scripts
- wp_enqueue_script(array(
- 'acf-limiter',
- ));
-
- // styles
- wp_enqueue_style(array(
- 'jquery-ui-progressbar.min','limiterCSS'
- ));
-
-
- }
-
-
- /*
- * input_admin_head()
- *
- * This action is called in the admin_head action on the edit screen where your field is created.
- * Use this action to add css and javascript to assist your create_field() action.
- *
- * @info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_head
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function input_admin_head()
- {
- // Note: This function can be removed if not used
-
-
-
- }
-
-
- /*
- * field_group_admin_enqueue_scripts()
- *
- * This action is called in the admin_enqueue_scripts action on the edit screen where your field is edited.
- * Use this action to add css + javascript to assist your create_field_options() action.
- *
- * $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function field_group_admin_enqueue_scripts()
- {
- // Note: This function can be removed if not used
- }
-
-
- /*
- * field_group_admin_head()
- *
- * This action is called in the admin_head action on the edit screen where your field is edited.
- * Use this action to add css and javascript to assist your create_field_options() action.
- *
- * @info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_head
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function field_group_admin_head()
- {
- // Note: This function can be removed if not used
- }
-
-
- /*
- * load_value()
- *
- * This filter is appied to the $value after it is loaded from the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value found in the database
- * @param $post_id - the $post_id from which the value was loaded from
- * @param $field - the field array holding all the field options
- *
- * @return $value - the value to be saved in te database
- */
-
- function load_value( $value, $post_id, $field )
- {
- // Note: This function can be removed if not used
- return $value;
- }
-
-
- /*
- * update_value()
- *
- * This filter is appied to the $value before it is updated in the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which will be saved in the database
- * @param $post_id - the $post_id of which the value will be saved
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function update_value( $value, $post_id, $field )
- {
- // Note: This function can be removed if not used
- return $value;
- }
-
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is passed to the create_field action
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which was loaded from the database
- * @param $post_id - the $post_id from which the value was loaded
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function format_value( $value, $post_id, $field )
- {
- // defaults?
- /*
- $field = array_merge($this->defaults, $field);
- */
-
- // perhaps use $field['preview_size'] to alter the $value?
-
-
- // Note: This function can be removed if not used
- return $value;
- }
-
-
- /*
- * format_value_for_api()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is passed back to the api functions such as the_field
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which was loaded from the database
- * @param $post_id - the $post_id from which the value was loaded
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function format_value_for_api( $value, $post_id, $field )
- {
- // defaults?
- /*
- $field = array_merge($this->defaults, $field);
- */
-
- // perhaps use $field['preview_size'] to alter the $value?
-
-
- // Note: This function can be removed if not used
- return $value;
- }
-
-
- /*
- * load_field()
- *
- * This filter is appied to the $field after it is loaded from the database
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - the field array holding all the field options
- *
- * @return $field - the field array holding all the field options
- */
-
- function load_field( $field )
- {
- // Note: This function can be removed if not used
- return $field;
- }
-
-
- /*
- * update_field()
- *
- * This filter is appied to the $field before it is saved to the database
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - the field array holding all the field options
- * @param $post_id - the field group ID (post_type = acf)
- *
- * @return $field - the modified field
- */
-
- function update_field( $field, $post_id )
- {
- // Note: This function can be removed if not used
- return $field;
- }
-
-
-}
-
-
-// create field
-new acf_field_limiter();
-
-?>
diff --git a/limiter-v5.php b/limiter-v5.php
deleted file mode 100755
index 8228dcf..0000000
--- a/limiter-v5.php
+++ /dev/null
@@ -1,629 +0,0 @@
-name = 'limiter';
-
-
- /*
- * label (string) Multiple words, can include spaces, visible when selecting a field type
- */
-
- $this->label = __('Limiter', 'acf-limiter');
-
-
- /*
- * category (string) basic | content | choice | relational | jquery | layout | CUSTOM GROUP NAME
- */
-
- $this->category = 'basic';
-
-
- /*
- * defaults (array) Array of default settings which are merged into the field object. These are used later in settings
- */
-
- $this->defaults = array(
- 'default_value' => '',
- 'new_lines' => '',
- 'character_number' => 150,
- 'display_characters' => 1,
- 'rows' => '',
- 'placeholder' => '',
- );
-
-
- /*
- * l10n (array) Array of strings that are used in JavaScript. This allows JS strings to be translated in PHP and loaded via:
- * var message = acf._e('limiter', 'error');
- */
-
- $this->l10n = array(
- 'error' => __('Error! Please enter a higher value', 'acf-limiter'),
- );
-
-
- // do not delete!
- parent::__construct();
-
- }
-
-
- /*
- * render_field_settings()
- *
- * Create extra settings for your field. These are visible when editing a field
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field (array) the $field being edited
- * @return n/a
- */
-
- function render_field_settings( $field ) {
-
- /*
- * acf_render_field_setting
- *
- * This function will create a setting for your field. Simply pass the $field parameter and an array of field settings.
- * The array of settings does not require a `value` or `prefix`; These settings are found from the $field array.
- *
- * More than one setting can be added by copy/paste the above code.
- * Please note that you must also have a matching $defaults value for the field name (font_size)
- */
-
- // default_value
- acf_render_field_setting( $field, array(
- 'label' => __('Default Value','acf'),
- 'instructions' => __('Appears when creating a new post','acf'),
- 'type' => 'textarea',
- 'name' => 'default_value',
- 'rows' => 4
- ));
-
-
- // placeholder
- acf_render_field_setting( $field, array(
- 'label' => __('Placeholder Text','acf'),
- 'instructions' => __('Appears within the input','acf'),
- 'type' => 'text',
- 'name' => 'placeholder',
- ));
-
- acf_render_field_setting( $field, array(
- 'label' => __('Character Limit','acf'),
- 'instructions' => __('How many characters would you like to limit','acf-limiter'),
- 'type' => 'number',
- 'name' => 'character_number',
- 'append' => __('characters','acf-limiter')
- ));
-
- acf_render_field_setting( $field, array(
- 'label' => __('Display character limit','acf-limiter'),
- 'instructions' => __('Show the number of characters left over the top of the progress bar.','acf-limiter'),
- 'type' => 'radio',
- 'name' => 'display_characters',
- 'choices' => array(
- 1 => __("No",'acf'),
- 0 => __("Yes",'acf'),
- ),
- 'layout' => 'horizontal'
- ));
-
- // rows
- acf_render_field_setting( $field, array(
- 'label' => __('Rows','acf'),
- 'instructions' => __('Sets the textarea height','acf'),
- 'type' => 'number',
- 'name' => 'rows',
- 'placeholder' => 4,
- 'append' => __('textlines','acf-limiter')
- ));
-
- // formatting
- acf_render_field_setting( $field, array(
- 'label' => __('New Lines','acf'),
- 'instructions' => __('Controls how new lines are rendered','acf'),
- 'type' => 'select',
- 'name' => 'new_lines',
- 'choices' => array(
- 'wpautop' => __("Automatically add paragraphs",'acf'),
- 'br' => __("Automatically add <br>",'acf'),
- '' => __("No Formatting",'acf')
- )
- ));
-
- }
-
-
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field (array) the $field being rendered
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field (array) the $field being edited
- * @return n/a
- */
-
- function render_field( $field ) {
-
- /*
- * Create a simple text input using the 'font_size' setting.
- */
-
- // rows
- if ( empty($field['rows']) ) {
- $field['rows'] = 4;
- }
-
- // character limit
- if ( empty($field['character_number']) || $field['character_number'] < 1 ) {
- $character_number = 999999;
- } else {
- $character_number = $field['character_number'];
- }
-
-
- echo '';
-
- echo('');
-
- if ( isset($field['display_characters']) ) {
- if ( $field['display_characters'] == 0 ) {
- echo('
/ '.$character_number.'
');
- }
- }
- }
-
-
- /*
- * input_admin_enqueue_scripts()
- *
- * This action is called in the admin_enqueue_scripts action on the edit screen where your field is created.
- * Use this action to add CSS + JavaScript to assist your render_field() action.
- *
- * @type action (admin_enqueue_scripts)
- * @since 3.6
- * @date 23/01/13
- *
- * @param n/a
- * @return n/a
- */
-
-
-
- function input_admin_enqueue_scripts() {
-
- $dir = plugin_dir_url( __FILE__ );
-
-
- // register & include JS
- wp_register_script( 'acf-input-limiter', "{$dir}js/limiter.js" );
-
-
-
- // register & include CSS
- wp_register_style( 'acf-input-limiter', "{$dir}css/limiter.css" );
-
- wp_register_style( 'jquery-ui-progressbar.min', "{$dir}css/jquery-ui-progressbar.min.css" );
-
-
-
-
-
-
-
- //jquery-ui-progressbar
- wp_enqueue_script(array(
- 'acf-input-limiter','jquery-ui-progressbar'
- ));
-
- // styles
- wp_enqueue_style(array(
- 'jquery-ui-progressbar.min','acf-input-limiter'
- ));
-
-
-
- }
-
-
-
-
- /*
- * input_admin_head()
- *
- * This action is called in the admin_head action on the edit screen where your field is created.
- * Use this action to add CSS and JavaScript to assist your render_field() action.
- *
- * @type action (admin_head)
- * @since 3.6
- * @date 23/01/13
- *
- * @param n/a
- * @return n/a
- */
-
- /*
-
- function input_admin_head() {
-
-
-
- }
-
- */
-
-
- /*
- * input_form_data()
- *
- * This function is called once on the 'input' page between the head and footer
- * There are 2 situations where ACF did not load during the 'acf/input_admin_enqueue_scripts' and
- * 'acf/input_admin_head' actions because ACF did not know it was going to be used. These situations are
- * seen on comments / user edit forms on the front end. This function will always be called, and includes
- * $args that related to the current screen such as $args['post_id']
- *
- * @type function
- * @date 6/03/2014
- * @since 5.0.0
- *
- * @param $args (array)
- * @return n/a
- */
-
- /*
-
- function input_form_data( $args ) {
-
-
-
- }
-
- */
-
-
- /*
- * input_admin_footer()
- *
- * This action is called in the admin_footer action on the edit screen where your field is created.
- * Use this action to add CSS and JavaScript to assist your render_field() action.
- *
- * @type action (admin_footer)
- * @since 3.6
- * @date 23/01/13
- *
- * @param n/a
- * @return n/a
- */
-
- /*
-
- function input_admin_footer() {
-
-
-
- }
-
- */
-
-
- /*
- * field_group_admin_enqueue_scripts()
- *
- * This action is called in the admin_enqueue_scripts action on the edit screen where your field is edited.
- * Use this action to add CSS + JavaScript to assist your render_field_options() action.
- *
- * @type action (admin_enqueue_scripts)
- * @since 3.6
- * @date 23/01/13
- *
- * @param n/a
- * @return n/a
- */
-
- /*
-
- function field_group_admin_enqueue_scripts() {
-
- }
-
- */
-
-
- /*
- * field_group_admin_head()
- *
- * This action is called in the admin_head action on the edit screen where your field is edited.
- * Use this action to add CSS and JavaScript to assist your render_field_options() action.
- *
- * @type action (admin_head)
- * @since 3.6
- * @date 23/01/13
- *
- * @param n/a
- * @return n/a
- */
-
- /*
-
- function field_group_admin_head() {
-
- }
-
- */
-
-
- /*
- * load_value()
- *
- * This filter is applied to the $value after it is loaded from the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value found in the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- * @return $value
- */
-
- /*
-
- function load_value( $value, $post_id, $field ) {
-
- return $value;
-
- }
-
- */
-
-
- /*
- * update_value()
- *
- * This filter is applied to the $value before it is saved in the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value found in the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- * @return $value
- */
-
- /*
-
- function update_value( $value, $post_id, $field ) {
-
- return $value;
-
- }
-
- */
-
-
- /*
- * 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
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- *
- * @return $value (mixed) the modified value
- */
-
- function format_value( $value, $post_id, $field ) {
-
- // bail early if no value or not for template
- if( empty($value) || !is_string($value) ) {
-
- return $value;
-
- }
-
-
- // new lines
- if( $field['new_lines'] == 'wpautop' ) {
-
- $value = wpautop($value);
-
- } elseif( $field['new_lines'] == 'br' ) {
-
- $value = nl2br($value);
-
- }
-
-
- // return
- return $value;
- }
-
-
- /*
- * validate_value()
- *
- * This filter is used to perform validation on the value prior to saving.
- * All values are validated regardless of the field's required setting. This allows you to validate and return
- * messages to the user if the value is not correct
- *
- * @type filter
- * @date 11/02/2014
- * @since 5.0.0
- *
- * @param $valid (boolean) validation status based on the value and the field's required setting
- * @param $value (mixed) the $_POST value
- * @param $field (array) the field array holding all the field options
- * @param $input (string) the corresponding input name for $_POST value
- * @return $valid
- */
-
- /*
-
- function validate_value( $valid, $value, $field, $input ){
-
- // Basic usage
- if( $value < $field['custom_minimum_setting'] )
- {
- $valid = false;
- }
-
-
- // Advanced usage
- if( $value < $field['custom_minimum_setting'] )
- {
- $valid = __('The value is too little!','acf-limiter'),
- }
-
-
- // return
- return $valid;
-
- }
-
- */
-
-
- /*
- * delete_value()
- *
- * This action is fired after a value has been deleted from the db.
- * Please note that saving a blank value is treated as an update, not a delete
- *
- * @type action
- * @date 6/03/2014
- * @since 5.0.0
- *
- * @param $post_id (mixed) the $post_id from which the value was deleted
- * @param $key (string) the $meta_key which the value was deleted
- * @return n/a
- */
-
- /*
-
- function delete_value( $post_id, $key ) {
-
-
-
- }
-
- */
-
-
- /*
- * load_field()
- *
- * This filter is applied to the $field after it is loaded from the database
- *
- * @type filter
- * @date 23/01/2013
- * @since 3.6.0
- *
- * @param $field (array) the field array holding all the field options
- * @return $field
- */
-
- /*
-
- function load_field( $field ) {
-
- return $field;
-
- }
-
- */
-
-
- /*
- * update_field()
- *
- * This filter is applied to the $field before it is saved to the database
- *
- * @type filter
- * @date 23/01/2013
- * @since 3.6.0
- *
- * @param $field (array) the field array holding all the field options
- * @return $field
- */
-
- /*
-
- function update_field( $field ) {
-
- return $field;
-
- }
-
- */
-
-
- /*
- * delete_field()
- *
- * This action is fired after a field is deleted from the database
- *
- * @type action
- * @date 11/02/2014
- * @since 5.0.0
- *
- * @param $field (array) the field array holding all the field options
- * @return n/a
- */
-
- /*
-
- function delete_field( $field ) {
-
-
-
- }
-
- */
-
-
-}
-
-
-// create field
-new acf_field_limiter();
-
-?>
diff --git a/limiter-wysiwyg-v4.php b/limiter-wysiwyg-v4.php
deleted file mode 100755
index 704e134..0000000
--- a/limiter-wysiwyg-v4.php
+++ /dev/null
@@ -1,310 +0,0 @@
-settings = array(
- 'dir' => apply_filters('acf/helpers/get_dir', __FILE__)
- );
-
-
- }
-
-
-
- function create_options( $field )
- {
-
- ?>
-
-
- ");
- echo("");
-
- }
-
-
- function input_admin_enqueue_scripts()
- {
-
-
- // register acf scripts
- wp_register_script( 'acf-wysiwyg-limiter', $this->settings['dir'] . 'js/wysiwyg_limiter.js', array('acf-input'), $this->settings['version'] );
-
- wp_register_style( 'jquery-ui-progressbar.min', $this->settings['dir'] . 'css/jquery-ui-progressbar.min.css', array('acf-input'), $this->settings['version'] );
-
- //jquery-ui-progressbar
- wp_enqueue_script( 'jquery-ui-progressbar');
-
-
- // scripts
- wp_enqueue_script(array(
- 'acf-wysiwyg-limiter',
- ));
-
- // styles
- wp_enqueue_style(array(
- 'jquery-ui-progressbar.min',
- ));
-
-
- }
-
- function input_admin_head()
- {
- // Note: This function can be removed if not used
-
-
-
- }
-
-
- /*
- * field_group_admin_enqueue_scripts()
- *
- * This action is called in the admin_enqueue_scripts action on the edit screen where your field is edited.
- * Use this action to add css + javascript to assist your create_field_options() action.
- *
- * $info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function field_group_admin_enqueue_scripts()
- {
- // Note: This function can be removed if not used
- }
-
-
- /*
- * field_group_admin_head()
- *
- * This action is called in the admin_head action on the edit screen where your field is edited.
- * Use this action to add css and javascript to assist your create_field_options() action.
- *
- * @info http://codex.wordpress.org/Plugin_API/Action_Reference/admin_head
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function field_group_admin_head()
- {
- // Note: This function can be removed if not used
- }
-
-
- /*
- * load_value()
- *
- * This filter is appied to the $value after it is loaded from the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value found in the database
- * @param $post_id - the $post_id from which the value was loaded from
- * @param $field - the field array holding all the field options
- *
- * @return $value - the value to be saved in te database
- */
-
- function load_value( $value, $post_id, $field )
- {
- // Note: This function can be removed if not used
- return $value;
- }
-
-
- /*
- * update_value()
- *
- * This filter is appied to the $value before it is updated in the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which will be saved in the database
- * @param $post_id - the $post_id of which the value will be saved
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function update_value( $value, $post_id, $field )
- {
- // Note: This function can be removed if not used
- return $value;
- }
-
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is passed to the create_field action
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which was loaded from the database
- * @param $post_id - the $post_id from which the value was loaded
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function format_value( $value, $post_id, $field )
- {
- // defaults?
- /*
- $field = array_merge($this->defaults, $field);
- */
-
- // perhaps use $field['preview_size'] to alter the $value?
-
-
- // Note: This function can be removed if not used
- return $value;
- }
-
-
- /*
- * format_value_for_api()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is passed back to the api functions such as the_field
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which was loaded from the database
- * @param $post_id - the $post_id from which the value was loaded
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function format_value_for_api( $value, $post_id, $field )
- {
- // defaults?
- /*
- $field = array_merge($this->defaults, $field);
- */
-
- // perhaps use $field['preview_size'] to alter the $value?
-
-
- // Note: This function can be removed if not used
- return $value;
- }
-
-
- /*
- * load_field()
- *
- * This filter is appied to the $field after it is loaded from the database
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - the field array holding all the field options
- *
- * @return $field - the field array holding all the field options
- */
-
- function load_field( $field )
- {
- // Note: This function can be removed if not used
- return $field;
- }
-
-
- /*
- * update_field()
- *
- * This filter is appied to the $field before it is saved to the database
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - the field array holding all the field options
- * @param $post_id - the field group ID (post_type = acf)
- *
- * @return $field - the modified field
- */
-
- function update_field( $field, $post_id )
- {
- // Note: This function can be removed if not used
- return $field;
- }
-
-
-
-}
-
-
-new acf_field_wysiwyg_limited();
-
-?>
\ No newline at end of file
diff --git a/readme.txt b/readme.txt
old mode 100755
new mode 100644
index 389c134..0963f2d
--- a/readme.txt
+++ b/readme.txt
@@ -1,20 +1,23 @@
=== Advanced Custom Fields: Limiter Field ===
-Contributors: Atomicsmash
-Tags: ACF, ACF3, ACF4, Advanced Custom Fields, Limiter, character number, word count
-Requires at least: 3.0.1
-Tested up to: 3.5.1
-Stable tag: 4.3
+Contributors: Atomic Smash
+Tags: ACF, ACF5, ACF4, Advanced Custom Fields, Limiter, character number, word count
+Requires at least: 4.9.7
+Tested up to: 5.5.3
+Stable tag: trunk
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
-This plugin provides a textarea that limits the number of characters a user can add. The limit is cleanly represented by a jQuery UI progress bar.
+Provides a textarea that limits the number of characters a user can add. The limit is cleanly represented by a jQuery UI progress bar.
== Description ==
-__Works with ACF v4 and v5__
-
This plugin provides an Advanced Custom Field textarea that limits the number of characters a user can add. The limit is cleanly represented by a jQuery Ui progress bar. You can define the number of characters on a per field basis.
+= Compatibility =
+
+This ACF field type is compatible with:
+* ACF 5
+* ACF 4
This has been tested in:
@@ -22,22 +25,20 @@ This has been tested in:
* ACF - Flexible content fields
* ACF - Option pages
-
== Installation ==
-1. Download the plugin
-1. Extract zip and place plugin folder in /wp-content/plugins/
-1. Login into your wordpress installation and activate plugin
-
-
-== Screenshots ==
-
-1. This is the field in action.
-1. These are it's options
-
+1. Copy the `acf-limiter` folder into your `wp-content/plugins` folder
+2. Activate the Limiter plugin via the plugins admin page
+3. Create a new field via ACF and select the Limiter type
+4. Read the description above for usage instructions
== Changelog ==
+= 1.3.0 =
+* Restructured plugin
+* Fixed bug affecting field loading
+* Removed support for ACF3
+
= 1.2.1 =
* Added composer.json