enter center' => esc_html__( 'Center Center', 'kirki' ), 'center bottom' => esc_html__( 'Center Bottom', 'kirki' ), 'right top' => esc_html__( 'Right Top', 'kirki' ), 'right center' => esc_html__( 'Right Center', 'kirki' ), 'right bottom' => esc_html__( 'Right Bottom', 'kirki' ), ], 'required' => array_merge( $args['required'], [ [ 'setting' => $args['settings'], 'operator' => '!=', 'value' => '', 'choice' => 'background-image', ], ] ), ], $args ) ); /** * Background size. */ new Kirki\Field\Radio_Buttonset( wp_parse_args( [ 'settings' => $args['settings'] . '[background-size]', 'label' => '', 'description' => esc_html__( 'Background Size', 'kirki' ), 'default' => isset( $args['default']['background-size'] ) ? $args['default']['background-size'] : '', 'section' => $args['section'], 'choices' => [ 'cover' => esc_html__( 'Cover', 'kirki' ), 'contain' => esc_html__( 'Contain', 'kirki' ), 'auto' => esc_html__( 'Auto', 'kirki' ), ], 'required' => array_merge( $args['required'], [ [ 'setting' => $args['settings'], 'operator' => '!=', 'value' => '', 'choice' => 'background-image', ], ] ), ], $args ) ); /** * Background attachment. */ new Kirki\Field\Radio_Buttonset( wp_parse_args( [ 'type' => 'kirki-radio-buttonset', 'settings' => $args['settings'] . '[background-attachment]', 'description' => esc_html__( 'Background Attachment', 'kirki' ), 'label' => '', 'default' => isset( $args['default']['background-attachment'] ) ? $args['default']['background-attachment'] : '', 'section' => $args['section'], 'choices' => [ 'scroll' => esc_html__( 'Scroll', 'kirki' ), 'fixed' => esc_html__( 'Fixed', 'kirki' ), ], 'required' => array_merge( $args['required'], [ [ 'setting' => $args['settings'], 'operator' => '!=', 'value' => '', 'choice' => 'background-image', ], ] ), ], $args ) ); add_action( 'customize_preview_init', [ $this, 'enqueue_scripts' ] ); add_filter( 'kirki_output_control_classnames', [ $this, 'output_control_classnames' ] ); } /** * Sets the $sanitize_callback * * @access protected * @since 1.0 * @return void */ protected function set_sanitize_callback() { // If a custom sanitize_callback has been defined, // then we don't need to proceed any further. if ( ! empty( $this->sanitize_callback ) ) { return; } $this->sanitize_callback = [ '\Kirki\Field\Background', 'sanitize' ]; } /** * Sanitizes background controls * * @static * @access public * @since 1.0 * @param array $value The value. * @return array */ public static function sanitize( $value ) { if ( ! is_array( $value ) ) { return []; } $sanitized_value = [ 'background-color' => '', 'background-image' => '', 'background-repeat' => '', 'background-position' => '', 'background-size' => '', 'background-attachment' => '', ]; if ( isset( $value['background-color'] ) ) { $sanitized_value['background-color'] = \Kirki\Field\Color::sanitize( $value['background-color'] ); } if ( isset( $value['background-image'] ) ) { $sanitized_value['background-image'] = esc_url_raw( $value['background-image'] ); } if ( isset( $value['background-repeat'] ) ) { $sanitized_value['background-repeat'] = in_array( $value['background-repeat'], [ 'no-repeat', 'repeat', 'repeat-x', 'repeat-y', ], true ) ? $value['background-repeat'] : ''; } if ( isset( $value['background-position'] ) ) { $sanitized_value['background-position'] = in_array( $value['background-position'], [ 'left top', 'left center', 'left bottom', 'center top', 'center center', 'center bottom', 'right top', 'right center', 'right bottom', ], true ) ? $value['background-position'] : ''; } if ( isset( $value['background-size'] ) ) { $sanitized_value['background-size'] = in_array( $value['background-size'], [ 'cover', 'contain', 'auto', ], true ) ? $value['background-size'] : ''; } if ( isset( $value['background-attachment'] ) ) { $sanitized_value['background-attachment'] = in_array( $value['background-attachment'], [ 'scroll', 'fixed', ], true ) ? $value['background-attachment'] : ''; } return $sanitized_value; } /** * Sets the $js_vars * * @access protected * @since 1.0 * @return void */ protected function set_js_vars() { // Typecast to array. $this->js_vars = (array) $this->js_vars; // Check if transport is set to auto. // If not, then skip the auto-calculations and exit early. if ( 'auto' !== $this->transport ) { return; } // Set transport to refresh initially. // Serves as a fallback in case we failt to auto-calculate js_vars. $this->transport = 'refresh'; $js_vars = []; // Try to auto-generate js_vars. // First we need to check if js_vars are empty, and that output is not empty. if ( empty( $this->js_vars ) && ! empty( $this->output ) ) { // Start going through each item in the $output array. foreach ( $this->output as $output ) { // If 'element' is not defined, skip this. if ( ! isset( $output['element'] ) ) { continue; } if ( is_array( $output['element'] ) ) { $output['element'] = implode( ',', $output['element'] ); } // If there's a sanitize_callback defined, skip this. if ( isset( $output['sanitize_callback'] ) && ! empty( $output['sanitize_callback'] ) ) { continue; } // If we got this far, it's safe to add this. $js_vars[] = $output; } // Did we manage to get all the items from 'output'? // If not, then we're missing something so don't add this. if ( count( $js_vars ) !== count( $this->output ) ) { return; } $this->js_vars = $js_vars; $this->transport = 'postMessage'; } } /** * Override parent method. No need to register any setting. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_setting( $wp_customize ) {} /** * Override the parent method. No need for a control. * * @access public * @since 0.1 * @param WP_Customize_Manager $wp_customize The customizer instance. * @return void */ public function add_control( $wp_customize ) {} /** * Enqueue scripts & styles. * * @access public * @since 1.0 * @return void */ public function enqueue_scripts() { wp_enqueue_script( 'kirki-typography', URL::get_from_path( __DIR__ ) . '/script.js', [ 'wp-hooks' ], '1.0', true ); } /** * Adds a custom output class for typography fields. * * @access public * @since 1.0 * @param array $classnames The array of classnames. * @return array */ public function output_control_classnames( $classnames ) { $classnames['kirki-background'] = '\Kirki\Field\CSS\Background'; return $classnames; } } fset, $enc); } } if (!\function_exists('mb_strrpos')) { function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } } if (!\function_exists('mb_strstr')) { function mb_strstr($s, $needle, $part = \false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } } if (!\function_exists('mb_get_info')) { function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } } if (!\function_exists('mb_http_output')) { function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } } if (!\function_exists('mb_strwidth')) { function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } } if (!\function_exists('mb_substr_count')) { function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } } if (!\function_exists('mb_output_handler')) { function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } } if (!\function_exists('mb_http_input')) { function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } } if (!\function_exists('mb_convert_variables')) { function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } } if (!\function_exists('mb_ord')) { function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); } } if (!\function_exists('mb_chr')) { function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); } } if (!\function_exists('mb_scrub')) { function mb_scrub($s, $enc = null) { $enc = null === $enc ? \mb_internal_encoding() : $enc; return \mb_convert_encoding($s, $enc, $enc); } } if (!\function_exists('mb_str_split')) { function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); } } if (\extension_loaded('mbstring')) { return; } if (!\defined('MB_CASE_UPPER')) { \define('MB_CASE_UPPER', 0); } if (!\defined('MB_CASE_LOWER')) { \define('MB_CASE_LOWER', 1); } if (!\defined('MB_CASE_TITLE')) { \define('MB_CASE_TITLE', 2); } blic function getInProgress() { return $this->inProgress; } /** * @param bool|null $inProgress */ public function setInProgress($inProgress) { $this->inProgress = $inProgress; } public function getRescheduleCount(): int { return $this->rescheduleCount; } public function setRescheduleCount(int $rescheduleCount) { $this->rescheduleCount = $rescheduleCount; } /** * @return Collection */ public function getSubscribers(): Collection { return $this->subscribers; } /** * @param int $processed ScheduledTaskSubscriberEntity::PROCESSED_* constant * @return SubscriberEntity[] */ public function getSubscribersByProcessed(int $processed): array { $criteria = Criteria::create() ->where(Criteria::expr()->eq('processed', $processed)); $subscribers = $this->subscribers->matching($criteria)->map(function (ScheduledTaskSubscriberEntity $taskSubscriber = null): ?SubscriberEntity { if (!$taskSubscriber) return null; return $taskSubscriber->getSubscriber(); }); return array_filter($subscribers->toArray()); } public function getSendingQueue(): ?SendingQueueEntity { $this->safelyLoadToOneAssociation('sendingQueue'); return $this->sendingQueue; } public function setSendingQueue(SendingQueueEntity $sendingQueue): void { $this->sendingQueue = $sendingQueue; } }
Fatal error: Uncaught ReflectionException: Class "MailPoet\Entities\ScheduledTaskEntity" does not exist in /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/persistence/src/Persistence/Mapping/RuntimeReflectionService.php:45 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/persistence/src/Persistence/Mapping/RuntimeReflectionService.php(45): ReflectionClass->__construct('MailPoet\\Entiti...') #1 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php(277): MailPoetVendor\Doctrine\Persistence\Mapping\RuntimeReflectionService->getClass('MailPoet\\Entiti...') #2 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(494): MailPoetVendor\Doctrine\ORM\Mapping\ClassMetadataInfo->wakeupReflection(Object(MailPoetVendor\Doctrine\Persistence\Mapping\RuntimeReflectionService)) #3 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/persistence/src/Persistence/Mapping/AbstractClassMetadataFactory.php(106): MailPoetVendor\Doctrine\ORM\Mapping\ClassMetadataFactory->wakeupReflection(Object(MailPoetVendor\Doctrine\ORM\Mapping\ClassMetadata), Object(MailPoetVendor\Doctrine\Persistence\Mapping\RuntimeReflectionService)) #4 /htdocs/wp-content/plugins/mailpoet/lib/Doctrine/TablePrefixMetadataFactory.php(44): MailPoetVendor\Doctrine\Persistence\Mapping\AbstractClassMetadataFactory->getMetadataFor('MailPoet\\Entiti...') #5 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(143): MailPoet\Doctrine\TablePrefixMetadataFactory->getMetadataFor('MailPoet\\Entiti...') #6 /htdocs/wp-content/plugins/mailpoet/lib/Doctrine/Repository.php(36): MailPoetVendor\Doctrine\ORM\EntityManager->getClassMetadata('MailPoet\\Entiti...') #7 /htdocs/wp-content/plugins/mailpoet/lib/Newsletter/Sending/ScheduledTasksRepository.php(35): MailPoet\Doctrine\Repository->__construct(Object(MailPoetVendor\Doctrine\ORM\EntityManager)) #8 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4131): MailPoet\Newsletter\Sending\ScheduledTasksRepository->__construct(Object(MailPoetVendor\Doctrine\ORM\EntityManager), Object(MailPoet\WP\Functions)) #9 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4091): MailPoetGenerated\FreeCachedContainer->getScheduledTasksRepositoryService() #10 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4808): MailPoetGenerated\FreeCachedContainer->getWelcomeSchedulerService() #11 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2673): MailPoetGenerated\FreeCachedContainer->getWPService() #12 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2578): MailPoetGenerated\FreeCachedContainer->getPopulatorService() #13 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2640): MailPoetGenerated\FreeCachedContainer->getActivatorService() #14 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #15 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #16 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #17 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #18 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #19 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #20 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #21 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #22 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #23 /htdocs/index.php(17): require('/htdocs/wp-blog...') #24 {main} thrown in /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/persistence/src/Persistence/Mapping/RuntimeReflectionService.php on line 45