widget-admin.php000064400000016025150212213730007626 0ustar00get_field_id( '' ); ?>
get_image_html( $instance, false ); ?>

style="display:none;">


here.', 'image-widget' ); ?>




style="display:none;">

style="display:none;">

index.php000064400000000034150212213730006355 0ustar00

id; //NOTE #1: the widget id is added here to allow uploader to only return array if this is used with image widget so that all other uploads are not harmed. $image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src"); $image_title = (!empty($instance['image'])) ? __('Change Image', 'image-widget') : __('Add Image', 'image-widget'); ?>
<?php echo $image_title; ?>

get_image_html($instance); ?>


widget.php000064400000001073150212213730006535 0ustar00get_image_html( $instance, true ); if ( ! empty( $description ) ) { echo '
'; echo wpautop( $description ); echo '
'; } echo $after_widget; widgets-editor.php000064400000006033150212214470010207 0ustar00

Justin Tadlock Blog. Do not use these fields if you are not sure what you are doing, it can break the design of your site. Leave these fields blank to use the theme sidebars design.', 'custom-sidebars')); ?>
quick-edit.php000064400000001746150212214470007322 0ustar00
widgets-location.php000064400000023242150212214470010532 0ustar00". * @param string $class Optinal classname added to the wrapper element. */ if ( ! function_exists( '_show_replaceable' ) ) { function _show_replaceable( $sidebar, $prefix, $cat_name, $class = '' ) { $base_id = 'cs-' . $prefix; $inp_id = $base_id . '-' . $sidebar['id']; $inp_name = '___cs___' . $prefix . '___' . $sidebar['id']; $sb_id = $sidebar['id']; $class = (empty( $class ) ? '' : ' ' . $class); ?>

...

Post or Page & set it up via the sidebars metabox.', 'custom-sidebars'), admin_url( 'edit.php' ), admin_url( 'edit.php?post_type=page' ) )); ?>


$details ) { $cat_name = __( 'categories', 'custom-sidebars' ); _show_replaceable( $details, 'cat', $cat_name ); } ?>
$details ) { $cat_name = __( 'Post Types', 'custom-sidebars' ); _show_replaceable( $details, 'pt', $cat_name ); } ?>
$taxonomy ) { echo '
'; foreach ( $sidebars as $sb_id => $details ) { _show_replaceable( $details, $taxonomy_slug, $taxonomy->label ); } echo '
'; } ?>


$details ) { $cat_name = __( 'Archive Types', 'custom-sidebars' ); _show_replaceable( $details, 'arc', $cat_name ); } ?>
$details ) { $cat_name = __( 'Category Archives', 'custom-sidebars' ); _show_replaceable( $details, 'arc-cat', $cat_name ); } ?>
$details ) { $cat_name = __( 'Author Archives', 'custom-sidebars' ); _show_replaceable( $details, 'arc-aut', $cat_name ); } ?>



$one ) { printf( '%s', esc_attr( $id ), esc_attr( implode( ' ', $classes ) ), esc_html( $one['title'] ) ); $classes = array( 'tab' ); } ?>

