Plugin Directory

Changeset 566459


Ignore:
Timestamp:
07/02/2012 02:06:30 PM (14 years ago)
Author:
Internet123
Message:

new fix: 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.

Location:
per-page-widgets/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • per-page-widgets/trunk/i123_per_page_widgets.php

    r565308 r566459  
    55Description: 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.
    66Author: Internet 123
    7 Version: 0.0.6
     7Version: 0.0.7
    88Author URI: http://www.i123.dk
    99*/
     
    2222function i123_widgets_get_real_widget_areas($sidebars_widgets) {
    2323    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())) {
    2525        if ($i123_widgets_pre_filtered_widget_areas !== false) return $i123_widgets_pre_filtered_widget_areas;
    2626
     
    209209    $i123_widgets_setting_overall = (isset($values['_i123_widgets_setting_overall'][0])) ? $values['_i123_widgets_setting_overall'][0] : '0';
    210210   
    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>';
    212212   
    213213    echo '<p>' . __('Choose which widget areas to show.', 'i123_widgets') . '</p>';
     
    229229                <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"'; ?> />
    230230                <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>
    232232            </div>
    233233        </div>
  • per-page-widgets/trunk/readme.txt

    r565308 r566459  
    44Requires at least: 3.3
    55Tested up to: 3.4.1
    6 Stable tag: 0.0.6
     6Stable tag: 0.0.7
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3030== Changelog ==
    3131
     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.
    3234= 0.0.6 (2012-06-29) =
    33 * Made room for large adminbars alt the top
     35* Made room for large adminbars at the top.
    3436= 0.0.5 (2012-06-15) =
    3537* Added title to widget-editor thickbox and links
    3638= 0.0.4 (2012-06-14) =
    37 * testet for wordpress version 3.4 - updated
     39* Tested for wordpress version 3.4 - updated.
    3840= 0.0.3 (2012-06-13) =
    39 * screenshot replaced
     41* Screenshot replaced.
    4042= 0.0.2 (2012-06-13) =
    41 * minor fixes added
     43* Minor fixes added.
    4244= 0.0.1 (2012-06-12) =
    4345* Original plugin, first published version.
  • per-page-widgets/trunk/scripts/admin.js

    r558383 r566459  
    88            var tbWindow = $('#TB_window');
    99            var width = $(window).width();
    10             var H = $(window).height();
     10            var T = $("#wpcontent").offset().top;
     11            var H = $(window).height() - T;
    1112            var W = ( 1720 < width ) ? 1720 : width;
    1213
    1314            if ( tbWindow.size() ) {
    1415                    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 );
    1617                    tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
    1718                    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'});
    1920            };
    2021
Note: See TracChangeset for help on using the changeset viewer.