Plugin Directory

Changeset 1811440


Ignore:
Timestamp:
01/29/2018 08:28:20 PM (8 years ago)
Author:
teakor
Message:

Adding 1.0.4 version

Location:
acf-bootstrap-button/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • acf-bootstrap-button/trunk/acf-bbutton.php

    r1801006 r1811440  
    55 * Plugin URI: https://wordpress.org/plugins/acf-bootstrap-button/
    66 * Description: Add a field to create a Bootstrap Button for the popular Advanced Custom Fields plugin, with internal or external link.
    7  * Version: 1.0.3
     7 * Version: 1.0.4
    88 * Author: teakor
    99 * Author URI:
     
    3333    *  @type    function
    3434    *  @date    17/02/2016
    35     *  @since   1.0.3
     35    *  @since   1.0.4
    3636    *
    3737    *  @param   n/a
     
    4343        // vars
    4444        $this->settings = array(
    45             'version'   => '1.0.3',
     45            'version'   => '1.0.4',
    4646            'url'       => plugin_dir_url( __FILE__ ),
    4747            'path'      => plugin_dir_path( __FILE__ )
     
    6868    *  @type    function
    6969    *  @date    17/02/2016
    70     *  @since   1.0.3
     70    *  @since   1.0.4
    7171    *
    7272    *  @param   $version (int) major ACF version. Defaults to false
     
    9696
    9797    $active = ( $field['active_state'] ) ? " active" : "";
    98     $class = trim($field['style'] . ' ' . $field['size'] . ' ' . $active . ' ' . $field['css_class']);
     98    $class = trim($field['style'] . ' ' . $field['size'] . $active . ' ' . $field['css_class']);
    9999
    100100    switch ($field['tag']){
     
    108108
    109109        case "button":
    110             $disabled = ( $field['disabled_state'] ) ? 'disabled="disabled"' : "";
     110            $disabled = ( $field['disabled_state'] ) ? 'disabled' : "";
    111111            $text = ( $field['text'] == "") ? $field['title'] : $field['text'];
    112112            $bbutton = sprintf('<button class="btn %s" %s type="button">%s</button>', $class, $disabled, $text);
     
    114114
    115115        case "input":
    116             $disabled = ( $field['disabled_state'] ) ? 'disabled="disabled"' : "";
     116        case "submit":
     117        case "reset":
     118            $disabled = ( $field['disabled_state'] ) ? 'disabled' : "";
    117119            $text = ( $field['text'] == "") ? $field['title'] : $field['text'];
    118             $bbutton = sprintf('<input class="btn %s" %s type="button" value="%s">', $class, $disabled, $text);
    119             break;
    120 
    121         case "submit":
    122             $disabled = ( $field['disabled_state'] ) ? 'disabled="disabled"' : "";
    123             $text = ( $field['text'] == "") ? $field['title'] : $field['text'];
    124             $bbutton = sprintf('<input class="btn %s" %s type="submit" value="%s">', $class, $disabled, $text);
     120            $bbutton = sprintf('<input class="btn %s" %s type="%s" value="%s">', $class, $disabled, $field['tag'],$text);
    125121            break;
    126122    }
  • acf-bootstrap-button/trunk/fields/acf-bbutton-v4.php

    r1801006 r1811440  
    144144                        'input'     => __("Input",'acf-bootstrap-button'),
    145145                        'submit'    => __("Submit",'acf-bootstrap-button'),
     146                        'reset'     => __("Reset",'acf-bootstrap-button'),
    146147                    )
    147148                ));
     
    340341                            <option value="input" <?php if ( $field['value']['tag'] == 'input' ) echo 'selected'; ?>><?php _e("Input",'acf-bootstrap-button'); ?></option>
    341342                            <option value="submit" <?php if ( $field['value']['tag'] == 'submit' ) echo 'selected'; ?>><?php _e("Submit",'acf-bootstrap-button'); ?></option>
     343                            <option value="reset" <?php if ( $field['value']['tag'] == 'reset' ) echo 'selected'; ?>><?php _e("Reset",'acf-bootstrap-button'); ?></option>
    342344                        </select>
    343345                    </div>
  • acf-bootstrap-button/trunk/readme.txt

    r1801006 r1811440  
    33Tags: acf, advanced, custom, field, fields, form, repeater, content, button, bootstrap
    44Requires at least: 4.5.0
    5 Tested up to: 4.9.1
    6 Stable tag: 1.0.3
     5Tested up to: 4.9.2
     6Stable tag: 1.0.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Add a field to create a Bootstrap Button for the popular Advanced Custom Fields plugin, with internal or external link.
     10This plugin adds a field for creating e a Bootstrap button for the popular plugin Advanced Custom Fields. In addition to supporting all Bootstrap options, you can insert an internal or external link with the link picker.
    1111
    1212== Description ==
    1313
    14 Add a field to create a Bootstrap Button for the popular Advanced Custom Fields plugin, with internal or external link.
    15 
     14This plugin adds a field for creating e a Bootstrap button for the popular plugin Advanced Custom Fields. In addition to supporting all Bootstrap options, you can insert an internal or external link with the link picker.
    1615
    1716= Configuration Options: =
    1817    1.  Button text.
    19     2.  Tag HTML (a, button, input, submit).
     18    2.  Tag HTML (a, button, input, submit, reset).
    2019    3.  Button Style (Default, Primary, Success, Information, Warning, Danger, Link).
    2120    4.  Button Size (Default, Large, Small, Extra Small).
     
    2423    7.  Internal or external link.
    2524
    26 The points between 1 and 6 can be configured with default values and set so that they are not visible on the page or in the post where this custom field is added.
    27 For more information on points between 2 and 5, please refer to the [Bootstrap documentation](https://getbootstrap.com/docs/3.3/css/#buttons).
     25Points from 1 to 7 can be configured with default values and you can choose whether or not to display these options on the page or post, where this custom field was added.
    2826
    29 = Use =
    30 To display the button in the Front End, put the following code in your theme.
     27For more information on points from 2 to 5 refer to the [Bootstrap documentation 3.3.7](https://getbootstrap.com/docs/3.3/css/#buttons).
     28
     29= How to use it =
     30  The plugin does not include the Bootstrap css in the theme in order to be able to display it correctly, it is necessary to insert the Bootstrap css in the theme, following the guidelines of Wordpress: Including CSS & JavaScript.
     31
     32  To view the button in the front end, a function has been implemented, which will facilitate the operation. This function will only read the values of the button and return the correct HTML.
    3133
    3234`echo acf_bbutton_render(get_field('my-bbutton'));`
    33 
    34 = Note =
    35 It is recommended to let this plugin enqueue the latest version stable of [Bootstraap 3.3](https://getbootstrap.com/docs/3.3/).
    3635
    3736= Compatibility =
     
    4039* ACF 4
    4140
    42 = Features Next Release =
    43 * Add ACF 5 compatibility
    44 
    4541== Installation ==
    4642
     
    48442. Activate the Advanced Custom Fields: Bootstrap Button plugin via the plugins admin page
    49453. Create a new field via ACF and select the Button type
    50 4. Please refer to the description for more info regarding the field type settings
     464. Please refer to the plugin description for more info regarding the field type settings
    5147
    5248== Screenshots ==
     
    5753
    5854== Changelog ==
     55= 1.0.4 =
     56* Add Tag reset
     57
    5958= 1.0.3 =
    6059* Fix bug language
Note: See TracChangeset for help on using the changeset viewer.