/home/cp072267/public_html/dkrgroupholdings.com/wp-content/plugins/mystickymenu
NameSizeModeActions
admin/-0755rm
dist/-0755rm
images/-0755rm
languages/-0755rm
class-email-signup.php65630644editdlrm
class-help.php39980644editdlrm
class-review-box.php298180644editdlrm
class-upgrade-box.php138890644editdlrm
index.php260644editdlrm
mystickymenu-admin-widgetanalytics.php48230644editdlrm
mystickymenu-contact-leads.php16030644editdlrm
mystickymenu-deactivate-form.php88260644editdlrm
mystickymenu-fonts.php343960644editdlrm
mystickymenu-leads.php153920644editdlrm
mystickymenu-popup.php20370644editdlrm
mystickymenu-review-popup.php83850644editdlrm
mystickymenu.php749730644editdlrm
mystickymeny-new-welcomebar.php38090644editdlrm
readme.txt350970644editdlrm
recommended-plugins.php185500644editdlrm
uninstall.php1250644editdlrm
upgrade-to-pro.php535310644editdlrm
welcome-bar.php1245070644editdlrm
Edit: /home/cp072267/public_html/dkrgroupholdings.com/wp-content/plugins/mystickymenu/mystickymenu.php (74973B)
$widget_value ){ $element_widget_no = ''; if ( $key != 0 ) { $element_widget_no = '-' . $key; } delete_option( 'mysticky_option_welcomebar' . $element_widget_no ); } delete_option( 'mystickymenu-welcomebars' ); } wp_die(); } public function mystickymenu_delete_contact_lead(){ global $wpdb; if ( ! current_user_can( 'manage_options' ) ) { wp_die(0); } check_ajax_referer( 'mystickymenu', 'wpnonce' ); if ( isset($_POST['ID']) && $_POST['ID'] != '' ) { $ID = sanitize_text_field($_POST['ID']); $table = $wpdb->prefix . 'mystickymenu_contact_lists'; $delete_sql = $wpdb->prepare("DELETE FROM {$table} WHERE id = %d",$ID); $delete = $wpdb->query($delete_sql); } if ( isset($_POST['all_leads']) && $_POST['all_leads'] == 1 ) { $table = $wpdb->prefix . 'mystickymenu_contact_lists'; $delete = $wpdb->query("TRUNCATE TABLE $table"); } wp_die(); } public function my_sticky_menu_bulks(){ global $wpdb; if (!current_user_can('manage_options')) { wp_die(0); } check_ajax_referer( 'mystickymenu', 'wpnonce' ); if( isset($_POST['wpnonce']) ){ $bulks = isset($_POST['bulks']) ? $_POST['bulks'] : array(); foreach( $bulks as $key => $bulk ){ $ID = sanitize_text_field($bulk); $table = $wpdb->prefix . 'mystickymenu_contact_lists'; $delete_sql = $wpdb->prepare("DELETE FROM {$table} WHERE id = %d",$ID); $delete = $wpdb->query($delete_sql); } } wp_die(); } public function mystickymenu_admin_send_message_to_owner() { if (!current_user_can('manage_options')) { wp_die(0); } $response = array(); $response['status'] = 0; $response['error'] = 0; $response['errors'] = array(); $response['message'] = ""; $errorArray = []; $errorMessage = __("%1\$s is required", "mystickymenu"); $postData = $_POST; if(!isset($postData['textarea_text']) || trim($postData['textarea_text']) == "") { $error = array( "key" => "textarea_text", "message" => __("Please enter your message","mystickymenu") ); $errorArray[] = $error; } if(!isset($postData['user_email']) || trim($postData['user_email']) == "") { $error = array( "key" => "user_email", "message" => sprintf($errorMessage,__("Email","mystickymenu")) ); $errorArray[] = $error; } else if(!filter_var($postData['user_email'], FILTER_VALIDATE_EMAIL)) { $error = array( 'key' => "user_email", "message" => "Email is not valid" ); $errorArray[] = $error; } if(empty($errorArray)) { if(!isset($_REQUEST['nonce']) || empty($_REQUEST['nonce'])) { $error = array( 'key' => "nonce", "message" => "Your request is not valid" ); $errorArray[] = $error; } else if(!wp_verify_nonce($_REQUEST['nonce'], "mystickymenu_send_message_to_owner")) { $error = array( 'key' => "nonce", "message" => "Your request is not valid" ); $errorArray[] = $error; } } if(empty($errorArray)) { global $current_user; $text_message = $postData['textarea_text']; $email = $postData['user_email']; $domain = site_url(); $user_name = $current_user->first_name." ".$current_user->last_name; $response['status'] = 1; /* sending message to Crisp */ $post_message = array(); $message_data = array(); $message_data['key'] = "Plugin"; $message_data['value'] = "My Sticky Bar"; $post_message[] = $message_data; $message_data = array(); $message_data['key'] = "Domain"; $message_data['value'] = $domain; $post_message[] = $message_data; $message_data = array(); $message_data['key'] = "Email"; $message_data['value'] = $email; $post_message[] = $message_data; $message_data = array(); $message_data['key'] = "Message"; $message_data['value'] = $text_message; $post_message[] = $message_data; $api_params = array( 'domain' => $domain, 'email' => $email, 'url' => site_url(), 'name' => $user_name, 'message' => $post_message, 'plugin' => "My Sticky Bar", 'type' => "Need Help", ); /* Sending message to Crisp API */ $crisp_response = wp_safe_remote_post("https://premioapps.com/premio/send-message-api.php", array('body' => $api_params, 'timeout' => 15, 'sslverify' => true)); if (is_wp_error($crisp_response)) { wp_safe_remote_post("https://premioapps.com/premio/send-message-api.php", array('body' => $api_params, 'timeout' => 15, 'sslverify' => false)); } } else { $response['error'] = 1; $response['errors'] = $errorArray; } wp_send_json($response); wp_die(); } public function mystickymenu_settings_link($links){ $settings_link = ''.esc_html__('Settings', 'mystickymenu').''; $links['need_help'] = ''.esc_html__( 'Need help?', 'mystickymenu' ).''; $links['go_pro'] = ''.esc_html__( 'Upgrade', 'mystickymenu' ).''; array_unshift($links, $settings_link); return $links; } public function mystickymenu_activation_redirect( $plugin) { if( $plugin == plugin_basename( __FILE__ ) ) { $option = get_option("mystickymenu_intro_box"); if($option === false) { add_option("mystickymenu_intro_box", "show"); } if(!defined( 'DOING_AJAX' )) { add_option("msm_redirection", 1); } } } public function check_for_redirection() { if(!defined( 'DOING_AJAX' )) { $status = get_option("msm_redirection"); if($status) { delete_option("msm_redirection"); $welcomebar_widgets = get_option("mysticky_option_welcomebar"); if ($welcomebar_widgets) { wp_redirect(admin_url('admin.php?page=my-stickymenu-welcomebar')); } else { wp_redirect(admin_url('admin.php?page=my-stickymenu-welcomebar&widget=0')); } exit; } $page = isset($_GET['page']) ? sanitize_text_field($_GET['page']) : ''; if($page == 'my-sticky-menu-leads'){ $total_leads = $this->total_my_sticky_bar_contact_list(); // Total number of my sticky bar contact form leads $contact_form_channel_active = $this->is_welcomebar_contact_form_enabled(); // True if contact form is enabled, false otherwise if($total_leads == 0 && !$contact_form_channel_active){ wp_redirect(admin_url('admin.php?page=my-stickymenu-welcomebar')); exit; } } } } public function mysticky_admin_script($hook) { if ( !isset($_GET['page']) || ( isset($_GET['page']) && $_GET['page'] != 'my-stickymenu-settings' && $_GET['page'] != 'my-stickymenu-welcomebar' && $_GET['page'] != 'my-stickymenu-new-welcomebar' && $_GET['page'] != 'my-sticky-menu-analytics' && $_GET['page'] != 'my-stickymenu-upgrade' && $_GET['page'] != 'msm-recommended-plugins' && $_GET['page'] != 'my-sticky-menu-leads' )) { return; } wp_enqueue_style( 'mystickymenuAdminStyle', plugins_url("/dist/css/mystickymenu-admin.css", __FILE__), array(), MYSTICKY_VERSION ); wp_enqueue_style( 'mystickybar-style', plugins_url("/dist/css/mystickybar-admin.css", __FILE__), array(), MYSTICKY_VERSION ); wp_enqueue_style( 'mystickybar-app', plugins_url("/dist/css/app.css", __FILE__), array(), MYSTICKY_VERSION ); wp_enqueue_style( 'mystickymenuHelpStyle', plugins_url("/dist/css/mystickymenu-help.css", __FILE__), array(), MYSTICKY_VERSION ); wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_style( 'wp-jquery-ui-dialog' ); wp_enqueue_style('jquery-ui'); wp_enqueue_script('jquery-ui'); wp_enqueue_script('jquery-ui-slider'); wp_enqueue_script( 'jquery-ui-dialog' ); if ( isset($_GET['page']) && $_GET['page'] == 'my-stickymenu-upgrade' ) { wp_enqueue_script( 'my-select2', plugins_url('dist/js/select2.js', __FILE__ ), array( 'wp-color-picker' ), MYSTICKY_VERSION, ['strategy' => 'defer', 'in_footer'=> true ] ); wp_enqueue_style('my-css-select2', plugins_url('dist/css/select2.css', __FILE__), array(), MYSTICKY_VERSION ); wp_enqueue_style('stickymenu-pricing-table', plugins_url("/dist/css/pricing-table.css", __FILE__), [], MYSTICKY_VERSION); $queryArgs = [ 'family' => 'Poppins:wght@400;500;600;700&display=swap', 'subset' => 'latin,latin-ext', ]; wp_enqueue_style('google-poppins-fonts', add_query_arg($queryArgs, "//fonts.googleapis.com/css2"), [], MYSTICKY_VERSION); wp_enqueue_script('stickymenu-slick', plugins_url('/dist/js/slick.js', __FILE__), ['jquery'], MYSTICKY_VERSION, ['strategy' => 'defer', 'in_footer'=> true ]); } wp_enqueue_style("mystickyelements-star-rating-svg-css", plugins_url("/dist/css/star-rating-svg.css", __FILE__), [], MYSTICKY_VERSION ); wp_enqueue_script("mystickyelements-star-rating-svg-js", plugins_url('/dist/js/star-rating-svg.js', __FILE__), ['jquery'], MYSTICKY_VERSION, ['strategy' => 'defer', 'in_footer'=> true ]); wp_enqueue_script( 'morphext-js', plugins_url("/dist/js/morphext.js", __FILE__), array('jquery'), MYSTICKY_VERSION, ['strategy' => 'defer', 'in_footer'=> true ] ); wp_enqueue_script( 'mailcheck-js', plugins_url("/dist/js/mailcheck.js", __FILE__), ['jquery'], MYSTICKY_VERSION, true); wp_enqueue_script('autocomplete-email-js', plugins_url("/dist/js/email-autocomplete.js", __FILE__), ['jquery'], MYSTICKY_VERSION, true); wp_enqueue_script('mystickymenuAdminScript', plugins_url("/dist/js/mystickymenu-admin.js", __FILE__), array( 'jquery', 'jquery-ui-slider', 'wp-color-picker' ), MYSTICKY_VERSION,['strategy' => 'defer', 'in_footer'=> true ]); wp_enqueue_script('msb-app', plugins_url("/dist/js/app.js", __FILE__), array( 'jquery', 'jquery-ui-slider', 'wp-color-picker' ), MYSTICKY_VERSION,['strategy' => 'defer', 'in_footer'=> true ]); $locale_settings = array( 'ajaxurl' => admin_url('admin-ajax.php'), 'mystickymenu_url' => MYSTICKYMENU_URL, 'ajax_nonce' => wp_create_nonce('mystickymenu'), ); wp_localize_script('mystickymenuAdminScript', 'mystickymenu', $locale_settings); } public function mysticky_load_transl(){ load_plugin_textdomain('mystickymenu', FALSE, dirname(plugin_basename(__FILE__)).'/languages/'); } function sanitize_options($value) { $value = stripslashes($value); $value = sanitize_textarea_field($value); return $value; } public function add_plugin_page(){ if ( isset($_GET['hide_msmrecommended_plugin']) && $_GET['hide_msmrecommended_plugin'] == 1) { update_option('hide_msmrecommended_plugin',true); } $mysticky_option_welcomebar = get_option('mysticky_option_welcomebar'); $total_leads = $this->total_my_sticky_bar_contact_list(); // Total number of my sticky bar contact form leads $contact_form_channel_active = $this->is_welcomebar_contact_form_enabled(); // True if contact form is enabled, false otherwise $hide_msmrecommended_plugin = get_option('hide_msmrecommended_plugin'); // echo "
";
		// // print_r($total_leads);
		// print_r($contact_form_channel_active);
		// echo "
"; // exit; // This page will be under "Settings" add_menu_page( esc_html__('Settings Admin', 'mystickymenu'), esc_html__('My Sticky Bar', 'mystickymenu'), 'manage_options', 'my-stickymenu-welcomebar', array( $this, 'mystickystickymenu_admin_welcomebar_page' ) ); if(!empty($mysticky_option_welcomebar)) { add_submenu_page( 'my-stickymenu-welcomebar', esc_html__('Settings Admin', 'mystickymenu'), esc_html__('Dashboard', 'mystickymenu'), 'manage_options', 'my-stickymenu-welcomebar', array( $this, 'mystickystickymenu_admin_welcomebar_page' ) ); } add_submenu_page( 'my-stickymenu-welcomebar', esc_html__('Settings Admin', 'mystickymenu'), esc_html__('+ Create New Bar', 'mystickymenu'), 'manage_options', 'my-stickymenu-new-welcomebar', array( $this, 'mystickystickymenu_admin_new_welcomebar_page' ) ); if( class_exists( 'POPTIN_Plugin_Base' ) ) { add_submenu_page( 'my-stickymenu-welcomebar', esc_html__('Settings Admin', 'mystickymenu'), esc_html__('Poptin Popups', 'mystickymenu'), 'manage_options', 'manage-poptin-plugin', array( $this, 'mystickymenu_manage_poptin_plugin' ) ); } else { add_submenu_page( 'my-stickymenu-welcomebar', esc_html__('Settings Admin', 'mystickymenu'), esc_html__('Poptin Popups', 'mystickymenu'), 'manage_options', 'install-poptin-plugin', array( $this, 'mystickymenu_install_poptin_plugin' ) ); } add_submenu_page( 'my-stickymenu-welcomebar', esc_html__('Settings Admin', 'mystickymenu'), esc_html__('Widget Analytics', 'mystickymenu'), 'manage_options', 'my-sticky-menu-analytics', array( $this, 'mystickymenu_admin_widget_analytics_page' ) ); add_submenu_page( 'my-stickymenu-welcomebar', esc_html__('Settings Admin', 'mystickymenu'), esc_html__('Contact Form Leads', 'mystickymenu'), 'manage_options', 'my-sticky-menu-leads', array( $this, 'mystickymenu_admin_leads_page' ) ); add_submenu_page( 'my-stickymenu-welcomebar', esc_html__('Settings Admin', 'mystickymenu'), esc_html__('Sticky Menu Settings', 'mystickymenu'), 'manage_options', 'my-stickymenu-settings', array( $this, 'create_admin_page' ) ); if ( !$hide_msmrecommended_plugin){ add_submenu_page( 'my-stickymenu-welcomebar', 'msm-recommended-plugins', esc_html__('Recommended Plugins', 'mystickymenu'), 'manage_options', 'msm-recommended-plugins', array( $this, 'mystickymenu_recommended_plugins' ) ); } add_submenu_page( 'my-stickymenu-welcomebar', esc_html__('Upgrade to Pro ⭐️', 'mystickymenu'), esc_html__('Upgrade to Pro ⭐️', 'mystickymenu'), 'manage_options', 'my-stickymenu-upgrade', array( $this, 'mystickymenu_admin_upgrade_to_pro' ) ); } public function mystickymenu_admin_head(){ global $submenu; $parent_slug = 'my-stickymenu-welcomebar'; $welcomebar_widgets = get_option( 'mysticky_option_welcomebar' ); $total_leads = $this->total_my_sticky_bar_contact_list(); // Total number of my sticky bar contact form leads $contact_form_channel_active = $this->is_welcomebar_contact_form_enabled(); // True if contact form is enabled, false otherwise // echo "
";
		// print_r($submenu[$parent_slug]);
		// print_r($total_leads);
		// echo "
"; // exit; if (isset($submenu[$parent_slug])) { foreach ($submenu[$parent_slug] as &$item) { if (isset($item[2]) && $item[2] === 'my-sticky-menu-leads') { $item[4] = 'msb-admin-menu-leads'; // add your class here } if (isset($item[2]) && $item[2] === 'my-sticky-menu-leads') { $item[4] = 'msb-admin-menu-leads'; // add your class here } if (isset($item[2]) && $item[2] === 'my-stickymenu-new-welcomebar' && !empty($welcomebar_widgets)) { $item[4] = 'msb-admin-menu-upgrade'; // add your class here } } } ?> prefix . 'mystickymenu_contact_lists'; $total_leads = 0; // Check if table exists using prepared statement for security $table_check = $wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $tableName)); if ($table_check === $tableName) { // Use prepared statement with identifier placeholder for table name $total_leads = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM %i", $tableName)); $total_leads = absint($total_leads); } return $total_leads; } public function is_welcomebar_contact_form_enabled() { $welcomebar = get_option('mysticky_option_welcomebar', []); return !empty($welcomebar['mysticky_welcomebar_enable_lead']) && intval($welcomebar['mysticky_welcomebar_enable_lead']) === 1; } public function create_admin_page(){ $is_shown = myStickyMenu_SIGNUP_CLASS::check_modal_status(); if($is_shown) { include_once MYSTICKYMENU_PATH . 'admin/email-signup.php'; return; } $upgarde_url = admin_url("admin.php?page=my-stickymenu-upgrade"); // Set class property if (isset($_POST['mysticky_option_name']) && !empty($_POST['mysticky_option_name']) && isset($_POST['nonce'])) { if(!empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'mysticky_option_backend_update')) { $post = $_POST['mysticky_option_name']; foreach($post as $key=>$value) { $post[$key] = self::sanitize_options($value); } $post['device_desktop'] = 'on'; $post['device_mobile'] = 'on'; update_option( 'mysticky_option_name', $post); $this->mysticky_clear_all_caches(); if(isset($_POST['submit_dashboard']) && !empty($_POST['submit_dashboard'])) { ?>

' . esc_html__('Settings saved.','mystickymenu'). '

'; } else { wp_verify_nonce($_GET['nonce'], 'wporg_frontend_delete'); echo '

' . esc_html__('Unable to complete your request','mystickymenu'). '

'; } } $is_shown = myStickyMenu_SIGNUP_CLASS::check_modal_status(); if($is_shown) { include_once MYSTICKYMENU_PATH . 'admin/email-signup.php'; return; } else { $option = get_option("mystickymenu_intro_box"); if($option == "show") { include_once dirname(__FILE__) . "/mystickymenu-popup.php"; } include_once MYSTICKYMENU_PATH . 'admin/sticky-header-settings.php'; } } public function mystickystickymenu_admin_welcomebar_page() { $is_shown = myStickyMenu_SIGNUP_CLASS::check_modal_status(); if($is_shown) { include_once MYSTICKYMENU_PATH . 'admin/email-signup.php'; return; } /* DATE : 2022-08-04 Welcome bar save data function */ if (isset($_POST['mysticky_option_welcomebar']) && !empty($_POST['mysticky_option_welcomebar']) && isset($_POST['nonce'])) { if(!empty($_POST['nonce']) && wp_verify_nonce($_POST['nonce'], 'mysticky_option_welcomebar_update')) { $widgets = get_option( 'mysticky_option_welcomebar' ); $is_first_widget = 0; if( isset($widgets) && $widgets == '' ){ $is_first_widget = 1; } $welcomebars_widgets[0] = 'Bar #0'; update_option( 'mystickymenu-welcomebars', $welcomebars_widgets ); $mysticky_option_welcomebar = mysticky_bar_sanitize_options( $_POST['mysticky_option_welcomebar'] ); $allowed_tags = [ 'a' => array( 'href' => array(), 'title' => array(), 'rel' => array(), 'target' => array() ), 'p' => array( 'style' => array(), ), 'br' => array(), 'em' => array(), 'u' => array(), 'strong' => array(), ]; $mysticky_option_welcomebar['mysticky_welcomebar_bar_text'] = wp_kses(stripslashes($_POST['mysticky_option_welcomebar']['mysticky_welcomebar_bar_text']), $allowed_tags); $mysticky_option_welcomebar['mysticky_welcomebar_thankyou_screen_text'] = wp_kses(stripslashes($_POST['mysticky_option_welcomebar']['mysticky_welcomebar_thankyou_screen_text']) , $allowed_tags); $mysticky_option_welcomebar['mysticky_welcomebar_height'] = 60; $mysticky_option_welcomebar['mysticky_welcomebar_device_desktop'] = 'desktop'; $mysticky_option_welcomebar['mysticky_welcomebar_device_mobile'] = 'mobile'; $mysticky_option_welcomebar['mysticky_welcomebar_trigger'] = 'after_a_few_seconds'; $mysticky_option_welcomebar['mysticky_welcomebar_triggersec'] = '0'; $mysticky_option_welcomebar['mysticky_welcomebar_expirydate'] = ''; $mysticky_option_welcomebar['mysticky_welcomebar_page_settings'] = ''; $mysticky_option_welcomebar['mysticky_welcomebar_text_type'] = 'static_text'; $button_text = $_POST['mysticky_option_welcomebar']['mysticky_welcomebar_btn_text']; $mysticky_option_welcomebar['mysticky_welcomebar_btn_text'] = wp_kses(htmlspecialchars_decode(stripslashes($button_text)) , [ 'p' => array( 'style' => array(), ), 'br' => array(), 'em' => array(), 'span' => array( 'style' => array(), ), 'u' => array(), 'strong' => array(), 'underline' => array(), ]); update_option( 'mysticky_option_welcomebar', $mysticky_option_welcomebar); $this->mysticky_clear_all_caches(); $button = esc_html__('Save & View Dashboard', 'mystickymenu'); if(isset($_POST['submit']) && ( $_POST['submit'] == $button || $_POST['submit']== '' ) ){ if ( isset($is_first_widget) && $is_first_widget == 1 ) { ?>

' . esc_html__('Settings saved.','mystickymenu'). '

'; } else { wp_verify_nonce($_GET['nonce'], 'wporg_frontend_delete'); echo '

' . esc_html__('Unable to complete your request','mystickymenu'). '

'; } } if (isset($_POST['mysticky_welcomebar_reset']) && !empty($_POST['mysticky_welcomebar_reset']) && isset($_POST['nonce_reset'])) { if(!empty($_POST['nonce_reset']) && wp_verify_nonce($_POST['nonce_reset'], 'mysticky_option_welcomebar_reset')) { $mysticky_option_welcomebar_reset = mysticky_welcomebar_pro_widget_default_fields(); update_option( 'mysticky_option_welcomebar', $mysticky_option_welcomebar_reset); $this->mysticky_clear_all_caches(); echo '

' . esc_html__('Reset Settings saved.','mystickymenu'). '

'; } else { wp_verify_nonce($_GET['nonce'], 'wporg_frontend_delete'); echo '

' . esc_html__('Unable to complete your request','mystickymenu'). '

'; } } $mysticky_options = get_option( 'mysticky_option_name'); $is_old = get_option("has_sticky_header_old_version"); $is_old = ($is_old == "yes") ? true : false; $nonce = wp_create_nonce('mysticky_option_backend_update'); $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=2199&edd_options[price_id]="; ?>
slug != '' ) { $mysticky_class_id_selector = $menu_object->slug; } else { $mysticky_class_id_selector = 'custom'; } $mystickyClass = '.navbar'; $template_name = get_template(); switch( $template_name ){ case 'ashe': $mysticky_class_id_selector = 'custom'; $mystickyClass = '#main-nav'; break; case 'astra': case 'hello-elementor': case 'sydney': case 'twentysixteen': $mysticky_class_id_selector = 'custom'; $mystickyClass = 'header.site-header'; break; case 'generatepress': $mysticky_class_id_selector = 'custom'; $mystickyClass = 'nav.main-navigation'; break; case 'transportex': $mysticky_class_id_selector = 'custom'; $mystickyClass = '.transportex-menu-full'; break; case 'hestia': case 'neve': $mysticky_class_id_selector = 'custom'; $mystickyClass = 'header.header'; break; case 'mesmerize': $mysticky_class_id_selector = 'custom'; $mystickyClass = '.navigation-bar'; break; case 'oceanwp': $mysticky_class_id_selector = 'custom'; $mystickyClass = 'header#site-header'; break; case 'shapely': $mysticky_class_id_selector = 'custom'; $mystickyClass = '#site-navigation'; break; case 'storefront': $mysticky_class_id_selector = 'custom'; $mystickyClass = '.storefront-primary-navigation'; break; case 'twentynineteen': $mysticky_class_id_selector = 'custom'; $mystickyClass = '#site-navigation'; break; case 'twentyseventeen': $mysticky_class_id_selector = 'custom'; $mystickyClass = '.navigation-top'; break; default: break; } $default = array( 'mysticky_class_id_selector' => $mysticky_class_id_selector, 'mysticky_class_selector' => $mystickyClass, 'device_desktop' => 'on', 'device_mobile' => 'on', 'myfixed_zindex' => '99990', 'myfixed_bgcolor' => '#f7f5e7', 'myfixed_opacity' => '90', 'myfixed_transition_time' => '0.3', 'myfixed_disable_small_screen' => '0', 'myfixed_disable_large_screen' => '0', 'mysticky_active_on_height' => '0', 'mysticky_active_on_height_home'=> '0', 'myfixed_fade' => 'slide', 'myfixed_cssstyle' => '#mysticky-nav .myfixed { margin:0 auto; float:none; border:0px; background:none; max-width:100%; }' ); if ( get_option('mysticky_option_name') == false && current_user_can( 'manage_options' ) ) { $status = get_option("sticky_header_status"); if($status == false) { update_option("sticky_header_status", "done"); update_option("has_sticky_header_old_version", "no"); } update_option( 'mysticky_option_name', $default ); } else { $status = get_option("sticky_header_status"); if($status == false) { update_option("sticky_header_status", "done"); update_option("has_sticky_header_old_version", "yes"); } } if(isset($_POST['reset_mysticky_options']) && current_user_can( 'manage_options' )) { if(isset($_REQUEST['nonce']) && !empty($_REQUEST['nonce']) && wp_verify_nonce($_REQUEST['nonce'], 'mysticky_option_backend_reset_nonce')) { update_option('mysticky_option_name', $default); } else { } } if ( !get_option( 'update_mysticky_version_2_6') && current_user_can( 'manage_options' )) { $mysticky_option_name = get_option( 'mysticky_option_name' ); $mysticky_option_name['mysticky_class_id_selector'] = 'custom'; if ($mysticky_option_name['myfixed_fade'] == 'on'){ $mysticky_option_name['myfixed_fade'] = 'slide'; }else{ $mysticky_option_name['myfixed_fade'] = 'fade'; } update_option( 'mysticky_option_name', $mysticky_option_name ); update_option( 'update_mysticky_version_2_6', true ); } if ( !get_option( 'update_mysticky_version_2_5_7') && current_user_can( 'manage_options' )) { $mysticky_option_name = get_option( 'mysticky_option_name' ); $mysticky_option_name['stickymenu_enable'] = 1; update_option( 'mysticky_option_name', $mysticky_option_name ); update_option( 'update_mysticky_version_2_5_7', true ); } } /* * clear cache when any option is updated * */ public function mysticky_clear_all_caches(){ try { global $wp_fastest_cache; // if W3 Total Cache is being used, clear the cache if (function_exists('w3tc_flush_all')) { w3tc_flush_all(); } /* if WP Super Cache is being used, clear the cache */ if (function_exists('wp_cache_clean_cache')) { global $file_prefix, $supercachedir; if (empty($supercachedir) && function_exists('get_supercache_dir')) { $supercachedir = get_supercache_dir(); } wp_cache_clean_cache($file_prefix); } if (class_exists('WpeCommon')) { //be extra careful, just in case 3rd party changes things on us if (method_exists('WpeCommon', 'purge_memcached')) { //WpeCommon::purge_memcached(); } if (method_exists('WpeCommon', 'clear_maxcdn_cache')) { //WpeCommon::clear_maxcdn_cache(); } if (method_exists('WpeCommon', 'purge_varnish_cache')) { //WpeCommon::purge_varnish_cache(); } } if (method_exists('WpFastestCache', 'deleteCache') && !empty($wp_fastest_cache)) { $wp_fastest_cache->deleteCache(); } if (function_exists('rocket_clean_domain')) { rocket_clean_domain(); // Preload cache. if (function_exists('run_rocket_sitemap_preload')) { run_rocket_sitemap_preload(); } } if (class_exists("autoptimizeCache") && method_exists("autoptimizeCache", "clearall")) { autoptimizeCache::clearall(); } if (class_exists("LiteSpeed_Cache_API") && method_exists("autoptimizeCache", "purge_all")) { LiteSpeed_Cache_API::purge_all(); } if ( class_exists( '\Hummingbird\Core\Utils' ) ) { $modules = \Hummingbird\Core\Utils::get_active_cache_modules(); foreach ( $modules as $module => $name ) { $mod = \Hummingbird\Core\Utils::get_module( $module ); if ( $mod->is_active() ) { if ( 'minify' === $module ) { $mod->clear_files(); } else { $mod->clear_cache(); } } } } } catch (Exception $e) { return 1; } } public function mystickymenu_deactivate() { global $pagenow; if ( 'plugins.php' !== $pagenow ) { return; } include dirname(__FILE__) . "/mystickymenu-deactivate-form.php"; } public function mystickymenu_plugin_deactivate() { global $current_user; if ( ! current_user_can( 'manage_options' ) ) { wp_die(0); } check_ajax_referer( 'mystickymenu_deactivate_nonce', 'nonce' ); $postData = $_POST; $errorCounter = 0; $response = array(); $response['status'] = 0; $response['message'] = ""; $response['valid'] = 1; if(!isset($postData['reason']) || empty($postData['reason'])) { $errorCounter++; $response['message'] = "Please provide reason"; } else if(!isset($postData['reason']) || empty($postData['reason'])) { $errorCounter++; $response['message'] = "Please provide reason"; } else { $nonce = $postData['nonce']; if(!wp_verify_nonce($nonce, 'mystickymenu_deactivate_nonce')) { $response['message'] = __("Your request is not valid", "mystickymenu"); $errorCounter++; $response['valid'] = 0; } } if($errorCounter == 0) { global $current_user; $plugin_info = get_plugin_data( dirname(__FILE__) . "/mystickymenu.php" ); $postData = $_POST; $email = "none@none.none"; if (isset($postData['email_id']) && !empty($postData['email_id']) && filter_var($postData['email_id'], FILTER_VALIDATE_EMAIL)) { $email = $postData['email_id']; } $domain = site_url(); $user_name = $current_user->first_name . " " . $current_user->last_name; $response['status'] = 1; /* sending message to Crisp */ $post_message = array(); $message_data = array(); $message_data['key'] = "Plugin"; $message_data['value'] = "My Sticky Bar"; $post_message[] = $message_data; $message_data = array(); $message_data['key'] = "Plugin Version"; $message_data['value'] = $plugin_info['Version']; $post_message[] = $message_data; $message_data = array(); $message_data['key'] = "Domain"; $message_data['value'] = $domain; $post_message[] = $message_data; $message_data = array(); $message_data['key'] = "Email"; $message_data['value'] = $email; $post_message[] = $message_data; $message_data = array(); $message_data['key'] = "WordPress Version"; $message_data['value'] = esc_attr(get_bloginfo('version')); $post_message[] = $message_data; $message_data = array(); $message_data['key'] = "PHP Version"; $message_data['value'] = PHP_VERSION; $post_message[] = $message_data; $message_data = array(); $message_data['key'] = "Message"; $message_data['value'] = $postData['reason']; $post_message[] = $message_data; $api_params = array( 'domain' => $domain, 'email' => $email, 'url' => site_url(), 'name' => $user_name, 'message' => $post_message, 'plugin' => "My Sticky Bar", 'type' => "Uninstall", ); /* Sending message to Crisp API */ $crisp_response = wp_safe_remote_post("https://premioapps.com/premio/send-message-api.php", array('body' => $api_params, 'timeout' => 15, 'sslverify' => true)); if (is_wp_error($crisp_response)) { wp_safe_remote_post("https://premioapps.com/premio/send-message-api.php", array('body' => $api_params, 'timeout' => 15, 'sslverify' => false)); } } echo json_encode($response); wp_die(); } /* * * Mysticky Menu : Contact Lead function for show all the lead which send by user. * DATE : 2022-08-04 * */ public function mystickymenu_admin_leads_page(){ include_once MYSTICKYMENU_PATH . 'mystickymenu-leads.php'; } public function mystickymenu_review_box() { if (current_user_can('manage_options')) { $nonce = filter_input(INPUT_POST, 'nonce'); $days = filter_input(INPUT_POST, 'days'); if (!empty($nonce) && wp_verify_nonce($nonce, 'mystickymenu')) { if ($days == -1) { add_option("my-sticky-menu_hide_review_box", "1"); update_option("get_mystickybar_page_views", -1); } else { $date = date("Y-m-d", strtotime("+".$days." days")); update_option("my-sticky-menu_show_review_box_after", $date); update_option("get_mystickybar_page_views", 4); } } } wp_die(); } public function mystickymenu_review_box_message (){ if (current_user_can('manage_options')) { $nonce = filter_input(INPUT_POST, 'nonce'); if (!empty($nonce) && wp_verify_nonce($nonce, 'mystickymenu')) { add_option("my-sticky-menu_hide_review_box", "1"); update_option("get_mystickybar_page_views", -1); $rating = filter_input(INPUT_POST, 'rating'); $message = filter_input(INPUT_POST, 'message'); if ( $message != '' ) { global $current_user; $postMessage = []; $domain = site_url(); $user_name = $current_user->first_name." ".$current_user->last_name; $email = $current_user->user_email; $messageData = []; $messageData['key'] = "email"; $messageData['value'] = $email; $postMessage[] = $messageData; $messageData = []; $messageData['key'] = "website"; $messageData['value'] = $domain; $postMessage[] = $messageData; $messageData = []; $messageData['key'] = "message"; $messageData['value'] = $message; $postMessage[] = $messageData; $messageData = []; $messageData['key'] = "rating"; $messageData['value'] = $rating; $postMessage[] = $messageData; $apiParams = [ 'title' => 'Review for My Sticky Bar WordPress', 'domain' => $domain, 'email' => "contact@premio.io", 'url' => site_url(), 'name' => $user_name, 'message' => $postMessage, 'plugin' => 'My Sticky Bar', 'type' => "Review", ]; // Sending message to Crisp API $apiResponse = wp_safe_remote_post("https://premioapps.com/premio/send-feedback-api.php", ['body' => $apiParams, 'timeout' => 15, 'sslverify' => true]); if (is_wp_error($apiResponse)) { wp_safe_remote_post("https://premioapps.com/premio/send-feedback-api.php", ['body' => $apiParams, 'timeout' => 15, 'sslverify' => false]); } } } wp_die(); } } } class MyStickyMenuFrontend { public function __construct() { add_action( 'wp_head', array( $this, 'mysticky_build_stylesheet_content' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'mysticky_disable_at' ) ); add_action('wp_ajax_stickymenu_contact_lead_form', array($this, 'stickymenu_contact_lead_form')); add_action('wp_ajax_nopriv_stickymenu_contact_lead_form', array($this, 'stickymenu_contact_lead_form')); } public function mysticky_build_stylesheet_content() { $mysticky_options = get_option( 'mysticky_option_name' ); if (isset($mysticky_options['disable_css'])) { //do nothing } else { $mysticky_options['disable_css'] = false; } if ($mysticky_options ['disable_css'] == false ) { echo ''; $template_name = get_template(); ?> mystickymenu_google_fonts_url(), array(), MYSTICKY_VERSION); } } wp_enqueue_script( 'morphext-js', plugins_url("/dist/js/morphext.js", __FILE__), array('jquery'), MYSTICKY_VERSION, ['strategy' => 'defer', 'in_footer'=> true ] ); wp_register_script('welcomebar-frontjs', plugins_url("/dist/js/welcomebar-front.js", __FILE__), array( 'jquery', 'morphext-js' ), MYSTICKY_VERSION, ['strategy' => 'defer', 'in_footer'=> true ]); wp_enqueue_script('welcomebar-frontjs'); wp_localize_script( 'welcomebar-frontjs', 'welcomebar_frontjs', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) , 'days' => __( 'Days', 'mystickymenu' ), 'hours' => __( 'Hours', 'mystickymenu' ), 'minutes' => __( 'Minutes', 'mystickymenu' ), 'seconds' => __( 'Seconds', 'mystickymenu' ), 'ajax_nonce' => wp_create_nonce('mystickymenu'), ) ); wp_enqueue_style( 'msb-front', plugins_url("dist/css/mystickymenu-front.css", __FILE__), array(), MYSTICKY_VERSION ); if( !isset($mysticky_options['stickymenu_enable']) || isset($mysticky_options['stickymenu_enable']) && $mysticky_options['stickymenu_enable'] == 0){ return; } // needed for update 1.7 => 1.8 ... will be removed in the future () if (isset($mysticky_options['mysticky_active_on_height_home'])) { //do nothing } else { $mysticky_options['mysticky_active_on_height_home'] = $mysticky_options['mysticky_active_on_height']; } if ($mysticky_options['mysticky_active_on_height_home'] == 0 ) { $mysticky_options['mysticky_active_on_height_home'] = $mysticky_options['mysticky_active_on_height']; } if ( is_front_page() && is_home() ) { $mysticky_options['mysticky_active_on_height'] = $mysticky_options['mysticky_active_on_height_home']; } elseif ( is_front_page()){ $mysticky_options['mysticky_active_on_height'] = $mysticky_options['mysticky_active_on_height_home']; } wp_register_script('detectmobilebrowser', plugins_url( "dist/js/detectmobilebrowser.js", __FILE__ ), array('jquery'), MYSTICKY_VERSION, ['strategy' => 'defer', 'in_footer'=> true ]); wp_enqueue_script( 'detectmobilebrowser' ); wp_register_script( 'mystickymenu', plugins_url("/dist/js/mystickymenu.js", __FILE__), array('jquery'), MYSTICKY_VERSION, ['strategy' => 'defer', 'in_footer'=> true ] ); wp_enqueue_script( 'mystickymenu' ); $myfixed_disable_scroll_down = isset($mysticky_options['myfixed_disable_scroll_down']) ? esc_attr($mysticky_options['myfixed_disable_scroll_down']) : 'false'; $mystickyTransition = isset($mysticky_options['myfixed_fade']) ? esc_attr($mysticky_options['myfixed_fade']) : 'fade'; $mystickyDisableLarge = isset($mysticky_options['myfixed_disable_large_screen']) ? esc_attr($mysticky_options['myfixed_disable_large_screen']) : '0'; $mystickyClass = ( $mysticky_options['mysticky_class_id_selector'] != 'custom') ? '.menu-' . $mysticky_options['mysticky_class_id_selector'] .'-container' : $mysticky_options['mysticky_class_selector']; if ( $mysticky_options['mysticky_class_id_selector'] != 'custom' ) { $template_name = get_template(); switch( $template_name ){ case 'ashe': $mystickyClass = '#main-nav'; break; case 'astra': case 'hello-elementor': case 'sydney': case 'twentysixteen': $mystickyClass = 'header.site-header'; break; case 'generatepress': $mystickyClass = 'nav.main-navigation'; break; case 'transportex': $mystickyClass = '.transportex-menu-full'; break; case 'hestia': case 'neve': $mystickyClass = 'header.header'; break; case 'mesmerize': $mystickyClass = '.navigation-bar'; break; case 'oceanwp': $mystickyClass = 'header#site-header'; break; case 'shapely': $mystickyClass = '#site-navigation'; break; case 'storefront': $mystickyClass = '.storefront-primary-navigation'; break; case 'twentynineteen': $mystickyClass = '#site-navigation'; break; case 'twentyseventeen': $mystickyClass = '.navigation-top'; break; default: break; } } $mysticky_translation_array = array( 'mystickyClass' => $mystickyClass, 'activationHeight' => $mysticky_options['mysticky_active_on_height'], 'disableWidth' => $mysticky_options['myfixed_disable_small_screen'], 'disableLargeWidth' => $mystickyDisableLarge, 'adminBar' => $top, 'device_desktop' => true, 'device_mobile' => true, 'mystickyTransition' => $mystickyTransition, 'mysticky_disable_down' => $myfixed_disable_scroll_down, ); wp_localize_script( 'mystickymenu', 'option', $mysticky_translation_array ); } public function mysticky_disable_at() { $mysticky_options = get_option( 'mysticky_option_name' ); $mysticky_disable_at_front_home = isset($mysticky_options['mysticky_disable_at_front_home']); $mysticky_disable_at_blog = isset($mysticky_options['mysticky_disable_at_blog']); $mysticky_disable_at_page = isset($mysticky_options['mysticky_disable_at_page']); $mysticky_disable_at_tag = isset($mysticky_options['mysticky_disable_at_tag']); $mysticky_disable_at_category = isset($mysticky_options['mysticky_disable_at_category']); $mysticky_disable_at_single = isset($mysticky_options['mysticky_disable_at_single']); $mysticky_disable_at_archive = isset($mysticky_options['mysticky_disable_at_archive']); $mysticky_disable_at_search = isset($mysticky_options['mysticky_disable_at_search']); $mysticky_disable_at_404 = isset($mysticky_options['mysticky_disable_at_404']); $mysticky_enable_at_pages = isset($mysticky_options['mysticky_enable_at_pages']) ? esc_attr($mysticky_options['mysticky_enable_at_pages']) : ''; $mysticky_enable_at_posts = isset($mysticky_options['mysticky_enable_at_posts']) ? esc_attr($mysticky_options['mysticky_enable_at_posts']) : ''; // Trim input to ignore empty spaces $mysticky_enable_at_pages_exp = array_map('trim', explode(',', $mysticky_enable_at_pages)); $mysticky_enable_at_posts_exp = array_map('trim', explode(',', $mysticky_enable_at_posts)); if ( is_front_page() && is_home() ) { /* Default homepage */ if ( $mysticky_disable_at_front_home == false ) { $this->mystickymenu_script(); } } elseif ( is_front_page()){ /* Static homepage */ if ( $mysticky_disable_at_front_home == false ) { $this->mystickymenu_script(); } } elseif ( is_home()){ /* Blog page */ if ( $mysticky_disable_at_blog == false ) { $this->mystickymenu_script(); } } elseif ( is_page() ){ /* Single page*/ if ( $mysticky_disable_at_page == false ) { $this->mystickymenu_script(); } if ( is_page( $mysticky_enable_at_pages_exp ) ){ $this->mystickymenu_script(); } } elseif ( is_tag()){ /* Tag page */ if ( $mysticky_disable_at_tag == false ) { $this->mystickymenu_script(); } } elseif ( is_category()){ /* Category page */ if ( $mysticky_disable_at_category == false ) { $this->mystickymenu_script(); } } elseif ( is_single()){ /* Single post */ if ( $mysticky_disable_at_single == false ) { $this->mystickymenu_script(); } if ( is_single( $mysticky_enable_at_posts_exp ) ){ $this->mystickymenu_script(); } } elseif ( is_archive()){ /* Archive */ if ( $mysticky_disable_at_archive == false ) { $this->mystickymenu_script(); } } elseif ( is_search()){ /* Search */ if ( $mysticky_disable_at_search == false ) { $this->mystickymenu_script(); } } elseif ( is_404()){ /* 404 */ if ( $mysticky_disable_at_404 == false ) { $this->mystickymenu_script(); } } } /** * Mysticky Menu: Contact Form Lead Submission Function * DATE : 2022-08-04 * */ public function stickymenu_contact_lead_form(){ global $wpdb; global $wp; $stickymenus_widgets = get_option( 'mystickymenu-welcomebars' ); $errors = array(); $element_widget_no = $_POST['widget_id']; $element_widget_name = (isset($stickymenus_widgets[$element_widget_no]) && $stickymenus_widgets[$element_widget_no] != '' ) ? esc_html($stickymenus_widgets[$element_widget_no]) : ''; $flag = true; if( isset($element_widget_name) && $element_widget_name != ''){ if( !isset($_POST['contact_name']) || $_POST['contact_name'] == ''){ $error = array( 'key' => "contact-form-name", 'message' => __( "This field is required", "mystickymenu" ) ); $errors[] = $error; $flag = false; }else{ $contact_lists_table = $wpdb->prefix . 'mystickymenu_contact_lists'; $postArr = $_POST; if( $element_widget_no == 0 ){ $element_widget_no = ''; } $allowed_keys = ['contact_name', 'contact_email', 'contact_phone', 'page_link']; $params = []; foreach ($allowed_keys as $key) { if (isset($_POST[$key]) && $_POST[$key] !== '') { $params[$key] = sanitize_text_field($_POST[$key]); } } if(!empty($params)) { $params["widget_id"] = esc_sql(sanitize_text_field($element_widget_no)); $params["widget_name"] = esc_sql(sanitize_text_field($element_widget_name)); $params["message_date"] = date('Y-m-d H:i:s'); $params["contact_email"] = (isset($params["contact_email"]) && $params["contact_email"] != '') ? sanitize_email($params["contact_email"]) : ''; $wpdb->insert($contact_lists_table, $params); die; } } } if( $flag != true ){ echo json_encode(array("status" => 0, "error" => 1, "errors" => $errors, "message" => $errors['message'])); } die; } } new MyStickyMenuBackend(); new MyStickyMenuFrontend(); register_activation_hook( __FILE__, 'mystickymenu_activate' ); function mystickymenu_activate() { update_option( 'update_mysticky_version_2_5_7', true ); global $wpdb; require_once( ABSPATH . 'wp-admin/includes/upgrade.php'); $charset_collate = $wpdb->get_charset_collate(); $contact_lists_table = $wpdb->prefix . 'mystickymenu_contact_lists'; if ($wpdb->get_var("show tables like '$contact_lists_table'") != $contact_lists_table) { $contact_lists_table_sql = "CREATE TABLE $contact_lists_table ( ID int(11) NOT NULL AUTO_INCREMENT, widget_id INT(11) NULL, contact_name varchar(255) NULL, contact_phone varchar(255) NULL, contact_email varchar(255) NULL, widget_name varchar(255) NULL, page_link varchar(522) NULL, message_date DATETIME NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (ID) ) $charset_collate;"; dbDelta($contact_lists_table_sql); } } add_action( 'admin_init' , 'mystickymenu_admin_init' ); function mystickymenu_admin_init(){ global $wpdb; require_once( ABSPATH . 'wp-admin/includes/upgrade.php'); $charset_collate = $wpdb->get_charset_collate(); $contact_lists_table = $wpdb->prefix . 'mystickymenu_contact_lists'; if ($wpdb->get_var("show tables like '$contact_lists_table'") != $contact_lists_table) { $contact_lists_table_sql = "CREATE TABLE $contact_lists_table ( ID int(11) NOT NULL AUTO_INCREMENT, widget_id INT(11) NULL, contact_name varchar(255) NULL, contact_phone varchar(255) NULL, contact_email varchar(255) NULL, widget_name varchar(255) NULL, page_link varchar(522) NULL, message_date DATETIME NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (ID) ) $charset_collate;"; dbDelta($contact_lists_table_sql); } if(get_option('msb_cl_widget_id_exists', false) == false){ // Check if the column already exists $column_exists = $wpdb->get_results( $wpdb->prepare( "SHOW COLUMNS FROM $contact_lists_table LIKE %s", 'widget_id' ) ); if (empty($column_exists)) { update_option('msb_cl_widget_id_exists', true); $wpdb->query( "ALTER TABLE $contact_lists_table ADD COLUMN widget_id INT(11) NULL AFTER ID" ); } } } function mystickymenu_change_menu_text() { global $submenu; if(isset($submenu['my-stickymenu-welcomebar'])) { $totalItems = count($submenu['my-stickymenu-welcomebar'])-1; if(isset($submenu['my-stickymenu-welcomebar'][$totalItems][0])) { $submenu['my-stickymenu-welcomebar'][$totalItems][0] = ' '.esc_html__( 'Upgrade to Pro' , 'mystickymenu'); } } } add_action('admin_init', 'mystickymenu_change_menu_text'); add_action('admin_footer', 'mystickymenu_admin_footer_style'); function mystickymenu_admin_footer_style() { ?> $value) { if (is_array($value)) { $sanitized_array[$key] = mysticky_bar_sanitize_options( $value ); // Recursive call for nested arrays } else { switch ($key) { case 'sender_email': $sanitized_array[$key] = sanitize_email($value); break; case 'mysticky_welcomebar_redirect': $sanitized_array[$key] = sanitize_url($value); break; case 'mysticky_welcomebar_bar_text': case 'mysticky_welcomebar_thankyou_screen_text': $sanitized_array[$key] = sanitize_textarea_field($value); break; default: $sanitized_array[$key] = sanitize_text_field($value); } } } return $sanitized_array; }