$one ) { printf( '
', esc_attr( $id ), esc_attr( implode( ' ', $classes ) ) ); foreach ( $sidebars as $sb_id => $details ) { _show_replaceable( $details, $id, $one['cat_name'] ); } echo '
'; $classes = array( 'tab' ); } ?>
widgets.php000064400000012664150212214470006732 0ustar00

| | |
metabox.php000064400000010452150212214470006714 0ustar00'; printf( '%s', sprintf( /* translators: %s is replaced with the Page Name */ esc_html__( 'To change the sidebar for %s', 'custom-sidebars' ), esc_html( $page_name ) ) ); echo ''; echo '

'; $url = esc_url( CSB_IMG_URL . 'metabox/' . $img . '?version=3.2.4' ); printf( '', esc_url( $url ), esc_url( $url ) ); } } /** * show */ if ( $is_front ) { $page_name = esc_html__( 'Front Page', 'custom-sidebars' ); custom_sidebars_replace_not_allowed( $page_name, 'frontpage-info.png' ); } elseif ( $is_blog ) { $page_name = esc_html__( 'Blog Page', 'custom-sidebars' ); $archive = esc_html__( 'Post Index', 'custom-sidebars' ); custom_sidebars_replace_not_allowed( $page_name, 'blogpage-info.png', $archive ); } elseif ( $is_woo_shop ) { $page_name = esc_html__( 'WooCommerce Shop', 'custom-sidebars' ); $post_type_object = get_post_type_object( 'product' ); /* translators: %s is replaced with the Archive name */ $archive = sprintf( esc_html__( '%s Archives', 'custom-sidebars' ), $post_type_object->label ); custom_sidebars_replace_not_allowed( $page_name, 'wooshop-info.png', $archive ); } else { echo '

'; esc_html_e( 'Here you can replace the default sidebars. Simply select what sidebar you want to show for this post!', 'custom-sidebars' ); echo '

'; if ( ! empty( $sidebars ) ) { global $wp_registered_sidebars; $available = CustomSidebars::sort_sidebars_by_name( $wp_registered_sidebars ); foreach ( $sidebars as $s ) { ?>

'; /* translators: %s is replaced with the URL of the Widgets page */ CustomSidebars::wp_kses_wf(sprintf(__( 'All sidebars have been locked, you cannot replace them. Go to the widgets page to unlock a sidebar.', 'custom-sidebars' ), admin_url( 'widgets.php' ))); echo '

'; } } widgets-delete.php000064400000001200150212214470010152 0ustar00
bulk-edit.php000064400000002434150212214470007136 0ustar00
widgets-export.php000064400000003103150212214470010235 0ustar00



import.php000064400000031605150212214470006572 0ustar00 $to_id ) { $from = $theme_sidebars[ $from_id ]; $to = array(); if ( isset( $theme_sidebars[ $to_id ] ) ) { $to = $theme_sidebars[ $to_id ]; } else { $to = $import['sidebars'][ $to_id ]; } ?>

 

col-sidebars.php000064400000004164150212214470007627 0ustar00%s', esc_html( $content ) ); } } /** * prepare */ if ( $is_front ) { custom_sidebars_col_sideber_not_available( __( 'Home Page', 'custom-sidebars' ) ); } elseif ( $is_blog ) { custom_sidebars_col_sideber_not_available( __( 'Blog Page', 'custom-sidebars' ) ); } else if ( $is_woo_shop ) { custom_sidebars_col_sideber_not_available( __( 'WooCommerce Shop', 'custom-sidebars' ) ); } else { global $wp_registered_sidebars; $available = CustomSidebars::sort_sidebars_by_name( $wp_registered_sidebars ); $content = ''; foreach ( $sidebars as $s ) { $sb_name = $available[ $s ]['name']; $replaced = ! empty( $available[ $selected[ $s ] ] ); $class = $replaced ? 'cust' : 'def'; if ( $replaced ) { $content .= sprintf( '
', esc_attr( $s ), isset( $selected[ $s ] )? esc_attr( $selected[ $s ] ):'', esc_attr( $class, 'custom-sidebars' ) ); $content .= esc_html( $sb_name ); $content .= '
'; $content .= '
'; $content .= esc_html( $available[ $selected[ $s ] ]['name'] ); $content .= '
'; } } if ( empty( $content ) ) { echo '-'; } else { echo '
'; CustomSidebars::wp_kses_wf( $content ); echo '
'; } } class-all-tables-list-table.php000064400000057266150212233020012444 0ustar00 */ protected array $_actions; // phpcs:ignore PSR2.Classes.PropertyDeclaration.Underscore /** * Initialize the List Table. * * @since 1.0.0 */ public function __construct() { $screen = get_current_screen(); // Hide "Last Modified By" column by default. if ( false === get_user_option( "manage{$screen->id}columnshidden" ) ) { // @phpstan-ignore property.nonObject update_user_option( get_current_user_id(), "manage{$screen->id}columnshidden", array( 'table_last_modified_by' ), true ); // @phpstan-ignore property.nonObject } // @phpstan-ignore argument.type (WordPress Core's docblocks state wrong argument types in some places.) parent::__construct( array( 'singular' => 'tablepress-table', // Singular name of the listed records. 'plural' => 'tablepress-all-tables', // Plural name of the listed records. 'ajax' => false, // Does this list table support AJAX? 'screen' => $screen, // WP_Screen object. ) ); } /** * Set the data items (here: tables) that are to be displayed by the List Tables, and their original count. * * @since 1.0.0 * * @param string[] $items Tables to be displayed in the List Table. */ public function set_items( array $items ): void { $this->items = $items; $this->items_count = count( $items ); } /** * Check whether the user has permissions for certain AJAX actions. * (not used, but must be implemented in this child class) * * @since 1.0.0 * * @return bool true (Default value). */ #[\Override] public function ajax_user_can(): bool { return true; } /** * Get a list of columns in this List Table. * * Format: 'internal-name' => 'Column Title'. * * @since 1.0.0 * * @return array List of columns in this List Table. */ #[\Override] public function get_columns(): array { $columns = array( 'cb' => $this->has_items() ? '' : '', // Checkbox for "Select all", but only if there are items in the table. // "name" is special in WP, which is why we prefix every entry here, to be safe! 'table_id' => __( 'ID', 'tablepress' ), 'table_name' => __( 'Table Name', 'tablepress' ), 'table_description' => __( 'Description', 'tablepress' ), 'table_author' => __( 'Author', 'tablepress' ), 'table_last_modified_by' => __( 'Last Modified By', 'tablepress' ), 'table_last_modified' => __( 'Last Modified', 'tablepress' ), ); return $columns; } /** * Get a list of columns that are sortable. * * Format: 'internal-name' => array( $field for $item[ $field ], true for already sorted ). * * @since 1.0.0 * * @return array List of sortable columns in this List Table. */ #[\Override] protected function get_sortable_columns(): array { // No sorting on the Empty List placeholder. if ( ! $this->has_items() ) { return array(); } $sortable_columns = array( 'table_id' => array( 'id', true ), // true means its already sorted. 'table_name' => array( 'name', false ), 'table_description' => array( 'description', false ), 'table_author' => array( 'author', false ), 'table_last_modified_by' => array( 'last_modified_by', false ), 'table_last_modified' => array( 'last_modified', false ), ); return $sortable_columns; } /** * Gets the name of the default primary column. * * @since 1.7.0 * * @return string Name of the default primary column, in this case, the table name. */ #[\Override] protected function get_default_primary_column_name(): string { return 'table_name'; } /** * Render a cell in the "cb" column. * * @since 1.0.0 * * @param array $item Data item for the current row. * @return string HTML content of the cell. */ #[\Override] protected function column_cb( /* array */ $item ): string { // Don't use type hints in the method declaration to prevent PHP errors, as the method is inherited. $user_can_copy_table = current_user_can( 'tablepress_copy_table', $item['id'] ); $user_can_delete_table = current_user_can( 'tablepress_delete_table', $item['id'] ); $user_can_export_table = current_user_can( 'tablepress_export_table', $item['id'] ); if ( ! ( $user_can_copy_table || $user_can_delete_table || $user_can_export_table ) ) { return ''; } if ( '' === trim( $item['name'] ) ) { $item['name'] = __( '(no name)', 'tablepress' ); } return sprintf( // The `label-covers-full-cell` class on the