/** * @param $settings * @param $block_name * * @return array * get styling options */ if ( ! function_exists( 'pixwell_get_meta_setting' ) ) { function pixwell_get_meta_setting( $settings, $block_name ) { if ( ! is_array( $settings ) ) { $settings = array(); } if ( ! isset( $settings['cat_info'] ) ) { $settings['cat_info'] = pixwell_get_option( 'cat_info_' . $block_name ); } if ( ! isset( $settings['custom_info'] ) ) { $settings['custom_info'] = pixwell_get_option( 'custom_info_' . $block_name ); } if ( ! isset( $settings['entry_meta'] ) ) { $settings['entry_meta'] = pixwell_get_option( 'entry_meta_' . $block_name ); } if ( ! isset( $settings['readmore'] ) ) { $settings['readmore'] = pixwell_get_option( 'readmore_' . $block_name ); } if ( ! isset( $settings['summary'] ) ) { $settings['summary'] = pixwell_get_option( 'excerpt_' . $block_name ); } if ( ! isset( $settings['excerpt'] ) ) { $settings['excerpt'] = pixwell_get_option( 'excerpt_length_' . $block_name ); } if ( ! isset( $settings['review'] ) ) { $settings['review'] = pixwell_get_option( 'review_' . $block_name ); } if ( ! isset( $settings['bookmark'] ) ) { $settings['bookmark'] = pixwell_get_option( 'bookmark_' . $block_name ); } if ( ! empty( $settings['readmore'] ) ) { $settings['readmore'] = pixwell_get_option( 'readmore_text' ); $settings['readmore'] = apply_filters( 'the_title', $settings['readmore'] ); } if ( isset ( $settings['entry_meta']['enabled']['placebo'] ) ) { unset ( $settings['entry_meta']['enabled']['placebo'] ); } return $settings; } } /** * @return bool * check post thumbnails */ if ( ! function_exists( 'pixwell_is_featured_image' ) ) { function pixwell_is_featured_image( $size = 'full' ) { if ( ! has_post_thumbnail() ) { return false; } $thumbnail = get_the_post_thumbnail( null, $size ); if ( empty( $thumbnail ) ) { return false; } return true; } } /** * @param string $classes * @param int $length * pixwell_is_sponsor_post */ if ( ! function_exists( 'pixwell_is_sponsor_post' ) ) : function pixwell_is_sponsor_post() { $sponsor = rb_get_meta( 'sponsor_post' ); if ( ! empty( $sponsor ) && 1 == $sponsor ) { return true; } return false; } endif; /** * @param string $classes * @param int $length * pixwell_is_sponsor_post */ if ( ! function_exists( 'pixwell_is_shop_post' ) ) : function pixwell_is_shop_post() { $setting = pixwell_get_option( 'meta_shop_post' ); if ( empty( $setting ) ) { return false; } if ( ! class_exists( 'WooCommerce' ) ) { return false; } $shop_post = rb_get_meta( 'shop_post' ); if ( ! empty( $shop_post ) && 1 == $shop_post ) { return true; } return false; } endif;/** * The registry for Third Party Plugins Integration files. * * This file is only used to include the integration files/classes. * This works as an entry point for the initial add_action for the * detect function. * * It is not required to add all integration files here, this just provides * a common place for plugin authors to append their file to. */ defined('WPINC') || exit(); use LiteSpeed\API; $third_cls = array( 'Aelia_CurrencySwitcher', 'Autoptimize', 'Avada', 'BBPress', 'Beaver_Builder', 'Caldera_Forms', 'Divi_Theme_Builder', 'Facetwp', 'LiteSpeed_Check', 'Theme_My_Login', 'User_Switching', 'WCML', 'WooCommerce', 'WC_PDF_Product_Vouchers', 'Woo_Paypal', 'Wp_Polls', 'WP_PostRatings', 'Wpdiscuz', 'WPLister', 'WPML', 'WpTouch', 'Yith_Wishlist', ); foreach ($third_cls as $cls) { add_action('litespeed_load_thirdparty', 'LiteSpeed\Thirdparty\\' . $cls . '::detect'); } // Preload needed for certain thirdparty add_action('litespeed_init', 'LiteSpeed\Thirdparty\Divi_Theme_Builder::preload'); add_action('litespeed_init', 'LiteSpeed\Thirdparty\WooCommerce::preload'); add_action('litespeed_init', 'LiteSpeed\Thirdparty\NextGenGallery::preload'); add_action('litespeed_init', 'LiteSpeed\Thirdparty\AMP::preload'); add_action('litespeed_init', 'LiteSpeed\Thirdparty\Elementor::preload'); add_action('litespeed_init', 'LiteSpeed\Thirdparty\Gravity_Forms::preload'); add_action('litespeed_init', 'LiteSpeed\Thirdparty\Perfmatters::preload');/** * External dependencies */ import classnames from 'classnames'; import { Icon, link as linkIcon } from '@wordpress/icons'; import { __experimentalInputControl as InputControl } from '@wordpress/components'; // eslint-disable-line @wordpress/no-unsafe-wp-apis /** * Internal dependencies */ import './style.scss'; /** * Renders a with a link icon prefix. * * @param {Object} props React props. * @param {string} [props.className] Additional CSS class name to be appended. * @param {...*} [props.restProps] Props to be forwarded to the InputControl. * * @see module:@wordpress/components#__experimentalInputControl */ export default function UrlInputControl( { className, ...restProps } ) { return ( } { ...restProps } /> ); } declare( strict_types = 1 ); ?>