Plugin Directory

Changeset 1447317


Ignore:
Timestamp:
07/01/2016 03:03:16 PM (10 years ago)
Author:
inxilpro
Message:

0.2.0 - Ship

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

Legend:

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

    r1445949 r1447317  
    11=== WP Bootstrap Widgets ===
    22Contributors: inxilpro, jgrossi
    3 Tags: bootstrap, widget, widgets, page builder, responsive, cms, layout, alert, button, embed, image, panel, well
     3Tags: bootstrap, widget, widgets, page builder, responsive, cms, layout, alert, button, embed, image, panel, well, navbar
    44Requires at least: 4.0
    55Tested up to: 4.5.2
    6 Stable tag: 0.1.1
     6Stable tag: 0.2.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1212== Description ==
    1313
    14 WP Bootstrap Widgets provides configurable widgets for common [Twitter Bootstrap (version 3)](https://getbootstrap.com/) components. If your theme is based on Bootstrap, these widgets will automatically look great! Works particularly well with the [SiteOrigin Page Builder](https://wordpress.org/plugins/siteorigin-panels/) as you can drop your widets into your multi-column layouts with ease.
     14WP Bootstrap Widgets provides configurable widgets for common [Twitter Bootstrap (version 3)](https://getbootstrap.com/) components. If your theme is based on Bootstrap, these widgets will automatically look great! Works particularly well with the [SiteOrigin Page Builder](https://wordpress.org/plugins/siteorigin-panels/) as you can drop your widgets into your multi-column layouts with ease.
    1515
    1616Included widgets:
     
    1919  - [Button](https://getbootstrap.com/css/#buttons)
    2020  - [Image](https://getbootstrap.com/css/#images)
     21  - [Navigation Bar](https://getbootstrap.com/components/#navbar)
    2122  - [Responsive Embed](https://getbootstrap.com/components/#responsive-embed)
    2223  - [Panels](https://getbootstrap.com/components/#panels)
    2324  - [Wells](https://getbootstrap.com/components/#wells)
    2425
    25 All widgets are configurable (choose from `primary`, `succcess`, `info`, etc).
     26All widgets are configurable (choose from `primary`, `success`, `info`, etc).
    2627
    2728== Installation ==
     
    3334== Changelog ==
    3435
     36= 0.2 =
     37* Add navbar widget support, with brand name, logo and color.
     38* Better organization of assets files.
     39* Add CSS file for the front end layer.
     40* Add width and height attributes for image widget.
     41
    3542= 0.1 =
    3643Initial release
  • wp-bootstrap-widgets/tags/0.2.0/widgets/image.php

    r1445949 r1447317  
    55 *
    66 * @author Junior Grossi <@jgrossi>
    7  * @todo Add set dimensions
    87 */
    98class WPBW_Widget_Image extends WP_Widget {
     
    2221            )
    2322        );
    24         add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
    25     }
    26 
    27     public function admin_scripts() {
    28         wp_enqueue_media();
    29         wp_enqueue_script( $this->name, plugin_dir_url( __FILE__ ) . '../js/image.js', array( 'jquery' ) );
    3023    }
    3124
     
    5851        $this->form_field_url( $instance );
    5952        $this->form_field_alt( $instance );
     53        $this->form_field_dimensions( $instance );
    6054        $this->form_field_responsive( $instance );
    6155        $this->form_field_shape( $instance );
     
    8478     */
    8579    public function form_field_alt( $instance ) {
    86         $id    = $this->get_field_id( 'alt' );
    87         $name  = $this->get_field_name( 'alt' );
    88         $value = isset( $instance['alt'] ) ? $instance['alt'] : '';
     80        $id          = $this->get_field_id( 'alt' );
     81        $name        = $this->get_field_name( 'alt' );
     82        $value       = isset( $instance['alt'] ) ? $instance['alt'] : '';
    8983        $placeholder = 'eg. Photo of cat pouncing';
    9084        wpbw_field_text( $name, __( 'Descriptive Text (alt):' ), compact( 'id', 'placeholder' ), $value );
     85    }
     86
     87    /**
     88     * The image width and height attributes
     89     *
     90     * @param $instance
     91     */
     92    public function form_field_dimensions( $instance ) {
     93        $id          = $this->get_field_id( 'width' );
     94        $name        = $this->get_field_name( 'width' );
     95        $value       = isset( $instance['width'] ) ? $instance['width'] : '';
     96        $placeholder = 'eg. 640 or 50%';
     97        wpbw_field_text( $name, __( 'Width (pixels or %):' ), compact( 'id', 'placeholder' ), $value );
     98        $id          = $this->get_field_id( 'height' );
     99        $name        = $this->get_field_name( 'height' );
     100        $value       = isset( $instance['height'] ) ? $instance['height'] : '';
     101        $placeholder = 'eg. 480 or 30%';
     102        wpbw_field_text( $name, __( 'Height (pixels or %):' ), compact( 'id', 'placeholder' ), $value );
    91103    }
    92104
  • wp-bootstrap-widgets/tags/0.2.0/wp-bootstrap-widgets.php

    r1445301 r1447317  
    1414
    1515define( 'WPBW_NAME', 'WP Bootstrap Widgets' );
     16define( 'WPBW_SLUG', 'wp-bootstrap-widgets' );
     17define( 'WPBW_URL', plugin_dir_url( __FILE__ ) );
    1618define( 'WPBW_REQUIRED_PHP_VERSION', '5.2' );
    1719define( 'WPBW_REQUIRED_WP_VERSION', '3.0' );
     
    5052    register_widget( 'WPBW_Widget_Embed' );
    5153    register_widget( 'WPBW_Widget_Image' );
     54    register_widget( 'WPBW_Widget_NavigationBar' );
    5255    register_widget( 'WPBW_Widget_Panel' );
    5356    register_widget( 'WPBW_Widget_Well' );
     
    7477}
    7578
     79/**
     80 * Register the plugin CSS and JS files for admin panel
     81 */
     82function wpbw_assets_admin() {
     83    wp_enqueue_media(); // Media Library
     84    wp_enqueue_script( WPBW_SLUG, WPBW_URL . 'assets/scripts-admin.js', array( 'jquery' ) );
     85    wp_enqueue_style( WPBW_SLUG, WPBW_URL . 'assets/styles-admin.css' );
     86}
     87
     88/**
     89 * Register the CSS and JS files for frontend layer
     90 */
     91function wpbw_assets_front() {
     92    wp_enqueue_style( WPBW_SLUG, WPBW_URL . 'assets/styles-front.css' );
     93    wp_enqueue_script(
     94        'bootstrap',
     95        'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js',
     96        array( 'jquery' )
     97    );
     98}
     99
    76100/*
    77101 * Check requirements and load main class
     
    80104if ( wpbw_requirements_met() ) {
    81105    require_once( dirname( __FILE__ ) . '/form-fields.php' );
     106    require_once( dirname( __FILE__ ) . '/include/navigation-bar-walker.php' );
    82107    require_once( dirname( __FILE__ ) . '/widgets/alert.php' );
    83108    require_once( dirname( __FILE__ ) . '/widgets/button.php' );
    84109    require_once( dirname( __FILE__ ) . '/widgets/embed.php' );
    85110    require_once( dirname( __FILE__ ) . '/widgets/image.php' );
     111    require_once( dirname( __FILE__ ) . '/widgets/navigation-bar.php' );
    86112    require_once( dirname( __FILE__ ) . '/widgets/panel.php' );
    87113    require_once( dirname( __FILE__ ) . '/widgets/well.php' );
    88114
    89115    add_action( 'widgets_init', 'wpbw_widgets_init' );
     116    add_action( 'admin_enqueue_scripts', 'wpbw_assets_admin' );
     117    add_action( 'wp_enqueue_scripts', 'wpbw_assets_front' );
    90118    // Site Origin Page Builder Plugin
    91119    if ( has_filter( 'siteorigin_panels_widget_dialog_tabs' ) ) {
  • wp-bootstrap-widgets/trunk/README.txt

    r1445949 r1447317  
    11=== WP Bootstrap Widgets ===
    22Contributors: inxilpro, jgrossi
    3 Tags: bootstrap, widget, widgets, page builder, responsive, cms, layout, alert, button, embed, image, panel, well
     3Tags: bootstrap, widget, widgets, page builder, responsive, cms, layout, alert, button, embed, image, panel, well, navbar
    44Requires at least: 4.0
    55Tested up to: 4.5.2
    6 Stable tag: 0.1.1
     6Stable tag: 0.2.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1212== Description ==
    1313
    14 WP Bootstrap Widgets provides configurable widgets for common [Twitter Bootstrap (version 3)](https://getbootstrap.com/) components. If your theme is based on Bootstrap, these widgets will automatically look great! Works particularly well with the [SiteOrigin Page Builder](https://wordpress.org/plugins/siteorigin-panels/) as you can drop your widets into your multi-column layouts with ease.
     14WP Bootstrap Widgets provides configurable widgets for common [Twitter Bootstrap (version 3)](https://getbootstrap.com/) components. If your theme is based on Bootstrap, these widgets will automatically look great! Works particularly well with the [SiteOrigin Page Builder](https://wordpress.org/plugins/siteorigin-panels/) as you can drop your widgets into your multi-column layouts with ease.
    1515
    1616Included widgets:
     
    1919  - [Button](https://getbootstrap.com/css/#buttons)
    2020  - [Image](https://getbootstrap.com/css/#images)
     21  - [Navigation Bar](https://getbootstrap.com/components/#navbar)
    2122  - [Responsive Embed](https://getbootstrap.com/components/#responsive-embed)
    2223  - [Panels](https://getbootstrap.com/components/#panels)
    2324  - [Wells](https://getbootstrap.com/components/#wells)
    2425
    25 All widgets are configurable (choose from `primary`, `succcess`, `info`, etc).
     26All widgets are configurable (choose from `primary`, `success`, `info`, etc).
    2627
    2728== Installation ==
     
    3334== Changelog ==
    3435
     36= 0.2 =
     37* Add navbar widget support, with brand name, logo and color.
     38* Better organization of assets files.
     39* Add CSS file for the front end layer.
     40* Add width and height attributes for image widget.
     41
    3542= 0.1 =
    3643Initial release
  • wp-bootstrap-widgets/trunk/widgets/image.php

    r1445949 r1447317  
    55 *
    66 * @author Junior Grossi <@jgrossi>
    7  * @todo Add set dimensions
    87 */
    98class WPBW_Widget_Image extends WP_Widget {
     
    2221            )
    2322        );
    24         add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
    25     }
    26 
    27     public function admin_scripts() {
    28         wp_enqueue_media();
    29         wp_enqueue_script( $this->name, plugin_dir_url( __FILE__ ) . '../js/image.js', array( 'jquery' ) );
    3023    }
    3124
     
    5851        $this->form_field_url( $instance );
    5952        $this->form_field_alt( $instance );
     53        $this->form_field_dimensions( $instance );
    6054        $this->form_field_responsive( $instance );
    6155        $this->form_field_shape( $instance );
     
    8478     */
    8579    public function form_field_alt( $instance ) {
    86         $id    = $this->get_field_id( 'alt' );
    87         $name  = $this->get_field_name( 'alt' );
    88         $value = isset( $instance['alt'] ) ? $instance['alt'] : '';
     80        $id          = $this->get_field_id( 'alt' );
     81        $name        = $this->get_field_name( 'alt' );
     82        $value       = isset( $instance['alt'] ) ? $instance['alt'] : '';
    8983        $placeholder = 'eg. Photo of cat pouncing';
    9084        wpbw_field_text( $name, __( 'Descriptive Text (alt):' ), compact( 'id', 'placeholder' ), $value );
     85    }
     86
     87    /**
     88     * The image width and height attributes
     89     *
     90     * @param $instance
     91     */
     92    public function form_field_dimensions( $instance ) {
     93        $id          = $this->get_field_id( 'width' );
     94        $name        = $this->get_field_name( 'width' );
     95        $value       = isset( $instance['width'] ) ? $instance['width'] : '';
     96        $placeholder = 'eg. 640 or 50%';
     97        wpbw_field_text( $name, __( 'Width (pixels or %):' ), compact( 'id', 'placeholder' ), $value );
     98        $id          = $this->get_field_id( 'height' );
     99        $name        = $this->get_field_name( 'height' );
     100        $value       = isset( $instance['height'] ) ? $instance['height'] : '';
     101        $placeholder = 'eg. 480 or 30%';
     102        wpbw_field_text( $name, __( 'Height (pixels or %):' ), compact( 'id', 'placeholder' ), $value );
    91103    }
    92104
  • wp-bootstrap-widgets/trunk/wp-bootstrap-widgets.php

    r1445301 r1447317  
    1414
    1515define( 'WPBW_NAME', 'WP Bootstrap Widgets' );
     16define( 'WPBW_SLUG', 'wp-bootstrap-widgets' );
     17define( 'WPBW_URL', plugin_dir_url( __FILE__ ) );
    1618define( 'WPBW_REQUIRED_PHP_VERSION', '5.2' );
    1719define( 'WPBW_REQUIRED_WP_VERSION', '3.0' );
     
    5052    register_widget( 'WPBW_Widget_Embed' );
    5153    register_widget( 'WPBW_Widget_Image' );
     54    register_widget( 'WPBW_Widget_NavigationBar' );
    5255    register_widget( 'WPBW_Widget_Panel' );
    5356    register_widget( 'WPBW_Widget_Well' );
     
    7477}
    7578
     79/**
     80 * Register the plugin CSS and JS files for admin panel
     81 */
     82function wpbw_assets_admin() {
     83    wp_enqueue_media(); // Media Library
     84    wp_enqueue_script( WPBW_SLUG, WPBW_URL . 'assets/scripts-admin.js', array( 'jquery' ) );
     85    wp_enqueue_style( WPBW_SLUG, WPBW_URL . 'assets/styles-admin.css' );
     86}
     87
     88/**
     89 * Register the CSS and JS files for frontend layer
     90 */
     91function wpbw_assets_front() {
     92    wp_enqueue_style( WPBW_SLUG, WPBW_URL . 'assets/styles-front.css' );
     93    wp_enqueue_script(
     94        'bootstrap',
     95        'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js',
     96        array( 'jquery' )
     97    );
     98}
     99
    76100/*
    77101 * Check requirements and load main class
     
    80104if ( wpbw_requirements_met() ) {
    81105    require_once( dirname( __FILE__ ) . '/form-fields.php' );
     106    require_once( dirname( __FILE__ ) . '/include/navigation-bar-walker.php' );
    82107    require_once( dirname( __FILE__ ) . '/widgets/alert.php' );
    83108    require_once( dirname( __FILE__ ) . '/widgets/button.php' );
    84109    require_once( dirname( __FILE__ ) . '/widgets/embed.php' );
    85110    require_once( dirname( __FILE__ ) . '/widgets/image.php' );
     111    require_once( dirname( __FILE__ ) . '/widgets/navigation-bar.php' );
    86112    require_once( dirname( __FILE__ ) . '/widgets/panel.php' );
    87113    require_once( dirname( __FILE__ ) . '/widgets/well.php' );
    88114
    89115    add_action( 'widgets_init', 'wpbw_widgets_init' );
     116    add_action( 'admin_enqueue_scripts', 'wpbw_assets_admin' );
     117    add_action( 'wp_enqueue_scripts', 'wpbw_assets_front' );
    90118    // Site Origin Page Builder Plugin
    91119    if ( has_filter( 'siteorigin_panels_widget_dialog_tabs' ) ) {
Note: See TracChangeset for help on using the changeset viewer.