当前位置: 首页>>代码示例>>PHP>>正文


PHP get_hidden_columns函数代码示例

本文整理汇总了PHP中get_hidden_columns函数的典型用法代码示例。如果您正苦于以下问题:PHP get_hidden_columns函数的具体用法?PHP get_hidden_columns怎么用?PHP get_hidden_columns使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_hidden_columns函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_column_info

 function get_column_info()
 {
     $columns = get_column_headers($this->_screen);
     $hidden = get_hidden_columns($this->_screen);
     $sortable = array();
     return array($columns, $hidden, $sortable);
 }
开发者ID:snagga,项目名称:urbantac,代码行数:7,代码来源:list-table.php

示例2: get_column_info

 /**
  * @access protected
  *
  * @return array
  */
 protected function get_column_info()
 {
     $columns = get_column_headers($this->_screen);
     $hidden = get_hidden_columns($this->_screen);
     $sortable = array();
     $primary = $this->get_default_primary_column_name();
     return array($columns, $hidden, $sortable, $primary);
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:13,代码来源:class-wp-list-table-compat.php

示例3: prepare_items

 function prepare_items()
 {
     $columns = $this->get_columns();
     $sortable = $this->get_sortable_columns();
     $hidden = get_hidden_columns($this->screen);
     $this->_column_headers = array($columns, $hidden, $sortable);
     $this->items = $this->get_records();
     $total_items = $this->get_total_found_rows();
     $this->set_pagination_args(array('total_items' => $total_items, 'per_page' => $this->get_items_per_page('edit_stream_notifications_per_page', 20)));
 }
开发者ID:xwp,项目名称:stream-legacy,代码行数:10,代码来源:list-table.php

示例4: get_primary_column_name

 /**
  * Gets the name of the primary column in the Entries screen
  *
  * @since 2.0.14
  *
  * @return string $primary_column
  */
 protected function get_primary_column_name()
 {
     $columns = get_column_headers($this->screen);
     $hidden = get_hidden_columns($this->screen);
     $primary_column = '';
     foreach ($columns as $column_key => $column_display_name) {
         if ('cb' != $column_key && !in_array($column_key, $hidden)) {
             $primary_column = $column_key;
             break;
         }
     }
     return $primary_column;
 }
开发者ID:hugocica,项目名称:locomotiva-2016,代码行数:20,代码来源:FrmEntriesListHelper.php

示例5: prepare_items

 /**
  * Prepares the list of venues for displaying.
  *
  * Modifies the query based on the current view and screen options and
  * begins setting up columns.
  *
  * @since 1.0.0
  */
 function prepare_items()
 {
     global $wp_query, $wpdb;
     $screen = get_current_screen();
     $per_page = get_user_option('gigs_page_audiotheme_venues_per_page');
     $per_page = empty($per_page) ? 20 : $per_page;
     // Set up column headers.
     $columns = $this->get_columns();
     $hidden = get_hidden_columns($screen->id);
     $sortable = $this->get_sortable_columns();
     $this->_column_headers = array($columns, $hidden, $sortable);
     // Compile the WP_Query args based on the current view and user options.
     $args = array('post_type' => 'audiotheme_venue', 'order' => isset($_REQUEST['order']) && 'desc' === strtolower($_REQUEST['order']) ? 'desc' : 'asc', 'orderby' => !isset($_REQUEST['orderby']) ? 'title' : $_REQUEST['orderby'], 'posts_per_page' => $per_page);
     if (isset($_REQUEST['orderby'])) {
         switch ($_REQUEST['orderby']) {
             case 'gigs':
                 $args['meta_key'] = '_audiotheme_gig_count';
                 $args['orderby'] = 'meta_value_num';
                 break;
             case 'city':
             case 'contact_name':
             case 'contact_phone':
             case 'contact_email':
             case 'country':
             case 'phone':
             case 'state':
             case 'website':
                 $args['meta_key'] = '_audiotheme_' . $_REQUEST['orderby'];
                 $args['orderby'] = 'meta_value';
                 break;
         }
     }
     if (isset($_REQUEST['s'])) {
         $args['s'] = stripslashes($_REQUEST['s']);
     }
     $args['paged'] = $this->get_pagenum();
     // Run the query.
     $items = array();
     $wp_query = new WP_Query($args);
     if (isset($wp_query->posts) && count($wp_query->posts)) {
         foreach ($wp_query->posts as $post) {
             $items[$post->ID] = get_audiotheme_venue($post->ID);
         }
     }
     $this->items = $items;
     $this->set_pagination_args(array('total_items' => $wp_query->found_posts, 'per_page' => $per_page, 'total_pages' => $wp_query->max_num_pages));
 }
开发者ID:sewmyheadon,项目名称:audiotheme,代码行数:55,代码来源:class-audiotheme-venues-list-table.php

示例6: array

</div>

<div class="clear"></div>

<?php 
if ('all' == $cat_id) {
    $cat_id = '';
}
$args = array('category' => $cat_id, 'hide_invisible' => 0, 'orderby' => $sqlorderby, 'hide_empty' => 0);
if (!empty($_GET['s'])) {
    $args['search'] = $_GET['s'];
}
$links = get_bookmarks($args);
if ($links) {
    $link_columns = get_column_headers('link-manager');
    $hidden = get_hidden_columns('link-manager');
    ?>

<?php 
    wp_nonce_field('bulk-bookmarks');
    ?>
<table class="widefat fixed" cellspacing="0">
	<thead>
	<tr>
<?php 
    print_column_headers('link-manager');
    ?>
	</tr>
	</thead>

	<tfoot>
开发者ID:jinpingv,项目名称:website_wrapper,代码行数:31,代码来源:link-manager.php

示例7: flag_picturelist

function flag_picturelist()
{
    // *** show picture list
    global $wpdb, $flagdb, $user_ID, $flag;
    // Look if its a search result
    $is_search = isset($_GET['s']) ? true : false;
    if ($is_search) {
        // fetch the imagelist
        $picturelist = $flag->manage_page->search_result;
        // we didn't set a gallery or a pagination
        $act_gid = 0;
        $_GET['paged'] = 1;
        $page_links = false;
    } else {
        // GET variables
        $act_gid = $flag->manage_page->gid;
        // Load the gallery metadata
        $gallery = $flagdb->find_gallery($act_gid);
        if (!$gallery) {
            flagGallery::show_error(__('Gallery not found.', 'flash-album-gallery'));
            return;
        }
        // Check if you have the correct capability
        if (!flagAdmin::can_manage_this_gallery($gallery->author)) {
            flagGallery::show_error(__('Sorry, you have no access here', 'flash-album-gallery'));
            return;
        }
        // look for pagination
        if (!isset($_GET['paged']) || intval($_GET['paged']) < 1) {
            $_GET['paged'] = 1;
        }
        $_GET['paged'] = intval($_GET['paged']);
        $start = ($_GET['paged'] - 1) * 50;
        // get picture values
        $picturelist = $flagdb->get_gallery($act_gid, $flag->options['galSort'], $flag->options['galSortDir'], false, 50, $start);
        // build pagination
        $page_links = paginate_links(array('base' => add_query_arg('paged', '%#%'), 'format' => '', 'prev_text' => __('&laquo;'), 'next_text' => __('&raquo;'), 'total' => $flagdb->paged['max_objects_per_page'], 'current' => $_GET['paged']));
        // get the current author
        $act_author_user = get_userdata((int) $gallery->author);
    }
    // list all galleries
    $gallerylist = $flagdb->find_all_galleries();
    //get the columns
    $gallery_columns = flag_manage_gallery_columns();
    $hidden_columns = get_hidden_columns('flag-manage-images');
    $hidden_columns = array_filter($hidden_columns);
    if ($picturelist) {
        $a_hits = array();
        foreach ($picturelist as $p) {
            $a_hits[] = $p->hitcounter;
        }
        if (!array_sum($a_hits)) {
            $hidden_columns[] = 'views_likes';
            $hidden_columns[] = 'rating';
        }
    } else {
        $hidden_columns[] = 'views_likes';
        $hidden_columns[] = 'rating';
    }
    $num_columns = count($gallery_columns) - count($hidden_columns);
    ?>
<!--[if lt IE 8]>
	<style type="text/css">
		.custom_thumb {
			display : none;
		}
	</style>
<![endif]-->

<script type="text/javascript"> 
//<![CDATA[
function showDialog( windowId, height ) {
	var form = document.getElementById('updategallery');
	var elementlist = "";
	for (i = 0, n = form.elements.length; i < n; i++) {
		if(form.elements[i].type == "checkbox") {
			if(form.elements[i].name == "doaction[]")
				if(form.elements[i].checked == true)
					if (elementlist == "")
						elementlist = form.elements[i].value;
					else
						elementlist += "," + form.elements[i].value ;
		}
	}
	jQuery("#" + windowId + "_bulkaction").val(jQuery("#bulkaction").val());
	jQuery("#" + windowId + "_imagelist").val(elementlist);
	// console.log (jQuery("#TB_imagelist").val());
	tb_show("", "#TB_inline?width=640&height=" + height + "&inlineId=" + windowId + "&modal=true", false);
}

function checkAll(form)
{
	for (i = 0, n = form.elements.length; i < n; i++) {
		if(form.elements[i].type == "checkbox") {
			if(form.elements[i].name == "doaction[]") {
				if(form.elements[i].checked == true)
					form.elements[i].checked = false;
				else
					form.elements[i].checked = true;
			}
//.........这里部分代码省略.........
开发者ID:jasonralph,项目名称:jasonralph.org,代码行数:101,代码来源:manage-images.php

示例8: get_column_info

 /**
  * Get a list of all, hidden and sortable columns, with filter applied
  *
  * @since 3.1.0
  * @access protected
  *
  * @return array
  */
 function get_column_info()
 {
     if (isset($this->_column_headers)) {
         return $this->_column_headers;
     }
     $columns = get_column_headers($this->screen);
     $hidden = get_hidden_columns($this->screen);
     $sortable_columns = $this->get_sortable_columns();
     /**
      * Filter the list table sortable columns for a specific screen.
      *
      * The dynamic portion of the hook name, $this->screen->id, refers
      * to the ID of the current screen, usually a string.
      *
      * @since 3.5.0
      *
      * @param array $sortable_columns An array of sortable columns.
      */
     $_sortable = apply_filters("manage_{$this->screen->id}_sortable_columns", $sortable_columns);
     $sortable = array();
     foreach ($_sortable as $id => $data) {
         if (empty($data)) {
             continue;
         }
         $data = (array) $data;
         if (!isset($data[1])) {
             $data[1] = false;
         }
         $sortable[$id] = $data;
     }
     $this->_column_headers = array($columns, $hidden, $sortable);
     return $this->_column_headers;
 }
开发者ID:blogfor,项目名称:king,代码行数:41,代码来源:class-axiom-list-table.php

示例9: if

			<?php if ($page_links) echo "<div class='tablenav-pages'>$page_links</div>"; ?>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>

	<table class="widefat" cellspacing="0">
		<thead>
		<tr><?php print_column_headers('ecart_page_ecart-customers'); ?></tr>
		</thead>
		<tfoot>
		<tr><?php print_column_headers('ecart_page_ecart-customers',false); ?></tr>
		</tfoot>
	<?php if (sizeof($Customers) > 0): ?>
		<tbody id="customers-table" class="list orders">
		<?php
			$hidden = get_hidden_columns('ecart_page_ecart-customers');

			$even = false;
			foreach ($Customers as $Customer):
			$CustomerName = (empty($Customer->firstname) && empty($Customer->lastname))?'('.__('no contact name','Ecart').')':"{$Customer->firstname} {$Customer->lastname}";
			?>
		<tr<?php if (!$even) echo " class='alternate'"; $even = !$even; ?>>
			<th scope='row' class='check-column'><input type='checkbox' name='selected[]' value='<?php echo $Customer->id; ?>' /></th>
			<td class="name column-name"><a class='row-title' href='<?php echo esc_url( add_query_arg(array('page'=>'ecart-customers','id'=>$Customer->id),admin_url('admin.php'))); ?>' title='<?php _e('Edit','Ecart'); ?> &quot;<?php echo esc_attr($CustomerName); ?>&quot;'><?php echo esc_html($CustomerName); ?></a><?php echo !empty($Customer->company)?"<br />".esc_html($Customer->company):""; ?></td>
			<td class="login column-login<?php echo in_array('login',$hidden)?' hidden':''; ?>"><?php echo esc_html($Customer->user_login); ?></td>
			<td class="email column-email<?php echo in_array('email',$hidden)?' hidden':''; ?>"><a href="mailto:<?php echo esc_attr($Customer->email); ?>"><?php echo esc_html($Customer->email); ?></a></td>

			<td class="location column-location<?php echo in_array('location',$hidden)?' hidden':''; ?>"><?php
				$location = '';
				$location = $Customer->city;
				if (!empty($location) && !empty($Customer->state)) $location .= ', ';
开发者ID:robbiespire,项目名称:paQui,代码行数:31,代码来源:customers.php

示例10: get_column_info

 function get_column_info()
 {
     $columns = get_column_headers($this->_screen);
     $hidden = get_hidden_columns($this->_screen);
     $_sortable = $this->get_sortable_columns();
     foreach ($_sortable as $id => $data) {
         if (empty($data)) {
             continue;
         }
         $data = (array) $data;
         if (!isset($data[1])) {
             $data[1] = false;
         }
         $sortable[$id] = $data;
     }
     return array($columns, $hidden, $sortable);
 }
开发者ID:popovdenis,项目名称:kmst,代码行数:17,代码来源:manage-galleries.php

示例11: render_screen_options

    /**
     * Render the screen options tab.
     *
     * @since 3.3.0
     */
    public function render_screen_options()
    {
        global $wp_meta_boxes;
        $columns = get_column_headers($this);
        $hidden = get_hidden_columns($this);
        ?>
		<div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php 
        esc_attr_e('Screen Options Tab');
        ?>
">
		<form id="adv-settings" action="" method="post">
		<?php 
        if (isset($wp_meta_boxes[$this->id]) || $this->get_option('per_page') || $columns && empty($columns['_title'])) {
            ?>
			<h5><?php 
            _e('Show on screen');
            ?>
</h5>
		<?php 
        }
        if (isset($wp_meta_boxes[$this->id])) {
            ?>
			<div class="metabox-prefs">
				<?php 
            meta_box_prefs($this);
            if ('dashboard' === $this->id && has_action('welcome_panel') && current_user_can('edit_theme_options')) {
                if (isset($_GET['welcome'])) {
                    $welcome_checked = empty($_GET['welcome']) ? 0 : 1;
                    update_user_meta(get_current_user_id(), 'show_welcome_panel', $welcome_checked);
                } else {
                    $welcome_checked = get_user_meta(get_current_user_id(), 'show_welcome_panel', true);
                    if (2 == $welcome_checked && wp_get_current_user()->user_email != get_option('admin_email')) {
                        $welcome_checked = false;
                    }
                }
                echo '<label for="wp_welcome_panel-hide">';
                echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked((bool) $welcome_checked, true, false) . ' />';
                echo _x('Welcome', 'Welcome panel') . "</label>\n";
            }
            ?>
				<br class="clear" />
			</div>
			<?php 
        }
        if ($columns) {
            if (!empty($columns['_title'])) {
                ?>
			<h5><?php 
                echo $columns['_title'];
                ?>
</h5>
			<?php 
            }
            ?>
			<div class="metabox-prefs">
				<?php 
            $special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname');
            foreach ($columns as $column => $title) {
                // Can't hide these for they are special
                if (in_array($column, $special)) {
                    continue;
                }
                if (empty($title)) {
                    continue;
                }
                if ('comments' == $column) {
                    $title = __('Comments');
                }
                $id = "{$column}-hide";
                echo '<label for="' . $id . '">';
                echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked(!in_array($column, $hidden), true, false) . ' />';
                echo "{$title}</label>\n";
            }
            ?>
				<br class="clear" />
			</div>
		<?php 
        }
        $this->render_screen_layout();
        $this->render_per_page_options();
        echo $this->_screen_settings;
        ?>
		<div><?php 
        wp_nonce_field('screen-options-nonce', 'screenoptionnonce', false);
        ?>
</div>
		</form>
		</div>
		<?php 
    }
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:95,代码来源:screen.php

示例12: isset

    Shopp::_e('New Order');
    ?>
</h2>
	<?php 
}
?>

	<?php 
$this->notices();
?>


	<?php 
$totalsedit = isset($_GET['edit']) && 'totals' == $_GET['edit'];
$columns = get_column_headers($this->screen);
$hidden = get_hidden_columns($this->screen);
$colspan = count($columns);
$timestamp = empty($Purchase->created) ? current_time('timestamp') : $Purchase->created;
?>
	<div id="order">
		<div class="title">
			<div id="titlewrap">
				<span class="date"><?php 
echo Shopp::_d(get_option('date_format'), $timestamp);
?>
 <small><?php 
echo date(get_option('time_format'), $timestamp);
?>
</small>

				<div class="alignright">
开发者ID:forthrobot,项目名称:inuvik,代码行数:31,代码来源:new.php

示例13: dynamic_taxonomy_row

 /**
  * Prints manage row for dynamic taxonomy
  *
  * @param Dynamic_Taxonomy_Handler $taxonomy_obj
  * @param string $style
  * @return unknown
  */
 public function dynamic_taxonomy_row($taxonomy_obj, $style)
 {
     $checkbox = "<input type='checkbox' name='taxonomies[]' id='taxonomy_{$taxonomy_obj->get_taxonomy_name()}' value='{$taxonomy_obj->get_taxonomy_name()}' />";
     $r = "<tr id='taxonomy-{$taxonomy_obj->get_taxonomy_name()}'{$style}>";
     $columns = get_column_headers('dynamic_taxonomy');
     $hidden = get_hidden_columns('dynamic_taxonomy');
     foreach ($columns as $column_name => $column_display_name) {
         $class = "class=\"{$column_name} column-{$column_name}\"";
         $style = '';
         if (in_array($column_name, $hidden)) {
             $style = ' style="display:none;"';
         }
         $attributes = "{$class}{$style}";
         switch ($column_name) {
             case 'cb':
                 $r .= "<th scope='row' class='check-column'>{$checkbox}</th>";
                 break;
             case 'taxonomy':
                 $r .= sprintf('<td %s>%s<br /><div class="row-actions"><span class="edit"><a href="%s">Edit</a> | </span><span class="delete"><a href="%s" class="submitdelete">Delete</a></span></div></td>', $attributes, $taxonomy_obj->get_taxonomy_name(), $this->get_edit_taxonomy_url($taxonomy_obj->get_taxonomy_name()), wp_nonce_url($this->get_manage_taxonomies_url(array('action' => 'delete', 'taxonomy' => $taxonomy_obj->get_taxonomy_name())), 'delete_taxonomy'));
                 break;
             case 'label':
                 $r .= "<td {$attributes}>{$taxonomy_obj->get_taxonomy_label()}</td>";
                 break;
             case 'object_types':
                 $obect_types = count($taxonomy_obj->get_object_types()) > 0 ? join(', ', $taxonomy_obj->get_object_types()) : "none";
                 $r .= "<td {$attributes}>{$obect_types}</td>";
                 break;
             default:
                 $r .= "<td {$attributes}>";
                 $r .= apply_filters('manage_users_custom_column', '', $column_name, $taxonomy_obj->get_taxonomy_name());
                 $r .= "</td>";
         }
     }
     $r .= '</tr>';
     return $r;
 }
开发者ID:andru,项目名称:cms-press,代码行数:43,代码来源:dynamic-taxonomies.php

示例14: table

    /**
     * Renders the report table to the WP admin screen
     *
     * @author Jonathan Davis
     * @since 1.3
     *
     * @return void
     **/
    public function table()
    {
        extract($this->options, EXTR_SKIP);
        // Get only the records for this page
        $beginning = (int) ($paged - 1) * $per_page;
        $report = array_values($this->data);
        $report = array_slice($report, $beginning, $beginning + $per_page, true);
        unset($this->data);
        // Free memory
        ?>


			<table class="widefat" cellspacing="0">
				<thead>
				<tr><?php 
        ShoppUI::print_column_headers($this->screen);
        ?>
</tr>
				</thead>
			<?php 
        if (false !== $report && count($report) > 0) {
            ?>
				<tbody id="report" class="list stats">
				<?php 
            $columns = get_column_headers($this->screen);
            $hidden = get_hidden_columns($this->screen);
            $even = false;
            $records = 0;
            while (list($id, $data) = each($report)) {
                if ($records++ > $per_page) {
                    break;
                }
                ?>
					<tr<?php 
                if (!$even) {
                    echo " class='alternate'";
                }
                $even = !$even;
                ?>
>
				<?php 
                foreach ($columns as $column => $column_title) {
                    $classes = array($column, "column-{$column}");
                    if (in_array($column, $hidden)) {
                        $classes[] = 'hidden';
                    }
                    if (method_exists(get_class($this), $column)) {
                        ?>
							<td class="<?php 
                        echo esc_attr(join(' ', $classes));
                        ?>
"><?php 
                        echo call_user_func(array($this, $column), $data, $column, $column_title, $this->options);
                        ?>
</td>
						<?php 
                    } else {
                        ?>
							<td class="<?php 
                        echo esc_attr(join(' ', $classes));
                        ?>
">
							<?php 
                        do_action('shopp_manage_report_custom_column', $column, $column_title, $data);
                        ?>
							</td>
						<?php 
                    }
                }
                /* $columns */
                ?>
				</tr>
				<?php 
            }
            /* records */
            ?>

				<tr class="summary average">
					<?php 
            $averages = clone $this->totals;
            $first = true;
            foreach ($columns as $column => $column_title) {
                if ($first) {
                    $averages->id = $averages->period = $averages->{$column} = __('Average', 'Shopp');
                    $first = false;
                } else {
                    $value = isset($averages->{$column}) ? $averages->{$column} : null;
                    $total = isset($this->total) ? $this->total : 0;
                    if (null == $value) {
                        $averages->{$column} = '';
                    } elseif (0 === $total) {
                        $averages->{$column} = 0;
//.........这里部分代码省略.........
开发者ID:msigley,项目名称:shopp,代码行数:101,代码来源:Reports.php

示例15: manage_columns_prefs

/**
 * {@internal Missing Short Description}}
 *
 * @since unknown
 *
 * @param unknown_type $page
 */
function manage_columns_prefs($page) {
	$columns = get_column_headers($page);

	$hidden = get_hidden_columns($page);

	foreach ( $columns as $column => $title ) {
		// Can't hide these
		if ( 'cb' == $column || 'title' == $column || 'name' == $column || 'username' == $column || 'media' == $column || 'comment' == $column )
			continue;
		if ( empty($title) )
			continue;

		if ( 'comments' == $column )
			$title = __('Comments');
		$id = "$column-hide";
		echo '<label for="' . $id . '">';
		echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . (! in_array($column, $hidden) ? ' checked="checked"' : '') . ' />';
		echo "$title</label>\n";
	}
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:27,代码来源:template.php


注:本文中的get_hidden_columns函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。