Changeset 566459
- Timestamp:
- 07/02/2012 02:06:30 PM (14 years ago)
- Location:
- per-page-widgets/trunk
- Files:
-
- 3 edited
-
i123_per_page_widgets.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
scripts/admin.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
per-page-widgets/trunk/i123_per_page_widgets.php
r565308 r566459 5 5 Description: Control widget areas on a per-page / per-post basis. Gives you the ability to show or hide individual widget areas on each page / post as well as completely substituting the widgets shown in a specific widget area on a specific page or post. 6 6 Author: Internet 123 7 Version: 0.0. 67 Version: 0.0.7 8 8 Author URI: http://www.i123.dk 9 9 */ … … 22 22 function i123_widgets_get_real_widget_areas($sidebars_widgets) { 23 23 global $wp_registered_sidebars, $sidebars_widgets, $post, $i123_widgets_pre_filtered_widget_areas; 24 if ((isset($post))&&(is_numeric($post->ID)) ) {24 if ((isset($post))&&(is_numeric($post->ID))&&(is_singular())) { 25 25 if ($i123_widgets_pre_filtered_widget_areas !== false) return $i123_widgets_pre_filtered_widget_areas; 26 26 … … 209 209 $i123_widgets_setting_overall = (isset($values['_i123_widgets_setting_overall'][0])) ? $values['_i123_widgets_setting_overall'][0] : '0'; 210 210 211 echo '<p><a href="widgets.php?i123_widgets_iframe=yes&KeepThis=true&TB_iframe=true&height=200&width=200" class="thickbox sidebareditlink" id="i123_widgets_show_sidebar_default_edit" >' . __('Edit default widgets on all pages.', 'i123_widgets') . '</a></p>';211 echo '<p><a href="widgets.php?i123_widgets_iframe=yes&KeepThis=true&TB_iframe=true&height=200&width=200" class="thickbox sidebareditlink" id="i123_widgets_show_sidebar_default_edit" title="' . esc_attr(__('Edit default widgets on all pages.', 'i123_widgets')) . '">' . __('Edit default widgets on all pages.', 'i123_widgets') . '</a></p>'; 212 212 213 213 echo '<p>' . __('Choose which widget areas to show.', 'i123_widgets') . '</p>'; … … 229 229 <input type="radio" id="i123_widgets_show_sidebar_<?php echo $value['id'] ?>-2" name="i123_widgets_show_sidebar_<?php echo $value['id'] ?>" class="i123_widgets_checkbox" value="2"<?php if($i123_widgets_show_this=='2') echo ' checked="checked"'; ?> /> 230 230 <label for="i123_widgets_show_sidebar_<?php echo $value['id'] ?>-2" class="i123_widgets_checkfield_description"><?php echo __('Special', 'i123_widgets') ?><br /> 231 <a href="widgets.php?i123_widgets_p=<?php echo $post->ID ?>&i123_widgets_s=<?php echo $value['id'] ?>&KeepThis=true&TB_iframe=true&height=200&width=200" class="thickbox sidebareditlink" id="i123_widgets_show_sidebar_<?php echo $value['id'] ?>_edit" ><?php echo __('Edit widgets', 'i123_widgets') ?></a></label>231 <a href="widgets.php?i123_widgets_p=<?php echo $post->ID ?>&i123_widgets_s=<?php echo $value['id'] ?>&KeepThis=true&TB_iframe=true&height=200&width=200" class="thickbox sidebareditlink" id="i123_widgets_show_sidebar_<?php echo $value['id'] ?>_edit" title="<?php echo esc_attr(sprintf(__('Edit widgets in the sidebar "%s" on "%s"', 'i123_widgets'), $value['name'], $post->post_title)) ?>"><?php echo __('Edit widgets', 'i123_widgets') ?></a></label> 232 232 </div> 233 233 </div> -
per-page-widgets/trunk/readme.txt
r565308 r566459 4 4 Requires at least: 3.3 5 5 Tested up to: 3.4.1 6 Stable tag: 0.0. 66 Stable tag: 0.0.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 30 30 == Changelog == 31 31 32 = 0.0.7 (2012-07-02) = 33 * Fixed a bug that made first post on pages showing multiple posts decide widget settings. Plugin now checks to make sure it is being called on a single post or page. 32 34 = 0.0.6 (2012-06-29) = 33 * Made room for large adminbars a lt the top35 * Made room for large adminbars at the top. 34 36 = 0.0.5 (2012-06-15) = 35 37 * Added title to widget-editor thickbox and links 36 38 = 0.0.4 (2012-06-14) = 37 * testet for wordpress version 3.4 - updated39 * Tested for wordpress version 3.4 - updated. 38 40 = 0.0.3 (2012-06-13) = 39 * screenshot replaced41 * Screenshot replaced. 40 42 = 0.0.2 (2012-06-13) = 41 * minor fixes added43 * Minor fixes added. 42 44 = 0.0.1 (2012-06-12) = 43 45 * Original plugin, first published version. -
per-page-widgets/trunk/scripts/admin.js
r558383 r566459 8 8 var tbWindow = $('#TB_window'); 9 9 var width = $(window).width(); 10 var H = $(window).height(); 10 var T = $("#wpcontent").offset().top; 11 var H = $(window).height() - T; 11 12 var W = ( 1720 < width ) ? 1720 : width; 12 13 13 14 if ( tbWindow.size() ) { 14 15 tbWindow.width( W - 50 ).height( H - 75 ); 15 $('#TB_iframeContent').width( W - 50 ).height( H - 105);16 $('#TB_iframeContent').width( W - 50 ).height( H - 80 ); 16 17 tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'}); 17 18 if ( typeof document.body.style.maxWidth != 'undefined' ) 18 tbWindow.css({'top': '50px','margin-top':'0'});19 tbWindow.css({'top': (T + 25) + 'px','margin-top':'0'}); 19 20 }; 20 21
Note: See TracChangeset
for help on using the changeset viewer.