本文整理汇总了PHP中get_post_status函数的典型用法代码示例。如果您正苦于以下问题:PHP get_post_status函数的具体用法?PHP get_post_status怎么用?PHP get_post_status使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_post_status函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: sp_google_maps_shortcode_meta
function sp_google_maps_shortcode_meta()
{
global $post;
?>
<p>
<strong>
<label for="map_shortcode"><?php
_e("ShortCode For This Map", 'sp_google_maps');
?>
</label>
</strong>
</p>
<?php
if (get_post_status($post->ID) === "publish") {
?>
<input type="text" id="map_shortcode" value='[SPGM id="<?php
echo $post->ID;
?>
"]' onclick="select();" />
<br>
<code><?php
_e('Copy and Paste This ShortCode To Use This Map', 'sp_google_maps');
?>
</code>
<?php
} else {
?>
<p><small><?php
_e('ShortCode will apear after first save.', 'sp_google_maps');
?>
</small></p>
<?php
}
}
开发者ID:samepage33,项目名称:SP-Google-Maps,代码行数:34,代码来源:metaboxes.php
示例2: kamino_sanitize_dropdown_pages
/**
* Drop-down Pages sanitization callback example.
*
* - Sanitization: dropdown-pages
* - Control: dropdown-pages
*
* Sanitization callback for 'dropdown-pages' type controls. This callback sanitizes `$page_id`
* as an absolute integer, and then validates that $input is the ID of a published page.
*
* @see absint() https://developer.wordpress.org/reference/functions/absint/
* @see get_post_status() https://developer.wordpress.org/reference/functions/get_post_status/
*
* @param int $page Page ID.
* @param WP_Customize_Setting $setting Setting instance.
*
* @return int|string Page ID if the page is published; otherwise, the setting default.
*/
function kamino_sanitize_dropdown_pages($page_id, $setting)
{
// Ensure $input is an absolute integer.
$page_id = absint($page_id);
// If $page_id is an ID of a published page, return it; otherwise, return the default.
return 'publish' == get_post_status($page_id) ? $page_id : $setting->default;
}
开发者ID:sixteenbit,项目名称:kamino,代码行数:24,代码来源:sanitization.php
示例3: x_shortcode_toc_item
function x_shortcode_toc_item($atts)
{
extract(shortcode_atts(array('id' => '', 'class' => '', 'style' => '', 'title' => '', 'page' => ''), $atts, 'x_toc_item'));
$id = $id != '' ? 'id="' . esc_attr($id) . '"' : '';
$class = $class != '' ? 'x-toc-item ' . esc_attr($class) : 'x-toc-item';
$style = $style != '' ? 'style="' . $style . '"' : '';
$title = $title != '' ? $title : '';
switch ($page) {
case 0:
$page = '';
break;
case 1:
$page = '';
break;
default:
$page = $page;
if (get_post_status(get_the_ID()) == "draft") {
$page = '&page=' . $page;
} else {
$page = get_the_ID() == get_option('page_on_front') ? 'page/' . $page . '/' : $page . '/';
}
}
$link = esc_url(get_permalink());
$output = "<li {$id} class=\"{$class}\" {$style}><a href=" . $link . $page . " title=\"Go to {$title}\">" . $title . '</a></li>';
return $output;
}
开发者ID:elinberg,项目名称:ericlinberg,代码行数:26,代码来源:toc.php
示例4: problogger_jumbotron
static function problogger_jumbotron()
{
global $post;
if (!$post) {
return false;
}
$show = get_post_meta($post->ID, '_problogger_meta_jumbotron_show_key', true);
if ($show == '2') {
return false;
}
$the_post_id = get_post_meta($post->ID, '_problogger_meta_jumbotron_post_id', true);
if (!get_post_status($the_post_id)) {
return false;
}
$the_post = get_post($the_post_id);
$width = problogger_option('jumbotron_width', 'container');
$the_bg_color = get_post_meta($the_post->ID, '_jumbotron_meta_color_key', true);
$the_styles = 'style="' . ($the_bg_color ? 'background-color: ' . $the_bg_color . '; ' : '') . 'border-radius: 0;"';
$the_content = apply_filters('the_content', $the_post->post_content);
$output = $the_content;
switch ($width) {
case 'full':
$output = sprintf('<section class="jumbotron" %s>%s</section>', $the_styles, $the_content);
break;
case 'fullcontain':
$output = sprintf('<section class="jumbotron" %s><div class="container">%s</div></section>', $the_styles, $the_content);
break;
case 'container':
default:
$output = sprintf('<section class="jumbotron container" %s>%s</section>', $the_styles, $the_content);
break;
}
return print $output;
}
开发者ID:nlk-sites,项目名称:nectar7,代码行数:34,代码来源:class.problogger_partials.php
示例5: medium_save_video_meta
/**
* Saves the video embed code on post save
*
* @since 4.0
*/
function medium_save_video_meta($post_id)
{
global $post;
// Return early if this is a newly created post that hasn't been saved yet.
if ('auto-draft' == get_post_status($post_id)) {
return $post_id;
}
// Check if the user intended to change this value.
if (!isset($_POST['medium_video_box_nonce']) || !wp_verify_nonce($_POST['medium_video_box_nonce'], plugin_basename(__FILE__))) {
return $post_id;
}
// Get post type object
$post_type = get_post_type_object($post->post_type);
// Check if user has permission
if (!current_user_can($post_type->cap->edit_post, $post_id)) {
return $post_id;
}
// Get posted data and sanitize it
$new_video = isset($_POST['medium_video_field']) ? $_POST['medium_video_field'] : '';
// Get existing video
$video = get_post_meta($post_id, 'video', true);
// If a new video was submitted and there was no previous one, add it
if ($new_video && '' == $video) {
add_post_meta($post_id, 'video', $new_video, true);
} elseif ($new_video && $new_video != $video) {
update_post_meta($post_id, 'video', $new_video);
} elseif ('' == $new_video && $video) {
delete_post_meta($post_id, 'video', $video);
}
}
开发者ID:newscloud,项目名称:medium,代码行数:35,代码来源:metabox.php
示例6: ajax_post
function ajax_post()
{
require_once ABSPATH . '/wp-admin/includes/post.php';
if (!wp_verify_nonce($_POST['_wpnonce'], 'update-post_' . $_POST['post_ID'])) {
wp_send_json_error(array('message' => __('You are not allowed to edit this item.')));
}
$_POST['post_title'] = strip_tags($_POST['post_title']);
$post_id = edit_post();
if (isset($_POST['save']) || isset($_POST['publish'])) {
$status = get_post_status($post_id);
if (isset($_POST['publish'])) {
switch ($status) {
case 'pending':
$message = 8;
break;
case 'future':
$message = 9;
break;
default:
$message = 6;
}
} else {
$message = 'draft' == $status ? 10 : 1;
}
} else {
$message = 4;
}
$post = get_post($post_id);
wp_send_json_success(array('message' => $this->get_message($post, $message), 'post' => $post, 'processedPostContent' => apply_filters('the_content', $post->post_content)));
}
开发者ID:foxpcteam,项目名称:wp-front-end-editor,代码行数:30,代码来源:class-fee.php
示例7: redirect_post
/**
* Redirect to previous page.
*
* @param int $post_id Optional. Post ID.
*/
function redirect_post($post_id = '', $_url)
{
$_url = esc_url(add_query_arg('form', $post_id, $_url));
if (isset($_POST['save']) || isset($_POST['publish'])) {
$status = get_post_status($post_id);
if (isset($_POST['publish'])) {
switch ($status) {
case 'pending':
$message = 8;
break;
case 'future':
$message = 9;
break;
default:
$message = 6;
}
} else {
$message = 'draft' == $status ? 10 : 1;
}
$location = add_query_arg('message', $message, $_url);
} else {
$location = add_query_arg('message', 4, $_url);
}
wp_redirect(esc_url($location));
exit;
}
开发者ID:rebeccayshen,项目名称:kitlist,代码行数:31,代码来源:edit-form.php
示例8: send_with_donation_id
/**
* Static method that is fired right after a donation is completed, sending the donation receipt.
*
* @param int $donation_id
* @return boolean
* @access public
* @static
* @since 1.0.0
*/
public static function send_with_donation_id($donation_id)
{
if (!charitable_get_helper('emails')->is_enabled_email(self::get_email_id())) {
return false;
}
if (!charitable_is_approved_status(get_post_status($donation_id))) {
return false;
}
$donation = charitable_get_donation($donation_id);
if (!is_object($donation) || 0 == count($donation->get_campaign_donations())) {
return false;
}
if (!apply_filters('charitable_send_' . self::get_email_id(), true, $donation)) {
return false;
}
$email = new Charitable_Email_New_Donation(array('donation' => $donation));
/**
* Don't resend the email.
*/
if ($email->is_sent_already($donation_id)) {
return false;
}
$sent = $email->send();
/**
* Log that the email was sent.
*/
if (apply_filters('charitable_log_email_send', true, self::get_email_id(), $email)) {
$email->log($donation_id, $sent);
}
return true;
}
开发者ID:helgatheviking,项目名称:Charitable,代码行数:40,代码来源:class-charitable-email-new-donation.php
示例9: rockAjax_save
function rockAjax_save()
{
if (!isset($_POST['serializedArray'])) {
return;
}
if (!is_admin()) {
return;
}
// get the submitted parameters
$postID = (int) $_POST['postID'];
if (!is_string(get_post_status($postID))) {
return;
}
$array = $_POST['serializedArray'];
$_builder_in_use = isset($_POST['_builder_in_use']) ? $_POST['_builder_in_use'] : 'false';
$_featured_image_in_builder = $_POST['featuredInBuilder'];
update_post_meta($postID, '_this_r_content', addslashes($array));
update_post_meta($postID, '_builder_in_use', $_builder_in_use);
update_post_meta($postID, '_featured_image_in_builder', $_featured_image_in_builder);
// generate the response
$response = json_encode(array('success' => true));
// response output
echo $response;
exit;
}
开发者ID:Neminath,项目名称:lastmile,代码行数:25,代码来源:builder-functions.php
示例10: show_pending_post_notice
function show_pending_post_notice($user_id, $post_id)
{
if (get_post_status($post_id) == 'pending') {
add_action('admin_footer', 'disable_review_button');
add_action('admin_head', 'disable_review_button_styles');
}
}
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:7,代码来源:contributor-settings.php
示例11: save
public function save()
{
$parent = get_post($this->parent_id);
$post_to_save = get_object_vars($parent);
unset($post_to_save['ID']);
unset($post_to_save['guid']);
$post_to_save['post_parent'] = $parent->ID;
$post_to_save['post_name'] = $parent->post_name . '-' . $this->start_date->format('Y-m-d');
$duration = $this->get_duration();
$end_date = $this->get_end_date();
if (!empty($this->post_id)) {
// update the existing post
$post_to_save['ID'] = $this->post_id;
if (get_post_status($this->post_id) == 'trash') {
$post_to_save['post_status'] = get_post_status($this->post_id);
}
$this->post_id = wp_update_post($post_to_save);
update_post_meta($this->post_id, '_EventStartDate', $this->start_date->format(DateSeriesRules::DATE_FORMAT));
update_post_meta($this->post_id, '_EventEndDate', $end_date->format(DateSeriesRules::DATE_FORMAT));
update_post_meta($this->post_id, '_EventDuration', $duration);
} else {
// add a new post
$post_to_save['guid'] = esc_url(add_query_arg(array('eventDate' => $this->start_date->format('Y-m-d')), $parent->guid));
$this->post_id = wp_insert_post($post_to_save);
// save several queries by calling add_post_meta when we have a new post
add_post_meta($this->post_id, '_EventStartDate', $this->start_date->format(DateSeriesRules::DATE_FORMAT));
add_post_meta($this->post_id, '_EventEndDate', $end_date->format(DateSeriesRules::DATE_FORMAT));
add_post_meta($this->post_id, '_EventDuration', $duration);
}
$this->copy_meta();
// everything else
$this->set_terms();
}
开发者ID:pellio11,项目名称:ns-select-project,代码行数:33,代码来源:tribeeventspro-recurrenceinstance.php
示例12: valid
public function valid()
{
if (!defined('WPDDL_DEVELOPMENT') && !defined('WPDDL_PRODUCTION')) {
return false;
}
$type = self::get_type_name();
if (isset(self::$layout_id[$type]) && self::$layout_id[$type] !== null && self::$layout_id !== false) {
return true;
}
global $wpdb;
$layouts_per_post_type = $wpdb->get_results("SELECT meta_value, post_id FROM {$wpdb->postmeta} WHERE meta_key = '_ddl_post_types_was_batched'");
foreach ($layouts_per_post_type as $setting) {
$setting->meta_value = unserialize($setting->meta_value);
if (is_array($setting->meta_value) && in_array($type, $setting->meta_value)) {
if (get_post_status($setting->post_id) == 'trash') {
continue;
}
$title = get_the_title($setting->post_id);
self::$layout_id[$type] = $setting->post_id;
self::$layout_name[$type] = $title;
return true;
}
}
self::$layout_id[$type] = false;
self::$layout_name[$type] = false;
return false;
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:27,代码来源:template_exists.php
示例13: form_init
function form_init()
{
global $ultimatemember;
$http_post = 'POST' == $_SERVER['REQUEST_METHOD'];
if ($http_post && !is_admin() && isset($_POST['form_id']) && is_numeric($_POST['form_id'])) {
$this->form_id = $_POST['form_id'];
$this->form_status = get_post_status($this->form_id);
if ($this->form_status == 'publish') {
/* save entire form as global */
$this->post_form = $_POST;
$this->post_form = $this->beautify($this->post_form);
$this->form_data = $ultimatemember->query->post_data($this->form_id);
$this->post_form['submitted'] = $this->post_form;
$this->post_form = array_merge($this->form_data, $this->post_form);
if ($_POST[$ultimatemember->honeypot] != '') {
wp_die('Hello, spam bot!');
}
if (!in_array($this->form_data['mode'], array('login'))) {
$form_timestamp = trim($_POST['timestamp']);
$live_timestamp = current_time('timestamp');
if ($form_timestamp == '' && um_get_option('enable_timebot') == 1) {
wp_die(__('Hello, spam bot!'));
}
if ($live_timestamp - $form_timestamp < 6 && um_get_option('enable_timebot') == 1) {
wp_die(__('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!'));
}
}
/* Continue based on form mode - pre-validation */
do_action('um_submit_form_errors_hook', $this->post_form);
do_action("um_submit_form_{$this->post_form['mode']}", $this->post_form);
}
}
}
开发者ID:smithsa,项目名称:daily-job-hunter,代码行数:33,代码来源:um-form.php
示例14: fnt_dashboard_widget
function fnt_dashboard_widget()
{
$clientid = '9f690b3117f0c43767528e2b60bc70ce';
$args = array('posts_per_page' => -1, 'offset' => 0, 'post_status' => array('publish', 'draft'), 'post_type' => 'tracks');
$errors = 0;
$query = new WP_Query($args);
while ($query->have_posts()) {
$query->the_post();
$id = get_the_ID();
$track_url = get_post_meta($id, 'track_url', true);
$errored = 0;
if (get_post_status() == 'draft') {
$errored = 1;
} else {
$soundcloud_url = 'https://api.soundcloud.com/resolve?url=' . $track_url . '&format=json&consumer_key=' . $clientid;
$track_json = file_get_contents($soundcloud_url);
$track = json_decode($track_json);
if ($track == null || isset($track->errors) && isset($track->errors[0]) && $track->errors[0]->error_message == '404 - Not Found' || $track->errors[0]->error_message == 'HTTP Error: 403') {
$errored = 1;
$update = array('ID' => $id, 'post_status' => 'draft');
wp_update_post($update);
}
}
if ($errored > 0) {
echo '<span style="color:red;">SC Track is private & won\'t play: </span> ' . '<a href="' . get_edit_post_link() . '" target="_blank">' . get_the_title() . '</a><br/>';
$errors++;
}
}
if ($errors > 0) {
echo '<br/><em>These ' . $errors . ' posts are all drafts, but should probably be fixed or removed.</em>';
} else {
echo 'There are no broken tracks! That is SHOCKING :)';
}
}
开发者ID:jacobraccuia,项目名称:dailybeatmedia,代码行数:34,代码来源:admin_functions.php
示例15: __construct
/**
* Constructor.
*/
public function __construct()
{
add_action('wp', array($this, 'process'));
$this->steps = (array) apply_filters('submit_resume_steps', array('submit' => array('name' => __('Submit Details', 'wp-job-manager-resumes'), 'view' => array($this, 'submit'), 'handler' => array($this, 'submit_handler'), 'priority' => 10), 'preview' => array('name' => __('Preview', 'wp-job-manager-resumes'), 'view' => array($this, 'preview'), 'handler' => array($this, 'preview_handler'), 'priority' => 20), 'done' => array('name' => __('Done', 'wp-job-manager-resumes'), 'view' => array($this, 'done'), 'handler' => '', 'priority' => 30)));
uasort($this->steps, array($this, 'sort_by_priority'));
// Get step/resume
if (!empty($_REQUEST['step'])) {
$this->step = is_numeric($_REQUEST['step']) ? max(absint($_REQUEST['step']), 0) : array_search($_REQUEST['step'], array_keys($this->steps));
}
$this->resume_id = !empty($_REQUEST['resume_id']) ? absint($_REQUEST['resume_id']) : 0;
$this->job_id = !empty($_REQUEST['job_id']) ? absint($_REQUEST['job_id']) : 0;
// Load resume details
if ($this->resume_id) {
$resume_status = get_post_status($this->resume_id);
if ('expired' === $resume_status) {
if (!resume_manager_user_can_edit_resume($this->resume_id)) {
$this->resume_id = 0;
$this->job_id = 0;
$this->step = 0;
}
} elseif (0 === $this->step && !in_array($resume_status, apply_filters('resume_manager_valid_submit_resume_statuses', array('preview'))) && empty($_POST['resume_application_submit_button'])) {
$this->resume_id = 0;
$this->job_id = 0;
$this->step = 0;
}
}
}
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:30,代码来源:class-wp-resume-manager-form-submit-resume-working.php
示例16: polylangMetaBoxRender
/**
* Registers the Polylang language meta box.
*
* @param object $post WP_Post post object.
* @param array $metabox Array of metabox arguments.
*
* @return void.
*/
public static function polylangMetaBoxRender($post, $metabox)
{
global $polylang;
$post_id = $post->ID;
$post_type = $metabox['args']['post_type'];
if ($lg = $polylang->model->get_post_language($post_id)) {
$lang = $lg;
} elseif (!empty($_GET['new_lang'])) {
$lang = $polylang->model->get_language($_GET['new_lang']);
} else {
$lang = $polylang->pref_lang;
}
$text_domain = Plugin::TEXT_DOMAIN;
$languages = $polylang->model->get_languages_list();
$pll_dropdown = new PLL_Walker_Dropdown();
$dropdown = $pll_dropdown->walk($languages, array('name' => 'post_lang_choice', 'class' => 'tags-input', 'selected' => $lang ? $lang->slug : '', 'flag' => true));
foreach ($languages as $key_language => $language) {
if ($language->term_id == $lang->term_id) {
unset($languages[$key_language]);
$languages = array_values($languages);
break;
}
}
wp_nonce_field('pll_language', '_pll_nonce');
$is_autopost = get_post_status($post) == 'auto-draft';
include Trapp\instance()->plugin_dir . 'views/admin/metabox-translations-post/language.php';
if (!$is_autopost) {
include Trapp\instance()->plugin_dir . 'views/admin/metabox-translations-post/translations.php';
include Trapp\instance()->plugin_dir . 'views/admin/metabox-translations-post/trapp.php';
}
}
开发者ID:phh,项目名称:wp-trapp,代码行数:39,代码来源:MetaBox.php
示例17: get_assigned_courses_ids
function get_assigned_courses_ids($status = 'all')
{
global $wpdb;
$assigned_courses = array();
$courses = Instructor::get_course_meta_keys($this->ID);
foreach ($courses as $course) {
$course_id = $course;
// Dealing with multisite nuances
if (is_multisite()) {
// Primary blog?
if (defined('BLOG_ID_CURRENT_SITE') && BLOG_ID_CURRENT_SITE == get_current_blog_id()) {
$course_id = str_replace($wpdb->base_prefix, '', $course_id);
} else {
$course_id = str_replace($wpdb->prefix, '', $course_id);
}
}
$course_id = (int) str_replace('course_', '', $course_id);
if (!empty($course_id)) {
if ($status !== 'all') {
if (get_post_status($course_id) == $status) {
$assigned_courses[] = $course_id;
}
} else {
$assigned_courses[] = $course_id;
}
}
}
return $assigned_courses;
}
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:29,代码来源:class.instructor.php
示例18: catchbox_sanitize_post_id
/**
* Sanitizes post_id in slider
* @param $input entered value
* @return sanitized output
*
* @since Catch Box 1.4
*/
function catchbox_sanitize_post_id($input)
{
// Ensure $input is an absolute integer.
$post_id = absint($input);
// If $page_id is an ID of a published page, return it; otherwise, return empty
return 'publish' == get_post_status($post_id) ? $post_id : '';
}
开发者ID:WildCodeSchool,项目名称:projet-hopital_static,代码行数:14,代码来源:customizer-sanitize-functions.php
示例19: get_frontend_data
public function get_frontend_data($post_id)
{
$collector = array();
$meta = fw_get_db_post_option($post_id);
$post_status = get_post_status($post_id);
if ('publish' === $post_status and isset($meta['populated'])) {
$slider_name = $meta['slider']['selected'];
$population_method = $meta['slider'][$slider_name]['population-method'];
$number_of_images = (int) $meta['number_of_images'];
$collector = array('slides' => array(), 'settings' => array('title' => $meta['title'], 'slider_type' => $slider_name, 'population_method' => $population_method, 'post_id' => $post_id, 'extra' => isset($meta['custom-settings']) ? $meta['custom-settings'] : array()));
$query_data = array();
$post_type = $meta['tags']['selected'];
$terms = $meta['tags'][$post_type]['terms'];
$tax_query = array('tax_query' => array('relation' => 'OR'));
foreach ($terms as $term) {
$decoded_data = json_decode($term, true);
$query_data[$decoded_data['taxonomy']][] = $decoded_data['term_id'];
}
foreach ($query_data as $taxonomy => $terms) {
$tax_query['tax_query'][] = array('taxonomy' => $taxonomy, 'field' => 'id', 'terms' => $terms);
}
$final_query = array_merge(array('post_status' => 'publish', 'posts_per_page' => $number_of_images, 'post_type' => $post_type, 'meta_key' => '_thumbnail_id'), $tax_query);
global $post;
$original_post = $post;
$the_query = new WP_Query($final_query);
while ($the_query->have_posts()) {
$the_query->the_post();
array_push($collector['slides'], array('title' => get_the_title(), 'multimedia_type' => $this->multimedia_types[0], 'src' => wp_get_attachment_url(get_post_thumbnail_id(get_the_ID())), 'desc' => get_the_excerpt(), 'extra' => array('post_id' => $post->ID)));
}
wp_reset_postdata();
$post = $original_post;
unset($original_post);
}
return $collector;
}
开发者ID:Archrom,项目名称:wordpress_remaf,代码行数:35,代码来源:class-fw-extension-population-method-tags.php
示例20: valid
public function valid()
{
// false if views not active
if (!parent::valid()) {
return false;
}
global $wpdb;
$cpt = Types_Helper_Condition::get_post_type();
if (isset(self::$views_per_post_type[$cpt->name])) {
return true;
}
// @todo check with Juan if views has a get_views_of_post_type() function
$views_settings = $wpdb->get_results("SELECT meta_value, post_id FROM {$wpdb->postmeta} WHERE meta_key = '_wpv_settings'");
foreach ($views_settings as $setting) {
$setting->meta_value = unserialize($setting->meta_value);
if (isset($setting->meta_value['post_type']) && in_array($cpt->name, $setting->meta_value['post_type'])) {
if (get_post_status($setting->post_id) == 'trash') {
continue;
}
$title = get_the_title($setting->post_id);
self::$views_per_post_type[$cpt->name][] = array('id' => $setting->post_id, 'name' => $title);
}
}
if (isset(self::$views_per_post_type[$cpt->name])) {
return true;
}
return false;
}
开发者ID:axeljohansson1988,项目名称:oddcv,代码行数:28,代码来源:views_exist.php
注:本文中的get_post_status函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论