Plugin Directory

Changeset 2549275


Ignore:
Timestamp:
06/16/2021 09:55:50 PM (5 years ago)
Author:
trepmal
Message:

Update to version 1.4.1 from GitHub

Location:
mini-loops
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • mini-loops/tags/1.4.1/CHANGELOG.md

    r2546965 r2549275  
    11## Changelog
     2
     3### Version 1.4.1
     4
     5- Fix: Corrects sloppy shortcode fixes.
     6- Fix: Mini-Mini-Loops widget default settings.
    27
    38### Version 1.4
  • mini-loops/tags/1.4.1/helpers.php

    r2546965 r2549275  
    316316        $atts['item_format'] = do_shortcode( $content );
    317317    } elseif ( ! empty( $content) ) {
    318         $content = ltrim( $content, '</p>' );
    319         $content = rtrim( $content, '<p>' );
     318        // for some annoying reason, shortcode content often ends up like this:
     319        // `</p>%thecontent%<p>`
     320        // so we explicitly look for these errant tags and remove them
     321        if ( substr( $content, 0, 4 ) === '</p>' ){
     322            $content = substr( $content, 4 );
     323        }
     324        if ( substr( $content, -3 ) === '<p>' ){
     325            $content = substr( $content, 0, -3 );
     326        }
    320327        $atts['item_format'] = miniloops_straighten_quote( $content );
    321328    }
  • mini-loops/tags/1.4.1/mini-loops.php

    r2546965 r2549275  
    55Plugin URI: http://trepmal.com/plugins/mini-loops/
    66Description: Query posts and display them where you want
    7 Version: 1.4
     7Version: 1.4.1
    88Author: Kailey Lampert
    99Author URI: http://kaileylampert.com
  • mini-loops/tags/1.4.1/readme.txt

    r2546965 r2549275  
    55Requires at least: 3.5
    66Tested up to: 5.7
    7 Stable tag: 1.4
     7Stable tag: 1.4.1
    88License: GPLv2 or later
    99
     
    341341== Upgrade Notice ==
    342342
     343= 1.4.1 =
     344Fix: Corrects sloppy shortcode fixes and Mini-Mini-Loops widget default settings.
     345
    343346= 1.4 =
    344347General updates, improved shortcode compat with the Block Editor.
     
    375378
    376379== Changelog ==
     380
     381= Version 1.4.1 =
     382* Fix: Corrects sloppy shortcode fixes.
     383* Fix: Mini-Mini-Loops widget default settings.
    377384
    378385= Version 1.4 =
  • mini-loops/tags/1.4.1/widget.php

    r2546965 r2549275  
    3939        //get old variables
    4040        $instance['title']                   = wp_kses_post( $new_instance['title'] );
    41         $instance['hide_title']              = (bool) isset( $new_instance['hide_title'] ) ? 1 : 0;
     41        $instance['hide_title']              = (bool) isset( $new_instance['hide_title'] ) && $new_instance['hide_title'] ? 1 : 0;
    4242        $instance['title_url']               = esc_url( $new_instance['title_url'] );
    4343        $instance['number_posts']            = (int) $new_instance['number_posts'];
     
    4949        $instance['order']                   = esc_attr( $new_instance['order'] );
    5050        $instance['order_meta_key']          = esc_attr( $new_instance['order_meta_key'] );
    51         $instance['reverse_order']           = (bool) isset( $new_instance['reverse_order'] ) ? 1 : 0;
    52         $instance['shuffle_order']           = (bool) isset( $new_instance['shuffle_order'] ) ? 1 : 0;
    53         $instance['ignore_sticky']           = (bool) isset( $new_instance['ignore_sticky'] ) ? 1 : 0;
    54         $instance['only_sticky']             = (bool) isset( $new_instance['only_sticky'] ) ? 1 : 0;
    55         $instance['exclude_sticky']          = (bool) isset( $new_instance['exclude_sticky'] ) ? 1 : 0;
    56         $instance['exclude_current']         = (bool) isset( $new_instance['exclude_current'] ) ? 1 : 0;
    57         $instance['current_category']        = (bool) isset( $new_instance['current_category'] ) ? 1 : 0;
    58         $instance['current_single_category'] = (bool) isset( $new_instance['current_single_category'] ) ? 1 : 0;
    59         $instance['current_author']          = (bool) isset( $new_instance['current_author'] ) ? 1 : 0;
     51        $instance['reverse_order']           = (bool) isset( $new_instance['reverse_order'] ) && $new_instance['reverse_order'] ? 1 : 0;
     52        $instance['shuffle_order']           = (bool) isset( $new_instance['shuffle_order'] ) && $new_instance['shuffle_order'] ? 1 : 0;
     53        $instance['ignore_sticky']           = (bool) isset( $new_instance['ignore_sticky'] ) && $new_instance['ignore_sticky'] ? 1 : 0;
     54        $instance['only_sticky']             = (bool) isset( $new_instance['only_sticky'] ) && $new_instance['only_sticky'] ? 1 : 0;
     55        $instance['exclude_sticky']          = (bool) isset( $new_instance['exclude_sticky'] ) && $new_instance['exclude_sticky'] ? 1 : 0;
     56        $instance['exclude_current']         = (bool) isset( $new_instance['exclude_current'] ) && $new_instance['exclude_current'] ? 1 : 0;
     57        $instance['current_category']        = (bool) isset( $new_instance['current_category'] ) && $new_instance['current_category'] ? 1 : 0;
     58        $instance['current_single_category'] = (bool) isset( $new_instance['current_single_category'] ) && $new_instance['current_single_category'] ? 1 : 0;
     59        $instance['current_author']          = (bool) isset( $new_instance['current_author'] ) && $new_instance['current_author'] ? 1 : 0;
    6060        $instance['categories']              = esc_attr( $new_instance['categories'] );
    6161        $instance['tags']                    = esc_attr( $new_instance['tags'] );
     
    9797        $instance = wp_parse_args( (array) $instance, get_miniloops_defaults() );
    9898        extract( $instance );
    99 
    10099        ?>
    101100        <p><?php esc_html_e( 'Back to basics. Just recent posts. No fuss.', 'mini-loops' ); ?></p>
     
    125124        <input name="<?php echo esc_attr( $this->get_field_name('order_by') ); ?>" type="hidden" value="<?php echo esc_attr( $order_by ); ?>" />
    126125        <input name="<?php echo esc_attr( $this->get_field_name('order') ); ?>" type="hidden" value="<?php echo esc_attr( $order ); ?>" />
     126        <input name="<?php echo esc_attr( $this->get_field_name('order_meta_key') ); ?>" type="hidden" value="<?php echo esc_attr( $order_meta_key ); ?>" />
    127127        <input name="<?php echo esc_attr( $this->get_field_name('reverse_order') ); ?>" type="hidden" value="<?php echo esc_attr( $reverse_order ); ?>" />
    128128        <input name="<?php echo esc_attr( $this->get_field_name('shuffle_order') ); ?>" type="hidden" value="<?php echo esc_attr( $shuffle_order ); ?>" />
  • mini-loops/trunk/CHANGELOG.md

    r2546965 r2549275  
    11## Changelog
     2
     3### Version 1.4.1
     4
     5- Fix: Corrects sloppy shortcode fixes.
     6- Fix: Mini-Mini-Loops widget default settings.
    27
    38### Version 1.4
  • mini-loops/trunk/helpers.php

    r2546965 r2549275  
    316316        $atts['item_format'] = do_shortcode( $content );
    317317    } elseif ( ! empty( $content) ) {
    318         $content = ltrim( $content, '</p>' );
    319         $content = rtrim( $content, '<p>' );
     318        // for some annoying reason, shortcode content often ends up like this:
     319        // `</p>%thecontent%<p>`
     320        // so we explicitly look for these errant tags and remove them
     321        if ( substr( $content, 0, 4 ) === '</p>' ){
     322            $content = substr( $content, 4 );
     323        }
     324        if ( substr( $content, -3 ) === '<p>' ){
     325            $content = substr( $content, 0, -3 );
     326        }
    320327        $atts['item_format'] = miniloops_straighten_quote( $content );
    321328    }
  • mini-loops/trunk/mini-loops.php

    r2546965 r2549275  
    55Plugin URI: http://trepmal.com/plugins/mini-loops/
    66Description: Query posts and display them where you want
    7 Version: 1.4
     7Version: 1.4.1
    88Author: Kailey Lampert
    99Author URI: http://kaileylampert.com
  • mini-loops/trunk/readme.txt

    r2546965 r2549275  
    55Requires at least: 3.5
    66Tested up to: 5.7
    7 Stable tag: 1.4
     7Stable tag: 1.4.1
    88License: GPLv2 or later
    99
     
    341341== Upgrade Notice ==
    342342
     343= 1.4.1 =
     344Fix: Corrects sloppy shortcode fixes and Mini-Mini-Loops widget default settings.
     345
    343346= 1.4 =
    344347General updates, improved shortcode compat with the Block Editor.
     
    375378
    376379== Changelog ==
     380
     381= Version 1.4.1 =
     382* Fix: Corrects sloppy shortcode fixes.
     383* Fix: Mini-Mini-Loops widget default settings.
    377384
    378385= Version 1.4 =
  • mini-loops/trunk/widget.php

    r2546965 r2549275  
    3939        //get old variables
    4040        $instance['title']                   = wp_kses_post( $new_instance['title'] );
    41         $instance['hide_title']              = (bool) isset( $new_instance['hide_title'] ) ? 1 : 0;
     41        $instance['hide_title']              = (bool) isset( $new_instance['hide_title'] ) && $new_instance['hide_title'] ? 1 : 0;
    4242        $instance['title_url']               = esc_url( $new_instance['title_url'] );
    4343        $instance['number_posts']            = (int) $new_instance['number_posts'];
     
    4949        $instance['order']                   = esc_attr( $new_instance['order'] );
    5050        $instance['order_meta_key']          = esc_attr( $new_instance['order_meta_key'] );
    51         $instance['reverse_order']           = (bool) isset( $new_instance['reverse_order'] ) ? 1 : 0;
    52         $instance['shuffle_order']           = (bool) isset( $new_instance['shuffle_order'] ) ? 1 : 0;
    53         $instance['ignore_sticky']           = (bool) isset( $new_instance['ignore_sticky'] ) ? 1 : 0;
    54         $instance['only_sticky']             = (bool) isset( $new_instance['only_sticky'] ) ? 1 : 0;
    55         $instance['exclude_sticky']          = (bool) isset( $new_instance['exclude_sticky'] ) ? 1 : 0;
    56         $instance['exclude_current']         = (bool) isset( $new_instance['exclude_current'] ) ? 1 : 0;
    57         $instance['current_category']        = (bool) isset( $new_instance['current_category'] ) ? 1 : 0;
    58         $instance['current_single_category'] = (bool) isset( $new_instance['current_single_category'] ) ? 1 : 0;
    59         $instance['current_author']          = (bool) isset( $new_instance['current_author'] ) ? 1 : 0;
     51        $instance['reverse_order']           = (bool) isset( $new_instance['reverse_order'] ) && $new_instance['reverse_order'] ? 1 : 0;
     52        $instance['shuffle_order']           = (bool) isset( $new_instance['shuffle_order'] ) && $new_instance['shuffle_order'] ? 1 : 0;
     53        $instance['ignore_sticky']           = (bool) isset( $new_instance['ignore_sticky'] ) && $new_instance['ignore_sticky'] ? 1 : 0;
     54        $instance['only_sticky']             = (bool) isset( $new_instance['only_sticky'] ) && $new_instance['only_sticky'] ? 1 : 0;
     55        $instance['exclude_sticky']          = (bool) isset( $new_instance['exclude_sticky'] ) && $new_instance['exclude_sticky'] ? 1 : 0;
     56        $instance['exclude_current']         = (bool) isset( $new_instance['exclude_current'] ) && $new_instance['exclude_current'] ? 1 : 0;
     57        $instance['current_category']        = (bool) isset( $new_instance['current_category'] ) && $new_instance['current_category'] ? 1 : 0;
     58        $instance['current_single_category'] = (bool) isset( $new_instance['current_single_category'] ) && $new_instance['current_single_category'] ? 1 : 0;
     59        $instance['current_author']          = (bool) isset( $new_instance['current_author'] ) && $new_instance['current_author'] ? 1 : 0;
    6060        $instance['categories']              = esc_attr( $new_instance['categories'] );
    6161        $instance['tags']                    = esc_attr( $new_instance['tags'] );
     
    9797        $instance = wp_parse_args( (array) $instance, get_miniloops_defaults() );
    9898        extract( $instance );
    99 
    10099        ?>
    101100        <p><?php esc_html_e( 'Back to basics. Just recent posts. No fuss.', 'mini-loops' ); ?></p>
     
    125124        <input name="<?php echo esc_attr( $this->get_field_name('order_by') ); ?>" type="hidden" value="<?php echo esc_attr( $order_by ); ?>" />
    126125        <input name="<?php echo esc_attr( $this->get_field_name('order') ); ?>" type="hidden" value="<?php echo esc_attr( $order ); ?>" />
     126        <input name="<?php echo esc_attr( $this->get_field_name('order_meta_key') ); ?>" type="hidden" value="<?php echo esc_attr( $order_meta_key ); ?>" />
    127127        <input name="<?php echo esc_attr( $this->get_field_name('reverse_order') ); ?>" type="hidden" value="<?php echo esc_attr( $reverse_order ); ?>" />
    128128        <input name="<?php echo esc_attr( $this->get_field_name('shuffle_order') ); ?>" type="hidden" value="<?php echo esc_attr( $shuffle_order ); ?>" />
Note: See TracChangeset for help on using the changeset viewer.