Changeset 771371
- Timestamp:
- 09/13/2013 04:07:43 AM (12 years ago)
- Location:
- genesis-post-teasers/trunk
- Files:
-
- 5 edited
-
css/teaserstyles.php (modified) (3 diffs)
-
genesis-post-teasers.php (modified) (6 diffs)
-
gpt-meta-box.php (modified) (2 diffs)
-
js/settingslide.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
genesis-post-teasers/trunk/css/teaserstyles.php
r766525 r771371 5 5 $height = "auto"; 6 6 7 if ( $_GET['genesisopt_no_pair'])7 if ( isset( $_GET['genesisopt_no_pair'] ) ) 8 8 $width = 'auto'; 9 9 10 if ( $_GET['genesisopt_width'] && $_GET['genesisopt_enable_custom_styles'])10 if ( isset( $_GET['genesisopt_width'] ) && isset( $_GET['genesisopt_enable_custom_styles'] ) ) 11 11 $width = $_GET['genesisopt_width'] . "px"; 12 12 13 if ( $_GET['genesisopt_height'] && $_GET['genesisopt_enable_custom_styles'])13 if ( isset( $_GET['genesisopt_height'] ) && isset( $_GET['genesisopt_enable_custom_styles'] ) ) 14 14 $height = $_GET['genesisopt_height'] . "px"; 15 15 … … 40 40 <?php 41 41 42 if ( $_GET['genesisopt_no_pair'] && $_GET['genesisopt_enable_custom_styles']) { ?>42 if ( isset( $_GET['genesisopt_no_pair'] ) && isset( $_GET['genesisopt_enable_custom_styles'] ) ) { ?> 43 43 44 44 #post-teasers .genesis-grid-odd { … … 51 51 } 52 52 53 <?php } elseif ( $_GET['genesisopt_no_pair'] && ! $_GET['genesisopt_enable_custom_styles']) { ?>53 <?php } elseif ( isset( $_GET['genesisopt_no_pair'] ) && ! isset( $_GET['genesisopt_enable_custom_styles'] ) ) { ?> 54 54 55 55 #post-teasers .genesis-grid, -
genesis-post-teasers/trunk/genesis-post-teasers.php
r766525 r771371 4 4 Plugin URI: http://genesistutorials.com/plug-ins/genesis-post-teasers/ 5 5 Description: Add theme settings for enabling teasers for the Genesis Theme Framework by studiopress. Uses genesis_grid_loop(); 6 Version: 2.0. 16 Version: 2.0.2 7 7 Author: Christopher Cochran 8 8 Author URI: http://christophercochran.me … … 40 40 if ( ! in_array( $theme_info->Template, $genesis_flavors ) ) { 41 41 deactivate_plugins( plugin_basename(__FILE__) ); // Deactivate ourself 42 wp_die( 'Sorry, you can\'t activate unless you have installed <a href="http://www.studiopress.com/themes/genesis">Genesis</a>');42 wp_die( 'Sorry, you are not able to activate this plugin unless you have installed <a href="http://www.studiopress.com/themes/genesis">Genesis</a>' ); 43 43 } 44 44 … … 107 107 public function enable_logic() { 108 108 109 if ( function_exists('genesis') ) { 110 111 $this->full_posts = genesis_get_option( 'numof_full_posts' ); 112 $this->teaser_posts = $this->posts_size() - $this->full_posts; 113 114 if ( $this->teasers_on ) { 115 116 remove_action( 'genesis_loop', 'genesis_do_loop' ); 117 remove_action( 'genesis_loop', 'focus_grid_loop_helper' ); 118 remove_action( 'genesis_loop', 'pretty_grid_loop_helper' ); 119 120 add_action( 'genesis_loop', array( &$this, 'grid_loop' ) ); 121 122 add_action( 'genesis_before_post', array( &$this, 'container_open' ), 1 ); 109 if ( ! function_exists( 'genesis' ) ) 110 return; 111 112 $this->full_posts = genesis_get_option( 'numof_full_posts' ); 113 $this->teaser_posts = $this->posts_size() - $this->full_posts; 114 115 if ( $this->teasers_on ) { 116 117 remove_action( 'genesis_loop', 'genesis_do_loop' ); 118 remove_action( 'genesis_loop', 'focus_grid_loop_helper' ); 119 remove_action( 'genesis_loop', 'pretty_grid_loop_helper' ); 120 121 add_action( 'genesis_loop', array( &$this, 'grid_loop' ) ); 122 123 add_action( 'genesis_before_post', array( &$this, 'container_open' ), 1 ); 124 125 // HTML5 126 add_action( 'genesis_before_entry', array( &$this, 'container_open' ), 10 ); 127 128 if ( genesis_get_option( 'no_pair_teasers' ) == 0 ) { 129 130 add_action( 'genesis_before_post', array( &$this, 'row_wrap_open' ), 5 ); 131 add_action( 'genesis_after_post', array( &$this, 'row_wrap_closeopen' ), 15 ); 132 add_action( 'genesis_after_post', array( &$this, 'row_wrap_close' ), 15 ); 123 133 124 134 // HTML5 125 add_action( 'genesis_before_entry', array( &$this, 'container_open' ), 10 ); 126 127 if ( genesis_get_option('no_pair_teasers') == 0 ) { 128 129 add_action( 'genesis_before_post', array( &$this, 'row_wrap_open' ), 5 ); 130 add_action( 'genesis_after_post', array( &$this, 'row_wrap_closeopen' ), 15 ); 131 add_action( 'genesis_after_post', array( &$this, 'row_wrap_close' ), 15 ); 132 133 // HTML5 134 add_action( 'genesis_before_entry', array( &$this, 'row_wrap_open' ), 15 ); 135 add_action( 'genesis_after_entry', array( &$this, 'row_wrap_closeopen' ) ); 136 add_action( 'genesis_after_entry', array( &$this, 'row_wrap_close' ) ); 137 138 } 139 140 add_action( 'genesis_after_endwhile', array( &$this, 'container_close' ), 1 ); 141 142 if ( genesis_get_option('no_pair_teasers') == 1 || genesis_get_option('use_css') == 'pluginstyles' ) { 143 144 $genesis = $this->full_posts; 145 $genesisopt_full_width = genesis_get_option( 'no_pair_teasers' ); 146 $genesisopt_width = genesis_get_option( 'post_teaser_width' ); 147 $genesisopt_height = genesis_get_option( 'post_teaser_height' ); 148 $genesisopt_enable_custom_styles = genesis_get_option( 'enable_custom_teaser_styles' ); 149 150 wp_enqueue_style( 151 'teaserstyles', 152 WP_PLUGIN_URL . "/genesis-post-teasers/css/teaserstyles.php?genesis=$genesis&genesisopt_width=$genesisopt_width&genesisopt_height=$genesisopt_height&genesisopt_no_pair=$genesisopt_full_width&genesisopt_enable_custom_styles=$genesisopt_enable_custom_styles" 153 ); 154 155 } 156 157 if ( genesis_get_option('disable_teaser_meta') == 1 ) { 158 159 remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); 160 161 add_action( 'genesis_after_post_content', array( &$this, 'post_meta_logic' ) ); 162 163 164 // HTML5 165 remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); 166 167 add_action( 'genesis_entry_footer', array( &$this, 'post_meta_logic' ) ); 168 169 } 170 171 if ( genesis_get_option( 'disable_teaser_info' ) == 1 ) { 172 173 remove_action( 'genesis_before_post_content', 'genesis_post_info' ); 174 175 add_action( 'genesis_before_post_content', array( &$this, 'post_info_logic' ) ); 176 177 178 // HTML5 179 remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); 180 181 add_action( 'genesis_entry_header', array( &$this, 'post_info_logic' ), 12 ); 182 183 } 135 add_action( 'genesis_before_entry', array( &$this, 'row_wrap_open' ), 15 ); 136 add_action( 'genesis_after_entry', array( &$this, 'row_wrap_closeopen' ) ); 137 add_action( 'genesis_after_entry', array( &$this, 'row_wrap_close' ) ); 138 139 } 140 141 add_action( 'genesis_after_endwhile', array( &$this, 'container_close' ), 1 ); 142 143 if ( genesis_get_option( 'no_pair_teasers' ) == 1 || genesis_get_option( 'use_css' ) == 'pluginstyles' ) { 144 145 $genesis = $this->full_posts; 146 $genesisopt_full_width = genesis_get_option( 'no_pair_teasers' ); 147 $genesisopt_width = genesis_get_option( 'post_teaser_width' ); 148 $genesisopt_height = genesis_get_option( 'post_teaser_height' ); 149 $genesisopt_enable_custom_styles = genesis_get_option( 'enable_custom_teaser_styles' ); 150 151 wp_enqueue_style( 152 'teaserstyles', 153 WP_PLUGIN_URL . "/genesis-post-teasers/css/teaserstyles.php?genesis=$genesis&genesisopt_width=$genesisopt_width&genesisopt_height=$genesisopt_height&genesisopt_no_pair=$genesisopt_full_width&genesisopt_enable_custom_styles=$genesisopt_enable_custom_styles" 154 ); 155 156 } 157 158 if ( genesis_get_option( 'disable_teaser_meta' ) == 1 ) { 159 160 remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); 161 162 add_action( 'genesis_after_post_content', array( &$this, 'post_meta_logic' ) ); 163 164 165 // HTML5 166 remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); 167 168 add_action( 'genesis_entry_footer', array( &$this, 'post_meta_logic' ) ); 169 170 } 171 172 if ( genesis_get_option( 'disable_teaser_info' ) == 1 ) { 173 174 remove_action( 'genesis_before_post_content', 'genesis_post_info' ); 175 176 add_action( 'genesis_before_post_content', array( &$this, 'post_info_logic' ) ); 177 178 179 // HTML5 180 remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); 181 182 add_action( 'genesis_entry_header', array( &$this, 'post_info_logic' ), 12 ); 184 183 185 184 } … … 266 265 267 266 function query( $query ) { 267 268 if ( ! function_exists( 'genesis_get_option' ) ) 269 return; 268 270 269 271 if ( genesis_get_option( 'teasers_enable' ) == 'Home Page' ) … … 297 299 298 300 if ( genesis_get_option( 'enable_teaser_thumbnail' ) ) 299 $grid_image_size = genesis_get_option( 'teaser_thumbnail_size');301 $grid_image_size = genesis_get_option( 'teaser_thumbnail_size' ); 300 302 301 303 if ( genesis_get_option( 'readmore_link_on_teasers' ) ) … … 329 331 } 330 332 331 if ( genesis_get_option( 'teasers_enable') == 'Archives' ) {333 if ( genesis_get_option( 'teasers_enable' ) == 'Archives' ) { 332 334 333 335 $cat_id = get_query_var( 'cat' ); -
genesis-post-teasers/trunk/gpt-meta-box.php
r765337 r771371 45 45 <p style="padding-left: 20px;" class="select-feat-image-size <?php if ( genesis_get_option('gpt_enable_featured_thumbnail') == '' ) echo 'hidden' ?>"> 46 46 <?php _e("Image Size", 'genesis'); ?>: 47 <?php $sizes = genesis_get_ additional_image_sizes(); ?>47 <?php $sizes = genesis_get_image_sizes(); ?> 48 48 <select name="<?php echo GENESIS_SETTINGS_FIELD; ?>[gpt_thumbnail_featured_size]"> 49 49 <option style="padding-right:10px;" value="thumbnail">thumbnail (<?php echo get_option('thumbnail_size_w'); ?>x<?php echo get_option('thumbnail_size_h'); ?>)</option> … … 61 61 <p style="padding-left: 20px;" class="select-image-size <?php if ( genesis_get_option('enable_teaser_thumbnail') == '' ) echo 'hidden' ?>"> 62 62 <?php _e("Image Size", 'genesis'); ?>: 63 <?php $sizes = genesis_get_ additional_image_sizes(); ?>63 <?php $sizes = genesis_get_image_sizes(); ?> 64 64 <select name="<?php echo GENESIS_SETTINGS_FIELD; ?>[teaser_thumbnail_size]"> 65 65 <option style="padding-right:10px;" value="thumbnail">thumbnail (<?php echo get_option('thumbnail_size_w'); ?>x<?php echo get_option('thumbnail_size_h'); ?>)</option> -
genesis-post-teasers/trunk/js/settingslide.js
r415099 r771371 1 1 jQuery(document).ready(function($) { 2 3 jQuery("#gPostTeaz-settings-box input:radio:checked").live('load change', function() {4 5 if ( jQuery(this).val() == 'stylesheet' ) {6 jQuery("#gPostTeaz-settings-box .css-opts").hide('fast');2 3 $("#gPostTeaz-settings-box input:radio:checked").live('load change', function() { 4 5 if ( $(this).val() == 'stylesheet' ) { 6 $("#gPostTeaz-settings-box .css-opts").hide('fast'); 7 7 } 8 9 if ( jQuery(this).val() != 'stylesheet' ) {10 jQuery("#gPostTeaz-settings-box .css-opts").show('fast');8 9 if ( $(this).val() != 'stylesheet' ) { 10 $("#gPostTeaz-settings-box .css-opts").show('fast'); 11 11 } 12 12 13 13 }); 14 15 jQuery("#gPostTeaz-settings-box .css-opts input[type='checkbox']").live('load change', function() {16 17 if ( jQuery(this).is(':checked')) {18 jQuery("#gPostTeaz-settings-box .custom-css-opts").show('fast');19 } else { 20 jQuery("#gPostTeaz-settings-box .custom-css-opts").hide('fast');14 15 $("#gPostTeaz-settings-box .css-opts input[type='checkbox']").live('load change', function() { 16 17 if ( $(this).is(':checked') ) { 18 $("#gPostTeaz-settings-box .custom-css-opts").show('fast'); 19 } else { 20 $("#gPostTeaz-settings-box .custom-css-opts").hide('fast'); 21 21 } 22 22 23 23 }); 24 25 jQuery("#gPostTeaz-settings-box .enable-thumbnail input[type='checkbox']").live('load change', function() {26 27 if ( jQuery(this).is(':checked')) {28 jQuery("#gPostTeaz-settings-box .select-image-size").show('fast');29 } else { 30 jQuery("#gPostTeaz-settings-box .select-image-size").hide('fast');24 25 $("#gPostTeaz-settings-box .enable-thumbnail input[type='checkbox']").live('load change', function() { 26 27 if ( $(this).is(':checked') ) { 28 $("#gPostTeaz-settings-box .select-image-size").show('fast'); 29 } else { 30 $("#gPostTeaz-settings-box .select-image-size").hide('fast'); 31 31 } 32 32 33 33 }); 34 35 jQuery("#gPostTeaz-settings-box .enable-feat-thumbnail input[type='checkbox']").live('load change', function() {36 37 if ( jQuery(this).is(':checked')) {38 jQuery("#gPostTeaz-settings-box .select-feat-image-size").show('fast');39 } else { 40 jQuery("#gPostTeaz-settings-box .select-feat-image-size").hide('fast');34 35 $("#gPostTeaz-settings-box .enable-feat-thumbnail input[type='checkbox']").live('load change', function() { 36 37 if ( $(this).is(':checked') ) { 38 $("#gPostTeaz-settings-box .select-feat-image-size").show('fast'); 39 } else { 40 $("#gPostTeaz-settings-box .select-feat-image-size").hide('fast'); 41 41 } 42 42 43 43 }); 44 45 44 45 46 46 }); 47 47 48 48 function genesis_confirm( text ) { 49 49 var answer = confirm( text ); 50 50 51 51 if( answer ) { return true; } 52 52 else { return false; } -
genesis-post-teasers/trunk/readme.txt
r766525 r771371 37 37 == Changelog == 38 38 39 = 2.0.2 = 40 * Added: All images sizes are now available for thumbnails. 41 * Updated: More code clean up. 42 * Fixed: Fatal error when using JetPack Mobile theme. Extra checks to make sure Genesis is active before running code. 43 39 44 = 2.0.1 = 40 Fixed: Some themes may override "Do not show teasers in pairs" by using included theme styles. Added Styles to override floating of teasers when "Do not show teasers in pairs" is checked.45 * Fixed: Some themes may override "Do not show teasers in pairs" by using included theme styles. Added Styles to override floating of teasers when "Do not show teasers in pairs" is checked. 41 46 42 47 = 2.0.0 =
Note: See TracChangeset
for help on using the changeset viewer.