本文整理匯總了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);
}