Plugin Directory

Changeset 1471086


Ignore:
Timestamp:
08/09/2016 09:11:16 PM (10 years ago)
Author:
inxilpro
Message:

0.2.2 - Ship

Location:
wp-bootstrap-widgets
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-bootstrap-widgets/tags/0.2.2/README.txt

    r1447323 r1471086  
    44Requires at least: 4.0
    55Tested up to: 4.5.2
    6 Stable tag: 0.2.1
     6Stable tag: 0.2.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434== Changelog ==
    3535
     36= 0.2.2 =
     37* Add optional title to Responsive Embed component.
     38
    3639= 0.2 =
    3740* Add navbar widget support, with brand name, logo and color.
  • wp-bootstrap-widgets/tags/0.2.2/widgets/embed.php

    r1445949 r1471086  
    3838        $aspect_ratio = isset( $instance['aspect_ratio'] ) ? $instance['aspect_ratio'] : 'embed-responsive-16by9';
    3939        $code         = isset( $instance['code'] ) ? $instance['code'] : '';
     40        $title        = isset( $instance['title'] ) ? $instance['title'] : '';
    4041        echo $args['before_widget'];
     42        if ( ! empty( $title ) ) {
     43            echo $args['before_title'] . $title . $args['after_title'];
     44        }
    4145        ?>
    4246        <div class="embed-responsive <?php echo $aspect_ratio; ?>">
     
    5559     */
    5660    public function form( $instance ) {
     61        $this->form_field_title( $instance );
    5762        $this->form_field_code( $instance );
    5863        $this->form_field_aspect_ratio( $instance );
     64    }
     65
     66    /**
     67     * @param $instance
     68     */
     69    public function form_field_title( $instance ) {
     70        $id    = $this->get_field_id( 'title' );
     71        $name  = $this->get_field_name( 'title' );
     72        $value = isset( $instance['title'] ) ? $instance['title'] : '';
     73        wpbw_field_text( $name, __( 'Title <em>(optional)</em>:' ), compact( 'id' ), $value );
    5974    }
    6075
     
    104119        $instance['code']         = $this->filter_code_field( $new_instance['code'] );
    105120        $instance['aspect_ratio'] = strip_tags( $new_instance['aspect_ratio'] );
     121        $instance['title']        = strip_tags( $new_instance['title'] );
    106122
    107123        return $instance;
  • wp-bootstrap-widgets/tags/0.2.2/wp-bootstrap-widgets.php

    r1447323 r1471086  
    44Plugin URI:  https://github.com/glhd/wp-bootstrap-widgets
    55Description: Bootstrap Components as WordPress Widgets
    6 Version:     0.2.1
     6Version:     0.2.2
    77Author:      Galahad, Inc.
    88Author URI:  http://glhd.org/
  • wp-bootstrap-widgets/trunk/README.txt

    r1447323 r1471086  
    44Requires at least: 4.0
    55Tested up to: 4.5.2
    6 Stable tag: 0.2.1
     6Stable tag: 0.2.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434== Changelog ==
    3535
     36= 0.2.2 =
     37* Add optional title to Responsive Embed component.
     38
    3639= 0.2 =
    3740* Add navbar widget support, with brand name, logo and color.
  • wp-bootstrap-widgets/trunk/widgets/embed.php

    r1445949 r1471086  
    3838        $aspect_ratio = isset( $instance['aspect_ratio'] ) ? $instance['aspect_ratio'] : 'embed-responsive-16by9';
    3939        $code         = isset( $instance['code'] ) ? $instance['code'] : '';
     40        $title        = isset( $instance['title'] ) ? $instance['title'] : '';
    4041        echo $args['before_widget'];
     42        if ( ! empty( $title ) ) {
     43            echo $args['before_title'] . $title . $args['after_title'];
     44        }
    4145        ?>
    4246        <div class="embed-responsive <?php echo $aspect_ratio; ?>">
     
    5559     */
    5660    public function form( $instance ) {
     61        $this->form_field_title( $instance );
    5762        $this->form_field_code( $instance );
    5863        $this->form_field_aspect_ratio( $instance );
     64    }
     65
     66    /**
     67     * @param $instance
     68     */
     69    public function form_field_title( $instance ) {
     70        $id    = $this->get_field_id( 'title' );
     71        $name  = $this->get_field_name( 'title' );
     72        $value = isset( $instance['title'] ) ? $instance['title'] : '';
     73        wpbw_field_text( $name, __( 'Title <em>(optional)</em>:' ), compact( 'id' ), $value );
    5974    }
    6075
     
    104119        $instance['code']         = $this->filter_code_field( $new_instance['code'] );
    105120        $instance['aspect_ratio'] = strip_tags( $new_instance['aspect_ratio'] );
     121        $instance['title']        = strip_tags( $new_instance['title'] );
    106122
    107123        return $instance;
  • wp-bootstrap-widgets/trunk/wp-bootstrap-widgets.php

    r1447323 r1471086  
    44Plugin URI:  https://github.com/glhd/wp-bootstrap-widgets
    55Description: Bootstrap Components as WordPress Widgets
    6 Version:     0.2.1
     6Version:     0.2.2
    77Author:      Galahad, Inc.
    88Author URI:  http://glhd.org/
Note: See TracChangeset for help on using the changeset viewer.