/* * 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' => __('Sendinblue'), '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'] ); 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 '

'.__('Email log is disabled. To store and view email logs, please enable email logs from GoSMTP ').' '.__('settings').'.

'; } if(empty($options['mailer']) || empty($options['mailer'][0]) || $options['mailer'][0]['mail_type'] == 'mail'){ echo '

'.__('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').' '.__('here').'.

'; } do_action('gosmtp_show_notices'); }// 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); }<?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( get_parent_theme_file_uri( '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;
สล็อตวอเลท