Changeset 897356
- Timestamp:
- 04/18/2014 01:25:49 PM (10 years ago)
- Location:
- genesis-featured-content-widget/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
genesis-featured-content-widget/trunk/README.md
r837424 r897356 73 73 1. gsfc_after_taxonomy_more (alias of gsfc_after_category_more) - after the archive more conditional block 74 74 1. gsfc_after_[TAXONOMY]_more (alias of gsfc_after_category_more) - after the archive more conditional block 75 1. gs _featured_content_show_content - create your own custom content block75 1. gs_show_content - create your own custom content block 76 76 77 77 ### What Filters are available? ### -
genesis-featured-content-widget/trunk/css/column-classes.css
r837424 r897356 3 3 --------------------------------------------- */ 4 4 5 .five-sixths, 6 .four-sixths, 7 .four-fifths, 8 .one-fifth, 9 .one-fourth, 10 .one-half, 11 .one-sixth, 12 .one-third, 13 .three-fourths, 14 .three-fifths, 15 .three-sixths, 16 .two-fourths, 17 .two-fifths, 18 .two-sixths, 19 .two-thirds { 20 float: left; 21 margin-left: 2.564102564102564%; 5 .widget.featured-content-portfolio .gs-featured-content-entry { 6 clear: none !important; 22 7 } 23 8 24 .one-half, 25 .three-sixths, 26 .two-fourths { 27 width: 48.717948717948715%; 9 .widget.featured-content-portfolio .five-sixths, 10 .widget.featured-content-portfolio .four-sixths, 11 .widget.featured-content-portfolio .four-fifths, 12 .widget.featured-content-portfolio .one-fifth, 13 .widget.featured-content-portfolio .one-fourth, 14 .widget.featured-content-portfolio .one-half, 15 .widget.featured-content-portfolio .one-sixth, 16 .widget.featured-content-portfolio .one-third, 17 .widget.featured-content-portfolio .three-fourths, 18 .widget.featured-content-portfolio .three-fifths, 19 .widget.featured-content-portfolio .three-sixths, 20 .widget.featured-content-portfolio .two-fourths, 21 .widget.featured-content-portfolio .two-fifths, 22 .widget.featured-content-portfolio .two-sixths, 23 .widget.featured-content-portfolio .two-thirds { 24 float: left; 25 margin-left: 2.564102564102564% !important; 26 margin-right: 0 !important; 28 27 } 29 28 30 .one-third, 31 .two-sixths { 32 width: 31.623931623931625%; 29 .widget.featured-content-portfolio .one-half, 30 .widget.featured-content-portfolio .three-sixths, 31 .widget.featured-content-portfolio .two-fourths { 32 width: 48.717948717948715% !important; 33 33 } 34 34 35 . four-sixths,36 . two-thirds {37 width: 65.81196581196582%;35 ., 36 .s { 37 width: ; 38 38 } 39 39 40 .one-fourth { 41 width: 23.076923076923077%; 40 .widget.featured-content-portfolio .four-sixths, 41 .widget.featured-content-portfolio .two-thirds { 42 width: 65.81196581196582% !important; 42 43 } 43 44 44 . three-fourths{45 width: 74.35897435897436%;45 . { 46 width: ; 46 47 } 47 48 48 . one-fifth{49 width: 17.9487179487179488%;49 . { 50 width: ; 50 51 } 51 52 52 . two-fifths{53 width: 38.4615384615384616%;53 . { 54 width: ; 54 55 } 55 56 56 . three-fifths {57 width: 58.9743589743589744%;57 .-fifths { 58 width: ; 58 59 } 59 60 60 . four-fifths {61 width: 79.4871794871794872%;61 .-fifths { 62 width: ; 62 63 } 63 64 64 . one-sixth{65 width: 14.52991452991453%;65 . { 66 width: ; 66 67 } 67 68 68 . five-sixths{69 width: 82.90598290598291%;69 . { 70 width: ; 70 71 } 71 72 72 .first { 73 .widget.featured-content-portfolio .five-sixths { 74 width: 82.90598290598291% !important; 75 } 76 77 .widget.featured-content-portfolio .first { 73 78 clear: both; 74 margin-left: 0 ;79 margin-left: 0; 75 80 } -
genesis-featured-content-widget/trunk/css/column-classes.min.css
r818042 r897356 1 .five-sixths,.four-sixths,.four-fifths,.one-fifth,.one-fourth,.one-half,.one-sixth,.one-third,.three-fourths,.three-fifths,.three-sixths,.two-fourths,.two-fifths,.two-sixths,.two-thirds {float: left;margin-left: 2.564102564102564%;}.one-half,.three-sixths,.two-fourths {width: 48.717948717948715%;}.one-third,.two-sixths {width: 31.623931623931625%}.four-sixths,.two-thirds {width: 65.81196581196582%}.one-fourth {width: 23.076923076923077%}.three-fourths {width: 74.35897435897436%}.one-fifth {width: 17.9487179487179488%}.two-fifths {width: 38.4615384615384616%}.three-fifths {width: 58.9743589743589744%}.four-fifths {width: 79.4871794871794872%}.one-sixth {width: 14.52991452991453%}.five-sixths {width: 82.90598290598291%}.first {clear: both;margin-left: 0} 1 .widget.featured-content-portfolio .gs-featured-content-entry{clear:none!important} 2 .widget.featured-content-portfolio .five-sixths,.widget.featured-content-portfolio .four-sixths,.widget.featured-content-portfolio .four-fifths,.widget.featured-content-portfolio .one-fifth,.widget.featured-content-portfolio .one-fourth,.widget.featured-content-portfolio .one-half,.widget.featured-content-portfolio .one-sixth,.widget.featured-content-portfolio .one-third,.widget.featured-content-portfolio .three-fourths,.widget.featured-content-portfolio .three-fifths,.widget.featured-content-portfolio .three-sixths,.widget.featured-content-portfolio .two-fourths,.widget.featured-content-portfolio .two-fifths,.widget.featured-content-portfolio .two-sixths,.widget.featured-content-portfolio .two-thirds{float:left;margin-left:2.5641025641%!important;margin-right:0!important} 3 .widget.featured-content-portfolio .one-half,.widget.featured-content-portfolio .three-sixths,.widget.featured-content-portfolio .two-fourths{width:48.7179487179%!important} 4 .widget.featured-content-portfolio .one-third,.widget.featured-content-portfolio .two-sixths{width:31.6239316239%!important} 5 .widget.featured-content-portfolio .four-sixths,.widget.featured-content-portfolio .two-thirds{width:65.811965812%!important} 6 .widget.featured-content-portfolio .one-fourth{width:23.0769230769%!important} 7 .widget.featured-content-portfolio .three-fourths{width:74.358974359%!important} 8 .widget.featured-content-portfolio .one-fifth{width:17.9487179487%!important} 9 .widget.featured-content-portfolio .two-fifths{width:38.4615384615%!important} 10 .widget.featured-content-portfolio .three-fifths{width:58.9743589744%!important} 11 .widget.featured-content-portfolio .four-fifths{width:79.4871794872%!important} 12 .widget.featured-content-portfolio .one-sixth{width:14.5299145299%!important} 13 .widget.featured-content-portfolio .five-sixths{width:82.905982906%!important} 14 .widget.featured-content-portfolio .first{clear:both;margin-left:0!important} -
genesis-featured-content-widget/trunk/gs-featured-content-widget.php
r837424 r897356 4 4 * Plugin URI: https://wpsmith.net/ 5 5 * Description: Based on the Genesis Featured Widget Amplified for additional functionality which allows support for custom post types, taxonomies, and extends the flexibility of the widget via action hooks to allow the elements to be re-positioned or other elements to be added. 6 * Version: 1.1. 06 * Version: 1.1. 7 7 * Author: Travis Smith 8 8 * Author URI: http://wpsmith.net/ … … 47 47 $latest = '2.0'; 48 48 49 $theme_info = get_theme_data( TEMPLATEPATH . '/style.css' ); 50 51 if ( basename( TEMPLATEPATH ) != 'genesis' ) { 49 if ( basename( get_template_directory() ) != 'genesis' ) { 52 50 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate ourself 53 wp_die( sprintf( __( 'Sorry, you can\'t activate unless you have installed %1$sGenesis%2$s', 'g fwa' ), '<a href="http://wpsmith.net/get-genesis/">', '</a>' ) );51 wp_die( sprintf( __( 'Sorry, you can\'t activate unless you have installed %1$sGenesis%2$s', 'g' ), '<a href="http://wpsmith.net/get-genesis/">', '</a>' ) ); 54 52 } 55 53 56 if ( function_exists( 'genesis_truncate_phrase' ) ) 57 $version = genesis_truncate_phrase( $theme_info['Version'], 3 ); 58 59 if ( version_compare( $version, $latest, '<' ) ) { 54 if ( ! function_exists( 'genesis_upgrade_2001' ) ) { 60 55 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate ourself 61 56 wp_die( sprintf( __( 'Sorry, you can\'t activate without %1$sGenesis %2$s%3$s or greater', 'gsfc' ), '<a href="http://wpsmith.net/get-genesis/">', $latest, '</a>' ) ); -
genesis-featured-content-widget/trunk/readme.txt
r837425 r897356 70 70 1. gsfc_after_taxonomy_more (alias of gsfc_after_category_more) - after the archive more conditional block 71 71 1. gsfc_after_[TAXONOMY]_more (alias of gsfc_after_category_more) - after the archive more conditional block 72 1. gs _featured_content_show_content - create your own custom content block72 1. gs_show_content - create your own custom content block 73 73 1. gsfc_debug - debug filter, deletes all transients. 74 74 … … 84 84 85 85 == Changelog == 86 1.1.0 (01/12/2011) 86 1.1.2 (01/12/2013) 87 * Fixed column classes to ensure they over-ride child theme settings if selected. 88 89 1.1.1 (01/12/2013) 90 * Updated action/filters for consistency. DO NOT upgrade if you have used these hooks/filters without comparing. 91 92 1.1.0 (01/12/2013) 87 93 * First WordPress Repo Release 88 94 -
genesis-featured-content-widget/trunk/widget.php
r837424 r897356 144 144 145 145 GS_Featured_Content::add(); 146 do_action( 'gs _featured_content_actions', $this );146 do_action( 'gs_actions', $this ); 147 147 } 148 148 … … 178 178 //* Do Post Info By Line 179 179 add_action( 'gsfc_before_post_content', array( 'GS_Featured_Content', 'do_byline' ), 5 ); 180 add_action( 'gsfc_post_content', array( 'GS_Featured_Content', 'do_byline' ) );180 add_action( 'gsfc_post_content', array( 'GS_Featured_Content', 'do_byline' ) ); 181 181 add_action( 'gsfc_after_post_content', array( 'GS_Featured_Content', 'do_byline' ) ); 182 182 … … 221 221 public static function excerpt_more( $more_text ) { 222 222 if ( isset( GS_Featured_Content::$widget_instance['more_text'] ) && GS_Featured_Content::$widget_instance['more_text'] ) { 223 return sprintf( '<a href="%s">%s</a>', get_permalink(), GS_Featured_Content::$widget_instance['more_text'], GS_Featured_Content::$widget_instance['more_text'] );223 return sprintf( '<a href="%s">%s</a>', get_permalink(), GS_Featured_Content::$widget_instance['more_text'], GS_Featured_Content::$widget_instance['more_text'] ); 224 224 } 225 225 return $more_text; … … 346 346 */ 347 347 public static function do_byline( $instance ) { 348 if ( empty( $instance['show_byline'] ) || empty( $instance['post_info'] ) ) return; 348 if ( empty( $instance['show_byline'] ) || empty( $instance['post_info'] ) ) { 349 return; 350 } 349 351 350 352 $byline = ''; 351 if ( !empty( $instance['post_info'] ) ) 353 if ( !empty( $instance['post_info'] ) ) 352 354 $byline = sprintf( '<p class="byline post-info">%s</p>', do_shortcode( esc_html( $instance['post_info'] ) ) ); 355 353 356 354 357 GS_Featured_Content::maybe_echo( $instance, 'gsfc_before_post_content', 'byline_position', 'before-title', $byline ); 355 GS_Featured_Content::maybe_echo( $instance, 'gsfc_ after_post_content', 'byline_position', 'after-title', $byline );358 GS_Featured_Content::maybe_echo( $instance, 'gsfc_post_content', 'byline_position', 'after-title', $byline ); 356 359 } 357 360 … … 475 478 $title = the_title_attribute( 'echo=0' ); 476 479 477 if ( genesis_html5() ) 478 $hclass = ' class="entry-title"';479 else480 if ( genesis_html5() ) 481 $hclass = ; 482 480 483 $hclass = ''; 484 481 485 482 486 printf( '<h2%s>%s%s%s</h2>', $hclass, $wrap_open, $title, $wrap_close ); … … 501 505 the_content( esc_html( $instance['more_text'] ) ); 502 506 } else { 503 do_action( 'gs _featured_content_show_content' );507 do_action( 'gs_show_content' ); 504 508 } 505 509 } … … 592 596 public static function sanitize_transient( $name ) { 593 597 if ( 40 < strlen( $name ) ) 594 $name = substr( $ string, 0, 40 );598 $name = substr( $, 0, 40 ); 595 599 return $name; 596 600 } … … 611 615 return get_transient( $name ); 612 616 } 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 613 668 614 669 /** … … 647 702 GS_Featured_Content::action( 'gsfc_taxonomy_more', $instance ); 648 703 GS_Featured_Content::action( 'gsfc_' . $taxonomy . '_more', $instance ); 649 $term = get_term_by( 'slug', $posts_term['1'], $taxonomy );704 $term = get_term_by( 'slug', $posts_term['1'], $taxonomy ); 650 705 printf( 651 '<p class="more-from-% s"><a href="%1$s" title="%2$s">%3$s</a></p>',706 '<p class="more-from-%$s</a></p>', 652 707 $taxonomy, 653 708 esc_url( get_term_link( $posts_term['1'], $taxonomy ) ), … … 1082 1137 'optimize' => array( 1083 1138 'label' => __( 'Optimize?', 'gsfc' ), 1084 'description' => 'Check to optimize WP_Query & enable site transients for the query results. You MUST set Instance Identification Field below.',1139 'description' => 'Check to optimize WP_Query & enable site transients for the query results. .', 1085 1140 'type' => 'checkbox', 1086 1141 'requires' => '', … … 1491 1546 return $random_string; 1492 1547 } 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1493 1580 1494 1581 /** … … 1580 1667 __( 'All Taxonomies and Terms', 'gsfc' ) 1581 1668 ); 1582 1583 $taxonomies = get_taxonomies( array( 'public' => true), 'objects' );1669 1670 $taxonomies = ), 'objects' ); 1584 1671 $taxonomies = array_filter( $taxonomies, array( __CLASS__, 'exclude_taxonomies' ) ); 1585 1672 … … 1797 1884 // no 'class' attribute - add one with the value of width 1798 1885 if( strpos( $b, 'class' ) === false ) { 1799 $b = str_replace( '>', 'class="' . GS_Featured_Content::$base . '-' . $class. ' featuredpost"', $b );1886 $b = str_replace( '>', 'class="' . GS_Featured_Content::$base . '-' . . ' featuredpost"', $b ); 1800 1887 } 1801 1888 // there is 'class' attribute - append width value to it 1802 1889 else { 1803 $b = str_replace( 'class="', 'class="'. GS_Featured_Content::$base . '-' . $class. ' featuredpost ', $b );1890 $b = str_replace( 'class="', 'class="'. GS_Featured_Content::$base . '-' . . ' featuredpost ', $b ); 1804 1891 } 1805 1892
Note: See TracChangeset
for help on using the changeset viewer.