PluginProbe ʕ •ᴥ•ʔ
Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager / 3.0.7.1
Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager v3.0.7.1
trunk 2.1.2.0 3.0.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3 3.31 3.32 3.35 3.36 3.37 3.38
custom-sidebars / views / col-sidebars.php
custom-sidebars / views Last commit date
col-sidebars.php 9 years ago import.php 9 years ago metabox.php 9 years ago quick-edit.php 9 years ago widgets-delete.php 10 years ago widgets-editor.php 10 years ago widgets-export.php 10 years ago widgets-location.php 9 years ago widgets.php 10 years ago
col-sidebars.php
56 lines
1 <?php
2 /**
3 * Custom column inside the post-list.
4 *
5 * Uses:
6 * $selected
7 * $wp_registered_sidebars
8 * $post_id
9 */
10
11 $sidebars = CustomSidebars::get_options( 'modifiable' );
12
13 $is_front = get_option( 'page_on_front' ) == $post_id;
14 $is_blog = get_option( 'page_for_posts' ) == $post_id;
15
16 if ( $is_front || $is_blog ) {
17 if ( $is_front ) {
18 _e( '(Not available for Home-Page)', 'custom-sidebars' );
19 } else {
20 _e( '(Not available for Blog-Page)', 'custom-sidebars' );
21 }
22 foreach ( $sidebars as $s ) : ?>
23 <span data-sidebar="<?php echo esc_attr( $s ); ?>" data-replaced="<?php echo esc_attr( @$selected[ $s ] ); ?>" data-cshide="yes">
24 <?php endforeach;
25 } else {
26 global $wp_registered_sidebars;
27 $available = CustomSidebars::sort_sidebars_by_name( $wp_registered_sidebars );
28 $content = '';
29 foreach ( $sidebars as $s ) {
30 $sb_name = $available[ $s ]['name'];
31 $replaced = ! empty( $available[ $selected[ $s ] ] );
32 $class = $replaced ? 'cust' : 'def';
33
34 if ( $replaced ) {
35 $content .= sprintf(
36 '<dt data-sidebar="%s" data-replaced="%s" class="cs-key %s">',
37 esc_attr( $s ),
38 isset( $selected[ $s ] )? esc_attr( $selected[ $s ] ):'',
39 esc_attr( $class, 'custom-sidebars' )
40 );
41 $content .= esc_html( $sb_name );
42 $content .= '</dt>';
43 $content .= '<dd class="cs-val">';
44 $content .= esc_html( $available[ $selected[ $s ] ]['name'] );
45 $content .= '</dd>';
46 }
47 }
48 if ( empty( $content ) ) {
49 echo '-';
50 } else {
51 echo '<dl>';
52 echo $content;
53 echo '</dl>';
54 }
55 }
56