WordPress.org

Plugin Directory

Changeset 1362556


Ignore:
Timestamp:
03/02/16 12:20:49 (21 months ago)
Author:
tepelstreel
Message:

AFPW bugfix vs. 3.5.1

Location:
advanced-featured-post-widget
Files:
9 edited
17 copied

Legend:

Unmodified
Added
Removed
  • advanced-featured-post-widget/tags/3.5.1/advanced-fpw.php

    r1358710 r1362556  
    44Plugin URI: http://wasistlos.waldemarstoffel.com/plugins-fur-wordpress/advanced-featured-post-widget 
    55Description: The Advanced Featured Post Widget is yet another plugin to make your blog a bit more newspaper-like. Just by choosing a post from the dropdown menu, you can put it in the 'featured' area and display thumbnail, headline, excerpt or all three of them (if available) in the fully customizable widget. It just has more options than the the Featured Post Widget. 
    6 Version: 3.5 
     6Version: 3.5.1 
    77Author: Stefan Crämer 
    88Author URI: http://www.stefan-craemer.com 
  • advanced-featured-post-widget/tags/3.5.1/class-lib/A5_DynamicFileClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Handels styles or javascript in either dynamical files or inline 
  • advanced-featured-post-widget/tags/3.5.1/class-lib/A5_ExcerptClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Gets the excerpt of a post according to some parameters 
  • advanced-featured-post-widget/tags/3.5.1/class-lib/A5_FormFieldClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Gets all sort of input fields for plugins by Atelier 5  
     
    1616class A5_FormField { 
    1717     
    18     const version = '1.0 beta 20160127 AFPW'; 
     18    const version = '1.0 beta 20160302 AFPW'; 
    1919     
    2020    public $formfield; 
  • advanced-featured-post-widget/tags/3.5.1/class-lib/A5_ImageClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Gets the alt and title tag for attachments 
  • advanced-featured-post-widget/tags/3.5.1/class-lib/A5_OptionPageClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Gets all sort of containers for the flexible A5 settings pages 
     
    142142         
    143143        $class = (false === $closed) ? '' : ' closed'; 
    144      
    145         $output = $eol.'<div id="'.$id.'" class="postbox'.$class.'">'.$eol.$tab.'<div class="handlediv" title="'.__('Click to toggle').'">'.$eol.$dtab.'<br />'.$eol.$tab.'</div>'.$eol.$tab; 
    146              
    147         $output .= $eol.'<h3 class="hndle">'.$eol.$dtab.'<span>'.$label.'</span>'.$eol.$tab.'</h3>'.$eol.$tab.'<div class="inside">'.$eol.$tab;  
     144        $area = (false === $closed) ? 'true' : 'false'; 
     145     
     146        $output = $eol.'<div id="'.$id.'" class="postbox'.$class.'">'.$eol.$tab.'<div class="handlediv" title="'.__('Click to toggle').'" area-expanded="'.$area.'">'.$eol.$dtab.'<br />'.$eol.$tab.'</div>'.$eol.$tab; 
     147             
     148        $output .= $eol.'<h3 class="hndle ui-sortable-handle">'.$eol.$dtab.'<span>'.$label.'</span>'.$eol.$tab.'</h3>'.$eol.$tab.'<div class="inside">'.$eol.$tab;   
    148149         
    149150        return $output; 
  • advanced-featured-post-widget/tags/3.5.1/class-lib/A5_WidgetClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Some standard functions for widgets 
  • advanced-featured-post-widget/tags/3.5.1/class-lib/AFPW_WidgetClass.php

    r1358710 r1362556  
    127127        endforeach; 
    128128         
    129         array_unshift($posts, array('rand', __('Take a random post', 'advanced-fpw'))); 
    130          
    131129        $base_id = 'widget-'.$this->id_base.'-'.$this->number.'-'; 
    132130        $base_name = 'widget-'.$this->id_base.'['.$this->number.']'; 
     
    135133         
    136134        a5_text_field($base_id.'title', $base_name.'[title]', $title, __('Title:', 'advanced-fpw'), array('space' => true, 'class' => 'widefat')); 
    137         a5_select($base_id.'article', $base_name.'[article]', $posts, $article, __('Choose here the post, you want to appear in the widget.', 'advanced-fpw'), false, array('space' => true, 'class' => 'widefat')); 
    138         if ('rand' != $instance['article']) a5_select($base_id.'backup', $base_name.'[backup]',$posts,  $backup, __('Choose here the backup post. It will appear, when a single post page shows the featured article.', 'advanced-fpw'), false, array('space' => true, 'class' => 'widefat')); 
     135        a5_select($base_id.'article', $base_name.'[article]', $posts, $article, __('Choose here the post, you want to appear in the widget.', 'advanced-fpw'), __('Take a random post', 'advanced-fpw'), array('space' => true, 'class' => 'widefat')); 
     136        a5_select($base_id.'backup', $base_name.'[backup]',$posts,  $backup, __('Choose here the backup post. It will appear, when a single post page shows the featured article.', 'advanced-fpw'), __('Take a random post', 'advanced-fpw'), array('space' => true, 'class' => 'widefat')); 
    139137        a5_number_field($base_id.'id', $base_name.'[id]', $id, __('Post ID (if you want a custom post type or simply don&#39;t want to use the dropdown menu):', 'advanced-fpw'), array('space' => true, 'size' => 4, 'step' => 1)); 
    140138        a5_number_field($base_id.'bid', $base_name.'[bid]', $bid, __('ID for backup post (if you want a custom post type or simply you don&#39;t want to use the dropdown menu):', 'advanced-fpw'), array('space' => true, 'size' => 4, 'step' => 1)); 
     
    251249            $current_post = $wp_query->get_queried_object_id(); 
    252250             
    253             $afpw_setup['p'] = ($current_post == $article) ? $backup : $article; 
    254                  
    255             if ('rand' == $afpw_setup['p']) : 
     251            $afpw_setup['p'] = ($current_post == $article) ? (int)$backup : (int)$article; 
     252                 
     253            if (empty($afpw_setup['p'])) : 
    256254             
    257255                $afpw_setup['posts_per_page'] = 1; 
    258256             
    259257                $afpw_setup['orderby'] = 'rand'; 
    260                  
    261                 unset($afpw_setup['p']); 
    262258                 
    263259                $afpw_setup['post__not_in'] = array($current_post); 
  • advanced-featured-post-widget/tags/3.5.1/readme.txt

    r1358710 r1362556  
    55Requires at least: 2.9 
    66Tested up to: 4.5 
    7 Stable tag: 3.5 
     7Stable tag: 3.5.1 
    88 
    99With the Advanced Featured Post Widget you can put a certain post (or post type) in the focus and style it differently. 
     
    8585== Changelog == 
    8686 
     87= 3.5.1 = 
     88 
     89* bug with random posts fixed 
     90 
    8791= 3.5 = 
    8892 
     
    374378 
    375379Framework adjusted; WP 4.5 ready 
     380 
     381= 3.5.1 = 
     382 
     383bug with random posts fixed 
  • advanced-featured-post-widget/trunk/advanced-fpw.php

    r1358710 r1362556  
    44Plugin URI: http://wasistlos.waldemarstoffel.com/plugins-fur-wordpress/advanced-featured-post-widget 
    55Description: The Advanced Featured Post Widget is yet another plugin to make your blog a bit more newspaper-like. Just by choosing a post from the dropdown menu, you can put it in the 'featured' area and display thumbnail, headline, excerpt or all three of them (if available) in the fully customizable widget. It just has more options than the the Featured Post Widget. 
    6 Version: 3.5 
     6Version: 3.5.1 
    77Author: Stefan Crämer 
    88Author URI: http://www.stefan-craemer.com 
  • advanced-featured-post-widget/trunk/class-lib/A5_DynamicFileClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Handels styles or javascript in either dynamical files or inline 
  • advanced-featured-post-widget/trunk/class-lib/A5_ExcerptClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Gets the excerpt of a post according to some parameters 
  • advanced-featured-post-widget/trunk/class-lib/A5_FormFieldClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Gets all sort of input fields for plugins by Atelier 5  
     
    1616class A5_FormField { 
    1717     
    18     const version = '1.0 beta 20160127 AFPW'; 
     18    const version = '1.0 beta 20160302 AFPW'; 
    1919     
    2020    public $formfield; 
  • advanced-featured-post-widget/trunk/class-lib/A5_ImageClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Gets the alt and title tag for attachments 
  • advanced-featured-post-widget/trunk/class-lib/A5_OptionPageClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Gets all sort of containers for the flexible A5 settings pages 
     
    142142         
    143143        $class = (false === $closed) ? '' : ' closed'; 
    144      
    145         $output = $eol.'<div id="'.$id.'" class="postbox'.$class.'">'.$eol.$tab.'<div class="handlediv" title="'.__('Click to toggle').'">'.$eol.$dtab.'<br />'.$eol.$tab.'</div>'.$eol.$tab; 
    146              
    147         $output .= $eol.'<h3 class="hndle">'.$eol.$dtab.'<span>'.$label.'</span>'.$eol.$tab.'</h3>'.$eol.$tab.'<div class="inside">'.$eol.$tab;  
     144        $area = (false === $closed) ? 'true' : 'false'; 
     145     
     146        $output = $eol.'<div id="'.$id.'" class="postbox'.$class.'">'.$eol.$tab.'<div class="handlediv" title="'.__('Click to toggle').'" area-expanded="'.$area.'">'.$eol.$dtab.'<br />'.$eol.$tab.'</div>'.$eol.$tab; 
     147             
     148        $output .= $eol.'<h3 class="hndle ui-sortable-handle">'.$eol.$dtab.'<span>'.$label.'</span>'.$eol.$tab.'</h3>'.$eol.$tab.'<div class="inside">'.$eol.$tab;   
    148149         
    149150        return $output; 
  • advanced-featured-post-widget/trunk/class-lib/A5_WidgetClass.php

    r1358710 r1362556  
    66 * 
    77 * @ A5 Plugin Framework 
    8  * Version: 1.0 beta 20160127 
     8 * Version: 1.0 beta 20160302 
    99 * 
    1010 * Some standard functions for widgets 
  • advanced-featured-post-widget/trunk/class-lib/AFPW_WidgetClass.php

    r1358710 r1362556  
    127127        endforeach; 
    128128         
    129         array_unshift($posts, array('rand', __('Take a random post', 'advanced-fpw'))); 
    130          
    131129        $base_id = 'widget-'.$this->id_base.'-'.$this->number.'-'; 
    132130        $base_name = 'widget-'.$this->id_base.'['.$this->number.']'; 
     
    135133         
    136134        a5_text_field($base_id.'title', $base_name.'[title]', $title, __('Title:', 'advanced-fpw'), array('space' => true, 'class' => 'widefat')); 
    137         a5_select($base_id.'article', $base_name.'[article]', $posts, $article, __('Choose here the post, you want to appear in the widget.', 'advanced-fpw'), false, array('space' => true, 'class' => 'widefat')); 
    138         if ('rand' != $instance['article']) a5_select($base_id.'backup', $base_name.'[backup]',$posts,  $backup, __('Choose here the backup post. It will appear, when a single post page shows the featured article.', 'advanced-fpw'), false, array('space' => true, 'class' => 'widefat')); 
     135        a5_select($base_id.'article', $base_name.'[article]', $posts, $article, __('Choose here the post, you want to appear in the widget.', 'advanced-fpw'), __('Take a random post', 'advanced-fpw'), array('space' => true, 'class' => 'widefat')); 
     136        a5_select($base_id.'backup', $base_name.'[backup]',$posts,  $backup, __('Choose here the backup post. It will appear, when a single post page shows the featured article.', 'advanced-fpw'), __('Take a random post', 'advanced-fpw'), array('space' => true, 'class' => 'widefat')); 
    139137        a5_number_field($base_id.'id', $base_name.'[id]', $id, __('Post ID (if you want a custom post type or simply don&#39;t want to use the dropdown menu):', 'advanced-fpw'), array('space' => true, 'size' => 4, 'step' => 1)); 
    140138        a5_number_field($base_id.'bid', $base_name.'[bid]', $bid, __('ID for backup post (if you want a custom post type or simply you don&#39;t want to use the dropdown menu):', 'advanced-fpw'), array('space' => true, 'size' => 4, 'step' => 1)); 
     
    251249            $current_post = $wp_query->get_queried_object_id(); 
    252250             
    253             $afpw_setup['p'] = ($current_post == $article) ? $backup : $article; 
    254                  
    255             if ('rand' == $afpw_setup['p']) : 
     251            $afpw_setup['p'] = ($current_post == $article) ? (int)$backup : (int)$article; 
     252                 
     253            if (empty($afpw_setup['p'])) : 
    256254             
    257255                $afpw_setup['posts_per_page'] = 1; 
    258256             
    259257                $afpw_setup['orderby'] = 'rand'; 
    260                  
    261                 unset($afpw_setup['p']); 
    262258                 
    263259                $afpw_setup['post__not_in'] = array($current_post); 
  • advanced-featured-post-widget/trunk/readme.txt

    r1358710 r1362556  
    55Requires at least: 2.9 
    66Tested up to: 4.5 
    7 Stable tag: 3.5 
     7Stable tag: 3.5.1 
    88 
    99With the Advanced Featured Post Widget you can put a certain post (or post type) in the focus and style it differently. 
     
    8585== Changelog == 
    8686 
     87= 3.5.1 = 
     88 
     89* bug with random posts fixed 
     90 
    8791= 3.5 = 
    8892 
     
    374378 
    375379Framework adjusted; WP 4.5 ready 
     380 
     381= 3.5.1 = 
     382 
     383bug with random posts fixed 
Note: See TracChangeset for help on using the changeset viewer.