Revert "Prevent doubling main content in widget area"
This reverts commit c474037ecb.
This commit is contained in:
@@ -8,14 +8,8 @@ class SP_Widget_Event_Blocks extends WP_Widget {
|
|||||||
|
|
||||||
function widget( $args, $instance ) {
|
function widget( $args, $instance ) {
|
||||||
extract($args);
|
extract($args);
|
||||||
|
|
||||||
$id = empty($instance['id']) ? null : $instance['id'];
|
|
||||||
if ( get_the_ID() === $id ) {
|
|
||||||
$format = get_post_meta( $id, 'sp_format', true );
|
|
||||||
if ( 'blocks' == $format ) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
||||||
|
$id = empty($instance['id']) ? null : $instance['id'];
|
||||||
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
||||||
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
||||||
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
||||||
|
|||||||
@@ -8,14 +8,8 @@ class SP_Widget_Event_Calendar extends WP_Widget {
|
|||||||
|
|
||||||
function widget( $args, $instance ) {
|
function widget( $args, $instance ) {
|
||||||
extract($args);
|
extract($args);
|
||||||
|
|
||||||
$id = empty($instance['id']) ? null : $instance['id'];
|
|
||||||
if ( get_the_ID() === $id ) {
|
|
||||||
$format = get_post_meta( $id, 'sp_format', true );
|
|
||||||
if ( 'calendar' == $format ) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
||||||
|
$id = empty($instance['id']) ? null : $instance['id'];
|
||||||
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
||||||
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
||||||
$date_from = empty($instance['date_from']) ? 'default' : $instance['date_from'];
|
$date_from = empty($instance['date_from']) ? 'default' : $instance['date_from'];
|
||||||
|
|||||||
@@ -8,14 +8,8 @@ class SP_Widget_Event_List extends WP_Widget {
|
|||||||
|
|
||||||
function widget( $args, $instance ) {
|
function widget( $args, $instance ) {
|
||||||
extract($args);
|
extract($args);
|
||||||
|
|
||||||
$id = empty($instance['id']) ? null : $instance['id'];
|
|
||||||
if ( get_the_ID() === $id ) {
|
|
||||||
$format = get_post_meta( $id, 'sp_format', true );
|
|
||||||
if ( 'list' == $format ) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
||||||
|
$id = empty($instance['id']) ? null : $instance['id'];
|
||||||
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
||||||
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
$status = empty($instance['status']) ? 'default' : $instance['status'];
|
||||||
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
$date = empty($instance['date']) ? 'default' : $instance['date'];
|
||||||
|
|||||||
@@ -8,10 +8,8 @@ class SP_Widget_League_Table extends WP_Widget {
|
|||||||
|
|
||||||
function widget( $args, $instance ) {
|
function widget( $args, $instance ) {
|
||||||
extract($args);
|
extract($args);
|
||||||
|
|
||||||
$id = empty($instance['id']) ? 0 : $instance['id'];
|
$id = empty($instance['id']) ? 0 : $instance['id'];
|
||||||
if ( $id <= 0 || get_the_ID() === $id ) return;
|
if ( $id <= 0 ) return;
|
||||||
|
|
||||||
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
||||||
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
||||||
$number = empty($instance['number']) ? null : $instance['number'];
|
$number = empty($instance['number']) ? null : $instance['number'];
|
||||||
|
|||||||
@@ -8,13 +8,8 @@ class SP_Widget_Player_Gallery extends WP_Widget {
|
|||||||
|
|
||||||
function widget( $args, $instance ) {
|
function widget( $args, $instance ) {
|
||||||
extract($args);
|
extract($args);
|
||||||
|
|
||||||
$id = empty($instance['id']) ? 0 : $instance['id'];
|
$id = empty($instance['id']) ? 0 : $instance['id'];
|
||||||
if ( $id <= 0 || get_the_ID() === $id ) {
|
if ( $id <= 0 ) return;
|
||||||
$format = get_post_meta( $id, 'sp_format', true );
|
|
||||||
if ( 'gallery' == $format ) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
||||||
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
||||||
$number = empty($instance['number']) ? null : $instance['number'];
|
$number = empty($instance['number']) ? null : $instance['number'];
|
||||||
|
|||||||
@@ -8,13 +8,8 @@ class SP_Widget_Player_list extends WP_Widget {
|
|||||||
|
|
||||||
function widget( $args, $instance ) {
|
function widget( $args, $instance ) {
|
||||||
extract($args);
|
extract($args);
|
||||||
|
|
||||||
$id = empty($instance['id']) ? 0 : $instance['id'];
|
$id = empty($instance['id']) ? 0 : $instance['id'];
|
||||||
if ( $id <= 0 || get_the_ID() === $id ) {
|
if ( $id <= 0 ) return;
|
||||||
$format = get_post_meta( $id, 'sp_format', true );
|
|
||||||
if ( 'list' == $format ) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
$title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
||||||
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
$caption = empty($instance['caption']) ? null : $instance['caption'];
|
||||||
$number = empty($instance['number']) ? null : $instance['number'];
|
$number = empty($instance['number']) ? null : $instance['number'];
|
||||||
|
|||||||
Reference in New Issue
Block a user