本文整理汇总了PHP中WP_List_Table::display方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_List_Table::display方法的具体用法?PHP WP_List_Table::display怎么用?PHP WP_List_Table::display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_List_Table
的用法示例。
在下文中一共展示了WP_List_Table::display方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Render the view.
*/
public function render()
{
?>
<form method="GET">
<input type="hidden" name="page" value="<?php
echo esc_attr($_GET['page']);
?>
">
<?php
if (isset($_GET['status'])) {
?>
<input type="hidden" name="status" value="<?php
echo esc_attr($_GET['status']);
?>
">
<?php
}
?>
<?php
$this->table->views();
?>
<?php
$this->table->search_box(__("Search", Plugin::SLUG), 'itelic-search');
?>
<?php
$this->table->display();
?>
</form>
<?php
}
示例2: display
/**
* Prepare the table items and print the HTML.
*/
public function display()
{
$this->prepare_items();
if ($this->definition->formEnable()) {
echo '<form id="' . $this->definition->formId() . '" method="' . $this->definition->formMethod() . '">';
echo '<input type="hidden" name="page" value="' . $_REQUEST['page'] . '">';
}
echo $this->definition->displayBefore();
parent::display();
echo $this->definition->displayAfter();
if ($this->definition->formEnable()) {
echo '</form>';
}
}
示例3: display
public function display()
{
echo '
<script>
jQuery(document).ready(function() {
jQuery(".delete").click("delete",function(e){
e.preventDefault();
res=confirm("Are you sure?");
if(res) {
window.location=jQuery(this).attr("href");
}
});
});
</script>
<div id="poststuff" class="fastedit-reports-wide">';
parent::display();
}
示例4: display
function display()
{
$url = self_admin_url(WP_Stream_Admin::ADMIN_PARENT_PAGE);
echo '<form method="get" action="' . esc_url($url) . '" id="record-filter-form">';
echo $this->filter_search();
// xss ok
parent::display();
echo '</form>';
}
示例5: display_grid
protected function display_grid()
{
WP_List_Table::display();
}
示例6: display
/**
* Display the table.
*
* @since 141111 First documented version.
*/
public function display()
{
$this->search_box();
// When applicable.
$this->searchQueryFilterDescriptions();
// When applicable.
parent::display();
// Call parent handler now.
}
示例7: display
public function display($args = array())
{
global $plugin_page, $current_tab;
if ($wpjam_page = wpjam_get_admin_page($plugin_page)) {
$builtin_parent_pages = wpjam_get_builtin_parent_pages();
$parent_slug = isset($wpjam_page['parent_slug']) ? $wpjam_page['parent_slug'] : '';
if ($parent_slug && isset($builtin_parent_pages[$parent_slug])) {
$form_url = $builtin_parent_pages[$parent_slug];
} else {
$form_url = 'admin.php';
}
$form_url = is_network_admin() ? network_admin_url($form_url) : admin_url($form_url);
}
extract(wp_parse_args($args, array('search' => true)));
wpjam_admin_errors();
$this->views();
?>
<form action="<?php
echo $form_url;
?>
" method="get">
<input type="hidden" id="page" name="page" value="<?php
echo $plugin_page;
?>
">
<?php
if (isset($current_tab)) {
?>
<input type="hidden" id="tab" name="tab" value="<?php
echo $current_tab;
?>
">
<?php
}
?>
<?php
do_action('wpjam_list_table_hidden_fields', $plugin_page);
?>
<?php
if ($search && $this->_pagination_args || isset($_GET['s'])) {
$this->search_box('搜索', $this->_args['singular']);
}
?>
<?php
parent::display();
?>
</form>
<?php
}
示例8: display
public function display()
{
if ($this->connect_error) {
?>
<div class="connect-error">
<h2>Whoops!</h2>
<p>We don't appear to be able to connect to the WPEConomy server right now.
Try again later!</p>
</div>
<?php
return;
}
switch ($this->view) {
case 'list':
parent::display();
break;
default:
$this->display_grid();
break;
}
}
示例9: display
public function display()
{
if (count($this->filterElements) > 0) {
$this->views();
}
print "<form id=\"" . $this->pageName . "-filter\" action=\"\" method=\"get\">";
$this->search_box($this->searchBox->getButtonText(), $this->searchBox->getInputName());
if (count($this->searchBox->getHiddenFields()) > 0) {
$hf = $this->searchBox->getHiddenFields();
foreach ($hf as $hfs) {
printf("<input type=\"hidden\" name=\"%s\" value=\"%s\" />", $hfs['name'], $hfs['value']);
}
}
$this->prepare_items();
parent::display();
print "</form>";
}
示例10: display
/**
* Auto escapes all values and displays the table.
*
* @since 4.0.0
*
* @access public
*/
public function display()
{
if (is_array($this->items)) {
foreach ($this->items as &$item) {
foreach ($item as &$value) {
$value = esc_html($value);
}
}
}
parent::display();
}
示例11: display
public function display()
{
if ($this->get_table_id()) {
echo '<span style="display:none;" id="span-' . $this->get_table_id() . '"></span>';
}
parent::display();
// And now this is OK:
$id = $this->get_table_id();
if ($id) {
$cols = $this->get_columns();
$sort = $this->get_jquery_sortable_columns();
$head = '';
$i = 0;
foreach ($cols as $col => $val) {
if (!in_array($col, $sort)) {
$head .= "{$i}:{sorter:false},";
}
++$i;
}
?>
<script>if (typeof jQuery !== 'undefined') {
jQuery("span#span-<?php
echo $id;
?>
").nextAll("table").first().
attr("id", "<?php
echo $id;
?>
");
jQuery("span#span-<?php
echo $id;
?>
").remove();
jQuery("table#<?php
echo $id;
?>
").
find("th").each(function() {
jQuery(this).html(
"<a><span>" + jQuery(this).text() + "</span>" +
"<span class='sorting-indicator'></span></a>");
});
jQuery("table#<?php
echo $id;
?>
").first().
tablesorter({
headers: {
<?php
echo $head;
?>
},
cssAsc: 'sorted desc',
cssDesc: 'sorted asc',
cssHeader: 'sortable desc',
widgets: ['zebra'],
widgetZebra: { css: [ "non-alternate", "alternate" ] }
});
}</script><?php
}
}
示例12: display
public function display()
{
$this->prepare_items();
?>
<form id="<?php
echo $this->_id;
?>
" method="post" action="<?php
echo $this->_formAction;
?>
" class="ifw-listtable">
<?php
if (isset($_REQUEST['page'])) {
?>
<!-- if request has page value submit it for returning to current plugin page -->
<input type="hidden" name="page" value="<?php
echo $_REQUEST['page'];
?>
" />
<?php
}
?>
<?php
if (isset($_REQUEST['appaction'])) {
?>
<!-- if request has appaction value submit it for returning to current plugin page -->
<input type="hidden" name="appaction" value="<?php
echo $_REQUEST['appaction'];
?>
" />
<?php
}
?>
<?php
if (isset($this->_options['hidden_fields'])) {
foreach ($this->_options['hidden_fields'] as $field) {
?>
<input type="hidden" name="<?php
echo $field['name'];
?>
" value="<?php
echo $field['value'];
?>
" />
<?php
}
}
?>
<?php
IfwPsn_Wp_Proxy::doAction($this->_wpActionPrefix . 'before_display', $this);
echo parent::display();
IfwPsn_Wp_Proxy::doAction($this->_wpActionPrefix . 'after_display', $this);
?>
</form>
<?php
}
示例13: display
/**
* Displays the table.
* @access public
*/
public function display()
{
wp_nonce_field('revisr-list-nonce', 'revisr_list_nonce', false);
$filter_event = esc_attr(isset($_REQUEST['revisr_event']) ? $_REQUEST['revisr_event'] : 'all');
$filter_user = esc_attr(isset($_REQUEST['revisr_user']) ? $_REQUEST['revisr_user'] : 'all');
$filter_time = esc_attr(isset($_REQUEST['revisr_time']) ? $_REQUEST['revisr_time'] : 'all');
echo '<input type="hidden" name="revisr_event" value="' . $filter_event . '" />';
echo '<input type="hidden" name="revisr_user" value="' . $filter_user . '" />';
echo '<input type="hidden" name="revisr_time" value="' . $filter_time . '" />';
echo '<input type="hidden" id="order" name="order" value="' . $this->_pagination_args['order'] . '" />';
echo '<input type="hidden" id="orderby" name="orderby" value="' . $this->_pagination_args['orderby'] . '" />';
parent::display();
}
示例14: display
function display()
{
$url = self_admin_url($this->plugin->admin->admin_parent_page);
echo '<form method="get" action="' . esc_url($url) . '" id="record-filter-form">';
echo $this->filter_search();
// xss ok
parent::display();
echo '</form>';
}
示例15: html
/**
* Return the HTML markup for list table view.
*
* @brief Get the list table view
*
* @note This is a low level method that create the HTML markup for list table view. You'll notice that the display
* method above has an input param for echo/display. For now this method html() is here for backward compatibility.
*
* @return string
*/
public function html()
{
// Buffering...
WPDKHTML::startCompress();
// Fetch, prepare, sort, and filter our data...
if (!$this->prepare_items()) {
$this->before_views();
$this->views();
?>
<form id="<?php
echo $this->id;
?>
" class="wpdk-list-table-form" method="get" action="">
<?php
$this->search_box_field();
?>
<?php
// Standard input hidden
$input_hidden = array('page', 'post_type', 'orderby', 'order', '_action_result');
// TODO think to a filter
foreach ($input_hidden as $name) {
if (isset($_REQUEST[$name])) {
// TODO Warning!
$value = is_array($_REQUEST[$name]) ? esc_attr($_REQUEST[$name][0]) : esc_attr($_REQUEST[$name]);
?>
<input type="hidden" name="<?php
echo $name;
?>
" value="<?php
echo $value;
?>
"/>
<?php
}
}
?>
<?php
$this->before_display();
// since 1.5.1
?>
<?php
parent::display();
?>
<?php
$this->after_display();
// since 1.5.1
?>
</form>
<?php
}
?>
<?php
// Get the content
$this->viewController->viewHead->content = WPDKHTML::endCompress();
// Fires into the the title TAG.
add_action('wpdk_header_view_inner_title', array($this, 'wpdk_header_view_inner_title'));
return $this->viewController->html();
}