re']; $data['config']['auditTable']['status'] = $properties['config']['auditTable']['status']; $data['config']['optOption']['status'] = $properties['config']['optoutPopup']['elements']['optOption']['status']; $data['config']['optOption']['toggle'] = $properties['config']['optoutPopup']['elements']['optOption']['elements']['toggle']; return $data; } /** * Prepare shortcodes to be used on visitor side. * * @param array $properties Banner properties. * @return array */ public function prepare_shortcodes( $properties = array() ) { $settings = isset( $properties['settings'] ) ? $properties['settings'] : array(); $version_id = isset( $settings['versionID'] ) ? $settings['versionID'] : 'default'; $shortcodes = new \CookieYes\Lite\Frontend\Modules\Shortcodes\Shortcodes( $this->banner, $version_id ); $data = array(); $configs = ( isset( $properties['config'] ) && is_array( $properties['config'] ) ) ? $properties['config'] : array(); $config = cky_array_search( $configs, 'tag', 'readmore-button' ); $attributes = array(); if ( isset( $config['meta']['noFollow'] ) && true === $config['meta']['noFollow'] ) { $attributes['rel'] = 'nofollow'; } if ( isset( $config['meta']['newTab'] ) && true === $config['meta']['newTab'] ) { $attributes['target'] = '_blank'; } $data[] = array( 'key' => 'cky_readmore', 'content' => do_shortcode( '[cky_readmore]' ), 'tag' => 'readmore-button', 'status' => isset( $config['status'] ) && true === $config['status'] ? true : false, 'attributes' => $attributes, ); $data[] = array( 'key' => 'cky_show_desc', 'content' => do_shortcode( '[cky_show_desc]' ), 'tag' => 'show-desc-button', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_hide_desc', 'content' => do_shortcode( '[cky_hide_desc]' ), 'tag' => 'hide-desc-button', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_category_toggle_label', 'content' => do_shortcode( '[cky_category_toggle_label]' ), 'tag' => '', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_enable_category_label', 'content' => do_shortcode( '[cky_enable_category_label]' ), 'tag' => '', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_disable_category_label', 'content' => do_shortcode( '[cky_disable_category_label]' ), 'tag' => '', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_video_placeholder', 'content' => do_shortcode( '[cky_video_placeholder]' ), 'tag' => '', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_enable_optout_label', 'content' => do_shortcode( '[cky_enable_optout_label]' ), 'tag' => '', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_disable_optout_label', 'content' => do_shortcode( '[cky_disable_optout_label]' ), 'tag' => '', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_optout_toggle_label', 'content' => do_shortcode( '[cky_optout_toggle_label]' ), 'tag' => '', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_optout_option_title', 'content' => do_shortcode( '[cky_optout_option_title]' ), 'tag' => '', 'status' => true, 'attributes' => array(), ); $data[] = array( 'key' => 'cky_optout_close_label', 'content' => do_shortcode( '[cky_optout_close_label]' ), 'tag' => '', 'status' => true, 'attributes' => array(), ); return $data; } /** * Determines whether the current/given language code is right-to-left (RTL) * * @param string $language Current language. * @return boolean */ public function is_rtl( $language = '' ) { if ( ! $language ) { $language = cky_current_language(); } return in_array( $language, array( 'ar', 'az', 'dv', 'he', 'ku', 'fa', 'ur' ), true ); } }