Additional information
Level | Elementary, Middle, High |
---|
/** * Plugin Name: Elementor Pro * Description: Elevate your designs and unlock the full power of Elementor. Gain access to dozens of Pro widgets and kits, Theme Builder, Pop Ups, Forms and WooCommerce building capabilities. * Plugin URI: https://go.elementor.com/wp-dash-wp-plugins-author-uri/ * Version: 3.29.2 * Author: Elementor.com * Author URI: https://go.elementor.com/wp-dash-wp-plugins-author-uri/ * Text Domain: elementor-pro * Elementor tested up to: 3.29.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ELEMENTOR_PRO_VERSION', '3.29.2' ); /** * All versions should be `major.minor`, without patch, in order to compare them properly. * Therefore, we can't set a patch version as a requirement. * (e.g. Core 3.15.0-beta1 and Core 3.15.0-cloud2 should be fine when requiring 3.15, while * requiring 3.15.2 is not allowed) */ define( 'ELEMENTOR_PRO_REQUIRED_CORE_VERSION', '3.27' ); define( 'ELEMENTOR_PRO_RECOMMENDED_CORE_VERSION', '3.29' ); define( 'ELEMENTOR_PRO__FILE__', __FILE__ ); define( 'ELEMENTOR_PRO_PLUGIN_BASE', plugin_basename( ELEMENTOR_PRO__FILE__ ) ); define( 'ELEMENTOR_PRO_PATH', plugin_dir_path( ELEMENTOR_PRO__FILE__ ) ); define( 'ELEMENTOR_PRO_ASSETS_PATH', ELEMENTOR_PRO_PATH . 'assets/' ); define( 'ELEMENTOR_PRO_MODULES_PATH', ELEMENTOR_PRO_PATH . 'modules/' ); define( 'ELEMENTOR_PRO_URL', plugins_url( '/', ELEMENTOR_PRO__FILE__ ) ); define( 'ELEMENTOR_PRO_ASSETS_URL', ELEMENTOR_PRO_URL . 'assets/' ); define( 'ELEMENTOR_PRO_MODULES_URL', ELEMENTOR_PRO_URL . 'modules/' ); // Include Composer's autoloader if ( file_exists( ELEMENTOR_PRO_PATH . 'vendor/autoload.php' ) ) { require_once ELEMENTOR_PRO_PATH . 'vendor/autoload.php'; // We need this file because of the DI\create function that we are using. // Autoload classmap doesn't include this file. require_once ELEMENTOR_PRO_PATH . 'vendor_prefixed/php-di/php-di/src/functions.php'; } /** * Load gettext translate for our text domain. * * @since 1.0.0 * * @return void */ function elementor_pro_load_plugin() { if ( ! did_action( 'elementor/loaded' ) ) { add_action( 'admin_notices', 'elementor_pro_fail_load' ); return; } $core_version = ELEMENTOR_VERSION; $core_version_required = ELEMENTOR_PRO_REQUIRED_CORE_VERSION; $core_version_recommended = ELEMENTOR_PRO_RECOMMENDED_CORE_VERSION; if ( ! elementor_pro_compare_major_version( $core_version, $core_version_required, '>=' ) ) { add_action( 'admin_notices', 'elementor_pro_fail_load_out_of_date' ); return; } if ( ! elementor_pro_compare_major_version( $core_version, $core_version_recommended, '>=' ) ) { add_action( 'admin_notices', 'elementor_pro_admin_notice_upgrade_recommendation' ); } require ELEMENTOR_PRO_PATH . 'plugin.php'; } function elementor_pro_compare_major_version( $left, $right, $operator ) { $pattern = '/^(\d+\.\d+).*/'; $replace = '$1.0'; $left = preg_replace( $pattern, $replace, $left ); $right = preg_replace( $pattern, $replace, $right ); return version_compare( $left, $right, $operator ); } add_action( 'plugins_loaded', 'elementor_pro_load_plugin' ); function print_error( $message ) { if ( ! $message ) { return; } // PHPCS - $message should not be escaped echo '
' . esc_html__( 'Activate the Elementor plugin to start using all of Elementor Pro plugin’s features.', 'elementor-pro' ) . '
'; $message .= '' . sprintf( '%s', $activation_url, esc_html__( 'Activate Now', 'elementor-pro' ) ) . '
'; } else { if ( ! current_user_can( 'install_plugins' ) ) { return; } $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' ); $message = '' . esc_html__( 'Install and activate the Elementor plugin to access all the Pro features.', 'elementor-pro' ) . '
'; $message .= '' . sprintf( '%s', $install_url, esc_html__( 'Install Now', 'elementor-pro' ) ) . '
'; } print_error( $message ); } function elementor_pro_fail_load_out_of_date() { if ( ! current_user_can( 'update_plugins' ) ) { return; } $file_path = 'elementor/elementor.php'; $upgrade_link = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file_path, 'upgrade-plugin_' . $file_path ); $message = sprintf( '%2$s %4$s
', esc_html__( 'Elementor Pro requires newer version of the Elementor plugin', 'elementor-pro' ), esc_html__( 'Update the Elementor plugin to reactivate the Elementor Pro plugin.', 'elementor-pro' ), $upgrade_link, esc_html__( 'Update Now', 'elementor-pro' ) ); print_error( $message ); } function elementor_pro_admin_notice_upgrade_recommendation() { if ( ! current_user_can( 'update_plugins' ) ) { return; } $file_path = 'elementor/elementor.php'; $upgrade_link = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file_path, 'upgrade-plugin_' . $file_path ); $message = sprintf( '%2$s %4$s
', esc_html__( 'Don’t miss out on the new version of Elementor', 'elementor-pro' ), esc_html__( 'Update to the latest version of Elementor to enjoy new features, better performance and compatibility.', 'elementor-pro' ), $upgrade_link, esc_html__( 'Update Now', 'elementor-pro' ) ); print_error( $message ); } if ( ! function_exists( '_is_elementor_installed' ) ) { function _is_elementor_installed() { $file_path = 'elementor/elementor.php'; $installed_plugins = get_plugins(); return isset( $installed_plugins[ $file_path ] ); } }/** * Stripe Co-branded cards compatibility class. * * @package WooCommerce Stripe * @since 8.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } class WC_Stripe_Co_Branded_CC_Compatibility { const MIN_WC_VERSION = '8.9.0'; /** * Determines whether the current version of WooCommerce is supported. * * @return bool */ public static function is_wc_supported() { return 'beta' !== WC_VERSION && version_compare( WC_VERSION, self::MIN_WC_VERSION, '>' ); } }// Exit if accessed directly defined( 'ABSPATH' ) || exit; if ( ! function_exists( 'wcss_is_cart_empty' ) ) { /** * Check for woocommerce cart status. * * @return bool */ function wcss_is_cart_empty() { return WC()->cart->get_cart_contents_count() === 0 ? true : false; } } /** * Generate unique 5 characters alphanumeric cart key. * * @since 2.2.0 * @return string 5 characters alphanumeric cart key. */ function wcss_generate_cart_key() { $charset = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; $base = strlen( $charset ); $result = ''; $now = explode( ' ', microtime() ); $now = $now[1]; while ( $now >= $base ) { $i = $now % $base; $result = $charset[ $i ] . $result; $now = (int) ( $now / $base ); } return apply_filters( 'wcss_generate_cart_key', substr( $result, -5 ) ); }// Exit if accessed directly defined( 'ABSPATH' ) || exit; /** * Get saved cart object. * * @since 2.0.0 * * @param string $cart_key Optional. Saved cart key. * @return WCSS_Saved_Cart Saved cart object. */ function wcss_get_saved_cart( $cart = '' ) { return new WCSS_Saved_Cart( $cart ); } /** * Get all saved carts. * * @since 2.0.0 * * @return array|bool Array of saved cart objects. false otherwise. */ function wcss_get_saved_carts() { global $wpdb; $saved_carts = array(); $_saved_carts = $wpdb->get_results( "SELECT cart_key FROM {$wpdb->prefix}wcss_saved_cart ORDER BY id DESC" ); if ( ! $_saved_carts ) { return false; } foreach ( $_saved_carts as $_saved_cart ) { $saved_carts[] = wcss_get_saved_cart( $_saved_cart->cart_key ); } return $saved_carts; } /** * Get saved carts by fields. * * @since 2.0.0 * * @param string $field Saved cart field. Like `user_id`, `cart_key`. * @param string $value Saved cart field value. Like Saved cart user ID, Saved cart key. * @param string $order Optional. ASC or DESC. Default `DESC`. * @return array|bool Array of saved cart objects or false if no saved cart found. */ function wcss_get_saved_carts_by( $field, $value, $order = 'DESC' ) { if ( ! $field || ! $value ) { return false; } if ( 'user_id' !== $field && 'cart_key' !== $field ) { return false; } global $wpdb; $saved_carts = array(); $_saved_carts = $wpdb->get_results( $wpdb->prepare( "SELECT cart_key FROM {$wpdb->prefix}wcss_saved_cart WHERE {$field} = %s ORDER BY id {$order}", $value ) ); if ( ! $_saved_carts ) { return false; } foreach ( $_saved_carts as $_saved_cart ) { $saved_carts[] = wcss_get_saved_cart( $_saved_cart->cart_key ); } return $saved_carts; } /** * Delete all saved carts. * * @since 2.0.0 * * @return void */ function wcss_delete_saved_carts() { $saved_carts = wcss_get_saved_carts(); if ( ! $saved_carts ) { return; } foreach ( $saved_carts as $saved_cart ) { $shared_cart = wcss_get_shared_cart( $saved_cart->get_cart_key() ); $shared_cart->delete(); $saved_cart->delete(); } } /** * Delete saved cart. * * @since 2.0.0 * * @param string $cart_key Saved cart key. * @return bool True if saved cart deleted. False otherwise. */ function wcss_delete_saved_cart( $cart_key ) { $saved_cart = wcss_get_saved_cart( $cart_key ); $shared_cart = wcss_get_shared_cart( $cart_key ); if ( ! $saved_cart ) { return false; } $saved_cart->delete(); $shared_cart->delete(); return true; } /** * Insert data into saved cart table. * * @since 2.0.0 * * @param string $args Optional. Args used to create saved cart. * @return WCSS_Saved_Cart|bool Saved cart object on success, false otherwise. */ function wcss_insert_saved_cart( $args = '' ) { $a = wp_parse_args( $args, array( 'user_id' => 0, 'cart_name' => '', 'cart_key' => '', 'cart_saved' => '', ) ); $saved_cart = wcss_get_saved_cart(); if ( $saved_cart->is_exists() ) { return false; } $saved_cart->set_user_id( $a['user_id'] ); $saved_cart->set_cart_name( $a['cart_name'] ); $saved_cart->set_cart_key( $a['cart_key'] ); $saved_cart->set_cart_saved( $a['cart_saved'] ); return $saved_cart->create(); } /** * Get saved carts by user ID. * * @since 2.0.0 * * @param int $user_id User ID. * @return array list of saved carts. */ function wcss_get_saved_carts_by_user_id( $user_id ) { return wcss_get_saved_carts_by( 'user_id', $user_id ); } /** * Get saved carts table columns. * * @since 3.2.2 * * @return array Array of column labels keyed by column IDs. */ function wcss_get_saved_carts_columns() { /** * Filter the array of My Account > Saved carts columns. * * @since 3.2.2 * * @param array $columns Array of column labels keyed by column IDs. */ return apply_filters( 'wcss_saved_carts_columns', array( 'count' => esc_html__( '#', 'woo-cart-share' ), 'cart_name' => esc_html__( 'Cart Name', 'woo-cart-share' ), 'actions' => esc_html__( 'Actions', 'woo-cart-share' ), ) ); }// Exit if accessed directly defined( 'ABSPATH' ) || exit; /** * Get shared cart object. * * @since 2.0.0 * * @param string $cart_key Optional. Shared cart key. * @return WCSS_Shared_Cart Shared cart object. */ function wcss_get_shared_cart( $cart = '' ) { return new WCSS_Shared_Cart( $cart ); } /** * Get all shared carts. * * @since 2.0.0 * * @return array|bool Array of shared cart objects. false otherwise. */ function wcss_get_shared_carts() { global $wpdb; $shared_carts = array(); $_shared_carts = $wpdb->get_results( "SELECT cart_key FROM {$wpdb->prefix}wcss_shared_cart WHERE cart_key NOT IN ( SELECT cart_key FROM {$wpdb->prefix}wcss_saved_cart ) ORDER BY id DESC" ); if ( ! $_shared_carts ) { return false; } foreach ( $_shared_carts as $_shared_cart ) { $shared_carts[] = wcss_get_shared_cart( $_shared_cart->cart_key ); } return $shared_carts; } /** * Get shared carts by fields. * * @since 2.0.0 * * @param string $field Shared cart field. Like `cart_key`, `cart_shared_by`, `cart_retrieved`. * @param string $value Shared cart field value. Like Shared cart key, Shared cart by, Shared cart retrieved count. * @param string $order Optional. ASC or DESC. Default `DESC`. * @return array|bool Array of shared cart objects or false if no shared cart found. */ function wcss_get_shared_carts_by( $field, $value, $order = 'DESC' ) { if ( ! $field || ! $value ) { return false; } if ( 'user_id' !== $field && 'cart_key' !== $field && 'cart_retrieved' !== $field) { return false; } global $wpdb; $shared_carts = array(); $_shared_carts = $wpdb->get_results( $wpdb->prepare( "SELECT cart_key FROM {$wpdb->prefix}wcss_shared_cart WHERE {$field} = %s ORDER BY id {$order}", $value ) ); if ( ! $_shared_carts ) { return false; } foreach ( $_shared_carts as $_shared_cart ) { $shared_carts[] = wcss_get_shared_cart( $_shared_cart->cart_key ); } return $shared_carts; } /** * Delete all shared carts. * * @since 2.0.0 * * @return void */ function wcss_delete_shared_carts() { $shared_carts = wcss_get_shared_carts(); if ( ! $shared_carts ) { return; } foreach ( $shared_carts as $shared_cart ) { $saved_cart = wcss_get_saved_cart( $shared_cart->get_cart_key() ); $saved_cart->delete(); $shared_cart->delete(); } } /** * Delete shared cart. * * @since 2.0.0 * * @param string $cart_key Shared cart key. * @return bool True if shared cart deleted. False otherwise. */ function wcss_delete_shared_cart( $cart_key ) { $shared_cart = wcss_get_shared_cart( $cart_key ); $saved_cart = wcss_get_saved_cart( $cart_key ); if ( ! $shared_cart->is_exists() || $saved_cart->is_exists() ) { return false; } $shared_cart->delete(); return true; } /** * Get shared cart data by DB column. * * @param string $cart_key Cart key. * @param string $column Column name. * @return mixed|bool Returns data if found, false otherwise. */ function wcss_get_shared_cart_data( $cart_key, $column ) { $shared_cart = wcss_get_shared_cart( $cart_key ); if ( 'cart_key' === $column ) { return $shared_cart->get_cart_key(); } elseif ( 'cart_value' === $column ) { return $shared_cart->get_cart_value(); } elseif ( 'cart_shared_by' === $column ) { return $shared_cart->get_cart_shared_by(); } elseif ( 'cart_retrieved' === $column ) { return $shared_cart->get_cart_retrieved(); } elseif ( 'cart_retrieved_time' === $column ) { return $shared_cart->get_cart_retrieved_time(); } elseif ( 'cart_created' === $column ) { return $shared_cart->get_cart_created(); } return false; } /** * Insert data into shared cart table. * * @since 2.0.0 * * @param string $args Optional. Args used to create shared cart. * @return WCSS_Shared_Cart|bool Shared cart object on success, false otherwise. */ function wcss_insert_shared_cart( $args = '' ) { $a = wp_parse_args( $args, array( 'cart_key' => '', 'cart_value' => '', 'cart_shared_by' => 0, 'cart_retrieved' => 0, 'cart_retrieved_time' => null, 'cart_created' => '', ) ); $shared_cart = wcss_get_shared_cart(); if ( $shared_cart->is_exists() ) { return false; } $shared_cart->set_cart_key( $a['cart_key'] ); $shared_cart->set_cart_value( $a['cart_value'] ); $shared_cart->set_cart_shared_by( $a['cart_shared_by'] ); $shared_cart->set_cart_retrieved( $a['cart_retrieved'] ); $shared_cart->set_cart_retrieved_time( $a['cart_retrieved_time'] ); $shared_cart->set_cart_created( $a['cart_created'] ); $inserted_shared_cart = $shared_cart->create(); if ( ! $inserted_shared_cart ) { return false; } return $inserted_shared_cart; } /** * Increment the saved cart retrieved count value by one. * * @since 2.0.0 * * @param string $cart_key Cart key. * @return bool True on success, false otherwise. */ function wcss_shared_cart_retrieved_count_increment( $cart_key ) { $shared_cart = wcss_get_shared_cart( $cart_key ); if ( ! $shared_cart->is_exists() ) { return false; } $shared_cart->set_cart_retrieved( $shared_cart->get_cart_retrieved() + 1 ); return $shared_cart->update(); } /** * Set cart retrieved time. * * @param string $cart_key Cart key. * @return bool True on success, false otherwise. */ function wcss_set_shared_cart_retrieved_time( $cart_key ) { $shared_cart = wcss_get_shared_cart( $cart_key ); if ( ! $shared_cart->is_exists() ) { return false; } $shared_cart->set_cart_retrieved_time( current_time( 'mysql' ) ); return $shared_cart->update(); } /** * Get shared cart retrieved time. * * @since 2.0.0 * * @param string $cart_key Cart key. * @return string|bool Returns cart retrieved time on success, false otherwise. */ function wcss_get_shared_cart_retrieved_time( $cart_key ) { $shared_cart = wcss_get_shared_cart( $cart_key ); if ( ! $shared_cart->is_exists() ) { return false; } return $shared_cart->get_cart_retrieved_time(); } /** * Get the shared cart retrieved count. * * @since 2.0.0 * * @param string $cart_key Cart key. * @return int Returns cart retrieved count on success, false otherwise. */ function wcss_get_shared_cart_retrieved_count( $cart_key ) { $shared_cart = wcss_get_shared_cart( $cart_key ); if ( ! $shared_cart->is_exists() ) { return false; } return $shared_cart->get_cart_retrieved(); } /** * Get shared cart session. * * @param string $cart_key Cart key. * @return array Returns cart session on success, false otherwise. */ function wcss_get_shared_cart_session( $cart_key ) { $shared_cart = wcss_get_shared_cart( $cart_key ); if ( ! $shared_cart->is_exists() ) { return false; } return $shared_cart->get_cart_value(); } /** * Add to cart redirection URL. * * @since 2.1.1 * * @return string Add to cart redirection URL. */ function wcss_add_to_cart_redirection_url() { // Get plugin settings. $redirection_page_id = get_option( 'wcss_retrieved_cart_redirection_page_id' ); if ( ! is_numeric( $redirection_page_id ) ) { return wc_get_cart_url(); } return apply_filters( 'wcss_after_add_to_cart_redirection_url', get_permalink( $redirection_page_id ) ); }/** * Shared cart meta functions. * * @package WooCommerce Cart Share & Save * @version 1.8.5 */ defined( 'ABSPATH' ) || exit; /** * Get shared cart meta data. * * @since 1.8.5 * * @param string $cart_key Shared cart unique key. * @param string $meta_key Optional. The meta key to retrieve. By default, * returns data for all keys. Default empty. * * @return mixed False for an invalid `$cart_key`. * An empty string if a valid but non-existing Shared cart is passed. */ function wcss_get_shared_cart_meta( $cart_key, $meta_key = '' ) { global $wpdb; if ( ! $cart_key ) { return; } if ( ! $meta_key ) { return $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}wcss_shared_cart_meta WHERE cart_key = %s", $cart_key ), ARRAY_A ); } return $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->prefix}wcss_shared_cart_meta WHERE cart_key = %s AND meta_key = %s ORDER BY id DESC LIMIT 1", $cart_key, $meta_key ) ); } /** * Add shared cart meta data. * * @since 1.8.5 * * @param string $cart_key Shared cart unique key. * @param string $meta_key Metadata key. * @param mixed $meta_value Metadata value. * * @return int|false Meta ID on success, false on failure. */ function wcss_add_shared_cart_meta( $cart_key, $meta_key, $meta_value ) { global $wpdb; if ( wcss_get_shared_cart_meta( $cart_key, $meta_key ) ) { return false; } $query = $wpdb->insert( $wpdb->prefix . 'wcss_shared_cart_meta', array( 'cart_key' => $cart_key, 'meta_key' => $meta_key, 'meta_value' => maybe_serialize( $meta_value ), ), array( '%s', '%s', '%s', ) ); return $query ? $wpdb->insert_id : false; } /** * Update shared cart meta data. * * @since 1.8.5 * * @param string $cart_key Shared cart unique key. * @param string $meta_key Meta key. * @param mixed $meta_value Meta new value. * * @return int|bool True on success, false on failure. */ function wcss_update_shared_cart_meta( $cart_key, $meta_key, $meta_value ) { if ( ! $cart_key || ! $meta_key || ! $meta_value ) { return false; } global $wpdb; return $wpdb->update( $wpdb->prefix . 'wcss_shared_cart_meta', array( 'meta_value' => maybe_serialize( $meta_value ) ), array( 'cart_key' => $cart_key, 'meta_key' => $meta_key, ), array( '%s' ), array( '%s', '%s', ) ); } /** * Delete shared cart meta. * * @param string $cart_key Shared cart unique key. * @param string $meta_key Optional. Delete meta entry(ies). * Delete all meta entries if '$meta_key' not passed. * * @return bool True on success, false on failure. */ function wcss_delete_shared_cart_meta( $cart_key, $meta_key = '' ) { global $wpdb; if ( ! $meta_key ) { return $wpdb->delete( $wpdb->prefix . 'wcss_shared_cart_meta', array( 'cart_key' => $cart_key ), array( '%s' ) ); } return $wpdb->delete( $wpdb->prefix . 'wcss_shared_cart_meta', array( 'cart_key' => $cart_key, 'meta_key' => $meta_key, ), array( '%s', '%s', ) ); } /** * Delete all shared cart meta. * * @since 1.8.5 * * @return void */ function wcss_delete_all_shared_cart_meta() { global $wpdb; return $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}wcss_shared_cart_meta" ); }// Exit if accessed directly defined( 'ABSPATH' ) || exit; if ( ! function_exists( 'wcss_email_contact_media' ) ) { /** * Get email contact media. * * @return array */ function wcss_email_contact_media() { $contact_media = get_option( 'wcss_email_contact_media' ); $contact_media[0] = array( 'img' => WCSS_PLUGIN_URL . 'assets/images/email/email-facebook.png', 'link' => $contact_media['facebook'], ); $contact_media[1] = array( 'img' => WCSS_PLUGIN_URL . 'assets/images/email/email-instagram.png', 'link' => $contact_media['instagram'], ); $contact_media[2] = array( 'img' => WCSS_PLUGIN_URL . 'assets/images/email/email-twitter.png', 'link' => $contact_media['twitter'], ); $contact_media[3] = array( 'img' => WCSS_PLUGIN_URL . 'assets/images/email/email-whatsapp.png', 'link' => ( $contact_media['whatsapp'] ) ? '//wa.me/' . $contact_media['whatsapp'] : $contact_media['whatsapp'], ); // Unset default. if ( isset( $contact_media['facebook'] ) ) { unset( $contact_media['facebook'] ); } if ( isset( $contact_media['instagram'] ) ) { unset( $contact_media['instagram'] ); } if ( isset( $contact_media['twitter'] ) ) { unset( $contact_media['twitter'] ); } if ( isset( $contact_media['whatsapp'] ) ) { unset( $contact_media['whatsapp'] ); } return apply_filters( 'wcss_email_contact_media', $contact_media ); } } /** * Add inline style to email template HTML. * * @since 2.3.0 * * @param string $html Email template HTML. * @return string Inline CSS applied to HTML. */ function wcss_email_style_inline( $html ) { $css = apply_filters( 'wcss_email_css', wcss_get_template_html( 'email-cart/email-styles.php' ) ); /** * Return HTML with applied inline CSS. */ return wcss_apply_inline_styles( $html, $css ); } /** * Send cart email. * * This function is used to send cart email. * It cannot be called directly from the admin side; instead, please use an AJAX action to invoke this function in the admin area. * * @since 3.3.0 * * @param string $cart_key Cart key. * @param string $to Email to. Comma separated email addresses are allowed. * @param string $subject Optional. Email subject. * @param string $message Optional. Email message. * * @return void */ function wcss_send_cart_email( $cart_key, $to, $subject = '', $message = '' ) { if ( is_admin() && ! wp_doing_ajax() ) { _doing_it_wrong( __FUNCTION__, esc_html__( 'This function cannot be called directly from the admin side; instead, please use an AJAX action to invoke this function in the admin area.', 'woo-cart-share' ), '3.3.0' ); return; } $cart_key = sanitize_text_field( $cart_key ); /** * Before email cart send action. */ do_action( 'wcss_before_send_email_cart', $cart_key, $_POST ); /** * Filter email cart args. * * @since 3.3.0 * * @param array $args Email cart args. */ $args = apply_filters( 'wcss_email_cart_args', array( 'cart_key' => $cart_key, 'email_to' => sanitize_text_field( $to ), 'email_subject' => sanitize_text_field( $subject ), 'email_message' => wp_kses_post( $message ), ) ); // Deprecated `wcss_email_cart_form_post_data` filter hook. if ( has_filter( 'wcss_email_cart_form_post_data' ) ) { _deprecated_hook( 'wcss_email_cart_form_post_data', '3.3.0', 'wcss_email_cart_args' ); /** * Filter email cart form post data. * * @deprecated 3.3.0 Use `wcss_email_cart_args` filter hook instead. * * @param array $args Email cart args. */ $args = apply_filters( 'wcss_email_cart_form_post_data', $args ); } wcss_set_session_to_cart( $cart_key ); $email_body = wcss_get_template_html( 'email-cart/email-cart.php', array( 'cart_key' => $cart_key, 'message' => isset( $args['email_message'] ) ? $args['email_message'] : '', // Following variables were removed in plugin version 2.3.0 'brand_name' => get_option( 'wcss_email_brand_name' ), 'brand_logo_url' => get_option( 'wcss_email_brand_logo_url' ), 'retrieve_cart_button_text' => get_option( 'wcss_email_retrieve_cart_button_text' ), ) ); $email_from_name = apply_filters( 'wcss_email_from_name', get_option( 'wcss_email_from_name' ) ); $email_from_email = apply_filters( 'wcss_email_from_email', get_option( 'wcss_email_from_email' ) ); /** * Filter email cart headers. * * @since 1.9.1 * * @param array $headers Email cart header. * @return array Email cart header. */ $headers = apply_filters( 'wcss_email_cart_headers', array( 'Content-Type: text/html; charset=UTF-8', 'From: ' . esc_html( $email_from_name ) . ' <' . esc_html( $email_from_email ) . '>', ) ); /** * Filter email cart attachments. * * @since 3.3.0 * * @param array $attachments Email cart attachments. * @param string $cart_key Cart key. */ $attachments = apply_filters( 'wcss_email_cart_attachments', array(), $cart_key ); // Process and send emails. $emails = array_filter( array_map( 'trim', explode( ',', $args['email_to'] ) ), 'is_email' ); foreach ( $emails as $email ) { wp_mail( $email, $args['email_subject'], wcss_email_style_inline( $email_body ), $headers, $attachments ); } /** * After email cart send action. */ do_action( 'wcss_after_send_email_cart', $cart_key, $_POST ); }The Mosaic Mural Challenge exposes your students to the work of select artists that have inspired thought around environment stewardship, community, life, and the use of geometry to create paintings. Your students will use the Mosaic Mural toolkit and curriculum to gain a better understanding of geometry in art, working collaboratively in teams, and the power of creative expression in social action as they develop a solution.
Level | Elementary, Middle, High |
---|