Plugin Directory

Changeset 1244765


Ignore:
Timestamp:
09/14/2015 03:21:54 AM (11 years ago)
Author:
slobodanmanic
Message:

Version 1.2.2

Location:
sticky-header
Files:
25 added
4 edited

Legend:

Unmodified
Added
Removed
  • sticky-header/trunk/README.txt

    r1156881 r1244765  
    44Requires at least: 4.0
    55Tested up to: 4.2.2
    6 Stable tag: 1.2.1
     6Stable tag: 1.2.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5252== Changelog ==
    5353
     54= 1.2.2 =
     55* Uses wp_parse_args to ensure array keys are set. Props github.com/Shelob9.
     56
    5457= 1.2.1 =
    5558* Adds compressed JS and CSS files.
  • sticky-header/trunk/class-sticky-header.php

    r1156881 r1244765  
    2525     * @var     string
    2626     */
    27     const VERSION = '1.2.1';
     27    const VERSION = '1.0.0';
    2828
    2929    /**
     
    119119     */
    120120    public function enqueue_styles() {
    121         $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    122         wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( "css/public$min.css", __FILE__ ), array(), self::VERSION );
     121        wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'css/public.css', __FILE__ ), array(), self::VERSION );
    123122    }
    124123
     
    133132       
    134133        // Send plugin settings to JS file.
    135         $plugin_settings = get_option( 'thsp_sticky_header' );
     134        $plugin_settings = get_option( 'thsp_sticky_header', array() );
     135        $plugin_settings = wp_parse_args( $plugin_settings, array(
     136                'show_at' => 200,
     137                'hide_if_narrower' => 600
     138            )
     139        );
    136140        $script_params = array(
    137141            'show_at'           => $plugin_settings['show_at'],
  • sticky-header/trunk/sticky-header.php

    r1156881 r1244765  
    1313 * Plugin URI:      http://thematosoup.com
    1414 * Description:     Adds sticky header to your WordPress website
    15  * Version:         1.2.1
     15 * Version:         1.2.2
    1616 * Author:          ThematoSoup
    1717 * Author URI:      http://thematosoup.com
  • sticky-header/trunk/views/public.php

    r828982 r1244765  
    1414
    1515// Get Sticky Header options
    16 $thsp_sticky_header_settings = get_option( 'thsp_sticky_header' );
     16$thsp_sticky_header_settings = get_option( 'thsp_sticky_header', array() );
     17$thsp_sticky_header_settings = wp_parse_args( $thsp_sticky_header_settings, array(
     18        'logo' => ''
     19    )
     20);
    1721
    1822// Check if there is a logo image
Note: See TracChangeset for help on using the changeset viewer.