PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/mytube.pm/wp-content/plugins/comet-cache/src/includes/traits/Plugin/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : /home/trave494/mytube.pm/wp-content/plugins/comet-cache/src/includes/traits/Plugin/BbPressUtils.php |
<?php namespace WebSharks\CometCache\Traits\Plugin; use WebSharks\CometCache\Classes; trait BbPressUtils { /** * Is bbPress active? * * @since 150821 Improving bbPress support. * * @return bool `TRUE` if bbPress is active. */ public function isBbPressActive() { return class_exists('bbPress'); } /** * bbPress post types. * * @since 150821 Improving bbPress support. * * @return array All bbPress post types. */ public function bbPressPostTypes() { if (!$this->isBbPressActive()) { return []; } if (!is_null($types = &$this->cacheKey('bbPressPostTypes'))) { return $types; // Already did this. } $types = []; // Initialize. $types[] = bbp_get_forum_post_type(); $types[] = bbp_get_topic_post_type(); $types[] = bbp_get_reply_post_type(); return $types; } /** * bbPress post statuses. * * @since 150821 Improving bbPress support. * * @return array All bbPress post statuses. */ public function bbPressStatuses() { if (!$this->isBbPressActive()) { return []; } if (!is_null($statuses = &$this->cacheKey('bbPressStatuses'))) { return $statuses; // Already did this. } $statuses = []; // Initialize. foreach (get_post_stati([], 'objects') as $_key => $_status) { if (isset($_status->label_count['domain']) && $_status->label_count['domain'] === 'bbpress') { $statuses[] = $_status->name; } } unset($_key, $_status); // Housekeeping. return $statuses; } }