WordPress.org

Plugin Directory

Changeset 644501


Ignore:
Timestamp:
12/26/12 02:34:51 (16 months ago)
Author:
mrwweb
Message:

checking in v1.1.1 changes

Location:
feature-a-page-widget/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • feature-a-page-widget/trunk/feature-a-page-widget.php

    r644160 r644501  
    44* Description: Feature a single page in any sidebar. 
    55* Plugin URI: http://mrwweb.com/feature-a-page-widget-plugin-wordpress/ 
    6 * Version: 1.1.0 
     6* Version: 1.1.1 
    77* Author: Mark Root-Wiley (MRWweb) 
    88* Author URI: http://mrwweb.com 
     
    3131defined('ABSPATH') or die("Cannot access pages directly."); 
    3232 
    33 define('FPW_VERSION', '1.1.0'); 
     33define('FPW_VERSION', '1.1.1'); 
    3434 
    3535function fpw_update_version() { 
  • feature-a-page-widget/trunk/fpw_views/fpw_default.php

    r623010 r644501  
    88 * $page_title - The featured page's title 
    99 * $page_title_html - Full HTML markup used for the page title element 
     10 * $post_classes - a string of post classes, added v1.1.1 
    1011 * $featured image - the full <img> markup for the feature page's post thumbnail, _if it exists_ 
    1112 * $image_size - a string representing the defined image size. It iss selected based on the layout. 
     
    2324 
    2425// And now the widget title 
    25 if( $title ) 
     26if( $title ) { 
    2627    echo  wp_kses_post( $before_title ) . sanitize_text_field( $title ) .  wp_kses_post( $after_title ); 
     28} 
    2729 
    2830// Open the article element for the page 
    29 printf( 
    30     '<article class="fpw-layout-%1$s fpw-clearfix">', 
    31     esc_attr( $layout ) 
     31printf( '<article class="%1$s">', 
     32    esc_attr( $post_classes ) 
    3233); 
    3334 
    3435// Open link before for Title and Image 
    3536printf( 
    36     '<a href="%1$s" title="%2$s" class="fpw-featured-link">', 
     37    '<a href="%1$s" title="%2$s" class="fpw-featured-link" rel="bookmark">', 
    3738    get_permalink( (int) $featured_page_id ), 
    3839    esc_attr( get_the_title( (int) $featured_page_id ) ) 
     
    4041 
    4142// Title goes before the image for the "wrapped layout" 
    42 if( $layout == 'wrapped' ) 
     43if( $layout == 'wrapped' ) { 
    4344    echo wp_kses_post( $page_title_html ); 
     45} 
    4446 
    4547// Show the featured image if it exists 
     
    5355 
    5456// All other layouts put the image after the image 
    55 if( $layout != 'wrapped' ) 
     57if( $layout != 'wrapped' ) { 
    5658    echo wp_kses_post( $page_title_html ); 
     59} 
    5760 
    5861// close the link 
     
    6164if( $excerpt ) { 
    6265    printf( 
    63         '<p class="fpw-excerpt">%1$s</p>', 
     66        '<p class="fpw-excerpt entry-summary">%1$s</p>', 
    6467        wp_kses_post( $excerpt ) 
    6568    ); 
  • feature-a-page-widget/trunk/fpw_widget.class.php

    r633720 r644501  
    137137            $title = apply_filters( 'widget_title', $title ); 
    138138 
     139        // Let's make a post_class string 
     140        $post_class = get_post_class( 'hentry fpw-clearfix fpw-layout-' . esc_attr( $layout ), (int) $featured_page_id ); 
     141        $post_classes = ''; 
     142        foreach ($post_class as $class) { 
     143            $post_classes .= $class . ' '; 
     144        } 
     145 
    139146        // see if there's a page title. if so, put it together nicely for use in the widget 
    140147        if ( $featured_page->post_title ) { 
    141148            $page_title = apply_filters( 'fpw_page_title', esc_attr( $featured_page->post_title ) ); 
    142149            $page_title_html = sprintf(  
    143                 '<h1 class="fpw-page-title">%1$s</h1>', 
     150                '<h1 class="fpw-page-title entry-title">%1$s</h1>', 
    144151                sanitize_text_field( $page_title ) 
    145152            ); 
     
    177184                break; 
    178185        } 
     186 
    179187        // see if there is a post_thumbnail grab it and filter it 
    180188        if ( has_post_thumbnail( $featured_page_id ) ) { 
    181             $featured_image = get_the_post_thumbnail( $featured_page_id, $image_size ); 
     189            $featured_image = get_the_post_thumbnail( $featured_page_id, $image_size, array( 'class' => 'attachment-$size entry-image') ); 
    182190            $featured_image = apply_filters( 'fpw_featured_image', $featured_image, $featured_page_id ); 
    183191        } else { 
  • feature-a-page-widget/trunk/readme.txt

    r633720 r644501  
    3636 
    3737= Themes Tested = 
    38 Twenty Twelve, Twenty Eleven, Twenty Ten, P2, Kubrick (for old times' sake), Multiple Custom Themes 
     38Twenty Twelve, Twenty Eleven, Twenty Ten, P2, Kubrick (for old times' sake), Multiple Custom Themes. [Known theme incompatibilities.](http://wordpress.org/extend/plugins/feature-a-page-widget/other_notes/) 
    3939 
    4040== Installation == 
     
    64641. Update the page. 
    6565 
    66 = Where do I find the Featured Image or Excerpt fields? = 
     66= Where do I find the Featured Image or Excerpt fields? I don't see them. = 
     67The Featured Image and Excerpt fields are found on the Page editing screen of the Page you want to feature. If you don't see them: 
    67681. In the top right corner of any **Page**, click "Screen Options." 
    68691. From the menu that slides down, make sure the "Excerpt" and "Featured Image" are both checked. 
    69 1. Done! WordPress remembers this choice on all pages. 
     701. WordPress will remember this choice on all pages. 
    7071 
    7172= What are those icons in the "Select Page" drop down? / How can I tell if a page has a featured image or excerpt already? = 
     
    1231242. No need to choke down "option soup." 
    1241253. Widget interface shows you which pages have featured images and excerpts. 
     1264. Uses standard WordPress fields (Title, Featured Image, and Excerpt) that you already know and love. 
    125127 
    126128== Changelog == 
     129 
     130= 1.1.1 = 
     131* Fixed version number and plugin update hook. 
     132* Added post classes & hAtom markup to widget view (see [thread](http://wordpress.org/support/topic/applying-a-ahover-featured-image-possible?replies=5)). If you have customized `fpw_default.php`, you will need to review changes to the template in this version to take advantage of new classes. 
     133* Added known incompatibilites list to "Other Notes" section. 
    127134 
    128135= 1.1.0 = 
     
    153160 
    154161== Upgrade Notice == 
     162= 1.1.1 = 
     163* Improved widget markup & a few tiny fixes. Anyone who has customized fpw_default.php may want to integrate the new changes. 
    155164 
    156165= 1.1.0 = 
     
    164173 
    165174== Roadmap == 
     175 
     176= Known Theme Incompatibilities = 
     177* "Theme ID". [Support thread with fix.](http://wordpress.org/support/topic/text-not-wrapped-around-image?replies=4) 
    166178 
    167179= Philosophy = 
Note: See TracChangeset for help on using the changeset viewer.