Beispiel #1
0
/**
 * Echo the Page type name.
 *
 * @param  int $post_id
 *
 * @return string
 */
function the_papi_page_type_name($post_id = 0)
{
    echo papi_get_page_type_name($post_id);
}
Beispiel #2
0
		<div class="papi-debug">
			<div>
				<p>Papi debug info</p>
				<div class="papi-debug-info">
					<table>
						<thead>
							<tr>
								<th>Key</th>
								<th>Value</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>Page Type</td>
								<td><?php 
echo empty(papi_get_page_type_name()) ? 'No papi page type' : papi_get_page_type_name();
?>
</td>
							</tr>
							<tr>
								<td>Template</td>
								<td><?php 
global $template;
echo basename($template);
?>
</td>
							</tr>
							<tr>
								<td>Fields</td>
								<td>
									<?php 
Beispiel #3
0
 /**
  * Filter the link query results.
  *
  * @param  array $results
  *
  * @return array
  */
 public function wp_link_query(array $results)
 {
     $post_type = papi_get_post_type();
     foreach ($results as $index => $value) {
         $name = papi_get_page_type_name($value['ID']);
         if (empty($name)) {
             $name = papi_filter_settings_standard_page_type_name($post_type);
         }
         $results[$index]['info'] = esc_html($name);
     }
     return $results;
 }
Beispiel #4
0
/**
 * Echo the page type name.
 *
 * @param  int $post_id
 *
 * @return string
 */
function the_papi_page_type_name($post_id = 0)
{
    echo esc_html(papi_get_page_type_name($post_id));
}