本文整理汇总了PHP中WP_List_Table::print_column_headers方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_List_Table::print_column_headers方法的具体用法?PHP WP_List_Table::print_column_headers怎么用?PHP WP_List_Table::print_column_headers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_List_Table
的用法示例。
在下文中一共展示了WP_List_Table::print_column_headers方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_column_headers
public function print_column_headers($with_id = true)
{
if ($this->display_col_headers) {
parent::print_column_headers($with_id);
}
}
示例2:
/**
* Form is POST not GET. Override parent method to compensate.
*
* @param bool $with_id
*/
function print_column_headers($with_id = true)
{
if (empty($_GET['s']) && !empty($_POST['s'])) {
$_SERVER['REQUEST_URI'] = esc_url(add_query_arg('s', $_POST['s']));
}
if (empty($_GET['orderby']) && !empty($_POST['orderby'])) {
$_GET['orderby'] = $_POST['orderby'];
}
if (empty($_GET['order']) && !empty($_POST['order'])) {
$_GET['order'] = $_POST['order'];
}
parent::print_column_headers($with_id);
}
示例3:
/**
* Print column headers, adding view, search and filter arguments
*
* @since 1.42
*
* @param bool $with_id Whether to set the id attribute or not
*/
function print_column_headers($with_id = true)
{
$save_uri = $_SERVER['REQUEST_URI'];
$_SERVER['REQUEST_URI'] = add_query_arg(self::mla_submenu_arguments(), $save_uri);
parent::print_column_headers($with_id);
$_SERVER['REQUEST_URI'] = $save_uri;
}
示例4:
function print_column_headers($with_id = true)
{
if ($with_id) {
parent::print_column_headers($with_id);
}
}
示例5: print_column_headers
/**
* Prints column headers.
*
* @since 141111 First documented version.
*
* @param bool $with_id Add an `id=""` attribute?
*/
public function print_column_headers($with_id = true)
{
// @codingStandardsIgnoreEnd
ob_start();
// Open an output buffer.
parent::print_column_headers($with_id);
$column_headers = ob_get_clean();
$regex = '/\\b(href\\s*\\=\\s*)(["\'])(.+?)(\\2)/i';
if ($raw_search_query = $this->getRawSearchQuery()) {
$column_headers = preg_replace_callback($regex, function ($m) use($raw_search_query) {
$m[3] = wp_specialchars_decode($m[3], ENT_QUOTES);
$m[3] = add_query_arg('s', urlencode($raw_search_query), $m[3]);
return $m[1] . $m[2] . esc_attr($m[3]) . $m[4];
#
}, $column_headers);
}
echo $column_headers;
// Display.
}
示例6: die
/**
* Form is POST not GET. Override parent method to compensate.
*
* @param bool $with_id
*/
function print_column_headers($with_id = true)
{
if (isset($_POST['pb_catalog_search'])) {
if (!wp_verify_nonce(esc_attr($_POST['pb_catalog_search']), 'pb_catalog_search')) {
die('Security check.');
}
}
if (empty($_GET['s']) && !empty($_POST['s'])) {
$_SERVER['REQUEST_URI'] = esc_url(add_query_arg('s', $_POST['s']));
}
if (empty($_GET['orderby']) && !empty($_POST['orderby'])) {
$_GET['orderby'] = $_POST['orderby'];
}
if (empty($_GET['order']) && !empty($_POST['order'])) {
$_GET['order'] = $_POST['order'];
}
parent::print_column_headers($with_id);
}