Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-includes/ID3/Form.tar
Назад
ReviewForm.php 0000777 00000003465 15251221065 0007360 0 ustar 00 <?php namespace Rvx\Form; use Rvx\CPT\CptHelper; use Rvx\Utilities\Auth\Client; class ReviewForm { protected $cptHelper; public function __construct() { $this->cptHelper = new CptHelper(); } public static function post_type_support() { if (Client::getSync()) { // Retrieve settings $enabled_post_types = (new self())->cptHelper->enabledCPT(); // Dynamically add comment support for enabled post types foreach ($enabled_post_types as $post_type) { if (post_type_exists($post_type)) { add_post_type_support($post_type, 'comments'); } } } } public static function comments_template_init($default) { if (Client::getSync()) { // Retrieve settings $enabled_post_types = (new self())->cptHelper->enabledCPT(); // Check if the current post type is enabled if (is_singular($enabled_post_types)) { // Exclude WooCommerce account page if (\class_exists('WooCommerce') && is_account_page()) { // Do nothing on WooCommerce front-end user dashboard } else { // Invoke custom handler if (\class_exists('Rvx\\Handlers\\CommentBoxHandle')) { (new \Rvx\Handlers\CommentBoxHandle())->__invoke(); } // Load custom template if it exists $custom_template = \dirname(__FILE__) . '/widget.php'; if (\file_exists($custom_template)) { return $custom_template; } } } // Fallback to default template return $default; } } } widget.php 0000777 00000000010 15251221065 0006535 0 ustar 00 <?php ReviewFormHelper.php 0000777 00000005407 15251221065 0010516 0 ustar 00 <?php namespace Rvx\Form; use Rvx\CPT\CptHelper; class ReviewFormHelper { protected $cptHelper; public function __construct() { $this->cptHelper = new CptHelper(); } public function builderCustomizedFormTextsData() { // Helper function to extract specific Builder data $builder_status_data = $this->builderStatusData(); switch ($builder_status_data['builder_name']) { case 'elementor': global $builderElementorSetting; return !empty($builderElementorSetting) ? \json_encode($builderElementorSetting, \JSON_UNESCAPED_UNICODE) : $this->rvxDefaultReviewFormLevelData(); default: return $this->rvxDefaultReviewFormLevelData(); } } private function rvxDefaultReviewFormLevelData() { // Define the default values, if no builder is active / available then use the default string / texts $default_values = ['write_a_review' => __('Write a Review', 'reviewx'), 'text_rating_star_title' => __('Rating', 'reviewx'), 'text_review_title' => __('Review Title', 'reviewx'), 'placeholder_review_title' => __('Write Review Title', 'reviewx'), 'text_review_description' => __('Description', 'reviewx'), 'placeholder_review_description' => __('Write your description here', 'reviewx'), 'text_full_name' => __('Full name', 'reviewx'), 'placeholder_full_name' => __('Full Name', 'reviewx'), 'text_email_name' => __('Email address', 'reviewx'), 'placeholder_email_name' => __('Email Address', 'reviewx'), 'text_attachment_title' => __('Attachment', 'reviewx'), 'placeholder_upload_photo' => __('Upload Photo / Video', 'reviewx'), 'text_mark_as_anonymous' => __('Mark as Anonymous', 'reviewx'), 'text_recommended_title' => __('Recommendation?', 'reviewx')]; return \json_encode($default_values, \JSON_UNESCAPED_UNICODE); } /* * Check is builder active or not * Based on that return true or false */ public function builderStatusData() : array { $builder_status = \false; $builder_name = 'none'; // Elementor if (did_action('elementor/loaded')) { $builder_status = \true; $builder_name = 'elementor'; } return ['builder_status' => $builder_status, 'builder_name' => $builder_name]; } public function commentBoxDefaultStyleForCustomPostType() : void { $enabled_post_types = $this->cptHelper->enabledCPT(); if (!is_singular($enabled_post_types)) { ?> <style> #rvx-storefront-widget { display: none; } </style> <?php } } public function rvxEnabledPostTypes() : array { return $this->cptHelper->enabledCPT(); } }
| ver. 1.6 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка