if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } /*** WPBakery Page Builder Content elements refresh ***/ class VcSharedLibrary { // Here we will store plugin wise (shared) settings. Colors, Locations, Sizes, etc... /** * @var array */ private static $colors = array( 'Blue' => 'blue', 'Turquoise' => 'turquoise', 'Pink' => 'pink', 'Violet' => 'violet', 'Peacoc' => 'peacoc', 'Chino' => 'chino', 'Mulled Wine' => 'mulled_wine', 'Vista Blue' => 'vista_blue', 'Black' => 'black', 'Grey' => 'grey', 'Orange' => 'orange', 'Sky' => 'sky', 'Green' => 'green', 'Juicy pink' => 'juicy_pink', 'Sandy brown' => 'sandy_brown', 'Purple' => 'purple', 'White' => 'white', ); /** * @var array */ public static $icons = array( 'Glass' => 'glass', 'Music' => 'music', 'Search' => 'search', ); /** * @var array */ public static $sizes = array( 'Mini' => 'xs', 'Small' => 'sm', 'Normal' => 'md', 'Large' => 'lg', ); /** * @var array */ public static $button_styles = array( 'Rounded' => 'rounded', 'Square' => 'square', 'Round' => 'round', 'Outlined' => 'outlined', '3D' => '3d', 'Square Outlined' => 'square_outlined', ); /** * @var array */ public static $message_box_styles = array( 'Standard' => 'standard', 'Solid' => 'solid', 'Solid icon' => 'solid-icon', 'Outline' => 'outline', '3D' => '3d', ); /** * Toggle styles * @var array */ public static $toggle_styles = array( 'Default' => 'default', 'Simple' => 'simple', 'Round' => 'round', 'Round Outline' => 'round_outline', 'Rounded' => 'rounded', 'Rounded Outline' => 'rounded_outline', 'Square' => 'square', 'Square Outline' => 'square_outline', 'Arrow' => 'arrow', 'Text Only' => 'text_only', ); /** * Animation styles * @var array */ public static $animation_styles = array( 'Bounce' => 'easeOutBounce', 'Elastic' => 'easeOutElastic', 'Back' => 'easeOutBack', 'Cubic' => 'easeInOutCubic', 'Quint' => 'easeInOutQuint', 'Quart' => 'easeOutQuart', 'Quad' => 'easeInQuad', 'Sine' => 'easeOutSine', ); /** * @var array */ public static $cta_styles = array( 'Rounded' => 'rounded', 'Square' => 'square', 'Round' => 'round', 'Outlined' => 'outlined', 'Square Outlined' => 'square_outlined', ); /** * @var array */ public static $txt_align = array( 'Left' => 'left', 'Right' => 'right', 'Center' => 'center', 'Justify' => 'justify', ); /** * @var array */ public static $el_widths = array( '100%' => '', '90%' => '90', '80%' => '80', '70%' => '70', '60%' => '60', '50%' => '50', '40%' => '40', '30%' => '30', '20%' => '20', '10%' => '10', ); /** * @var array */ public static $sep_widths = array( '1px' => '', '2px' => '2', '3px' => '3', '4px' => '4', '5px' => '5', '6px' => '6', '7px' => '7', '8px' => '8', '9px' => '9', '10px' => '10', ); /** * @var array */ public static $sep_styles = array( 'Border' => '', 'Dashed' => 'dashed', 'Dotted' => 'dotted', 'Double' => 'double', 'Shadow' => 'shadow', ); /** * @var array */ public static $box_styles = array( 'Default' => '', 'Rounded' => 'vc_box_rounded', 'Border' => 'vc_box_border', 'Outline' => 'vc_box_outline', 'Shadow' => 'vc_box_shadow', 'Bordered shadow' => 'vc_box_shadow_border', '3D Shadow' => 'vc_box_shadow_3d', ); /** * Round box styles * * @var array */ public static $round_box_styles = array( 'Round' => 'vc_box_circle', 'Round Border' => 'vc_box_border_circle', 'Round Outline' => 'vc_box_outline_circle', 'Round Shadow' => 'vc_box_shadow_circle', 'Round Border Shadow' => 'vc_box_shadow_border_circle', ); /** * Circle box styles * * @var array */ public static $circle_box_styles = array( 'Circle' => 'vc_box_circle_2', 'Circle Border' => 'vc_box_border_circle_2', 'Circle Outline' => 'vc_box_outline_circle_2', 'Circle Shadow' => 'vc_box_shadow_circle_2', 'Circle Border Shadow' => 'vc_box_shadow_border_circle_2', ); /** * @return array */ public static function getColors() { return self::$colors; } /** * @return array */ public static function getIcons() { return self::$icons; } /** * @return array */ public static function getSizes() { return self::$sizes; } /** * @return array */ public static function getButtonStyles() { return self::$button_styles; } /** * @return array */ public static function getMessageBoxStyles() { return self::$message_box_styles; } /** * @return array */ public static function getToggleStyles() { return self::$toggle_styles; } /** * @return array */ public static function getAnimationStyles() { return self::$animation_styles; } /** * @return array */ public static function getCtaStyles() { return self::$cta_styles; } /** * @return array */ public static function getTextAlign() { return self::$txt_align; } /** * @return array */ public static function getBorderWidths() { return self::$sep_widths; } /** * @return array */ public static function getElementWidths() { return self::$el_widths; } /** * @return array */ public static function getSeparatorStyles() { return self::$sep_styles; } /** * Get list of box styles * * Possible $groups values: * - default * - round * - circle * * @param array $groups Array of groups to include. If not specified, return all * * @return array */ public static function getBoxStyles( $groups = array() ) { $list = array(); $groups = (array) $groups; if ( ! $groups || in_array( 'default', $groups, true ) ) { $list += self::$box_styles; } if ( ! $groups || in_array( 'round', $groups, true ) ) { $list += self::$round_box_styles; } if ( ! $groups || in_array( 'cirlce', $groups, true ) ) { $list += self::$circle_box_styles; } return $list; } /** * @return array */ public static function getColorsDashed() { $colors = array( esc_html__( 'Blue', 'js_composer' ) => 'blue', esc_html__( 'Turquoise', 'js_composer' ) => 'turquoise', esc_html__( 'Pink', 'js_composer' ) => 'pink', esc_html__( 'Violet', 'js_composer' ) => 'violet', esc_html__( 'Peacoc', 'js_composer' ) => 'peacoc', esc_html__( 'Chino', 'js_composer' ) => 'chino', esc_html__( 'Mulled Wine', 'js_composer' ) => 'mulled-wine', esc_html__( 'Vista Blue', 'js_composer' ) => 'vista-blue', esc_html__( 'Black', 'js_composer' ) => 'black', esc_html__( 'Grey', 'js_composer' ) => 'grey', esc_html__( 'Orange', 'js_composer' ) => 'orange', esc_html__( 'Sky', 'js_composer' ) => 'sky', esc_html__( 'Green', 'js_composer' ) => 'green', esc_html__( 'Juicy pink', 'js_composer' ) => 'juicy-pink', esc_html__( 'Sandy brown', 'js_composer' ) => 'sandy-brown', esc_html__( 'Purple', 'js_composer' ) => 'purple', esc_html__( 'White', 'js_composer' ) => 'white', ); return $colors; } } if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } /** * @since 4.4 vendors initialization moved to hooks in autoload/vendors. * * Used to initialize plugin yoast vendor. */ // 16 is required to be called after WPSEO_Admin_Init constructor. @since 4.9 add_action( 'plugins_loaded', 'vc_init_vendor_yoast', 16 ); function vc_init_vendor_yoast() { include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Require class-vc-wxr-parser-plugin.php to use is_plugin_active() below if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) || class_exists( 'WPSEO_Metabox' ) ) { require_once vc_path_dir( 'VENDORS_DIR', 'plugins/class-vc-vendor-yoast_seo.php' ); $vendor = new Vc_Vendor_YoastSeo(); if ( defined( 'WPSEO_VERSION' ) && version_compare( WPSEO_VERSION, '3.0.0' ) === - 1 ) { add_action( 'vc_after_set_mode', array( $vendor, 'load', ) ); } elseif ( is_admin() && 'vc_inline' === vc_action() ) { $vendor->frontendEditorBuild(); } } } if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } add_filter( 'attachment_fields_to_edit', 'vc_attachment_filter_field', 10, 2 ); add_filter( 'media_meta', 'vc_attachment_filter_media_meta', 10, 2 ); add_action( 'wp_ajax_vc_media_editor_add_image', 'vc_media_editor_add_image' ); add_action( 'wp_ajax_vc_media_editor_preview_image', 'vc_media_editor_preview_image' ); /** * @return array */ function vc_get_filters() { return array( 'antique' => esc_html__( 'Antique', 'js_composer' ), 'blackwhite' => esc_html__( 'Black & White', 'js_composer' ), 'boost' => esc_html__( 'Boost', 'js_composer' ), 'concentrate' => esc_html__( 'Concentrate', 'js_composer' ), 'country' => esc_html__( 'Country', 'js_composer' ), 'darken' => esc_html__( 'Darken', 'js_composer' ), 'dream' => esc_html__( 'Dream', 'js_composer' ), 'everglow' => esc_html__( 'Everglow', 'js_composer' ), 'forest' => esc_html__( 'Forest', 'js_composer' ), 'freshblue' => esc_html__( 'Fresh Blue', 'js_composer' ), 'frozen' => esc_html__( 'Frozen', 'js_composer' ), 'hermajesty' => esc_html__( 'Her Majesty', 'js_composer' ), 'light' => esc_html__( 'Light', 'js_composer' ), 'orangepeel' => esc_html__( 'Orange Peel', 'js_composer' ), 'rain' => esc_html__( 'Rain', 'js_composer' ), 'retro' => esc_html__( 'Retro', 'js_composer' ), 'sepia' => esc_html__( 'Sepia', 'js_composer' ), 'summer' => esc_html__( 'Summer', 'js_composer' ), 'tender' => esc_html__( 'Tender', 'js_composer' ), 'vintage' => esc_html__( 'Vintage', 'js_composer' ), 'washed' => esc_html__( 'Washed', 'js_composer' ), ); } /** * Add Image Filter field to media uploader * * @param array $form_fields , fields to include in attachment form * @param object $post , attachment record in database * * @return array $form_fields, modified form fields */ function vc_attachment_filter_field( $form_fields, $post ) { // don't add filter field, if image already has filter applied if ( get_post_meta( $post->ID, 'vc-applied-image-filter', true ) ) { return $form_fields; } $options = vc_get_filters(); $html_options = ''; foreach ( $options as $value => $title ) { $html_options .= ''; } $form_fields['vc-image-filter'] = array( 'label' => '', 'input' => 'html', 'html' => '
' . esc_html__( 'Image filter', 'js_composer' ) . '
', 'value' => get_post_meta( $post->ID, 'vc_image_filter', true ), 'helps' => '', ); return $form_fields; } /** * Apply filters to specified images * * If image(s) has filter specified via filters _POST param: * 1) copy it * 2) apply specified filter * 3) return new image id * * Required _POST params: * - array ids: array of attachment ids * * Optional _POST params: * - array filters: mapped array of ids and filters to apply * */ function vc_media_editor_add_image() { vc_user_access()->checkAdminNonce()->validateDie()->wpAny( 'upload_files' )->validateDie(); require_once vc_path_dir( 'HELPERS_DIR', 'class-vc-image-filter.php' ); $response = array( 'success' => true, 'data' => array( 'ids' => array(), ), ); $filters = (array) vc_post_param( 'filters', array() ); $ids = (array) vc_post_param( 'ids', array() ); if ( ! $ids ) { wp_send_json( $response ); } // default action is wp_handle_upload, which forces wp to check upload with is_uploaded_file() // override action to anything else to skip security checks $action = 'vc_handle_upload_imitation'; $file_key = 0; $post_id = 0; $post_data = array(); $overrides = array( 'action' => $action ); $_POST = array( 'action' => $action ); foreach ( $ids as $key => $attachment_id ) { if ( ! empty( $filters[ $attachment_id ] ) ) { $filter_name = $filters[ $attachment_id ]; } else { continue; } $source_path = get_attached_file( $attachment_id ); if ( empty( $source_path ) ) { continue; } $temp_path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . basename( $source_path ); if ( ! copy( $source_path, $temp_path ) ) { continue; } $extension = strtolower( pathinfo( $temp_path, PATHINFO_EXTENSION ) ); $mime_type = ''; switch ( $extension ) { case 'jpeg': case 'jpg': $image = imagecreatefromjpeg( $temp_path ); $mime_type = 'image/jpeg'; break; case 'png': $image = imagecreatefrompng( $temp_path ); $mime_type = 'image/png'; break; case 'gif': $image = imagecreatefromgif( $temp_path ); $mime_type = 'image/gif'; break; default: $image = false; } if ( ! $image ) { continue; } $Filter = new vcImageFilter( $image ); $Filter->$filter_name(); if ( ! vc_save_gd_resource( $Filter->getImage(), $temp_path ) ) { continue; } $new_filename = basename( $temp_path, '.' . $extension ) . '-' . $filter_name . '.' . $extension; $_FILES = array( array( 'name' => $new_filename, 'type' => $mime_type, 'tmp_name' => $temp_path, 'error' => UPLOAD_ERR_OK, 'size' => filesize( $temp_path ), ), ); $new_attachment_id = media_handle_upload( $file_key, $post_id, $post_data, $overrides ); if ( ! $new_attachment_id || is_wp_error( $new_attachment_id ) ) { continue; } update_post_meta( $new_attachment_id, 'vc-applied-image-filter', $filter_name ); $ids[ $key ] = $new_attachment_id; } $response['data']['ids'] = $ids; wp_send_json( $response ); } /** * Generate filter preview * * Preview url is generated as data uri (base64) * * Required _POST params: * - string filter: filter name * - int attachment_id: attachment id * * @return void Results are sent out as json * @throws \Exception */ function vc_media_editor_preview_image() { vc_user_access()->checkAdminNonce()->validateDie()->wpAny( 'upload_files' )->validateDie(); require_once vc_path_dir( 'HELPERS_DIR', 'class-vc-image-filter.php' ); $response = array( 'success' => true, 'data' => array( 'src' => '', ), ); $filter_name = vc_post_param( 'filter', '' ); $attachment_id = vc_post_param( 'attachment_id', false ); $preferred_size = vc_post_param( 'preferred_size', 'medium' ); if ( ! $filter_name || ! $attachment_id ) { wp_send_json( $response ); } $attachment_path = get_attached_file( $attachment_id ); $attachment_details = wp_prepare_attachment_for_js( $attachment_id ); if ( ! isset( $attachment_details['sizes'][ $preferred_size ] ) ) { $preferred_size = 'thumbnail'; } $attachment_url = wp_get_attachment_image_src( $attachment_id, $preferred_size ); if ( empty( $attachment_path ) || empty( $attachment_url[0] ) ) { wp_send_json( $response ); } $source_path = dirname( $attachment_path ) . '/' . basename( $attachment_url[0] ); $image = vc_get_gd_resource( $source_path ); if ( ! $image ) { wp_send_json( $response ); } $Filter = new vcImageFilter( $image ); $Filter->$filter_name(); $extension = strtolower( pathinfo( $source_path, PATHINFO_EXTENSION ) ); ob_start(); switch ( $extension ) { case 'jpeg': case 'jpg': imagejpeg( $Filter->getImage() ); break; case 'png': imagepng( $Filter->getImage() ); break; case 'gif': imagegif( $Filter->getImage() ); break; } $data = ob_get_clean(); // @codingStandardsIgnoreLine $response['data']['src'] = 'data:image/' . $extension . ';base64,' . base64_encode( $data ); wp_send_json( $response ); } /** * Read file from disk as GD resource * * @param string $file * * @return bool|resource */ function vc_get_gd_resource( $file ) { $extension = strtolower( pathinfo( $file, PATHINFO_EXTENSION ) ); switch ( $extension ) { case 'jpeg': case 'jpg': return imagecreatefromjpeg( $file ); case 'png': return imagecreatefrompng( $file ); case 'gif': return imagecreatefromgif( $file ); } return false; } /** * Save GD resource to file * * @param resource $resource * @param string $file * * @return bool */ function vc_save_gd_resource( $resource, $file ) { $extension = strtolower( pathinfo( $file, PATHINFO_EXTENSION ) ); switch ( $extension ) { case 'jpeg': case 'jpg': return imagejpeg( $resource, $file ); case 'png': return imagepng( $resource, $file ); case 'gif': return imagegif( $resource, $file ); } return false; } /** * Add "Filter: ..." meta field to attachment details box * * @param array $media_meta , meta to include in attachment form * @param object $post , attachment record in database * * @return array|string */ function vc_attachment_filter_media_meta( $media_meta, $post ) { $filter_name = get_post_meta( $post->ID, 'vc-applied-image-filter', true ); if ( ! $filter_name ) { return $media_meta; } $filters = vc_get_filters(); if ( ! isset( $filters[ $filter_name ] ) ) { return $media_meta; } $media_meta .= esc_html__( 'Filter:', 'js_composer' ) . ' ' . $filters[ $filter_name ]; return $media_meta; } if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } function vc_navbar_undoredo() { if ( vc_is_frontend_editor() || is_admin() ) { require_once vc_path_dir( 'EDITORS_DIR', 'navbar/class-vc-navbar-undoredo.php' ); new Vc_Navbar_Undoredo(); } } add_action( 'admin_init', 'vc_navbar_undoredo' ); .wp-block-uagb-testimonial.uagb-slick-carousel ul.slick-dots{margin-bottom:20px}.uagb-testimonial__wrap{box-sizing:border-box}.uagb-testimonial__wrap,.uagb-testimonial__wrap *{transition:all 0.2s}.uagb-icon-wrap .uagb-icon{display:inline-block}.uagb-tm__image-content img{height:auto !important}.uagb-tm__image,.uagb-testimonial__wrap,.uagb-tm__content,.uagb-tm__text-wrap{position:relative}.uagb-tm__imgicon-style-circle .uagb-tm__image img{border-radius:100%}.uagb-tm__imgicon-style-square .uagb-tm__image img{border-radius:0%}.uagb-tm__image img,.slick-slide .uagb-tm__image img{display:inline-block;box-sizing:content-box}.uagb-tm__content{overflow:hidden;text-align:center;word-break:break-word;border-radius:inherit;display:grid}.uagb-tm__image-position-left .uagb-tm__content,.uagb-tm__image-position-right .uagb-tm__content{display:flex}.uagb-tm__meta-inner{display:inline;width:100%;line-height:1}.uagb-tm__image-position-bottom .uagb-tm__image-content,.uagb-tm__image-position-bottom .uagb-testimonial-details{display:table-cell;vertical-align:middle}.uagb-tm__image-position-bottom .uagb-tm__image-content{padding-right:10px}.uagb-tm__author-name,.uagb-tm__company{display:block}.uagb-tm__image-aligned-middle .uagb-tm__image-content{align-self:center}.uagb-tm__author-name{font-size:30px;line-height:16px}.uagb-tm__company{font-size:15px;font-style:normal;line-height:16px;color:#888}.uagb-tm__overlay{height:100%;width:100%;top:0;left:0;position:absolute;background:transparent}.uagb-tm__items{visibility:hidden}.uagb-tm__items.slick-initialized{visibility:visible}.uagb-tm__image-position-top .uagb-tm__image-content{display:flex;justify-content:center}.uagb-slick-carousel.uagb-tm__arrow-outside .slick-next{right:-45px}.uagb-slick-carousel.uagb-tm__arrow-inside .slick-prev{left:25px;z-index:1}.uagb-slick-carousel.uagb-tm__arrow-inside .slick-next{right:25px}[dir="rtl"] .uagb-tm__arrow-inside.uagb-slick-carousel .slick-prev{left:auto;right:25px}[dir="rtl"] .uagb-tm__arrow-inside.uagb-slick-carousel .slick-next{left:25px;right:auto}[dir="rtl"] .uagb-tm__arrow-outside.uagb-slick-carousel .slick-prev{right:auto;left:-45px}[dir="rtl"] .uagb-tm__arrow-outside.uagb-slick-carousel .slick-next{left:auto;right:-45px}@media (min-width: 1025px){.wp-block-uagb-testimonial.uagb-post__carousel_notset .slick-slide:last-child .uagb-testimonial__wrap{padding-right:0}.wp-block-uagb-testimonial.uagb-post__carousel_notset .slick-slide:first-child .uagb-testimonial__wrap{padding-left:0}.wp-block-uagb-testimonial.uagb-post__carousel_notset .uagb-testimonial__wrap{margin-bottom:0}}@media (max-width: 976px){.wp-block-uagb-testimonial.uagb-post__carousel_notset-tablet .uagb-testimonial__wrap{margin-bottom:0}.wp-block-uagb-testimonial.uagb-post__carousel_notset-tablet .slick-slide:last-child .uagb-testimonial__wrap{padding-right:0}.wp-block-uagb-testimonial.uagb-post__carousel_notset-tablet .slick-slide:first-child .uagb-testimonial__wrap{padding-left:0}.uagb-tm-stacked-tablet.uagb-tm__image-position-bottom .uagb-tm__image-content,.uagb-tm-stacked-tablet.uagb-tm__image-position-bottom .uagb-testimonial-details{display:block;vertical-align:middle}.uagb-tm-stacked-tablet.uagb-tm__image-position-left .uagb-tm__content,.uagb-tm-stacked-tablet.uagb-tm__image-position-right .uagb-tm__content{display:block}.uagb-tm-stacked-tablet.uagb-tm__image-position-right.uagb-tm-reverse-order-tablet .uagb-tm__content{display:inline-flex;flex-direction:column-reverse}.uagb-tm-stacked-tablet.uagb-tm__image-aligned-top .uagb-tm__image-content{display:inline-flex;align-self:center}.uagb-slick-carousel.uagb-tm__arrow-outside .slick-prev{left:-10px;z-index:1}.uagb-slick-carousel.uagb-tm__arrow-outside .slick-next{right:-10px}[dir="rtl"] .uagb-slick-carousel.uagb-tm__arrow-outside .slick-prev{left:auto;right:15px}[dir="rtl"] .uagb-slick-carousel.uagb-tm__arrow-outside .slick-next{left:15px;right:auto}}@media (max-width: 768px){.wp-block-uagb-testimonial.uagb-post__carousel_notset-mobile .uagb-testimonial__wrap{margin-bottom:0}.wp-block-uagb-testimonial.uagb-post__carousel_notset-mobile .slick-slide:last-child .uagb-testimonial__wrap{padding-right:0}.wp-block-uagb-testimonial.uagb-post__carousel_notset-mobile .slick-slide:first-child .uagb-testimonial__wrap{padding-left:0}.uagb-tm-stacked-mobile.uagb-tm__image-position-bottom .uagb-tm__image-content,.uagb-tm-stacked-mobile.uagb-tm__image-position-bottom .uagb-testimonial-details{display:block;vertical-align:middle}.uagb-tm-stacked-mobile.uagb-tm__image-position-left .uagb-tm__content,.uagb-tm-stacked-mobile.uagb-tm__image-position-right .uagb-tm__content{display:block}.uagb-tm-stacked-mobile.uagb-tm__image-position-right.uagb-tm-reverse-order-mobile .uagb-tm__content{display:inline-flex;flex-direction:column-reverse}.uagb-tm-stacked-mobile.uagb-tm__image-aligned-top .uagb-tm__image-content{display:inline-flex;align-self:center}}.entry-content .wp-block-uagb-testimonial .is-carousel ul.slick-dots{padding:unset} class PMPro_Email_Template_Admin_Change extends PMPro_Email_Template { /** * The user object of the user to send the email to. * * @var WP_User */ protected $user; /** * Constructor. * * @since 3.4 * * @param WP_User $user The user object of the user to send the email to. */ public function __construct( WP_User $user ) { $this->user = $user; } /** * Get the email template slug. * * @since 3.4 * * @return string The email template slug. */ public static function get_template_slug() { return 'admin_change'; } /** * Get the "nice name" of the email template. * * @since 3.4 * * @return string The "nice name" of the email template. */ public static function get_template_name() { return esc_html__( 'Admin Change', 'paid-memberships-pro' ); } /** * Get "help text" to display to the admin when editing the email template. * * @since 3.4 * * @return string The "help text" to display to the admin when editing the email template. */ public static function get_template_description() { return esc_html__( 'The site administrator can manually update a user\'s membership through the WordPress admin. This email notifies the member of the level update.', 'paid-memberships-pro' ); } /** * Get the default subject for the email. * * @since 3.4 * * @return string The default subject for the email. */ public static function get_default_subject() { return esc_html__( "Your membership at !!sitename!! has been changed", "paid-memberships-pro" ); } /** * Get the default body content for the email. * * @since 3.4 * * @return string The default body content for the email. */ public static function get_default_body() { return wp_kses_post( __( '

An administrator at !!sitename!! has changed your membership level.

!!membership_change!!

If you did not request this membership change and would like more information please contact us at !!siteemail!!

Log in to your membership account here: !!login_url!!

', 'paid-memberships-pro' ) ); } /** * Get the email template variables for the email. * * @since 3.4 * * @return array The email template variables for the email (key => value pairs). */ public function get_email_template_variables() { $user = $this->user; // If the user no longer has a membership level, set the membership_change text to "Membership has been cancelled." if ( ! pmpro_hasMembershipLevel( null, $this->user->ID ) ) { $membership_change = esc_html__( 'Your membership has been cancelled.', 'paid-memberships-pro' ); } else { $membership_change = esc_html__( 'You can view your current memberships by logging in and visiting your membership account page.', 'paid-memberships-pro' ); } $email_template_variables = array( 'membership_change' => $membership_change, 'subject' => $this->get_default_subject(), 'name' => $user->display_name, 'display_name' => $user->display_name, 'user_login' => $user->user_login, 'user_email' => $user->user_email, ); return $email_template_variables; } /** * Get the email template variables for the email paired with a description of the variable. * * @since 3.4 * * @return array The email template variables for the email (key => value pairs). */ public static function get_email_template_variables_with_description() { return array( '!!display_name!!' => esc_html__( 'The display name of the user.', 'paid-memberships-pro' ), '!!user_login!!' => esc_html__( 'The username of the user.', 'paid-memberships-pro' ), '!!user_email!!' => esc_html__( 'The email address of the user.', 'paid-memberships-pro' ), '!!membership_change!!' => esc_html__( 'A message indicating the change in membership.', 'paid-memberships-pro' ), ); } /** * Get the email address to send the email to. * * @since 3.4 * * @return string The email address to send the email to. */ public function get_recipient_email() { return $this->user->user_email; } /** * Get the name of the email recipient. * * @since 3.4 * * @return string The name of the email recipient. */ public function get_recipient_name() { return $this->user->display_name; } /** * Returns the arguments to send the test email from the abstract class. * * @since 3.5 * * @return array The arguments to send the test email from the abstract class. */ public static function get_test_email_constructor_args() { global $current_user; return array( $current_user ); } } /** * Register the email template. * * @since 3.4 * * @param array $email_templates The email templates (template slug => email template class name) * @return array The modified email templates array. */ function pmpro_email_templates_change( $email_templates ) { $email_templates['admin_change'] = 'PMPro_Email_Template_Admin_Change'; return $email_templates; } add_filter( 'pmpro_email_templates', 'pmpro_email_templates_change' ); (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-453a8273"],{"0032":function(e,a,l){"use strict";var t=function(){var e=this,a=e.$createElement,l=e._self._c||a;return l("svg",{class:["idx-wp-icon","idx-wp-icon-"+e.icon,{"idx-wp-icon-spin":e.spin}],attrs:{role:"image","aria-hidden":"true",focusable:"false"}},[l("use",{attrs:{"xlink:href":"#"+e.icon}})])},n=[],i={name:"SvgIcon",props:{icon:{type:String,required:!0},spin:{type:Boolean,default:!1}}},r=i,o=(l("a4aa"),l("2877")),u=Object(o["a"])(r,t,n,!1,null,null,null);a["a"]=u.exports},"0633":function(e,a,l){"use strict";var t=function(){var e=this,a=e.$createElement,l=e._self._c||a;return l("idx-block",{attrs:{tag:"fieldset",className:{"form-content":!0,"form-content--disabled":e.formDisabled}}},[l("idx-block",{attrs:{className:"form-content__header"}},[l("idx-block",{attrs:{tag:"h2",className:"form-content__title"}},[e._v("Default State")]),l("p",[e._v(" You can enter a default state that will automatically be output on template pages and widgets that show the state. When you create a listing and leave the state field empty, the default below will be shown. You can override the default on each listing by entering a value into the state field. ")])],1),l("idx-form-group",[l("idx-form-label",{attrs:{customClass:"form-content__label",target:e.$idxStrap.prefix+"default-state"}},[e._v("Choose Default State")]),l("idx-form-input",{attrs:{type:"text",disabled:e.formDisabled,id:e.$idxStrap.prefix+"default-state",placeholder:"Enter your default state",value:e.defaultState},on:{change:function(a){return e.$emit("form-field-update",{key:"defaultState",value:a.target.value})}}})],1),l("idx-block",{attrs:{className:"form-content__header"}},[l("idx-block",{attrs:{tag:"h2",className:"form-content__title"}},[e._v("Default Currency")]),l("p",[e._v("Select a default currency symbol and optional currency code to display on listings.")])],1),l("idx-form-group",[l("idx-form-label",{attrs:{customClass:"form-content__label"}},[e._v("Currency Symbol")]),l("idx-custom-select",{attrs:{ariaLabel:"Currency Symbol",placeholder:"None",disabled:e.formDisabled,selected:e.currencySymbolSelected,options:e.currency.currencySymbols},on:{"selected-item":function(a){return e.$emit("form-field-update",{key:"currencySymbolSelected",value:a.value})}}})],1),l("idx-form-group",[l("idx-form-label",{attrs:{customClass:"form-content__label"}},[e._v("Currency Code")]),l("idx-custom-select",{attrs:{ariaLabel:"Currency Code",placeholder:"None",disabled:e.formDisabled,selected:e.currencyCodeSelected,options:e.currency.currencyCodes},on:{"selected-item":function(a){return e.$emit("form-field-update",{key:"currencyCodeSelected",value:a.value})}}})],1),l("idx-form-group",{attrs:{customClass:"form-content__toggle"}},[e._v(" Display Currency Code on Listings "),l("idx-toggle-slider",{attrs:{label:"Display Currency Code on Listings",uncheckedState:"No",checkedState:"Yes",active:e.displayCurrencyCode,disabled:e.formDisabled},on:{toggle:function(a){return e.$emit("form-field-update",{key:"displayCurrencyCode",value:!e.displayCurrencyCode})}}})],1),l("idx-block",{attrs:{className:"form-content__header"}},[l("idx-block",{attrs:{tag:"h2",className:"form-content__title"}},[e._v("Default Number of Posts")]),l("p",[e._v(" The default number of posts displayed on a listing archive page is 9. Here you can set a custom number. Enter -1 to display all listing posts. "),l("i",[e._v("If you have more than 20-30 posts, it's not recommended to show all or your page will load slow.")])])],1),l("idx-form-group",[l("idx-form-label",{attrs:{customClass:"form-content__label",target:e.$idxStrap.prefix+"default-posts"}},[e._v("Number of Posts on Listing Archive Page")]),l("idx-form-input",{attrs:{type:"text",disabled:e.formDisabled,id:e.$idxStrap.prefix+"default-posts",value:e.numberOfPosts},on:{change:function(a){return e.$emit("form-field-update",{key:"numberOfPosts",value:a.target.value})}}})],1),l("idx-block",{attrs:{className:"form-content__header"}},[l("idx-block",{attrs:{tag:"h2",className:"form-content__title"}},[e._v("Default Disclaimer")]),l("p",[e._v("Optionally enter a disclaimer to show on single listings. This can be overridden on individual listings.")])],1),l("idx-form-group",[l("idx-form-label",{attrs:{customClass:"form-content__label",target:e.$idxStrap.prefix+"default-disclaimer"}},[e._v("Default Disclaimer")]),l("idx-textarea",{attrs:{type:"text",disabled:e.formDisabled,id:e.$idxStrap.prefix+"default-disclaimer",placeholder:"Disclaimer text",rows:"3",value:e.defaultDisclaimer},on:{change:function(a){return e.$emit("form-field-update",{key:"defaultDisclaimer",value:a.target.value})}}})],1),l("idx-block",{attrs:{className:"form-content__header"}},[l("idx-block",{attrs:{tag:"h2",className:"form-content__title"}},[e._v("Listings Slug")]),l("p",[e._v(" Optionally change the slug of the listing post type. Don't forget to "),l("a",{attrs:{href:"../wp-admin/options-permalink.php",target:"_blank"}},[e._v(" reset your permalinks ")]),e._v(" if you change the slug! ")])],1),l("idx-form-group",[l("idx-form-label",{attrs:{customClass:"form-content__label",target:e.$idxStrap.prefix+"listings-slug"}},[e._v("Listings Slug")]),l("idx-form-input",{attrs:{type:"text",disabled:e.formDisabled,id:e.$idxStrap.prefix+"listings-slug",value:e.listingSlug},on:{change:function(a){return e.$emit("form-field-update",{key:"listingSlug",value:a.target.value})}}})],1)],1)},n=[],i=(l("a9e3"),[{value:"none",label:"None"},{value:"USD",label:"United States dollar"},{value:"GBP",label:"British pound"},{value:"CAD",label:"Canadian dollar"},{value:"EUR",label:"Euro"},{value:"MXN",label:"Mexican peso"},{value:"---",label:"---"},{value:"AED",label:"United Arab Emirates dirham"},{value:"AFN",label:"Afghan afghani"},{value:"ALL",label:"Albanian lek"},{value:"AMD",label:"Armenian dram"},{value:"AOA",label:"Angolan kwanza"},{value:"ARS",label:"Argentine peso"},{value:"AUD",label:"Australian dollar"},{value:"AWG",label:"Aruban florin"},{value:"AZN",label:"Azerbaijani manat"},{value:"BAM",label:"Bosnia and Herzegovina convertible mark"},{value:"BBD",label:"Barbadian dollar"},{value:"BDT",label:"Bangladeshi taka"},{value:"BGN",label:"Bulgarian lev"},{value:"BHD",label:"Bahraini dinar"},{value:"BIF",label:"Burundian franc"},{value:"BMD",label:"Bermudian dollar"},{value:"BND",label:"Brunei dollar"},{value:"BOB",label:"Bolivian boliviano"},{value:"BRL",label:"Brazilian real"},{value:"BSD",label:"Bahamian dollar"},{value:"BTN",label:"Bhutanese ngultrum"},{value:"BWP",label:"Botswana pula"},{value:"BYR",label:"Belarusian ruble"},{value:"BZD",label:"Belize dollar"},{value:"CDF",label:"Congolese franc"},{value:"CHF",label:"Swiss franc"},{value:"CLP",label:"Chilean peso"},{value:"CNY",label:"Chinese yuan"},{value:"COP",label:"Colombian peso"},{value:"CRC",label:"Costa Rican colón"},{value:"CUP",label:"Cuban convertible peso"},{value:"CVE",label:"Cape Verdean escudo"},{value:"CZK",label:"Czech koruna"},{value:"DJF",label:"Djiboutian franc"},{value:"DKK",label:"Danish krone"},{value:"DOP",label:"Dominican peso"},{value:"DZD",label:"Algerian dinar"},{value:"EGP",label:"Egyptian pound"},{value:"ERN",label:"Eritrean nakfa"},{value:"ETB",label:"Ethiopian birr"},{value:"FJD",label:"Fijian dollar"},{value:"FKP",label:"Falkland Islands pound"},{value:"GEL",label:"Georgian lari"},{value:"GHS",label:"Ghana cedi"},{value:"GMD",label:"Gambian dalasi"},{value:"GNF",label:"Guinean franc"},{value:"GTQ",label:"Guatemalan quetzal"},{value:"GYD",label:"Guyanese dollar"},{value:"HKD",label:"Hong Kong dollar"},{value:"HNL",label:"Honduran lempira"},{value:"HRK",label:"Croatian kuna"},{value:"HTG",label:"Haitian gourde"},{value:"HUF",label:"Hungarian forint"},{value:"IDR",label:"Indonesian rupiah"},{value:"ILS",label:"Israeli new shekel"},{value:"IMP",label:"Manx pound"},{value:"INR",label:"Indian rupee"},{value:"IQD",label:"Iraqi dinar"},{value:"IRR",label:"Iranian rial"},{value:"ISK",label:"Icelandic króna"},{value:"JEP",label:"Jersey pound"},{value:"JMD",label:"Jamaican dollar"},{value:"JOD",label:"Jordanian dinar"},{value:"JPY",label:"Japanese yen"},{value:"KES",label:"Kenyan shilling"},{value:"KGS",label:"Kyrgyzstani som"},{value:"KHR",label:"Cambodian riel"},{value:"KMF",label:"Comorian franc"},{value:"KPW",label:"North Korean won"},{value:"KRW",label:"South Korean won"},{value:"KWD",label:"Kuwaiti dinar"},{value:"KYD",label:"Cayman Islands dollar"},{value:"KZT",label:"Kazakhstani tenge"},{value:"LAK",label:"Lao kip"},{value:"LBP",label:"Lebanese pound"},{value:"LKR",label:"Sri Lankan rupee"},{value:"LRD",label:"Liberian dollar"},{value:"LSL",label:"Lesotho loti"},{value:"LTL",label:"Lithuanian litas"},{value:"LVL",label:"Latvian lats"},{value:"LYD",label:"Libyan dinar"},{value:"MAD",label:"Moroccan dirham"},{value:"MDL",label:"Moldovan leu"},{value:"MGA",label:"Malagasy ariary"},{value:"MKD",label:"Macedonian denar"},{value:"MMK",label:"Burmese kyat"},{value:"MNT",label:"Mongolian tögrög"},{value:"MOP",label:"Macanese pataca"},{value:"MRO",label:"Mauritanian ouguiya"},{value:"MUR",label:"Mauritian rupee"},{value:"MVR",label:"Maldivian rufiyaa"},{value:"MWK",label:"Malawian kwacha"},{value:"MYR",label:"Malaysian ringgit"},{value:"MZN",label:"Mozambican metical"},{value:"NAD",label:"Namibian dollar"},{value:"NGN",label:"Nigerian naira"},{value:"NIO",label:"Nicaraguan córdoba"},{value:"NOK",label:"Norwegian krone"},{value:"NPR",label:"Nepalese rupee"},{value:"NZD",label:"New Zealand dollar"},{value:"OMR",label:"Omani rial"},{value:"PAB",label:"Panamanian balboa"},{value:"PEN",label:"Peruvian nuevo sol"},{value:"PGK",label:"Papua New Guinean kina"},{value:"PHP",label:"Philippine peso"},{value:"PKR",label:"Pakistani rupee"},{value:"PLN",label:"Polish złoty"},{value:"PRB",label:"Transnistrian ruble"},{value:"PYG",label:"Paraguayan guaraní"},{value:"QAR",label:"Qatari riyal"},{value:"RON",label:"Romanian leu"},{value:"RSD",label:"Serbian dinar"},{value:"RUB",label:"Russian ruble"},{value:"RWF",label:"Rwandan franc"},{value:"SAR",label:"Saudi riyal"},{value:"SBD",label:"Solomon Islands dollar"},{value:"SCR",label:"Seychellois rupee"},{value:"SDG",label:"Singapore dollar"},{value:"SEK",label:"Swedish krona"},{value:"SGD",label:"Singapore dollar"},{value:"SHP",label:"Saint Helena pound"},{value:"SLL",label:"Sierra Leonean leone"},{value:"SOS",label:"Somali shilling"},{value:"SRD",label:"Surinamese dollar"},{value:"SSP",label:"South Sudanese pound"},{value:"STD",label:"São Tomé and Príncipe dobra"},{value:"SVC",label:"Salvadoran colón"},{value:"SYP",label:"Syrian pound"},{value:"SZL",label:"Swazi lilangeni"},{value:"THB",label:"Thai baht"},{value:"TJS",label:"Tajikistani somoni"},{value:"TMT",label:"Turkmenistan manat"},{value:"TND",label:"Tunisian dinar"},{value:"TOP",label:"Tongan paʻanga"},{value:"TRY",label:"Turkish lira"},{value:"TTD",label:"Trinidad and Tobago dollar"},{value:"TWD",label:"New Taiwan dollar"},{value:"TZS",label:"Tanzanian shilling"},{value:"UAH",label:"Ukrainian hryvnia"},{value:"UGX",label:"Ugandan shilling"},{value:"UYU",label:"Uruguayan peso"},{value:"UZS",label:"Uzbekistani som"},{value:"VEF",label:"Venezuelan bolívar"},{value:"VND",label:"Vietnamese đồng"},{value:"VUV",label:"Vanuatu vatu"},{value:"WST",label:"Samoan tālā"},{value:"XAF",label:"Central African CFA franc"},{value:"XCD",label:"East Caribbean dollar"},{value:"XOF",label:"West African CFA franc"},{value:"XPF",label:"CFP franc"},{value:"YER",label:"Yemeni rial"},{value:"ZAR",label:"South African rand"},{value:"ZMW",label:"Zambian kwacha"},{value:"ZWL",label:"Zimbabwean dollar"}]),r=[{value:"none",label:"None"},{value:"$",label:"$"},{value:"£",label:"£"},{value:"€",label:"€"},{value:"¥",label:"¥"},{value:"₱",label:"₱"},{value:"₩",label:"₩"},{value:"ƒ",label:"ƒ"},{value:"₦",label:"₦"}],o={currencyCodes:i,currencySymbols:r},u={name:"ListingsGeneral",inheritAttrs:!1,props:{currencyCodeSelected:{type:String,default:"none"},currencySymbolSelected:{type:String,default:"none"},displayCurrencyCode:{type:Boolean,default:!1},defaultDisclaimer:{type:String,default:""},numberOfPosts:{type:[Number,String],default:"9"},listingSlug:{type:String,default:"listings"},defaultState:{type:String,default:""},formDisabled:{type:Boolean,default:!1}},created:function(){this.currency=o}},s=u,d=(l("db11"),l("2877")),c=Object(d["a"])(s,t,n,!1,null,null,null);a["a"]=c.exports},"078c":function(e,a,l){"use strict";l("c5ee")},1331:function(e,a,l){"use strict";l.r(a);var t=function(){var e=this,a=e.$createElement,l=e._self._c||a;return l("GuidedSetupContentCard",{attrs:{cardTitle:e.cardTitle,steps:e.guidedSetupSteps},on:{"back-step":e.goBackStep,"skip-step":e.goSkipStep,continue:function(a){return e.saveHandler("listingsGeneral","listingsSettings","general")}},scopedSlots:e._u([{key:"controls",fn:function(){return[l("ListingsGeneral",e._b({attrs:{formDisabled:e.formDisabled},on:{"form-field-update":e.formUpdate}},"ListingsGeneral",e.localStateValues,!1))]},proxy:!0}])})},n=[],i=(l("96cf"),l("1da1")),r=l("5530"),o=l("2f62"),u=l("12e8"),s=l("fa47"),d=l("b387"),c=l("0633"),b=l("8be2"),p={name:"guided-setup-listings-general",inject:[u["a"].listingsSettings.repo],mixins:[s["a"],d["a"]],components:{ListingsGeneral:c["a"],GuidedSetupContentCard:b["a"]},data:function(){return{formDisabled:!1}},computed:Object(r["a"])({},Object(o["d"])({guidedSetupSteps:function(e){return e.guidedSetup.guidedSetupSteps}})),methods:Object(r["a"])({},Object(o["b"])({progressStepperUpdate:"guidedSetup/progressStepperUpdate"})),created:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){var l,t;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.module="listingsGeneral",e.cardTitle="Configure IMPress Listings",e.continuePath="/guided-setup/listings/idx",e.skipPath="/guided-setup/agents",a.next=6,e.listingsSettingsRepository.get("general");case 6:l=a.sent,t=l.data,e.updateState(t);case 9:case"end":return a.stop()}}),a)})))()},mounted:function(){this.progressStepperUpdate([4,2,0,0])}},v=p,f=l("2877"),m=Object(f["a"])(v,t,n,!1,null,null,null);a["default"]=m.exports},"33ff":function(e,a,l){},"7a2e":function(e,a,l){"use strict";l("e35d")},"8be2":function(e,a,l){"use strict";var t=function(){var e=this,a=e.$createElement,l=e._self._c||a;return l("idx-dialog",{attrs:{show:!0,customClass:"gs-dialog"},on:{dismiss:e.closeDialog},scopedSlots:e._u([{key:"header",fn:function(){return[l("idx-block",{attrs:{className:"dialog-header"}},[l("idx-block",{attrs:{className:"dialog-header__title"}},[e._v(e._s(e.title))]),l("idx-block",{attrs:{className:"dialog-header__dismiss"}},[l("span",{on:{click:e.closeDialog}},[e._v("Close ×")])])],1)]},proxy:!0}])},[l("ContentCard",{attrs:{steps:e.steps,cardTitle:e.cardTitle,relatedLinks:e.relatedLinks},on:{"back-step":function(a){return e.$emit("back-step")},"skip-step":function(a){return e.$emit("skip-step")},continue:function(a){return e.$emit("continue")}},scopedSlots:e._u([{key:"description",fn:function(){return[e._t("description")]},proxy:!0},{key:"controls",fn:function(){return[e._t("controls")]},proxy:!0}],null,!0)})],1)},n=[],i=l("5530"),r=function(){var e=this,a=e.$createElement,l=e._self._c||a;return l("idx-block",{attrs:{className:"content-card"}},[l("idx-block",{attrs:{className:"content-card__stepper"}},e._l(e.steps,(function(a){return l("idx-progress-stepper",e._b({key:a.name,scopedSlots:e._u([{key:"complete",fn:function(){return[l("svg-icon",{attrs:{icon:"check"}})]},proxy:!0},{key:"icon",fn:function(){return[l("svg-icon",{attrs:{icon:a.icon}})]},proxy:!0}],null,!0)},"idx-progress-stepper",Object.assign({},a),!1))})),1),l("idx-block",{attrs:{className:"content-card__content",role:"tabpanel"}},[l("h1",[e._v(e._s(e.cardTitle))]),e._t("description"),e._t("controls")],2),l("idx-block",{attrs:{className:"content-card__sidebar"}},[l("RelatedLinks",{attrs:{relatedLinks:e.relatedLinks}})],1),l("idx-block",{attrs:{className:"content-card__footer"}},[l("idx-block",{attrs:{className:"content-card__buttons"}},[l("idx-button",{attrs:{size:"lg",theme:"light"},on:{click:function(a){return e.$emit("back-step")}}},[e._v("← Back")]),l("idx-button",{attrs:{size:"lg",theme:"link",customClass:"btn-link"},on:{click:function(a){return e.$emit("skip-step")}}},[e._v("Skip")]),l("idx-button",{attrs:{size:"lg"},on:{click:function(a){return e.$emit("continue")}}},[e._v("Continue")])],1)],1)],1)},o=[],u=l("bb2b"),s=l("0032"),d={name:"ContentCard",components:{RelatedLinks:u["a"],SvgIcon:s["a"]},props:{cardTitle:{type:String,default:""},steps:{type:Array,default:function(){return[]}},relatedLinks:{type:Array,default:function(){return[]}}},mounted:function(){document.body.classList.add("".concat(this.$idxStrap.prefix,"modal-open"))},beforeDestroy:function(){document.body.classList.remove("".concat(this.$idxStrap.prefix,"modal-open"))}},c=d,b=(l("eb98"),l("2877")),p=Object(b["a"])(c,r,o,!1,null,null,null),v=p.exports,f=l("2f62"),m={name:"GuidedSetupContentCard",components:{ContentCard:v},props:{cardTitle:{type:String,default:""},relatedLinks:{type:Array,default:function(){return[]}},steps:{type:Array,default:function(){return[]}}},data:function(){return{title:"IMPress for IDX Broker Setup"}},computed:Object(i["a"])({},Object(f["c"])({changedModules:"guidedSetup/changedModules"})),methods:Object(i["a"])(Object(i["a"])({},Object(f["b"])({setItem:"guidedSetup/setItem"})),{},{closeDialog:function(){for(var e=0;e0}},methods:{formUpdate:function(e){var a=Object(t["a"])({},e.key,e.value);this.formChanges=Object(n["a"])(Object(n["a"])({},this.formChanges),a)}},beforeRouteLeave:function(e,a,l){if(this.formIsUpdated){var t=window.confirm("Do you really want to leave? You have unsaved changes!");t?l():l(!1)}else l()}}},bb2b:function(e,a,l){"use strict";var t=function(){var e=this,a=e.$createElement,l=e._self._c||a;return l("idx-card",[l("idx-card-header",[e._v(e._s(e.title))]),l("idx-card-body",[l("idx-list",{attrs:{unstyled:""}},[e._l(e.relatedLinks,(function(a){return l("idx-list-item",{key:a.href},[l("a",{attrs:{href:a.href,target:"_blank"}},[e._v(e._s(a.text))])])})),l("idx-list-item",[l("a",{attrs:{href:"https://middleware.idxbroker.com/mgmt/",target:"_blank"}},[e._v("IDX Broker Middleware")])]),l("idx-list-item",[l("a",{attrs:{href:"https://www.idxbroker.com/",target:"_blank"}},[e._v("Sign up for IDX Broker")])])],2)],1)],1)},n=[],i={name:"RelatedLinks",props:{title:{type:String,default:"Related Links"},relatedLinks:{type:Array,default:function(){return[]}}}},r=i,o=(l("078c"),l("2877")),u=Object(o["a"])(r,t,n,!1,null,"28b01ccf",null);a["a"]=u.exports},c5ee:function(e,a,l){},d537:function(e,a,l){},d90c:function(e,a,l){},db11:function(e,a,l){"use strict";l("d90c")},e35d:function(e,a,l){},eb98:function(e,a,l){"use strict";l("d537")},fa47:function(e,a,l){"use strict";var t=l("5530"),n=l("2f62");a["a"]={computed:Object(t["a"])({},Object(n["d"])({hasChanges:function(e){return e.guidedSetup.hasChanges}})),methods:{goBackStep:function(){this.$router.go(-1)},goSkipStep:function(){this.$router.push({path:this.skipPath})},updateState:function(e){for(var a in e)this.$store.dispatch("".concat(this.module,"/setItem"),{key:a,value:e[a]})},saveAction:function(){this.updateState(this.formChanges),this.formChanges={}},saveHandler:function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this.formIsUpdated?(this.$store.dispatch("guidedSetup/setItem",{key:"hasChanges",value:!0}),this.$store.dispatch("guidedSetup/setItem",{key:e,value:{changes:"omnibar"===e?this.localStateValues:this.formChanges,module:""!==a?a:this.module,path:l}}),this.formChanges={},this.$router.push({path:this.continuePath})):this.$router.push({path:this.continuePath})}},beforeRouteLeave:function(e,a,l){if("/settings/general"===e.path&&this.hasChanges){var t=window.confirm("Do you really want to leave? You have unsaved changes!");t?l():l(!1)}else l()}}}}]); //# sourceMappingURL=chunk-453a8273.14649de2.js.map if (!defined('WPVIVID_PLUGIN_DIR')) { die; } class WPvivid_Zip { public $zip_object; public function __construct($zip_method='') { $this->check_available_zip_object($zip_method); } public function add_files($zip_file,$root_path,$files,$create=false,$json=false) { if($create) { if(file_exists($zip_file)) @wp_delete_file($zip_file); } if($json!==false) { $this->add_json_file($zip_file,$json,$create); } if(file_exists($zip_file)) { $this->zip_object->open($zip_file); clearstatcache(); } else { $create_code = (version_compare(PHP_VERSION, '5.2.12', '>') && defined('ZIPARCHIVE::CREATE')) ? ZIPARCHIVE::CREATE : 1; $this->zip_object->open($zip_file, $create_code); } if(is_a($this->zip_object,'WPvivid_PclZip_2')) $this->zip_object->set_replace_path($root_path); foreach ($files as $file) { $new_file=str_replace($root_path,'',$file); if(file_exists($file)) { $this->zip_object->addFile($file,$new_file); } } if($this->zip_object->close()===false) { $ret['result']='failed'; $ret['error']='Failed to add zip files.'; if(is_a($this->zip_object,'WPvivid_PclZip_2')) { $ret['error'].=' last error:'.$this->zip_object->last_error; } else if(is_a($this->zip_object,'ZipArchive')) { $ret['error'].=' status string:'.$this->zip_object->getStatusString(); } return $ret; } $ret['result']='success'; return $ret; } public function add_file($zip_file,$file,$add_as,$replace_path) { global $wpvivid_plugin; $wpvivid_plugin->wpvivid_log->WriteLog('Prepare to zip file. file: '.basename($file),'notice'); if(file_exists($zip_file)) { $this->zip_object->open($zip_file); clearstatcache(); } else { $create_code = (version_compare(PHP_VERSION, '5.2.12', '>') && defined('ZIPARCHIVE::CREATE')) ? ZIPARCHIVE::CREATE : 1; $this->zip_object->open($zip_file, $create_code); } if(is_a($this->zip_object,'WPvivid_PclZip_2')) $this->zip_object->set_replace_path($replace_path); if($this->zip_object->addFile($file,$add_as)===false) { $ret['result']='failed'; $ret['error']='Failed to add zip file '.$file; if(is_a($this->zip_object,'WPvivid_PclZip_2')) { $ret['error'].=' last error:'.$this->zip_object->last_error; } else if(is_a($this->zip_object,'ZipArchive')) { $ret['error'].=' status string:'.$this->zip_object->getStatusString(); } return $ret; } if($this->zip_object->close()===false) { $ret['result']='failed'; $ret['error']='Failed to add zip files.'; if(is_a($this->zip_object,'WPvivid_PclZip_2')) { $ret['error'].=' last error:'.$this->zip_object->last_error; } else if(is_a($this->zip_object,'ZipArchive')) { $ret['error'].=' status string:'.$this->zip_object->getStatusString(); } return $ret; } $ret['result']='success'; $wpvivid_plugin->wpvivid_log->WriteLog('Adding zip files completed.'.basename($zip_file).', filesize: '.size_format(filesize($zip_file),2),'notice'); return $ret; } public function add_json_file($zip_file,$json,$create=false) { if($create) { if(file_exists($zip_file)) @wp_delete_file($zip_file); } $json['file']=basename($zip_file); $string=wp_json_encode($json); if(file_exists($zip_file)) { $this->zip_object->open($zip_file); clearstatcache(); } else { $create_code = (version_compare(PHP_VERSION, '5.2.12', '>') && defined('ZIPARCHIVE::CREATE')) ? ZIPARCHIVE::CREATE : 1; $this->zip_object->open($zip_file, $create_code); } if($this->zip_object->addFromString('wpvivid_package_info.json',$string)===false) { $ret['result']='failed'; $ret['error']='Failed to add zip file'; return $ret; } if(is_a($this->zip_object,'WPvivid_PclZip_2')) { } else { if($this->zip_object->close()===false) { $ret['result']='failed'; $ret['error']='Failed to add zip file'; return $ret; } } $ret['result']='success'; return $ret; } public function check_available_zip_object($zip_method) { if($zip_method=='ziparchive'||empty($zip_method)) { if($this->check_ziparchive_available()) { $this->zip_object=new ZipArchive(); } else { $this->zip_object=new WPvivid_PclZip_2(); } } else { $this->zip_object=new WPvivid_PclZip_2(); } } public function check_ziparchive_available() { if(class_exists('ZipArchive')) { if(method_exists('ZipArchive', 'addFile')) { return true; } else { return false; } } else { return false; } } public function addEmptyDir($zip_file,$folders) { $path=WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR; if(file_exists($path.$zip_file)) { $this->zip_object->open($path.$zip_file); } else { $create_code = (version_compare(PHP_VERSION, '5.2.12', '>') && defined('ZIPARCHIVE::CREATE')) ? ZIPARCHIVE::CREATE : 1; $this->zip_object->open($path.$zip_file, $create_code); } foreach ($folders as $folder) { $this->zip_object->addEmptyDir($folder); } $this->zip_object->close(); $ret['result']='success'; return $ret; } } class WPvivid_PclZip_2 { public $addfiles; public $adddirs; public $path; public $pclzip; public $last_error; public $replace_path; public function __construct() { $this->addfiles = array(); $this->adddirs = array(); if(!defined('PCLZIP_TEMPORARY_DIR')) { $path=WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR; $temp_dir =$path.'wpvivid-pclzip-temp'.DIRECTORY_SEPARATOR; define(PCLZIP_TEMPORARY_DIR,$temp_dir); } if (!class_exists('WPvivid_PclZip')) include_once WPVIVID_PLUGIN_DIR . '/includes/zip/class-wpvivid-pclzip.php'; } public function open($path, $flags = 0) { $ziparchive_create_match = (version_compare(PHP_VERSION, '5.2.12', '>') && defined('ZIPARCHIVE::CREATE')) ? ZIPARCHIVE::CREATE : 1; if ($flags == $ziparchive_create_match && file_exists($path)) @wp_delete_file($path); $this->pclzip = new WPvivid_PclZip($path); if (empty($this->pclzip)) { return false; } $this->path = $path; return true; } public function set_replace_path($replace_path) { $this->replace_path=$replace_path; } public function addFile($file, $add_as) { $this->addfiles[] = $file; return true; } public function addEmptyDir($dir) { $this->adddirs[] = $dir; } public function close() { if (empty($this->pclzip)) { return false; } $path=WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR; foreach ($this->adddirs as $dir) { $ret=$this->pclzip->add($path.'emptydir', WPVIVID_PCLZIP_OPT_REMOVE_PATH, $path.'emptydir', WPVIVID_PCLZIP_OPT_ADD_PATH, $dir); if (!$ret) { $this->last_error = $this->pclzip->errorInfo(true); return false; } } if(!class_exists('WPvivid_ZipClass')) include_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-zipclass.php'; $ret = $this->pclzip -> add($this->addfiles,WPVIVID_PCLZIP_OPT_REMOVE_PATH,$this->replace_path,WPVIVID_PCLZIP_CB_PRE_ADD,'wpvivid_function_per_add_callback',WPVIVID_PCLZIP_OPT_NO_COMPRESSION,WPVIVID_PCLZIP_OPT_TEMP_FILE_THRESHOLD,16); if (!$ret) { $this->last_error = $this->pclzip->errorInfo(true); return false; } $this->pclzip = false; $this->addfiles = array(); $this->adddirs = array(); clearstatcache(); return true; } public function addFromString($file_name,$string) { $path=WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR; $temp_path = $path.$file_name; if(file_exists($temp_path)) { @wp_delete_file($temp_path); } file_put_contents($temp_path,$string); $this->pclzip -> add($temp_path,WPVIVID_PCLZIP_OPT_REMOVE_PATH,dirname($temp_path)); @wp_delete_file($temp_path); return true; } } return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'ee03e8f4e6183ce97a00'); return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '1f16668929e0b888501a'); if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } /** * @param $term * * @return array|bool * @since 4.5.2 * */ function vc_autocomplete_taxonomies_field_render( $term ) { $vc_taxonomies_types = vc_taxonomies_types(); $terms = get_terms( array_keys( $vc_taxonomies_types ), array( 'include' => array( $term['value'] ), 'hide_empty' => false, ) ); $data = false; if ( is_array( $terms ) && 1 === count( $terms ) ) { $term = $terms[0]; $data = vc_get_term_object( $term ); } return $data; } /** * @param $search_string * * @return array|bool * @since 4.5.2 * */ function vc_autocomplete_taxonomies_field_search( $search_string ) { $data = array(); $vc_filter_by = vc_post_param( 'vc_filter_by', '' ); $vc_filter_by_post_type = vc_post_param( 'vc_filter_post_type', '' ); $vc_taxonomies_types = strlen( $vc_filter_by ) > 0 ? array( $vc_filter_by ) : array_keys( vc_taxonomies_types( $vc_filter_by_post_type ) ); if ( empty( $vc_taxonomies_types ) ) { return array(); } $vc_taxonomies = get_terms( $vc_taxonomies_types, array( 'hide_empty' => false, 'search' => $search_string, ) ); if ( is_array( $vc_taxonomies ) && ! empty( $vc_taxonomies ) ) { foreach ( $vc_taxonomies as $t ) { if ( is_object( $t ) ) { $data[] = vc_get_term_object( $t ); } } } return $data; } /** * @param $search * @param $wp_query * * @return string */ function vc_search_by_title_only( $search, $wp_query ) { global $wpdb; if ( empty( $search ) ) { return $search; } // skip processing - no search term in query $q = $wp_query->query_vars; if ( isset( $q['vc_search_by_title_only'] ) && $q['vc_search_by_title_only'] ) { $n = ! empty( $q['exact'] ) ? '' : '%'; $search = ''; $searchand = ''; foreach ( (array) $q['search_terms'] as $term ) { $term = $wpdb->esc_like( $term ); $like = $n . $term . $n; $search .= $searchand . $wpdb->prepare( "($wpdb->posts.post_title LIKE %s)", $like ); $searchand = ' AND '; } if ( ! empty( $search ) ) { $search = " AND ({$search}) "; if ( ! is_user_logged_in() ) { $search .= " AND ($wpdb->posts.post_password = '') "; } } } return $search; } /** * @param $search_string * * @return array */ function vc_include_field_search( $search_string ) { $query = $search_string; $data = array(); $args = array( 's' => $query, 'post_type' => 'any', ); $args['vc_search_by_title_only'] = true; $args['numberposts'] = - 1; if ( 0 === strlen( $args['s'] ) ) { unset( $args['s'] ); } add_filter( 'posts_search', 'vc_search_by_title_only', 500, 2 ); $posts = get_posts( $args ); if ( is_array( $posts ) && ! empty( $posts ) ) { foreach ( $posts as $post ) { $data[] = array( 'value' => $post->ID, 'label' => $post->post_title, 'group' => $post->post_type, ); } } return $data; } /** * @param $value * * @return array|bool */ function vc_include_field_render( $value ) { $post = get_post( $value['value'] ); return is_null( $post ) ? false : array( 'label' => $post->post_title, 'value' => $post->ID, 'group' => $post->post_type, ); } /** * @param $data_arr * * @return array */ function vc_exclude_field_search( $data_arr ) { $query = isset( $data_arr['query'] ) ? $data_arr['query'] : null; $term = isset( $data_arr['term'] ) ? $data_arr['term'] : ''; $data = array(); $args = ! empty( $query ) ? array( 's' => $term, 'post_type' => $query, ) : array( 's' => $term, 'post_type' => 'any', ); $args['vc_search_by_title_only'] = true; $args['numberposts'] = - 1; if ( 0 === strlen( $args['s'] ) ) { unset( $args['s'] ); } add_filter( 'posts_search', 'vc_search_by_title_only', 500, 2 ); $posts = get_posts( $args ); if ( is_array( $posts ) && ! empty( $posts ) ) { foreach ( $posts as $post ) { $data[] = array( 'value' => $post->ID, 'label' => $post->post_title, 'group' => $post->post_type, ); } } return $data; } /** * @param $value * * @return array|bool */ function vc_exclude_field_render( $value ) { $post = get_post( $value['value'] ); return is_null( $post ) ? false : array( 'label' => $post->post_title, 'value' => $post->ID, 'group' => $post->post_type, ); } Page not found – JFID
404
The page you are looking for does not exist.
GO BACK TO HOMEPAGE