Plugin Directory

Changeset 534339


Ignore:
Timestamp:
04/21/2012 03:08:33 AM (14 years ago)
Author:
kaser
Message:

updating plugin to version 1.2!

Location:
akfeatured-post-widget
Files:
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • akfeatured-post-widget/tags/1.1/ak_featured_post.php

    r533761 r534339  
    44Plugin URI: http://cssboss.com/featured_post
    55Description: Plugin to display the latest post from a specific category
    6 Version: 1.1
     6Version: 1.2
    77Author: Andrew Kaser
    88Author URI: http://www.andrewkaser.com
     
    1010*/
    1111
     12/*  Copyright 2012  ANDREW KASER  (email : [email protected])
     13
     14    This program is free software; you can redistribute it and/or modify
     15    it under the terms of the GNU General Public License, version 2, as
     16    published by the Free Software Foundation.
     17
     18    This program is distributed in the hope that it will be useful,
     19    but WITHOUT ANY WARRANTY; without even the implied warranty of
     20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     21    GNU General Public License for more details.
     22
     23    You should have received a copy of the GNU General Public License
     24    along with this program; if not, write to the Free Software
     25    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     26*/
     27
    1228    class ak_featured_post_widget extends WP_Widget {
    13         public function __construct() {
     29        public function __construct()
     30        {
    1431            parent::__construct(
    1532                'ak_featured_post_widget', // Base ID
     
    3249        }
    3350       
    34         public function form($instance){
     51        public function form($instance)
     52        {
    3553            if (isset($instance['category'])){ $category = $instance[ 'category' ]; } else { $category = __( 'Featured', 'text_domain' ); }
    3654            if (isset($instance['title'])){ $title=$instance['title']; } else { $title=__('Featured Post','text_domain'); }
     
    3856            if (isset($instance['show_post_title'])){ $show_post_title = $instance['show_post_title']; } else { $show_post_title = __('checked','text_domain'); }
    3957            if (isset($instance['show_post_limit'])){ $show_post_limit = $instance['show_post_limit']; } else { $show_post_limit = __('1','text_domain'); }
     58            if (isset($instance['show_featured_image'])){ $show_featured_image = $instance['show_featured_image']; } else { $show_featured_image = __('checked','text_domain'); }
     59            if (isset($instance['show_support_link'])){ $show_support_link = $instance['show_support_link']; } else { $show_support_link = __('checked','text_domain'); }
    4060            ?>
    4161            <p>
     
    4666            <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
    4767            <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
     68            <br />
    4869           
    4970            <label for="<?php echo $this->get_field_id( 'link_title_to_cat' ); ?>"><?php _e( 'Link Title To Category :' ); ?></label>
    5071            <input id="<?php echo $this->get_field_id( 'link_title_to_cat' ); ?>" name="<?php echo $this->get_field_name( 'link_title_to_cat' ); ?>" type="checkbox" value="<?php echo esc_attr( $link_title_to_cat ); ?>" <?php checked( (bool) $link_title_to_cat, true ); ?> />
    5172            <br />
     73           
    5274            <label for="<?php echo $this->get_field_id( 'category' ); ?>"><?php _e( 'Category :' ); ?></label>
    5375            <select id="<?php echo $this->get_field_id( 'catgeory' ); ?>" name="<?php echo $this->get_field_name( 'category' ); ?>" >
     
    6789            </select>
    6890            <br />
     91           
    6992            <label for="<?php echo $this->get_field_id( 'show_post_title' ); ?>"><?php _e( 'Show Post Title :' ); ?></label>
    7093            <input id="<?php echo $this->get_field_id( 'show_post_title' ); ?>" name="<?php echo $this->get_field_name( 'show_post_title' ); ?>" type="checkbox" value="<?php echo esc_attr( $show_post_title ); ?>" <?php checked( (bool) $show_post_title, true ); ?> />
     94            <br />
     95           
     96            <label for="<?php echo $this->get_field_id( 'show_featured_image' ); ?>"><?php _e( 'Show Featured Image :' ); ?></label>
     97            <input id="<?php echo $this->get_field_id( 'show_featured_image' ); ?>" name="<?php echo $this->get_field_name( 'show_featured_image' ); ?>" type="checkbox" value="<?php echo esc_attr( $show_featured_image ); ?>" <?php checked( (bool) $show_featured_image, true ); ?> />
     98            <br />
     99           
     100            <label for="<?php echo $this->get_field_id( 'show_support_link' ); ?>"><?php _e( 'Show Support Link :' ); ?></label>
     101            <input id="<?php echo $this->get_field_id( 'show_support_link' ); ?>" name="<?php echo $this->get_field_name( 'show_support_link' ); ?>" type="checkbox" value="<?php echo esc_attr( $show_support_link ); ?>" <?php checked( (bool) $show_support_link, true ); ?> />
    71102           
    72103            </p>
     
    82113            $instance['title'] = strip_tags( $new_instance['title']);
    83114            $instance['show_post_title'] =  ( isset( $new_instance['show_post_title'] ) ? 1 : 0 );
     115            $instance['show_featured_image'] =  ( isset( $new_instance['show_featured_image'] ) ? 1 : 0 );
     116            $instance['show_support_link'] =  ( isset( $new_instance['show_support_link'] ) ? 1 : 0 );
    84117            return $instance;
    85118        }
     
    99132            $show_post_title = $instance['show_post_title'];
    100133            $show_post_limit = $instance['show_post_limit'];
     134            $show_featured_image = $instance['show_featured_image'];
     135            $show_support_link = $instance['show_support_link'];
     136           
    101137           
    102138
     
    120156                        if ($show_post_title) { the_title(); } // To show the title of the post, or not... That is the question
    121157           
    122                         if (has_post_thumbnail()) {
    123                                 the_post_thumbnail('medium', array(
    124                                 'class' => 'ak_featured_post_image',
    125                                 'title' => $image_title));
    126                         }       
     158                        if ( $show_featured_image )
     159                        {
     160                            if (has_post_thumbnail())
     161                            {
     162                                    the_post_thumbnail('medium', array(
     163                                    'class' => 'ak_featured_post_image',
     164                                    'title' => $image_title));
     165                            }       
     166                        }
    127167                        ?>
    128168                    </a>
     169                   
    129170                </li>
    130171                <?php
    131172             endwhile;
    132 
     173           
     174            if ( $show_support_link )
     175            { ?>
     176                Powered By <a href="http://www.cssboss.com/featured_post" target="_blank">AK: Featured Post</a>
     177            <?php }
    133178            echo $after_widget; // end widget
    134179
  • akfeatured-post-widget/tags/1.1/readme.txt

    r534209 r534339  
    88Contributors: Kaser\
    99Donate Link: http://www.cssboss.com/donate\
    10 Tags : Featured Posts, Post Widget, Category Posts Widget, display posts\
     10Tags: Featured Posts, Post Widget, Category Posts Widget, display posts\
    1111Requires at least: 3.3\
    12 Tested up to 3.3\
     12Tested up to: 3.3\
    1313Stable tag: 1.1\
    1414\
    15 A simple widget that you can use to display a number of posts (from 1 to 99) from a specific category into any widgetized area of your blog. \
    16 Watch This Video : {\field{\*\fldinst{HYPERLINK "http://www.youtube.com/watch?v=eWhafkO7uJQ"}}{\fldrslt http://www.youtube.com/watch?v=eWhafkO7uJQ}}\
     15A widget that you can use to display posts from a category \
     16Watch This Video : http://www.youtube.com/watch?v=eWhafkO7uJQ\
    1717\
    1818== Description ==\
     
    2121\
    2222Video is more my style, so check out this video tutorial I made for the plugin \
    23 {\field{\*\fldinst{HYPERLINK "http://www.youtube.com/watch?v=eWhafkO7uJQ"}}{\fldrslt http://www.youtube.com/watch?v=eWhafkO7uJQ}}\
     23http://www.youtube.com/watch?v=eWhafkO7uJQ\
    2424\
    2525* You can create custom titles\
     
    3535\
    3636To manually upload the plugin :\
    37 1. Download and extract the `ak-featured-post` plugin from {\field{\*\fldinst{HYPERLINK "http://wordpress.org/extend/plugins/akfeatured-post-widget/"}}{\fldrslt http://wordpress.org/extend/plugins/akfeatured-post-widget/}} \
     371. Download and extract the `ak-featured-post` plugin from http://wordpress.org/extend/plugins/akfeatured-post-widget/ \
    38382. Upload `ak-featured-post` plugin folder to your wordpress plugin directory, default is `wp-content/plugins/`\
    39393. Activate the plugin through the 'Plugins' menu inside of the wordpress wp-admin dashboard\
  • akfeatured-post-widget/trunk/ak_featured_post.php

    r533761 r534339  
    44Plugin URI: http://cssboss.com/featured_post
    55Description: Plugin to display the latest post from a specific category
    6 Version: 1.1
     6Version: 1.2
    77Author: Andrew Kaser
    88Author URI: http://www.andrewkaser.com
     
    1010*/
    1111
     12/*  Copyright 2012  ANDREW KASER  (email : [email protected])
     13
     14    This program is free software; you can redistribute it and/or modify
     15    it under the terms of the GNU General Public License, version 2, as
     16    published by the Free Software Foundation.
     17
     18    This program is distributed in the hope that it will be useful,
     19    but WITHOUT ANY WARRANTY; without even the implied warranty of
     20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     21    GNU General Public License for more details.
     22
     23    You should have received a copy of the GNU General Public License
     24    along with this program; if not, write to the Free Software
     25    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     26*/
     27
    1228    class ak_featured_post_widget extends WP_Widget {
    13         public function __construct() {
     29        public function __construct()
     30        {
    1431            parent::__construct(
    1532                'ak_featured_post_widget', // Base ID
     
    3249        }
    3350       
    34         public function form($instance){
     51        public function form($instance)
     52        {
    3553            if (isset($instance['category'])){ $category = $instance[ 'category' ]; } else { $category = __( 'Featured', 'text_domain' ); }
    3654            if (isset($instance['title'])){ $title=$instance['title']; } else { $title=__('Featured Post','text_domain'); }
     
    3856            if (isset($instance['show_post_title'])){ $show_post_title = $instance['show_post_title']; } else { $show_post_title = __('checked','text_domain'); }
    3957            if (isset($instance['show_post_limit'])){ $show_post_limit = $instance['show_post_limit']; } else { $show_post_limit = __('1','text_domain'); }
     58            if (isset($instance['show_featured_image'])){ $show_featured_image = $instance['show_featured_image']; } else { $show_featured_image = __('checked','text_domain'); }
     59            if (isset($instance['show_support_link'])){ $show_support_link = $instance['show_support_link']; } else { $show_support_link = __('checked','text_domain'); }
    4060            ?>
    4161            <p>
     
    4666            <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
    4767            <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
     68            <br />
    4869           
    4970            <label for="<?php echo $this->get_field_id( 'link_title_to_cat' ); ?>"><?php _e( 'Link Title To Category :' ); ?></label>
    5071            <input id="<?php echo $this->get_field_id( 'link_title_to_cat' ); ?>" name="<?php echo $this->get_field_name( 'link_title_to_cat' ); ?>" type="checkbox" value="<?php echo esc_attr( $link_title_to_cat ); ?>" <?php checked( (bool) $link_title_to_cat, true ); ?> />
    5172            <br />
     73           
    5274            <label for="<?php echo $this->get_field_id( 'category' ); ?>"><?php _e( 'Category :' ); ?></label>
    5375            <select id="<?php echo $this->get_field_id( 'catgeory' ); ?>" name="<?php echo $this->get_field_name( 'category' ); ?>" >
     
    6789            </select>
    6890            <br />
     91           
    6992            <label for="<?php echo $this->get_field_id( 'show_post_title' ); ?>"><?php _e( 'Show Post Title :' ); ?></label>
    7093            <input id="<?php echo $this->get_field_id( 'show_post_title' ); ?>" name="<?php echo $this->get_field_name( 'show_post_title' ); ?>" type="checkbox" value="<?php echo esc_attr( $show_post_title ); ?>" <?php checked( (bool) $show_post_title, true ); ?> />
     94            <br />
     95           
     96            <label for="<?php echo $this->get_field_id( 'show_featured_image' ); ?>"><?php _e( 'Show Featured Image :' ); ?></label>
     97            <input id="<?php echo $this->get_field_id( 'show_featured_image' ); ?>" name="<?php echo $this->get_field_name( 'show_featured_image' ); ?>" type="checkbox" value="<?php echo esc_attr( $show_featured_image ); ?>" <?php checked( (bool) $show_featured_image, true ); ?> />
     98            <br />
     99           
     100            <label for="<?php echo $this->get_field_id( 'show_support_link' ); ?>"><?php _e( 'Show Support Link :' ); ?></label>
     101            <input id="<?php echo $this->get_field_id( 'show_support_link' ); ?>" name="<?php echo $this->get_field_name( 'show_support_link' ); ?>" type="checkbox" value="<?php echo esc_attr( $show_support_link ); ?>" <?php checked( (bool) $show_support_link, true ); ?> />
    71102           
    72103            </p>
     
    82113            $instance['title'] = strip_tags( $new_instance['title']);
    83114            $instance['show_post_title'] =  ( isset( $new_instance['show_post_title'] ) ? 1 : 0 );
     115            $instance['show_featured_image'] =  ( isset( $new_instance['show_featured_image'] ) ? 1 : 0 );
     116            $instance['show_support_link'] =  ( isset( $new_instance['show_support_link'] ) ? 1 : 0 );
    84117            return $instance;
    85118        }
     
    99132            $show_post_title = $instance['show_post_title'];
    100133            $show_post_limit = $instance['show_post_limit'];
     134            $show_featured_image = $instance['show_featured_image'];
     135            $show_support_link = $instance['show_support_link'];
     136           
    101137           
    102138
     
    120156                        if ($show_post_title) { the_title(); } // To show the title of the post, or not... That is the question
    121157           
    122                         if (has_post_thumbnail()) {
    123                                 the_post_thumbnail('medium', array(
    124                                 'class' => 'ak_featured_post_image',
    125                                 'title' => $image_title));
    126                         }       
     158                        if ( $show_featured_image )
     159                        {
     160                            if (has_post_thumbnail())
     161                            {
     162                                    the_post_thumbnail('medium', array(
     163                                    'class' => 'ak_featured_post_image',
     164                                    'title' => $image_title));
     165                            }       
     166                        }
    127167                        ?>
    128168                    </a>
     169                   
    129170                </li>
    130171                <?php
    131172             endwhile;
    132 
     173           
     174            if ( $show_support_link )
     175            { ?>
     176                Powered By <a href="http://www.cssboss.com/featured_post" target="_blank">AK: Featured Post</a>
     177            <?php }
    133178            echo $after_widget; // end widget
    134179
  • akfeatured-post-widget/trunk/readme.txt

    r534209 r534339  
    88Contributors: Kaser\
    99Donate Link: http://www.cssboss.com/donate\
    10 Tags : Featured Posts, Post Widget, Category Posts Widget, display posts\
     10Tags: Featured Posts, Post Widget, Category Posts Widget, display posts\
    1111Requires at least: 3.3\
    12 Tested up to 3.3\
     12Tested up to: 3.3\
    1313Stable tag: 1.1\
    1414\
    15 A simple widget that you can use to display a number of posts (from 1 to 99) from a specific category into any widgetized area of your blog. \
    16 Watch This Video : {\field{\*\fldinst{HYPERLINK "http://www.youtube.com/watch?v=eWhafkO7uJQ"}}{\fldrslt http://www.youtube.com/watch?v=eWhafkO7uJQ}}\
     15A widget that you can use to display posts from a category \
     16Watch This Video : http://www.youtube.com/watch?v=eWhafkO7uJQ\
    1717\
    1818== Description ==\
     
    2121\
    2222Video is more my style, so check out this video tutorial I made for the plugin \
    23 {\field{\*\fldinst{HYPERLINK "http://www.youtube.com/watch?v=eWhafkO7uJQ"}}{\fldrslt http://www.youtube.com/watch?v=eWhafkO7uJQ}}\
     23http://www.youtube.com/watch?v=eWhafkO7uJQ\
    2424\
    2525* You can create custom titles\
     
    3535\
    3636To manually upload the plugin :\
    37 1. Download and extract the `ak-featured-post` plugin from {\field{\*\fldinst{HYPERLINK "http://wordpress.org/extend/plugins/akfeatured-post-widget/"}}{\fldrslt http://wordpress.org/extend/plugins/akfeatured-post-widget/}} \
     371. Download and extract the `ak-featured-post` plugin from http://wordpress.org/extend/plugins/akfeatured-post-widget/ \
    38382. Upload `ak-featured-post` plugin folder to your wordpress plugin directory, default is `wp-content/plugins/`\
    39393. Activate the plugin through the 'Plugins' menu inside of the wordpress wp-admin dashboard\
Note: See TracChangeset for help on using the changeset viewer.