File manager - Edit - /home/aresglob/public_html/wp/wp-includes/images/smilies/functions.php.tar
Back
home/aresglob/public_html/wp/wp-content/plugins/siteseo/functions.php 0000644 00000016501 15103441741 0022200 0 ustar 00 <?php /* * SITESEO * https://siteseo.io * (c) SiteSEO Team */ if(!defined('ABSPATH')){ die('HACKING ATTEMPT!'); } function siteseo_admin_header(){ \SiteSEO\Settings\Util::admin_header(); } function siteseo_submit_button($value = ''){ \SiteSEO\Settings\Util::submit_btn(); } function siteseo_suggestions_variable(){ return [ '%%sep%%' => 'Separator', '%%sitetitle%%' => 'Site Title', '%%tagline%%' => 'Tagline', '%%post_title%%' => 'Post title', '%%post_excerpt%%' => 'Post excerpt', '%%post_content%%' => 'Post content / product description', '%%post_thumbnail_url%%' => 'Post thumbnail URL', '%%post_url%%' => 'Post url', '%%post_date%%' => 'Post date', '%%post_modified_date%%' => 'Post modified date', '%%post_author%%' => 'Post author', '%%post_category%%' => 'Post category', '%%post_tag%%' => 'Post_tag', '%%_category_title%%' => 'Category title', '%%_category_description%%' => 'Category description', '%%tag_title%%' => 'Tag title', '%%tag_description%%' => 'Tag description', '%%term_title%%' => 'Term title', '%%tag_description%%' => 'Tag description', '%%term_title%%' => 'Term title', '%%term_description%%' => 'Term description', '%%search_keywords%%' => 'Search keywords', '%%current_pagination%%' => 'Current number page', '%%page%%' => 'Page number with context', '%%cpt_plural%%' => 'Plural Post Type Archive name', '%%archive_title%%' => 'Archive_title', '%%archive_date%%' => 'Archive_date', '%%archive_date_day%%' => 'Day Archive date', '%%archive_date_month%%' => 'Month Archive title', '%%archive_date_month_name%%' => 'Month name Archive title', '%%archive_date_year%%' => 'Year Archive title', '%%_cf_your_custom_field_name%%' => 'Custom fields from post, page, post type and term taxonomy', '%%_ct_your_custom_taxonomy_slug%%' => 'Custom term taxonomy from post, page or post type', '%%wc_single_cat%%' => 'Single product category', '%%wc_single_tag%%' => 'Single product tag', '%%wc_single_short_desc%%' => 'Single product short description', '%%wc_single_price%%' => 'Single product price', '%%wc_single_price_exe_tax' => 'Single product price taxes excluded', '%%wc_sku%%' => 'Single SKU Product', '%%currentday%%' => 'Current day', '%%currentmonth%%' => 'Current month', '%%currentmonth_short%%' => 'Current month in 3 letter', '%%currentyear%%' => 'Current year', '%%currentdate%%' => 'Current date', '%%currenttime%%' => 'Current time', '%%author_first_name%%' => 'Author first name', '%%author_last_name%%' => 'Author last name', '%%author_website%%' => 'Author website', '%%author_nickname%%' => 'Author nickname', '%%author_bio%%' => 'Author biography', '%%_ucf_your_user_meta%%' => 'Custom User Meta', '%%currentmonth_num%%' => 'Current month in digital format', '%%target_keyword%%' => 'Target keywords', ]; } function siteseo_suggestion_button(){ $suggest_variable = siteseo_suggestions_variable(); if(empty($suggest_variable)){ return; } echo '<button class="tag-select-btn"><span id="icon" class="dashicons dashicons-arrow-down-alt2"></span></button> <div class="siteseo-suggestions-wrapper" style="position:relative;"> <div class="siteseo-suggetion"> <div class="search-box-container"> <input type="text" class="search-box" placeholder="Search a tag..."> </div> <div class="suggestions-container">'; foreach($suggest_variable as $key =>$value){ echo '<div class="section">'.esc_html($value).' <div class="item"> <div class="tag">'.esc_html($key).'</div> </div> </div>'; } echo '</div> </div> </div>'; } function siteseo_suggestion_button_metabox(){ $suggest_variable = siteseo_suggestions_variable(); if(empty($suggest_variable)){ return; } return '<button class="siteseo-tag-select-btn" type="button"> <span id="icon" class="dashicons dashicons-arrow-down-alt2"></span> </button> <div class="siteseo-suggestions-wrapper" style="position:relative;"> <div class="siteseo-suggetion"> <div class="siteseo-search-box-container"> <input type="text" class="search-box" placeholder="Search a tag..."> </div> <div class="siteseo-suggestions-container">' . implode('', array_map(function($key, $value){ return '<div class="section">'.esc_html($value).' <div class="item"> <div class="tag">'.esc_html($key).'</div> </div> </div>'; }, array_keys($suggest_variable), $suggest_variable)). '</div> </div> </div>'; } function siteseo_get_docs_links(){ $siteseo_docs = []; $siteseo_docs = [ 'page_speed' => [ 'api' => SITESEO_DOCS . 'api-cli-dev/add-your-google-page-speed-insights-api-key-to-siteseo/', 'google' => 'https://console.cloud.google.com/apis/library/pagespeedonline.googleapis.com', ] ]; return $siteseo_docs; } function siteseo_universal_assets(){ global $siteseo, $post; $post_id = isset($post->ID) ? $post->ID : get_the_ID(); if(!current_user_can('edit_post', $post_id)){ return; } // Checking if it is a block editor if(function_exists('get_current_screen')){ $screen = get_current_screen(); if(!empty($screen) && method_exists($screen, 'is_block_editor') && $screen->is_block_editor() === true){ if(empty($siteseo->advanced_settings['appearance_universal_metabox'])){ return; } $is_gutenberg = true; } } if ( !empty($is_gutenberg) || isset($_GET['fl_builder']) || isset($_GET['elementor-preview']) || isset($_GET['ct_builder']) || isset($_GET['vc_editable']) || isset($_GET['brizy_edit']) || isset($_GET['tve']) || isset($_GET['pagelayer-live']) || (!empty(get_queried_object_id()) && is_admin_bar_showing()) // To show when user is viewing the page as a admin ) { wp_enqueue_script('siteseo-universal-metabox', SITESEO_ASSETS_URL . '/js/universal-metabox.js', ['jquery'], SITESEO_VERSION); wp_localize_script('siteseo-universal-metabox', 'siteseo_universal', [ 'asset_url' => SITESEO_ASSETS_URL, 'post_id' => $post_id, 'site_url' => site_url(), 'metabox_url' => admin_url('admin.php?page=siteseo-metabox-wizard'), ]); } } function siteseo_post_types(){ $args = ['show_ui' => true, 'public' => true]; $post_types = get_post_types($args, 'objects', 'and'); unset( $post_types['attachment'], $post_types['elementor_library'], $post_types['customer_discount'], $post_types['cuar_private_file'], $post_types['cuar_private_page'], $post_types['ct_template'], $post_types['e-floating-buttons'], $post_types['pagelayer-template'], $post_types['hostim_footer'], $post_types['mega_menu'] ); return apply_filters('siteseo_post_types', $post_types); } function siteseo_user_can($cap){ return current_user_can('manage_options') || current_user_can('siteseo_'. $cap); } function siteseo_user_can_metabox(){ if(!is_user_logged_in()){ return false; } global $siteseo; $metabox_roles = !empty($siteseo->advanced_settings['security_metaboxe_role']) ? $siteseo->advanced_settings['security_metaboxe_role'] : []; $user = wp_get_current_user(); $user_role = current($user->roles); if(array_key_exists($user_role, $metabox_roles)){ return false; } return true; } function siteseo_remove_elementor_description_meta_tag(){ remove_action('wp_head', 'hello_elementor_add_description_meta_tag'); } home/aresglob/public_html/wp/wp-content/themes/astra/functions.php 0000644 00000021273 15103474276 0021456 0 ustar 00 <?php /** * Astra functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package Astra * @since 1.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Define Constants */ define( 'ASTRA_THEME_VERSION', '4.11.7' ); define( 'ASTRA_THEME_SETTINGS', 'astra-settings' ); define( 'ASTRA_THEME_DIR', trailingslashit( get_template_directory() ) ); define( 'ASTRA_THEME_URI', trailingslashit( esc_url( get_template_directory_uri() ) ) ); define( 'ASTRA_THEME_ORG_VERSION', file_exists( ASTRA_THEME_DIR . 'inc/w-org-version.php' ) ); /** * Minimum Version requirement of the Astra Pro addon. * This constant will be used to display the notice asking user to update the Astra addon to the version defined below. */ define( 'ASTRA_EXT_MIN_VER', '4.11.5' ); /** * Load in-house compatibility. */ if ( ASTRA_THEME_ORG_VERSION ) { require_once ASTRA_THEME_DIR . 'inc/w-org-version.php'; } /** * Setup helper functions of Astra. */ require_once ASTRA_THEME_DIR . 'inc/core/class-astra-theme-options.php'; require_once ASTRA_THEME_DIR . 'inc/core/class-theme-strings.php'; require_once ASTRA_THEME_DIR . 'inc/core/common-functions.php'; require_once ASTRA_THEME_DIR . 'inc/core/class-astra-icons.php'; define( 'ASTRA_WEBSITE_BASE_URL', 'https://wpastra.com' ); /** * ToDo: Deprecate constants in future versions as they are no longer used in the codebase. */ define( 'ASTRA_PRO_UPGRADE_URL', ASTRA_THEME_ORG_VERSION ? astra_get_pro_url( '/pricing/', 'free-theme', 'dashboard', 'upgrade' ) : 'https://woocommerce.com/products/astra-pro/' ); define( 'ASTRA_PRO_CUSTOMIZER_UPGRADE_URL', ASTRA_THEME_ORG_VERSION ? astra_get_pro_url( '/pricing/', 'free-theme', 'customizer', 'upgrade' ) : 'https://woocommerce.com/products/astra-pro/' ); /** * Update theme */ require_once ASTRA_THEME_DIR . 'inc/theme-update/astra-update-functions.php'; require_once ASTRA_THEME_DIR . 'inc/theme-update/class-astra-theme-background-updater.php'; /** * Fonts Files */ require_once ASTRA_THEME_DIR . 'inc/customizer/class-astra-font-families.php'; if ( is_admin() ) { require_once ASTRA_THEME_DIR . 'inc/customizer/class-astra-fonts-data.php'; } require_once ASTRA_THEME_DIR . 'inc/lib/webfont/class-astra-webfont-loader.php'; require_once ASTRA_THEME_DIR . 'inc/lib/docs/class-astra-docs-loader.php'; require_once ASTRA_THEME_DIR . 'inc/customizer/class-astra-fonts.php'; require_once ASTRA_THEME_DIR . 'inc/dynamic-css/custom-menu-old-header.php'; require_once ASTRA_THEME_DIR . 'inc/dynamic-css/container-layouts.php'; require_once ASTRA_THEME_DIR . 'inc/dynamic-css/astra-icons.php'; require_once ASTRA_THEME_DIR . 'inc/core/class-astra-walker-page.php'; require_once ASTRA_THEME_DIR . 'inc/core/class-astra-enqueue-scripts.php'; require_once ASTRA_THEME_DIR . 'inc/core/class-gutenberg-editor-css.php'; require_once ASTRA_THEME_DIR . 'inc/core/class-astra-wp-editor-css.php'; require_once ASTRA_THEME_DIR . 'inc/dynamic-css/block-editor-compatibility.php'; require_once ASTRA_THEME_DIR . 'inc/dynamic-css/inline-on-mobile.php'; require_once ASTRA_THEME_DIR . 'inc/dynamic-css/content-background.php'; require_once ASTRA_THEME_DIR . 'inc/dynamic-css/dark-mode.php'; require_once ASTRA_THEME_DIR . 'inc/class-astra-dynamic-css.php'; require_once ASTRA_THEME_DIR . 'inc/class-astra-global-palette.php'; // Enable NPS Survey only if the starter templates version is < 4.3.7 or > 4.4.4 to prevent fatal error. if ( ! defined( 'ASTRA_SITES_VER' ) || version_compare( ASTRA_SITES_VER, '4.3.7', '<' ) || version_compare( ASTRA_SITES_VER, '4.4.4', '>' ) ) { // NPS Survey Integration require_once ASTRA_THEME_DIR . 'inc/lib/class-astra-nps-notice.php'; require_once ASTRA_THEME_DIR . 'inc/lib/class-astra-nps-survey.php'; } /** * Custom template tags for this theme. */ require_once ASTRA_THEME_DIR . 'inc/core/class-astra-attr.php'; require_once ASTRA_THEME_DIR . 'inc/template-tags.php'; require_once ASTRA_THEME_DIR . 'inc/widgets.php'; require_once ASTRA_THEME_DIR . 'inc/core/theme-hooks.php'; require_once ASTRA_THEME_DIR . 'inc/admin-functions.php'; require_once ASTRA_THEME_DIR . 'inc/core/sidebar-manager.php'; /** * Markup Functions */ require_once ASTRA_THEME_DIR . 'inc/markup-extras.php'; require_once ASTRA_THEME_DIR . 'inc/extras.php'; require_once ASTRA_THEME_DIR . 'inc/blog/blog-config.php'; require_once ASTRA_THEME_DIR . 'inc/blog/blog.php'; require_once ASTRA_THEME_DIR . 'inc/blog/single-blog.php'; /** * Markup Files */ require_once ASTRA_THEME_DIR . 'inc/template-parts.php'; require_once ASTRA_THEME_DIR . 'inc/class-astra-loop.php'; require_once ASTRA_THEME_DIR . 'inc/class-astra-mobile-header.php'; /** * Functions and definitions. */ require_once ASTRA_THEME_DIR . 'inc/class-astra-after-setup-theme.php'; // Required files. require_once ASTRA_THEME_DIR . 'inc/core/class-astra-admin-helper.php'; require_once ASTRA_THEME_DIR . 'inc/schema/class-astra-schema.php'; /* Setup API */ require_once ASTRA_THEME_DIR . 'admin/includes/class-astra-api-init.php'; if ( is_admin() ) { /** * Admin Menu Settings */ require_once ASTRA_THEME_DIR . 'inc/core/class-astra-admin-settings.php'; require_once ASTRA_THEME_DIR . 'admin/class-astra-admin-loader.php'; require_once ASTRA_THEME_DIR . 'inc/lib/astra-notices/class-astra-notices.php'; } /** * Metabox additions. */ require_once ASTRA_THEME_DIR . 'inc/metabox/class-astra-meta-boxes.php'; require_once ASTRA_THEME_DIR . 'inc/metabox/class-astra-meta-box-operations.php'; require_once ASTRA_THEME_DIR . 'inc/metabox/class-astra-elementor-editor-settings.php'; /** * Customizer additions. */ require_once ASTRA_THEME_DIR . 'inc/customizer/class-astra-customizer.php'; /** * Astra Modules. */ require_once ASTRA_THEME_DIR . 'inc/modules/posts-structures/class-astra-post-structures.php'; require_once ASTRA_THEME_DIR . 'inc/modules/related-posts/class-astra-related-posts.php'; /** * Compatibility */ require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-gutenberg.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-jetpack.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/woocommerce/class-astra-woocommerce.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/edd/class-astra-edd.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/lifterlms/class-astra-lifterlms.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/learndash/class-astra-learndash.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-beaver-builder.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-bb-ultimate-addon.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-contact-form-7.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-visual-composer.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-site-origin.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-gravity-forms.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-bne-flyout.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-ubermeu.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-divi-builder.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-amp.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-yoast-seo.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/surecart/class-astra-surecart.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-starter-content.php'; require_once ASTRA_THEME_DIR . 'inc/addons/transparent-header/class-astra-ext-transparent-header.php'; require_once ASTRA_THEME_DIR . 'inc/addons/breadcrumbs/class-astra-breadcrumbs.php'; require_once ASTRA_THEME_DIR . 'inc/addons/scroll-to-top/class-astra-scroll-to-top.php'; require_once ASTRA_THEME_DIR . 'inc/addons/heading-colors/class-astra-heading-colors.php'; require_once ASTRA_THEME_DIR . 'inc/builder/class-astra-builder-loader.php'; // Elementor Compatibility requires PHP 5.4 for namespaces. if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) { require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-elementor.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-elementor-pro.php'; require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-web-stories.php'; } // Beaver Themer compatibility requires PHP 5.3 for anonymous functions. if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) { require_once ASTRA_THEME_DIR . 'inc/compatibility/class-astra-beaver-themer.php'; } require_once ASTRA_THEME_DIR . 'inc/core/markup/class-astra-markup.php'; /** * Load deprecated functions */ require_once ASTRA_THEME_DIR . 'inc/core/deprecated/deprecated-filters.php'; require_once ASTRA_THEME_DIR . 'inc/core/deprecated/deprecated-hooks.php'; require_once ASTRA_THEME_DIR . 'inc/core/deprecated/deprecated-functions.php'; home/aresglob/public_html/wp/wp-content/plugins/gosmtp-pro/functions.php 0000644 00000025114 15103714564 0022642 0 ustar 00 <?php /* * gosmtp * https://gosmtp.net * (c) Softaculous Team */ // Are we being accessed directly ? if(!defined('GOSMTP_PRO_VERSION')) { exit('Hacking Attempt !'); } function gosmtp_pro_activation(){ update_option('gosmtp_pro_version', GOSMTP_PRO_VERSION); } function gosmtp_pro_is_network_active($plugin_name){ $is_network_wide = false; // Handling network site if(!is_multisite()){ return $is_network_wide; } $_tmp_plugins = get_site_option('active_sitewide_plugins'); if(!empty($_tmp_plugins) && preg_grep('/.*\/'.$plugin_name.'\.php$/', array_keys($_tmp_plugins))){ $is_network_wide = true; } return $is_network_wide; } function gosmtp_pro_update_checker(){ $current_version = get_option('gosmtp_pro_version', '0.0'); $version = (int) str_replace('.', '', $current_version); // No update required if($current_version == GOSMTP_PRO_VERSION){ return true; } $is_network_wide = gosmtp_pro_is_network_active('gosmtp-pro'); if($is_network_wide){ $free_ins = get_site_option('gosmtp_free_installed'); }else{ $free_ins = get_option('gosmtp_free_installed'); } // If plugin runing reached here it means GoSMTP free installed if(empty($free_ins)){ if($is_network_wide){ update_site_option('gosmtp_free_installed', time()); }else{ update_option('gosmtp_free_installed', time()); } } update_option('gosmtp_version_pro_nag', time()); update_option('gosmtp_version_free_nag', time()); update_option('gosmtp_pro_version', GOSMTP_PRO_VERSION); } // Load license data function gosmtp_pro_load_license($parent = 0){ global $gosmtp, $lic_resp; $license_field = 'gosmtp_license'; $license_api_url = GOSMTP_API; // Save license if(!empty($parent) && is_string($parent) && strlen($parent) > 5){ $lic['license'] = $parent; // Load license of Soft Pro }elseif(!empty($parent)){ $license_field = 'softaculous_pro_license'; $lic = get_option('softaculous_pro_license', []); // My license }else{ $lic = get_option($license_field, []); } // Loaded license is a Soft Pro if(!empty($lic['license']) && preg_match('/^softwp/is', $lic['license'])){ $license_field = 'softaculous_pro_license'; $license_api_url = 'https://a.softaculous.com/softwp/'; $prods = apply_filters('softaculous_pro_products', []); }else{ $prods = []; } if(empty($lic['last_update'])){ $lic['last_update'] = time() - 86600; } // Update license details as well if(!empty($lic) && !empty($lic['license']) && (time() - @$lic['last_update']) >= 86400){ $url = $license_api_url.'/license.php?license='.$lic['license'].'&prods='.implode(',', $prods).'&url='.rawurlencode(site_url()); $resp = wp_remote_get($url); $lic_resp = $resp; //Did we get a response ? if(is_array($resp)){ $tosave = json_decode($resp['body'], true); //Is it the license ? if(!empty($tosave['license'])){ $tosave['last_update'] = time(); update_option($license_field, $tosave); $lic = $tosave; } } } // If the license is Free or Expired check for Softaculous Pro license if(empty($lic) || empty($lic['active'])){ if(function_exists('softaculous_pro_load_license')){ $softaculous_license = softaculous_pro_load_license(); if(!empty($softaculous_license['license']) && (!empty($softaculous_license['active']) || empty($lic['license'])) ){ $lic = $softaculous_license; } }elseif(empty($parent)){ $soft_lic = get_option('softaculous_pro_license', []); if(!empty($soft_lic)){ return gosmtp_pro_load_license(1); } } } if(!empty($lic['license'])){ $gosmtp->license = $lic; } } add_filter('softaculous_pro_products', 'gosmtp_softaculous_pro_products', 10, 1); function gosmtp_softaculous_pro_products($r = []){ $r['gosmtp'] = 'gosmtp'; return $r; } // Add our license key if ANY function gosmtp_pro_updater_filter_args($queryArgs){ global $gosmtp; if (!empty($gosmtp->license['license'])){ $queryArgs['license'] = $gosmtp->license['license']; } $queryArgs['url'] = rawurlencode(site_url()); return $queryArgs; } // Handle the Check for update link and ask to install license key function gosmtp_pro_updater_check_link($final_link){ global $gosmtp; if(empty($gosmtp->license['license'])){ return '<a href="'.admin_url('admin.php?page=gosmtp-license').'">Install GoSMTP Pro License Key</a>'; } return $final_link; } // Prevent update of gosmtp free function gosmtp_pro_get_free_version_num(){ if(defined('GOSMTP_VERSION')){ return GOSMTP_VERSION; } // In case of gosmtp deactive return gosmtp_pro_file_get_version_num('gosmtp/gosmtp.php'); } // Prevent update of gosmtp free function gosmtp_pro_file_get_version_num($plugin){ // In case of gosmtp deactive include_once(ABSPATH . 'wp-admin/includes/plugin.php'); $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/'.$plugin); if(empty($plugin_data)){ return false; } return $plugin_data['Version']; } // Prevent update of gosmtp free function gosmtp_pro_disable_manual_update_for_plugin($transient){ $plugin = 'gosmtp/gosmtp.php'; // Is update available? if(!isset($transient->response) || !isset($transient->response[$plugin])){ return $transient; } $free_version = gosmtp_pro_get_free_version_num(); $pro_version = GOSMTP_PRO_VERSION; if(!empty($GLOBALS['gosmtp_pro_is_upgraded'])){ $pro_version = gosmtp_pro_file_get_version_num('gosmtp-pro/gosmtp-pro.php'); } // Update the gosmtp version to the equivalent of Pro version if(!empty($pro_version) && version_compare($free_version, $pro_version, '<')){ $transient->response[$plugin]->new_version = $pro_version; $transient->response[$plugin]->package = 'https://downloads.wordpress.org/plugin/gosmtp.'.$pro_version.'.zip'; }else{ unset($transient->response[$plugin]); } return $transient; } // Auto update free version after update pro version function gosmtp_pro_update_free_after_pro($upgrader_object, $options){ // Check if the action is an update for the plugins if($options['action'] != 'update' || $options['type'] != 'plugin'){ return; } // Define the slugs for the free and pro plugins $free_slug = 'gosmtp/gosmtp.php'; $pro_slug = 'gosmtp-pro/gosmtp-pro.php'; // Check if the pro plugin is in the list of updated plugins if( (isset($options['plugins']) && in_array($pro_slug, $options['plugins']) && !in_array($free_slug, $options['plugins'])) || (isset($options['plugin']) && $pro_slug == $options['plugin']) ){ // Trigger the update for the free plugin $current_version = gosmtp_pro_get_free_version_num(); if(empty($current_version)){ return; } $GLOBALS['gosmtp_pro_is_upgraded'] = true; // This will set the 'update_plugins' transient again wp_update_plugins(); // Check for updates for the free plugin $update_plugins = get_site_transient('update_plugins'); if(empty($update_plugins) || !isset($update_plugins->response[$free_slug]) || version_compare($update_plugins->response[$free_slug]->new_version, $current_version, '<=')){ return; } require_once(ABSPATH . 'wp-admin/includes/plugin.php'); require_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'); $skin = wp_doing_ajax()? new WP_Ajax_Upgrader_Skin() : null; $upgrader = new Plugin_Upgrader($skin); $upgraded = $upgrader->upgrade($free_slug); if(!is_wp_error($upgraded) && $upgraded){ // Re-active free plugins if( file_exists( WP_PLUGIN_DIR . '/'. $free_slug ) && is_plugin_inactive($free_slug) ){ activate_plugin($free_slug); // TODO for network } // Re-active pro plugins if( file_exists( WP_PLUGIN_DIR . '/'. $pro_slug ) && is_plugin_inactive($pro_slug) ){ activate_plugin($pro_slug); // TODO for network } } } } function gosmtp_pro_api_url($main_server = 0, $suffix = 'gosmtp'){ global $gosmtp; $r = array( 'https://s0.softaculous.com/a/softwp/', 'https://s1.softaculous.com/a/softwp/', 'https://s2.softaculous.com/a/softwp/', 'https://s3.softaculous.com/a/softwp/', 'https://s4.softaculous.com/a/softwp/', 'https://s5.softaculous.com/a/softwp/', 'https://s7.softaculous.com/a/softwp/', 'https://s8.softaculous.com/a/softwp/' ); $mirror = $r[array_rand($r)]; // If the license is newly issued, we need to fetch from API only if(!empty($main_server) || empty($gosmtp->license['last_edit']) || (!empty($gosmtp->license['last_edit']) && (time() - 3600) < $gosmtp->license['last_edit']) ){ $mirror = GOSMTP_API; } if(!empty($suffix)){ $mirror = str_replace('/softwp', '/'.$suffix, $mirror); } return $mirror; } function gosmtp_pro_plugins_expired($plugins){ $plugins[] = 'GoSMTP'; return $plugins; } function gosmtp_pro_expiry_notice(){ global $gosmtp; // The combined notice for all Softaculous plugin to show that the license has expired $dismissed_at = get_option('softaculous_expired_licenses', 0); $expired_plugins = apply_filters('softaculous_expired_licenses', []); if( !empty($expired_plugins) && is_array($expired_plugins) && !defined('SOFTACULOUS_EXPIRY_LICENSES') && (empty($dismissed_at) || ($dismissed_at + WEEK_IN_SECONDS) < time()) ){ define('SOFTACULOUS_EXPIRY_LICENSES', true); // To make sure other plugins don't return a Notice echo '<div class="notice notice-error is-dismissible" id="gosmtp-pro-expiry-notice"> <p>'.sprintf(__('Your SoftWP license has %1$sexpired%2$s. Please renew it to continue receiving uninterrupted updates and support for %3$s.', 'gosmtp-pro'), '<font style="color:red;"><b>', '</b></font>', esc_html(implode(', ', $expired_plugins)) ). '</p> </div>'; wp_register_script('gosmtp-pro-expiry-notice', '', ['jquery'], GOSMTP_PRO_VERSION, true); wp_enqueue_script('gosmtp-pro-expiry-notice'); wp_add_inline_script('gosmtp-pro-expiry-notice', ' jQuery(document).ready(function(){ jQuery("#gosmtp-pro-expiry-notice").on("click", ".notice-dismiss", function(e){ e.preventDefault(); let target = jQuery(e.target); let jEle = target.closest("#gosmtp-pro-expiry-notice"); jEle.slideUp(); jQuery.post("'.admin_url('admin-ajax.php').'", { security : "'.wp_create_nonce('gosmtp_expiry_notice').'", action: "gosmtp_pro_dismiss_expired_licenses", }, function(res){ if(!res["success"]){ alert(res["data"]); } }).fail(function(data){ alert("There seems to be some issue dismissing this alert"); }); }); })'); } } home/aresglob/public_html/wp/wp-content/themes/twentytwentyfive/functions.php 0000644 00000010201 15104555447 0024011 0 ustar 00 <?php /** * Twenty Twenty-Five functions and definitions. * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package WordPress * @subpackage Twenty_Twenty_Five * @since Twenty Twenty-Five 1.0 */ // Adds theme support for post formats. if ( ! function_exists( 'twentytwentyfive_post_format_setup' ) ) : /** * Adds theme support for post formats. * * @since Twenty Twenty-Five 1.0 * * @return void */ function twentytwentyfive_post_format_setup() { add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) ); } endif; add_action( 'after_setup_theme', 'twentytwentyfive_post_format_setup' ); // Enqueues editor-style.css in the editors. if ( ! function_exists( 'twentytwentyfive_editor_style' ) ) : /** * Enqueues editor-style.css in the editors. * * @since Twenty Twenty-Five 1.0 * * @return void */ function twentytwentyfive_editor_style() { add_editor_style( 'assets/css/editor-style.css' ); } endif; add_action( 'after_setup_theme', 'twentytwentyfive_editor_style' ); // Enqueues style.css on the front. if ( ! function_exists( 'twentytwentyfive_enqueue_styles' ) ) : /** * Enqueues style.css on the front. * * @since Twenty Twenty-Five 1.0 * * @return void */ function twentytwentyfive_enqueue_styles() { wp_enqueue_style( 'twentytwentyfive-style', get_parent_theme_file_uri( 'style.css' ), array(), wp_get_theme()->get( 'Version' ) ); } endif; add_action( 'wp_enqueue_scripts', 'twentytwentyfive_enqueue_styles' ); // Registers custom block styles. if ( ! function_exists( 'twentytwentyfive_block_styles' ) ) : /** * Registers custom block styles. * * @since Twenty Twenty-Five 1.0 * * @return void */ function twentytwentyfive_block_styles() { register_block_style( 'core/list', array( 'name' => 'checkmark-list', 'label' => __( 'Checkmark', 'twentytwentyfive' ), 'inline_style' => ' ul.is-style-checkmark-list { list-style-type: "\2713"; } ul.is-style-checkmark-list li { padding-inline-start: 1ch; }', ) ); } endif; add_action( 'init', 'twentytwentyfive_block_styles' ); // Registers pattern categories. if ( ! function_exists( 'twentytwentyfive_pattern_categories' ) ) : /** * Registers pattern categories. * * @since Twenty Twenty-Five 1.0 * * @return void */ function twentytwentyfive_pattern_categories() { register_block_pattern_category( 'twentytwentyfive_page', array( 'label' => __( 'Pages', 'twentytwentyfive' ), 'description' => __( 'A collection of full page layouts.', 'twentytwentyfive' ), ) ); register_block_pattern_category( 'twentytwentyfive_post-format', array( 'label' => __( 'Post formats', 'twentytwentyfive' ), 'description' => __( 'A collection of post format patterns.', 'twentytwentyfive' ), ) ); } endif; add_action( 'init', 'twentytwentyfive_pattern_categories' ); // Registers block binding sources. if ( ! function_exists( 'twentytwentyfive_register_block_bindings' ) ) : /** * Registers the post format block binding source. * * @since Twenty Twenty-Five 1.0 * * @return void */ function twentytwentyfive_register_block_bindings() { register_block_bindings_source( 'twentytwentyfive/format', array( 'label' => _x( 'Post format name', 'Label for the block binding placeholder in the editor', 'twentytwentyfive' ), 'get_value_callback' => 'twentytwentyfive_format_binding', ) ); } endif; add_action( 'init', 'twentytwentyfive_register_block_bindings' ); // Registers block binding callback function for the post format name. if ( ! function_exists( 'twentytwentyfive_format_binding' ) ) : /** * Callback function for the post format name block binding source. * * @since Twenty Twenty-Five 1.0 * * @return string|void Post format name, or nothing if the format is 'standard'. */ function twentytwentyfive_format_binding() { $post_format_slug = get_post_format(); if ( $post_format_slug && 'standard' !== $post_format_slug ) { return get_post_format_string( $post_format_slug ); } } endif; home/aresglob/public_html/wp/wp-content/themes/ares-global-theme/functions.php 0000644 00000000601 15104623704 0023615 0 ustar 00 <?php // Enqueue parent and child theme styles function ares_global_enqueue_styles() { wp_enqueue_style('astra-parent-style', get_template_directory_uri() . '/style.css'); wp_enqueue_style('ares-global-style', get_stylesheet_directory_uri() . '/style.css', array('astra-parent-style') ); } add_action('wp_enqueue_scripts', 'ares_global_enqueue_styles'); ?> home/aresglob/public_html/wp/wp-content/plugins/siteseo-pro/functions.php 0000644 00000016200 15104637252 0022777 0 ustar 00 <?php /* * SITESEO * https://siteseo.io * (c) SITSEO Team */ // Are we being accessed directly ? if(!defined('ABSPATH')){ exit('Hacking Attempt !'); } // Add our license key if ANY function siteseo_pro_updater_filter_args($queryArgs){ global $siteseo; if (!empty($siteseo->license['license'])){ $queryArgs['license'] = $siteseo->license['license']; } $queryArgs['url'] = rawurlencode(site_url()); return $queryArgs; } // Handle the Check for update link and ask to install license key function siteseo_pro_updater_check_link($final_link){ global $siteseo; if(empty($siteseo->license['license'])){ return '<a href="'.admin_url('admin.php?page=siteseo-license').'">Install SiteSEO Pro License Key</a>'; } return $final_link; } // Prevent update of Siteseo free function siteseo_pro_file_get_free_version_num(){ if(defined('SITESEO_VERSION')){ return SITESEO_VERSION; } // In case of Siteseo deactive return siteseo_pro_file_get_version_num('siteseo/siteseo.php'); } // Prevent update of Siteseo free function siteseo_pro_file_get_version_num($plugin){ // In case of Siteseo deactive include_once(ABSPATH . 'wp-admin/includes/plugin.php'); $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/'.$plugin); if(empty($plugin_data)){ return false; } return $plugin_data['Version']; } // Prevent update of siteseo free function siteseo_pro_disable_manual_update_for_plugin($transient){ $plugin = 'siteseo/siteseo.php'; // Is update available? if(!isset($transient->response) || !isset($transient->response[$plugin])){ return $transient; } $free_version = siteseo_pro_file_get_free_version_num(); $pro_version = SITESEO_PRO_VERSION; if(!empty($GLOBALS['siteseo_pro_is_upgraded'])){ $pro_version = siteseo_pro_file_get_version_num('siteseo-pro/siteseo-pro.php'); } // Update the Siteseo version to the equivalent of Pro version if(!empty($pro_version) && version_compare($free_version, $pro_version, '<')){ $transient->response[$plugin]->new_version = $pro_version; $transient->response[$plugin]->package = 'https://a.softaculous.com/siteseo/files/versions/latest-stable-free.zip'; }else{ unset($transient->response[$plugin]); } return $transient; } // Auto update free version after update pro version function siteseo_pro_update_free_after_pro($upgrader_object, $options){ // Check if the action is an update for the plugins if($options['action'] != 'update' || $options['type'] != 'plugin'){ return; } // Define the slugs for the free and pro plugins $free_slug = 'siteseo/siteseo.php'; $pro_slug = 'siteseo-pro/siteseo-pro.php'; // Check if the pro plugin is in the list of updated plugins if( (isset($options['plugins']) && in_array($pro_slug, $options['plugins']) && !in_array($free_slug, $options['plugins'])) || (isset($options['plugin']) && $pro_slug == $options['plugin']) ){ // Trigger the update for the free plugin $current_version = siteseo_pro_file_get_free_version_num(); if(empty($current_version)){ return; } $GLOBALS['siteseo_pro_is_upgraded'] = true; // This will set the 'update_plugins' transient again wp_update_plugins(); // Check for updates for the free plugin $update_plugins = get_site_transient('update_plugins'); if(empty($update_plugins) || !isset($update_plugins->response[$free_slug]) || version_compare($update_plugins->response[$free_slug]->new_version, $current_version, '<=')){ return; } require_once(ABSPATH . 'wp-admin/includes/plugin.php'); require_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'); $skin = wp_doing_ajax()? new WP_Ajax_Upgrader_Skin() : null; $upgrader = new Plugin_Upgrader($skin); $upgraded = $upgrader->upgrade($free_slug); if(!is_wp_error($upgraded) && $upgraded){ // Re-active free plugins if( file_exists( WP_PLUGIN_DIR . '/'. $free_slug ) && is_plugin_inactive($free_slug) ){ activate_plugin($free_slug); // TODO for network } // Re-active pro plugins if( file_exists( WP_PLUGIN_DIR . '/'. $pro_slug ) && is_plugin_inactive($pro_slug) ){ activate_plugin($pro_slug); // TODO for network } } } } // Load license data function siteseo_pro_load_license($parent = 0){ global $siteseo, $lic_resp; $license_field = 'siteseo_license'; $license_api_url = SITESEO_API; // Save license if(!empty($parent) && is_string($parent) && strlen($parent) > 5){ $lic['license'] = $parent; // Load license of Soft Pro }elseif(!empty($parent)){ $license_field = 'softaculous_pro_license'; $lic = get_option('softaculous_pro_license', []); // My license }else{ $lic = get_option($license_field, []); } // Loaded license is a Soft Pro if(!empty($lic['license']) && preg_match('/^softwp/is', $lic['license'])){ $license_field = 'softaculous_pro_license'; $license_api_url = 'https://a.softaculous.com/softwp/'; $prods = apply_filters('softaculous_pro_products', []); }else{ $prods = []; } if(empty($lic['last_update'])){ $lic['last_update'] = time() - 86600; } // Update license details as well if(!empty($lic) && !empty($lic['license']) && (time() - @$lic['last_update']) >= 86400){ $url = $license_api_url.'/license.php?license='.$lic['license'].'&prods='.implode(',', $prods).'&url='.rawurlencode(site_url()); $resp = wp_remote_get($url); $lic_resp = $resp; //Did we get a response ? if(is_array($resp)){ $tosave = json_decode($resp['body'], true); //Is it the license ? if(!empty($tosave['license'])){ $tosave['last_update'] = time(); update_option($license_field, $tosave); $lic = $tosave; } } } // If the license is Free or Expired check for Softaculous Pro license if(empty($lic) || empty($lic['active'])){ if(function_exists('softaculous_pro_load_license')){ $softaculous_license = softaculous_pro_load_license(); if(!empty($softaculous_license['license']) && (!empty($softaculous_license['active']) || empty($lic['license'])) ){ $lic = $softaculous_license; } }elseif(empty($parent)){ $lic = get_option('softaculous_pro_license', []); if(!empty($lic)){ return siteseo_pro_load_license(1); } } } if(!empty($lic['license'])){ $siteseo->license = $lic; } } add_filter('softaculous_pro_products', 'siteseo_softaculous_pro_products', 10, 1); function siteseo_softaculous_pro_products($r = []){ $r['siteseo'] = 'siteseo'; return $r; } function siteseo_pro_api_url($main_server = 0, $suffix = 'siteseo'){ global $siteseo; $r = array( 'https://s0.softaculous.com/a/softwp/', 'https://s1.softaculous.com/a/softwp/', 'https://s2.softaculous.com/a/softwp/', 'https://s3.softaculous.com/a/softwp/', 'https://s4.softaculous.com/a/softwp/', 'https://s5.softaculous.com/a/softwp/', 'https://s7.softaculous.com/a/softwp/', 'https://s8.softaculous.com/a/softwp/' ); $mirror = $r[array_rand($r)]; // If the license is newly issued, we need to fetch from API only if(!empty($main_server) || empty($siteseo->license['last_edit']) || (!empty($siteseo->license['last_edit']) && (time() - 3600) < $siteseo->license['last_edit']) ){ $mirror = SITESEO_API; } if(!empty($suffix)){ $mirror = str_replace('/softwp', '/'.$suffix, $mirror); } return $mirror; } home/aresglob/public_html/wp/wp-content/plugins/speedycache/functions.php 0000644 00000005205 15104654264 0023010 0 ustar 00 <?php // functions.php is deprecated in favour of a classed based UTIL // So try not to use any function from this file in any new code, // as this file will be removed from future versions. if(!defined('ABSPATH')){ die('HACKING ATTEMPT!'); } // Check if a field is posted via GET else return default value // Deprecated since 1.2.0 use Util::sanitize_get function speedycache_optget($name, $default = ''){ if(!empty($_GET[$name])){ return \SpeedyCache\Util::sanitize_get($name); } return $default; } // Deprecated since 1.2.0 use Util::sanitize_request function speedycache_optreq($name, $default = ''){ if(!empty($_REQUEST[$name])){ return \SpeedyCache\Util::sanitize_request($name); } return $default; } // Deprecated since 1.2.0 use Util::sanitize_server function speedycache_optserver($index, $default = ''){ return !empty($index) && !empty($_SERVER[$index]) ? sanitize_text_field(wp_unslash($_SERVER[$index])) : $default; } // Check if a field is posted via POST else return default value // Deprecated since 1.2.0 use Util::sanitize_post function speedycache_optpost($name, $default = ''){ if(!empty($_POST[$name])){ return \SpeedyCache\Util::sanitize_post($name); } return $default; } // Deprecated since 1.2.0 nonce is handled on in each ajax function function speedycache_verify_nonce($nonce, $nonce_name){ if(!wp_verify_nonce($nonce, $nonce_name)){ wp_send_json(array('success' => false, 'message' => 'Security check failed')); } } // Deprecated since 1.2.0 use Util::cache_path function speedycache_cache_path($loc = ''){ if(!empty($loc)){ $loc = trim($loc, '/'); } return \SpeedyCache\Util::cache_path($loc); } // Checks if the given plugin active // Deprectaed do not use it function speedycache_is_plugin_active($plugin){ return in_array($plugin, (array) get_option('active_plugins', array()), true); } // Speculation Rules function speedycache_speculation_rules_config($config){ if(null === $config){ return null; } global $speedycache; $mode = isset($speedycache->options['speculation_mode']) ? $speedycache->options['speculation_mode'] : 'auto'; $eagerness = isset($speedycache->options['speculation_eagerness']) ? $speedycache->options['speculation_eagerness'] : 'auto'; // Disbaling Speculation Loading if($mode == 'disabled'){ return null; } if(!in_array($mode, ['prefetch', 'prerender', 'auto'], true)){ $mode = 'auto'; } if(!in_array($eagerness, ['eager', 'moderate', 'conservative', 'auto'], true)){ $eagerness = 'auto'; } return array( 'mode' => $mode, 'eagerness' => $eagerness, ); } home/aresglob/public_html/wp/wp-content/themes/popularfx/functions.php 0000644 00000061720 15105000122 0022336 0 ustar 00 <?php /** * PopularFX functions and definitions * * @link https://popularfx.com/docs/ * * @package PopularFX */ if ( ! defined( 'POPULARFX_VERSION' ) ) { // Replace the version number of the theme on each release. define( 'POPULARFX_VERSION', '1.2.6' ); } if ( ! defined( 'POPULARFX_PAGELAYER_API' ) ) { define( 'POPULARFX_PAGELAYER_API', 'https://api.pagelayer.com/' ); } if ( ! defined( 'POPULARFX_WWW_URL' ) ) { define( 'POPULARFX_WWW_URL', 'https://popularfx.com' ); } if ( ! defined( 'POPULARFX_PRO_URL' ) ) { define( 'POPULARFX_PRO_URL', 'https://popularfx.com/pricing?from=pfx-theme' ); } if ( ! defined( 'POPULARFX_URL' ) ) { define( 'POPULARFX_URL', get_template_directory_uri() ); } if(!defined('PAGELAYER_VERSION')){ define('POPULARFX_PAGELAYER_PRO_URL', 'https://pagelayer.com/pricing?from=pfx-theme'); } if ( ! function_exists( 'popularfx_setup' ) ){ /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function popularfx_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on PopularFX, use a find and replace * to change 'popularfx' to the name of your theme in all the template files. */ load_theme_textdomain( 'popularfx', get_stylesheet_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded <title> tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'popularfx' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); global $pagelayer, $popularfx; if(!empty($pagelayer->settings)){ $pagelayer->template_call_sidebar = 1; } // Show promos popularfx_promos(); $template = popularfx_get_template_name(); if(empty($template)){ // Set up the WordPress core custom background feature. add_theme_support('custom-background', apply_filters( 'popularfx_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); add_theme_support( 'custom-header', apply_filters( 'popularfx_custom_header_args', array( 'default-image' => '', 'default-text-color' => '000000', 'width' => 1200, 'height' => 250, 'flex-height' => true, 'wp-head-callback' => 'popularfx_header_style', ) ) ); add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); } // Add woocommerce support add_theme_support( 'woocommerce', array( 'product_grid' => array( 'min_columns'=> 1, 'max_columns' => 6, ), ) ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } } add_action( 'after_setup_theme', 'popularfx_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function popularfx_content_width() { // This variable is intended to be overruled from themes. // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}. // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $GLOBALS['content_width'] = apply_filters( 'popularfx_content_width', 640 ); } // To get activated template for parent and child theme function popularfx_get_template_name(){ $tmp = get_option('theme_mods_popularfx'); $mods = !empty($tmp['popularfx_template']) ? $tmp['popularfx_template'] : ''; return $mods; } // Backward compat function popularfx_copyright(){ return popularfx_theme_credits(); } // Show credit of our theme function popularfx_theme_credits(){ return '<a href="'.esc_url(POPULARFX_WWW_URL).'">'.__('PopularFX Theme', 'popularfx').'</a>'; } // Shows the promos function popularfx_promos(){ if(is_admin() && current_user_can('install_themes')){ //remove_theme_mod('popularfx_getting_started'); //remove_theme_mod('popularfx_templates_promo'); //remove_theme_mod('popularfx_show_promo'); // Show the getting started video option $seen = get_theme_mod('popularfx_getting_started'); if(empty($seen)){ add_action('admin_notices', 'popularfx_getting_started_notice'); } // Show the promo popularfx_maybe_promo([ 'after' => 1,// In days 'interval' => 30,// In days 'pro_url' => POPULARFX_PRO_URL, 'rating' => 'https://wordpress.org/themes/popularfx/#reviews', 'twitter' => 'https://twitter.com/PopularFXthemes?status='.rawurlencode('I love #PopularFX Theme by @pagelayer team for my #WordPress site - '.esc_url(home_url())), 'facebook' => 'https://facebook.com/popularfx', 'website' => POPULARFX_WWW_URL, 'image' => POPULARFX_URL.'/images/popularfx-logo.png', 'name' => 'popularfx_show_promo' ]); $template = popularfx_get_template_name(); if(empty($template)){ // Show the image promo popularfx_maybe_promo([ 'after' => 0,// In days 'interval' => 30,// In days 'pro_url' => POPULARFX_PRO_URL, 'rating' => 'https://wordpress.org/themes/popularfx/#reviews', 'twitter' => 'https://twitter.com/PopularFXthemes?status='.rawurlencode('I love #PopularFX Theme by @pagelayer team for my #WordPress site - '.esc_url(home_url())), 'facebook' => 'https://facebook.com/popularfx', 'website' => POPULARFX_WWW_URL, 'image' => POPULARFX_URL.'/images/popularfx-logo.png', 'name' => 'popularfx_templates_promo' ]); } //delete_option('popularfx_templates_promo'); } } add_action( 'after_switch_theme', 'popularfx_promos', 10 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function popularfx_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'popularfx' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'popularfx' ), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'popularfx_widgets_init' ); // URL of the PFX templates uploads dir function popularfx_templates_dir_url(){ $template = popularfx_get_template_name(); $style = get_template_directory().'/templates/'.$template.'/style.css'; if(file_exists($style)){ return get_stylesheet_directory_uri().'/templates'; } $dir = wp_upload_dir(NULL, false); return $dir['baseurl'].'/popularfx-templates'; } // URL of the PFX templates uploads dir function popularfx_templates_dir($suffix = true){ $template = popularfx_get_template_name(); $style = get_template_directory().'/templates/'.$template.'/style.css'; if(file_exists($style)){ return get_template_directory().'/templates'.($suffix ? '/'.$template : ''); } $dir = wp_upload_dir(NULL, false); return $dir['basedir'].'/popularfx-templates'.($suffix ? '/'.$template : ''); } /** * Enqueue scripts and styles. */ function popularfx_scripts() { $template = popularfx_get_template_name(); if(!empty($template) && defined('PAGELAYER_VERSION')){ wp_enqueue_style( 'popularfx-style', popularfx_templates_dir_url().'/'.$template.'/style.css', array(), POPULARFX_VERSION ); }else{ wp_enqueue_style( 'popularfx-style', get_template_directory_uri().'/style.css', array(), POPULARFX_VERSION ); wp_style_add_data( 'popularfx-style', 'rtl', 'replace' ); } // Enqueue sidebar.css wp_enqueue_style( 'popularfx-sidebar', get_template_directory_uri().'/sidebar.css', array(), POPULARFX_VERSION ); // Dashicons needed for WooCommerce and Scroll to Top if(class_exists( 'WooCommerce' ) || get_theme_mod('pfx_enable_scrolltop')){ wp_enqueue_style('dashicons'); } // Enqueue WooCommerce CSS if(class_exists( 'WooCommerce' )){ wp_enqueue_style( 'popularfx-woocommerce', get_template_directory_uri().'/woocommerce.css', array(), POPULARFX_VERSION ); wp_style_add_data( 'popularfx-woocommerce', 'rtl', 'replace' ); } wp_enqueue_script( 'popularfx-navigation', get_template_directory_uri().'/js/navigation.js', array('jquery'), POPULARFX_VERSION, true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'popularfx_scripts' ); function popularfx_the_title($before = '', $after = '', $echo = true){ if(is_page()){ return; } the_title($before, $after, $echo); } // Show the templates promo function popularfx_templates_promo(){ global $popularfx_promo_opts, $popularfx; if(!empty($GLOBALS['pfx_notices_shown'])){ return; } $GLOBALS['pfx_notices_shown'] = 1; $opts = $popularfx_promo_opts['popularfx_templates_promo']; echo '<style> #popularfx_templates_promo{ border-left: 1px solid #ccd0d4; } .popularfx-templates-promo{ background: #fff; padding: 5px; } .popularfx_promo_button { background-color: #4CAF50; /* Green */ border: none; color: white; padding: 6px 10px; text-align: center; text-decoration: none; display: inline-block; font-size: 13px; margin: 4px 2px; -webkit-transition-duration: 0.4s; /* Safari */ transition-duration: 0.4s; cursor: pointer; } .popularfx_promo_button:focus, .popularfx_promo_button:hover{ border: none; color: white; box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; } .popularfx_promo_buy { color: white; padding: 8px 12px; font-size: 14px; } .popularfx_promo_button1 { color: white; background-color: #4CAF50; border:3px solid #4CAF50; } .popularfx_promo_button1:hover { border:3px solid #4CAF50; } .popularfx_promo_button2 { color: white; background-color: #0085ba; } .popularfx_promo_button3 { color: white; background-color: #365899; } .popularfx_promo_button4 { color: white; background-color: rgb(66, 184, 221); } .popularfx_promo-close{ float:right; text-decoration:none; margin: 5px 10px 0px 0px; } .popularfx_promo-close:hover{ color: red; } .popularfx_promo-left{ display: inline-block; max-width: 34%; vertical-align: top; text-align: center; } .popularfx_promo-right{ display: inline-block; max-width: 65%; width: 65%; vertical-align: middle; } @media all and (max-width:599px){ .popularfx_promo-left, .popularfx_promo-right{ max-width: 100%; } } </style> <script type="application/javascript"> jQuery(document).ready(function(){ jQuery("#popularfx_templates_promo .popularfx_promo-close").click(function(){ var data; jQuery("#popularfx_templates_promo").hide(); // Save this preference jQuery.post("'.esc_url(admin_url('?'.$opts['name'].'=0')).'", data, function(response) { //alert(response); }); }); }); </script> <div class="'.(empty($opts['class']) ? 'notice notice-success' : 'popularfx-templates-promo').'" id="popularfx_templates_promo" style="min-height:90px"> <div class="popularfx_promo-left"> <img src="'.esc_url(POPULARFX_URL.'/images/templates.png').'" width="85%" /> </div> <div class="popularfx_promo-right"> <p align="center"> <a class="popularfx_promo-close" href="javascript:" aria-label="Dismiss this Notice"> <span class="dashicons dashicons-dismiss"></span> Dismiss </a> <a href="'.esc_url(POPULARFX_WWW_URL.'/templates').'" style="text-decoration: none; font-size: 15px;"> '.__('Did you know PopularFX comes with 500+ Templates to design your website. <br>Click to choose your template !', 'popularfx').'<br> </a> <br> '.(empty($opts['pro_url']) || !empty($popularfx['license']) ? '' : '<a class="button button-primary" target="_blank" href="'.esc_url($opts['pro_url']).'">'.__('Buy PopularFX Pro', 'popularfx').'</a>').' '.(empty($opts['rating']) ? '' : '<a class="button button-primary" target="_blank" href="'.esc_url($opts['rating']).'">'.__('Rate it 5★\'s', 'popularfx').'</a>').' '.(empty($opts['facebook']) ? '' : '<a class="button button-secondary" target="_blank" href="'.esc_url($opts['facebook']).'"><span class="dashicons dashicons-thumbs-up" style="vertical-align: middle;"></span> '.__('Facebook', 'popularfx').'</a>').' '.(empty($opts['twitter']) ? '' : '<a class="button button-secondary" target="_blank" href="'.esc_url($opts['twitter']).'"><span class="dashicons dashicons-twitter" style="vertical-align: middle;"></span> '.__('Tweet', 'popularfx').'</a>').' '.(empty($opts['website']) ? '' : '<a class="button button-secondary" target="_blank" href="'.esc_url($opts['website']).'">'.__('Visit our website', 'popularfx').'</a>').' </p> </div> </div>'; } function popularfx_getting_started_notice(){ if(!empty($GLOBALS['pfx_notices_shown'])){ return; } $GLOBALS['pfx_notices_shown'] = 1; // Are we to disable the promo if(isset($_GET['popularfx-getting-started']) && (int)$_GET['popularfx-getting-started'] == 0){ check_ajax_referer('popularfx_getting_started_nonce', 'popularfx_nonce'); set_theme_mod('popularfx_getting_started', time()); die('DONE'); } echo ' <script type="application/javascript"> jQuery(document).ready(function(){ jQuery("#popularfx-getting-started-notice").click(function(e){ if(jQuery(e.target).hasClass("notice-dismiss")){ var data; jQuery("#popularfx-getting-started-notice").hide(); // Save this preference jQuery.post("'.admin_url('?popularfx-getting-started=0&popularfx_nonce='.wp_create_nonce("popularfx_getting_started_nonce")).'", data, function(response) { //alert(response); }); return false; } }); }); </script> <div id="popularfx-getting-started-notice" class="notice notice-success is-dismissible"> <p style="font-size: 14px; font-weight: 600"> <a href="'.esc_url(POPULARFX_WWW_URL).'"><img src="'.esc_url(POPULARFX_URL).'/images/popularfx-logo.png" style="vertical-align: middle; margin:0px 10px" width="24" /></a>'.__('Thanks for choosing PopularFX. We recommend that you see the <a href="https://www.youtube.com/watch?v=DCisrbrmjgI" target="_blank">PopularFX Theme Guide Video</a> to know the basics of PopularFX.', 'popularfx').' </p> </div>'; } // Show promo notice on dashboard function popularfx_show_promo($opts = []){ global $popularfx_promo_opts, $popularfx; if(!empty($GLOBALS['pfx_notices_shown'])){ return; } $GLOBALS['pfx_notices_shown'] = 1; $opts = $popularfx_promo_opts['popularfx_show_promo']; echo '<style> #popularfx_promo{ border-left: 1px solid #ccd0d4; } .popularfx_promo_button { background-color: #4CAF50; /* Green */ border: none; color: white; padding: 6px 10px; text-align: center; text-decoration: none; display: inline-block; font-size: 13px; margin: 4px 2px; -webkit-transition-duration: 0.4s; /* Safari */ transition-duration: 0.4s; cursor: pointer; } .popularfx_promo_button:focus, .popularfx_promo_button:hover{ border: none; color: white; box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; } .popularfx_promo_buy { color: white; padding: 8px 12px; font-size: 14px; } .popularfx_promo_button1 { color: white; background-color: #4CAF50; border:3px solid #4CAF50; } .popularfx_promo_button1:hover { border:3px solid #4CAF50; } .popularfx_promo_button2 { color: white; background-color: #0085ba; } .popularfx_promo_button3 { color: white; background-color: #365899; } .popularfx_promo_button4 { color: white; background-color: rgb(66, 184, 221); } .popularfx_promo-close{ float:right; text-decoration:none; margin: 5px 10px 0px 0px; } .popularfx_promo-close:hover{ color: red; } .popularfx_promo-left-1{ display: inline-block; width: 65%; vertical-align: top; } .popularfx_promo-right-1{ display: inline-block; width: 35%; vertical-align: top } @media all and (max-width:599px){ .popularfx_promo-left, .popularfx_promo-right{ width: 100%; } } </style> <script type="application/javascript"> jQuery(document).ready(function(){ jQuery("#popularfx_promo .popularfx_promo-close").click(function(){ var data; jQuery("#popularfx_promo").hide(); // Save this preference jQuery.post("'.esc_url(admin_url('?'.$opts['name'].'=0')).'", data, function(response) { //alert(response); }); }); }); </script> <div class="notice notice-success" id="popularfx_promo" style="min-height:90px"> <div class="popularfx_promo-left-1">'; if(!empty($opts['image'])){ echo '<a href="'.esc_url($opts['website']).'"><img src="'.esc_url($opts['image']).'" style="float:left; margin:25px 20px 10px 10px" width="67" /></a>'; } echo ' <p style="font-size:14px; line-height: 1.6">'.sprintf( __('We are glad you are using %1$s to build your website. We really appreciate it ! <br>We would like to request you to give us a 5 Star rating on %2$s. <br>It will greatly boost our motivation !', 'popularfx'), '<a href="'.$opts['website'].'"><b>PopularFX</b></a>', '<a href="'.$opts['rating'].'" target="_blank">WordPress.org</a>').'</p> <p> '.(empty($opts['pro_url']) || !empty($popularfx['license']) ? '' : '<a class="button button-primary" target="_blank" href="'.esc_url($opts['pro_url']).'">'.__('Buy PopularFX Pro', 'popularfx').'</a>').' '.(empty($opts['rating']) ? '' : '<a class="button button-primary" target="_blank" href="'.esc_url($opts['rating']).'">'.__('Rate it 5★\'s', 'popularfx').'</a>').' '.(empty($opts['facebook']) ? '' : '<a class="button button-secondary" target="_blank" href="'.esc_url($opts['facebook']).'"><span class="dashicons dashicons-thumbs-up" style="vertical-align: middle;"></span> '.__('Facebook', 'popularfx').'</a>').' '.(empty($opts['twitter']) ? '' : '<a class="button button-secondary" target="_blank" href="'.esc_url($opts['twitter']).'"><span class="dashicons dashicons-twitter" style="vertical-align: middle;"></span> '.__('Tweet', 'popularfx').'</a>').' '.(empty($opts['website']) ? '' : '<a class="button button-secondary" target="_blank" href="'.esc_url($opts['website']).'">'.__('Visit our website', 'popularfx').'</a>').' </p> '.(empty($opts['pro_url']) || !empty($popularfx['license']) ? '' : '<p style="font-size:13px">'.sprintf( __('%1$s has many more features like 500+ Website %2$s Templates%3$s, 90+ widgets, 500+ sections, Theme Builder, WooCommerce Builder, Theme Creator and Exporter, Form Builder, Popup Builder, etc. You get a Pagelayer Pro license with the PopularFX Pro version.', 'popularfx'), '<a href="'.esc_url($opts['pro_url']).'"><b>PopularFX Pro</b></a>', '<a href="'.esc_url($opts['website'].'/templates').'">', '</a>').' </p>').' </div>'; echo '<div class="popularfx_promo-right-1"> <a class="popularfx_promo-close" href="javascript:" aria-label="'.__('Dismiss this Notice', 'popularfx').'"> <span class="dashicons dashicons-dismiss"></span> '.__('Dismiss', 'popularfx').' </a> <br> <center style="margin:10px;"> <a href="'.esc_url(POPULARFX_WWW_URL.'/templates').'" style="text-decoration: none; font-size: 15px;"><img src="'.esc_url(POPULARFX_URL.'/images/templates.png').'" width="100%" /><br><br>'.__('Install from 500+ Website Templates', 'popularfx').'</a> </center> </div> </div>'; } // Are we to show a promo ? function popularfx_maybe_promo($opts){ global $popularfx_promo_opts; // There must be an interval if(empty($opts['interval'])){ return false; } // Are we to show a promo $opt_name = empty($opts['name']) ? 'popularfx_show_promo' : $opts['name']; $func = empty($opts['name']) ? $opt_name : $opts['name']; $promo_time = get_theme_mod($opt_name); //echo $opt_name.' - '.$func.' - '.$promo_time.' - '.date('Ymd', $promo_time).'<br>';die(); // First time access if(empty($promo_time)){ set_theme_mod($opt_name, time() + (!empty($opts['after']) ? $opts['after'] * 86400 : 0)); $promo_time = get_theme_mod($opt_name); } // Is there interval elapsed if(time() >= $promo_time){ $popularfx_promo_opts[$opt_name] = $opts; add_action('admin_notices', $func); } // Are we to disable the promo if(isset($_GET[$opt_name]) && (int)$_GET[$opt_name] == 0){ set_theme_mod($opt_name, time() + ($opts['interval'] * 86400)); die('DONE'); } } // Is the sidebar enabled function popularfx_sidebar(){ // If no widgets in sidebar if ( ! is_active_sidebar( 'sidebar-1' ) ) { return; } $enabled = NULL; // For page if(is_page()){ $enabled = get_theme_mod('popularfx_sidebar_page', 'default'); } $is_product = class_exists('WooCommerce') && is_product() ? true : false; // For products none ! if(is_single() && $is_product){ $enabled = '0'; // For posts }elseif(is_single()){ $enabled = get_theme_mod('popularfx_sidebar_post', 'right'); } // For Archives if(is_archive() || is_home()){ $enabled = get_theme_mod('popularfx_sidebar_archives', 'right'); } // For Woocommerce if(class_exists( 'WooCommerce' ) && is_shop()){ $enabled = get_theme_mod('popularfx_sidebar_woocommerce', 0); } // Load the default if($enabled == 'default' || is_front_page()){ $enabled = get_theme_mod('popularfx_sidebar_default', 0); } // If its disabled if(empty($enabled)){ return; } // In live mode of templates dont show this for header and footer if(function_exists('pagelayer_is_live') && pagelayer_is_live()){ $pl_post_type = get_post_meta($GLOBALS['post']->ID, 'pagelayer_template_type', true); if(in_array($pl_post_type, ['header', 'footer'])){ return; } } return $enabled; } add_action('wp_enqueue_scripts', 'popularfx_sidebar_css', 1000); function popularfx_sidebar_css(){ // Sidebar CSS $enabled = popularfx_sidebar(); if(empty($enabled)){ return; } $width = (int) get_theme_mod('popularfx_sidebar_width', 20); $custom_css = ' aside { width: '.esc_attr($width).'%; float: '.esc_attr($enabled).'; } main, .pagelayer-content{ width: '.round(99 - esc_attr($width)).'% !important; display: inline-block; float: '.esc_attr($enabled == 'left' ? 'right' : 'left').'; }'.PHP_EOL; wp_add_inline_style('popularfx-style', $custom_css); } if ( ! function_exists( 'popularfx_header_style' ) ) : /** * Styles the header image and text displayed on the blog. * * @see popularfx_custom_header_setup(). */ function popularfx_header_style() { $header_text_color = get_header_textcolor(); /* * If no custom options for text are set, let's bail. * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ). */ if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { return; } // If we get this far, we have custom styles. Let's do this. ?> <style type="text/css"> <?php // Has the text been hidden? if ( ! display_header_text() ) : ?> .site-title, .site-description { position: absolute; clip: rect(1px, 1px, 1px, 1px); } <?php // If the user has set a custom color for the text use that. else : ?> .site-title a, .site-description { color: #<?php echo esc_attr( $header_text_color ); ?>; } <?php endif; ?> </style> <?php } endif; add_action( 'wp_footer', 'popularfx_footer_setup' ); if( ! function_exists( 'popularfx_footer_setup' )){ function popularfx_footer_setup(){ $pfx_enable_scrolltop = get_theme_mod('pfx_enable_scrolltop'); if(empty($pfx_enable_scrolltop)){ return; } echo '<a id="pfx-scroll-top" class="pfx-scroll-top"><span class="dashicons dashicons-arrow-up-alt2"></span><span class="screen-reader-text">Scroll to Top</span></a>'; } } /** * Custom template tags for this theme. */ require dirname( __FILE__ ) . '/inc/template-tags.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require dirname( __FILE__ ) . '/inc/template-functions.php'; /** * Customizer additions. */ require dirname( __FILE__ ) . '/inc/customizer.php'; /** * Load WooCommerce compatibility file. */ if ( class_exists( 'WooCommerce' ) ) { require dirname( __FILE__ ) . '/inc/woocommerce.php'; } // Update the theme require_once dirname( __FILE__ ) . '/inc/popularfx.php'; home/aresglob/public_html/wp/wp-content/plugins/gosmtp/main/functions.php 0000644 00000010132 15105134415 0022753 0 ustar 00 <?php /* * GoSMTP * https://gosmtp.net * (c) Softaculous Team */ if(!defined('GOSMTP_VERSION')){ die('Hacking Attempt!'); } // Load mailer list function gosmtp_get_mailer_list(){ $list = array( 'mail' => [ 'title' => __('Mail'), 'class' => 'GOSMTP\Mailer\Mail'], 'smtp' => [ 'title' => __('Other SMTP'), 'class' => 'GOSMTP\Mailer\SMTP'], 'amazonses' => [ 'title' => __('AmazonSES'), 'class' => 'GOSMTP\Mailer\AmazonSES\AmazonSES'], 'gmail' => [ 'title' => __('Gmail'), 'class' => 'GOSMTP\Mailer\Gmail\Gmail'], 'outlook' => [ 'title' => __('Outlook'), 'class' => 'GOSMTP\Mailer\Outlook\Outlook'], 'zoho' => [ 'title' => __('Zoho'), 'class' => 'GOSMTP\Mailer\Zoho'], 'sendlayer' => [ 'title' => __('Sendlayer'), 'class' => 'GOSMTP\Mailer\Sendlayer'], 'smtpcom' => [ 'title' => __('SMTPcom'), 'class' => 'GOSMTP\Mailer\SMTPcom'], 'sendinblue' => [ 'title' => __('Brevo'), 'class' => 'GOSMTP\Mailer\Sendinblue'], 'mailgun' => [ 'title' => __('Mailgun'), 'class' => 'GOSMTP\Mailer\Mailgun'], 'postmark' => [ 'title' => __('Postmark'), 'class' => 'GOSMTP\Mailer\Postmark'], 'sendgrid' => [ 'title' => __('Sendgrid'), 'class' => 'GOSMTP\Mailer\Sendgrid'], 'sparkpost' => [ 'title' => __('Sparkpost'), 'class' => 'GOSMTP\Mailer\Sparkpost'], 'elasticemail' => [ 'title' => __('Elastic Email', 'gosmtp'), 'class' => 'GOSMTP\Mailer\ElasticEmail'], 'smtp2go' => [ 'title' => __('SMTP2Go', 'gosmtp'), 'class' => 'GOSMTP\Mailer\SMTP2Go'] ); return apply_filters( 'gosmtp_get_mailer_list', $list ); } // Load mailer list function gosmtp_load_mailer_list(){ $list = gosmtp_get_mailer_list(); $gosmtpmailer = array(); foreach($list as $key => $mailer){ $class = $mailer['class']; if(!class_exists($class)){ continue; } $gosmtpmailer[$key] = new $class(); } return apply_filters( 'gosmtp_load_mailer_list', $gosmtpmailer ); } function gosmtp_clean($var){ if(is_array($var) || is_object($var)){ return map_deep($var, 'sanitize_text_field'); } if(is_scalar($var)){ return sanitize_text_field($var); } return ''; } // Check if a field is posted via GET else return default value function gosmtp_optget($name, $default = ''){ if(!empty($_GET[$name])){ return gosmtp_clean($_GET[$name]); } return $default; } // Check if a field is posted via POST else return default value function gosmtp_optpost($name, $default = ''){ if(!empty($_POST[$name])){ return gosmtp_clean($_POST[$name]); } return $default; } // Check if a field is posted via REQUEST else return default value function gosmtp_optreq($name, $default = ''){ if(!empty($_REQUEST[$name])){ return gosmtp_clean($_REQUEST[$name]); } return $default; } // Simply echo and dir function gosmtp_json_output(&$done){ echo json_encode($done); wp_die(); } // Generate a random string function gosmtp_RandomId($length = 10){ $characters = '0123456789abcdefghijklmnopqrstuvwxyz'; $charactersLength = strlen($characters); $randomString = ''; for($i = 0; $i < $length; $i++){ $randomString .= $characters[rand(0, $charactersLength - 1)]; } return $randomString; } // Show notice function gosmtp_show_notices(){ $options = get_option('gosmtp_options', array()); if(defined('GOSMTP_PREMIUM') && empty($options['logs']['enable_logs'])){ echo '<div class="error is-dismissible notice"> <p>'.__('Email log is disabled. To store and view email logs, please enable email logs from GoSMTP ').' <a href="'.admin_url('admin.php?page=gosmtp#logs-settings').'">'.__('settings').'</a>.</p> </div>'; } if(empty($options['mailer']) || empty($options['mailer'][0]) || $options['mailer'][0]['mail_type'] == 'mail'){ echo '<div class="error is-dismissible notice"> <p>'.__('It seems that you haven\'t configured GoSMTP mailer yet or it is set to default PHP. You need to setup mailer to send emails via SMTP. To setup the mailer settings click').' <a href="'.admin_url('admin.php?page=gosmtp#smtpsetting').'">'.__('here').'</a>.</p> </div>'; } do_action('gosmtp_show_notices'); } home/aresglob/public_html/wp/wp-content/plugins/backuply/functions.php 0000644 00000140420 15105363725 0022344 0 ustar 00 <?php /* * BACKUPLY * https://backuply.com * (c) Backuply Team */ if(!defined('ABSPATH')) { die('HACKING ATTEMPT!'); } function backuply_get_protocols(){ $protocols['ftp'] = 'FTP'; $protocols['gdrive'] = 'Google Drive'; $protocols['bcloud'] = 'Backuply Cloud'; if(defined('BACKUPLY_PRO')) { if(!function_exists('backuply_get_pro_backups') && defined('BACKUPLY_PRO_DIR')) { include_once(BACKUPLY_PRO_DIR . '/functions.php'); } $protocols += backuply_get_pro_backups(); } return $protocols; } function backuply_create_backup_folders(){ // Creating Backuply Folder if(!file_exists(BACKUPLY_BACKUP_DIR)) { @mkdir(BACKUPLY_BACKUP_DIR, 0755, true); } $random_string = wp_generate_password(6, false); // Creating backups_info folder if(file_exists(BACKUPLY_BACKUP_DIR . 'backups_info')){ @rename(BACKUPLY_BACKUP_DIR . 'backups_info', BACKUPLY_BACKUP_DIR . 'backups_info-'. $random_string); } // Creating backups folder if(file_exists(BACKUPLY_BACKUP_DIR . 'backups')){ @rename(BACKUPLY_BACKUP_DIR . 'backups', BACKUPLY_BACKUP_DIR . 'backups-'. $random_string); } $backup_info = backuply_glob('backups_info'); $backups = backuply_glob('backups'); if(empty($backup_info)){ @mkdir(BACKUPLY_BACKUP_DIR . 'backups_info-' . $random_string, 0755, true); } if(empty($backups)){ @mkdir(BACKUPLY_BACKUP_DIR . 'backups-' . $random_string, 0755, true); } } // Add the htaccess file to protect us ! function backuply_add_htaccess(){ if(!file_exists(BACKUPLY_BACKUP_DIR)) { @mkdir(BACKUPLY_BACKUP_DIR, 0755, true); } $htaccess = @fopen(BACKUPLY_BACKUP_DIR . '.htaccess', 'w'); if(!$htaccess) { return false; } @fwrite($htaccess, 'deny from all'); @fclose($htaccess); return true; } // Add the webconfig file to protect us ! function backuply_add_web_config(){ if(file_exists(BACKUPLY_BACKUP_DIR . 'web.config')){ return true; } $web_config = @fopen(BACKUPLY_BACKUP_DIR . 'web.config', 'w'); if(!$web_config) { return false; } $web_conf = '<configuration> <system.webServer> <authorization> <deny users="*" /> </authorization> </system.webServer> </configuration>'; @fwrite($web_config, $web_conf); @fclose($web_config); return true; } // Add the htaccess folder to protect us ! function backuply_add_index_files(){ if(!file_exists(BACKUPLY_BACKUP_DIR)) { @mkdir(BACKUPLY_BACKUP_DIR, 0755, true); } $php_protection = '<?php //Backuply'; $html_protection = '<html><body><a href="https://backuply.com" target="_blank">WordPress backups by Backuply</a></b
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings