dvadf
File manager - Edit - /home/centroca/public_html/ultimate-member.zip
Back
PK �@0])�cS email/notification_new_user.phpnu �[��� <div style="max-width: 560px; padding: 20px; background: #ffffff; border-radius: 5px; margin: 40px auto; font-family: Open Sans,Helvetica,Arial; font-size: 15px; color: #666;"> <div style="color: #444444; font-weight: normal;"> <div style="text-align: center; font-weight: 600; font-size: 26px; padding: 10px 0; border-bottom: solid 3px #eeeeee;">Centro Castilla</div> <div style="clear: both;"> </div> </div> <div style="padding: 0 30px 30px 30px; border-bottom: 3px solid #eeeeee;"> <div style="padding: 30px 0; font-size: 24px; text-align: center; line-height: 40px;">{display_name} has just created an account on {site_name}.</div> <div style="padding: 10px 0 50px 0; text-align: center;">To view their profile click here: <a style="color: #3ba1da; text-decoration: none;" href="{user_profile_link}">{user_profile_link}</a></div> <div style="padding: 0 0 15px 0;"> <div style="background: #eee; color: #444; padding: 12px 15px; border-radius: 3px; font-weight: bold; font-size: 16px;">Here is the submitted registration form:<br><br>{submitted_registration}</div> </div> </div> <div style="color: #999; padding: 20px 30px;"> <div>Thank you!</div> <div>The <a style="color: #3ba1da; text-decoration: none;" href="{site_url}">{site_name}</a> Team</div> </div> </div>PK �@0]3��D� � email/notification_review.phpnu �[��� <div style="max-width: 560px; padding: 20px; background: #ffffff; border-radius: 5px; margin: 40px auto; font-family: Open Sans,Helvetica,Arial; font-size: 15px; color: #666;"> <div style="color: #444444; font-weight: normal;"> <div style="text-align: center; font-weight: 600; font-size: 26px; padding: 10px 0; border-bottom: solid 3px #eeeeee;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Centro Castilla</span></span></div> <div style="clear: both;"> </div> </div> <div style="padding: 0 30px 30px 30px; border-bottom: 3px solid #eeeeee;"> <div style="padding: 30px 0; font-size: 24px; text-align: center; line-height: 40px;"><span style="vertical-align: inherit;">{display_name} acaba de solicitar la membresía de {site_name} y está esperando ser revisado.</span></div> <div style="padding: 10px 0 50px 0; text-align: center;"><a style="color: #3ba1da; text-decoration: none;" href="{user_profile_link}"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Para revisar este miembro, haga clic en el siguiente enlace: </span>{user_profile_link}</span></span></a></div> <div style="padding: 0 0 15px 0;"> <div style="background: #eee; color: #444; padding: 12px 15px; border-radius: 3px; font-weight: bold; font-size: 16px;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Aquí está el formulario de registro enviado: </span></span><br><br><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{submit_registration}</span></span></div> </div> </div> <div style="color: #999; padding: 20px 30px;"> <div><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">¡Gracias!</span></span></div> <div><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">El Centro Castilla y León </span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">equipo</span></span></div> </div> </div>PK �@0]>2+^{ { email/approved_email.phpnu �[��� <div style="max-width: 560px; padding: 20px; background: #ffffff; border-radius: 5px; margin: 40px auto; font-family: Open Sans,Helvetica,Arial; font-size: 15px; color: #666;"> <div style="color: #444444; font-weight: normal;"> <div style="text-align: center; font-weight: 600; font-size: 26px; padding: 10px 0; border-bottom: solid 3px #eeeeee;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{nombre del sitio}</span></span></div> <div style="clear: both;"> </div> </div> <div style="padding: 0 30px 30px 30px; border-bottom: 3px solid #eeeeee;"> <div style="padding: 30px 0; font-size: 24px; text-align: center; line-height: 40px;"><span style="vertical-align: inherit;">Gracias por registrarte!</span><span style="display: block;"><span style="vertical-align: inherit;">Su cuenta ahora está aprobada.</span></span></div> <div style="padding: 10px 0 50px 0; text-align: center;"><a style="background: #555555; color: #fff; padding: 12px 30px; text-decoration: none; border-radius: 3px; letter-spacing: 0.3px;" href="{login_url}"><span style="vertical-align: inherit;">Ingrese a nuestro sitio</span></a></div> <div style="padding: 0 0 15px 0;"> <div style="background: #eee; color: #444; padding: 12px 15px; border-radius: 3px; font-weight: bold; font-size: 16px;"><span style="vertical-align: inherit;">Información de la cuenta</span></div> <div style="padding: 10px 15px 0 15px; color: #333;"><span style="font-weight: bold;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="color: #999;"><span style="vertical-align: inherit;">Correo electrónico de su cuenta: </span></span>{email}</span></span></span></div> <div style="padding: 10px 15px 0 15px; color: #333;"><span style="color: #999;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Su nombre de usuario de la cuenta:</span> </span></span></span><span style="font-weight: bold;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{username}</span></span></span></div> <div style="padding: 10px 15px 0 15px; color: #333;"><span style="color: #999;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Establezca su contraseña:</span> </span></span></span><span style="font-weight: bold;"><a style="color: #3ba1da; text-decoration: none;" href="{password_reset_link}"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{password_reset_link}</span></span></a></span></div> </div> </div> <div style="color: #999; padding: 20px 30px;"> <div><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">¡Gracias!</span></span></div> <div><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">El </span></span><a style="color: #3ba1da; text-decoration: none;" href="{site_url}"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{} nombre_del_sitio</span></span></a><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"> equipo</span></span></div> </div> </div>PK �@0]��uT� � email/pending_email.phpnu �[��� <div style="max-width: 560px; padding: 20px; background: #ffffff; border-radius: 5px; margin: 40px auto; font-family: Open Sans,Helvetica,Arial; font-size: 15px; color: #666;"> <div style="color: #444444; font-weight: normal;"> <div style="text-align: center; font-weight: 600; font-size: 26px; padding: 10px 0; border-bottom: solid 3px #eeeeee;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{nombre del sitio}</span></span></div> <div style="clear: both;"> </div> </div> <div style="padding: 0 30px 30px 30px; border-bottom: 3px solid #eeeeee;"> <div style="padding: 30px 0; font-size: 24px; text-align: center; line-height: 40px;"> <div style="padding: 30px 0; font-size: 24px; text-align: center; line-height: 40px;"><span style="vertical-align: inherit;">Gracias por registrarte!</span><span style="display: block;"><span style="vertical-align: inherit;">Su cuenta debe revisarse manualmente.</span></span></div> <div style="padding: 15px; background: #eee; border-radius: 3px; text-align: center;"><span style="vertical-align: inherit;">Permítanos algo de tiempo para procesar su solicitud y revisar su información.</span></div> </div> </div> <div style="color: #999; padding: 20px 30px;"> <div><span style="vertical-align: inherit;">¡Gracias!</span></div> <div><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">El </span></span><a style="color: #3ba1da; text-decoration: none;" href="{site_url}"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{} nombre_del_sitio</span></span></a><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"> equipo</span></span></div> </div> </div>PK �@0],��x email/checkmail_email.phpnu �[��� <div style="max-width: 560px; padding: 20px; background: #ffffff; border-radius: 5px; margin: 40px auto; font-family: Open Sans,Helvetica,Arial; font-size: 15px; color: #666;"> <div style="color: #444444; font-weight: normal;"> <div style="text-align: center; font-weight: 600; font-size: 26px; padding: 10px 0; border-bottom: solid 3px #eeeeee;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{nombre del sitio}</span></span></div> <div style="clear: both;"> </div> </div> <div style="padding: 0 30px 30px 30px; border-bottom: 3px solid #eeeeee;"> <div style="padding: 30px 0; font-size: 24px; text-align: center; line-height: 40px;"><span style="vertical-align: inherit;">Gracias por registrarte!</span><span style="display: block;"><span style="vertical-align: inherit;">Haga clic en el siguiente enlace para activar su cuenta.</span></span></div> <div style="padding: 10px 0 50px 0; text-align: center;"><a style="background: #555555; color: #fff; padding: 12px 30px; text-decoration: none; border-radius: 3px; letter-spacing: 0.3px;" href="{account_activation_link}"><span style="vertical-align: inherit;">Activa tu cuenta</span></a></div> <div style="padding: 15px; background: #eee; border-radius: 3px; text-align: center;"><span style="vertical-align: inherit;">¿Necesitas ayuda? </span><a style="color: #3ba1da; text-decoration: none;" href="mailto:{admin_email}"><span style="vertical-align: inherit;">contáctenos</span></a><span style="vertical-align: inherit;"> hoy.</span></div> </div> <div style="color: #999; padding: 20px 30px;"> <div><span style="vertical-align: inherit;">¡Gracias!</span></div> <div><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">El </span></span><a style="color: #3ba1da; text-decoration: none;" href="{site_url}"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{} nombre_del_sitio</span></span></a><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"> equipo</span></span></div> </div> </div>PK �@0]��� email/welcome_email.phpnu �[��� <div style="max-width: 560px; padding: 20px; background: #ffffff; border-radius: 5px; margin: 40px auto; font-family: Open Sans,Helvetica,Arial; font-size: 15px; color: #666;"> <div style="color: #444444; font-weight: normal;"> <div style="text-align: center; font-weight: 600; font-size: 26px; padding: 10px 0; border-bottom: solid 3px #eeeeee;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{nombre del sitio}</span></span></div> <div style="clear: both;"> </div> </div> <div style="padding: 0 30px 30px 30px; border-bottom: 3px solid #eeeeee;"> <div style="padding: 30px 0; font-size: 24px; text-align: center; line-height: 40px;"><span style="vertical-align: inherit;">Gracias por registrarte!</span><span style="display: block;"><span style="vertical-align: inherit;">Su cuenta ahora está activa.</span></span></div> <div style="padding: 10px 0 50px 0; text-align: center;"><a style="background: #555555; color: #fff; padding: 12px 30px; text-decoration: none; border-radius: 3px; letter-spacing: 0.3px;" href="{login_url}"><span style="vertical-align: inherit;">Ingrese a nuestro sitio</span></a></div> <div style="padding: 20px;"><a style="color: #3ba1da; text-decoration: none;" href="mailto:{admin_email}"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Si tiene algún problema, comuníquese con nosotros al </span>{admin_email}</span></span></a></div> </div> <div style="color: #999; padding: 20px 30px;"> <div><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">¡Gracias!</span></span></div> <div><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">El </span></span><a style="color: #3ba1da; text-decoration: none;" href="{site_url}"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">{} nombre_del_sitio</span></span></a><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"> equipo</span></span></div> </div> </div>PK KB0]�*� 5 5 ( includes/action-scheduler/class-init.phpnu �[��� <?php namespace um\action_scheduler; if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'um\action_scheduler\Init' ) ) { /** * Class Init * * @since 2.9.0 * * @package um\action_scheduler */ class Init { /** * Global variable if Action Scheduler is active. * * @var bool */ protected $enabled = false; /** * Action Scheduler group * * @var string */ protected $default_group = 'ultimate-member'; /** * Path to library * * @var string */ protected $lib_path = UM_PATH . 'includes/lib/action-scheduler/action-scheduler.php'; /** * */ public function __construct() { if ( ! $this->can_be_active() ) { add_action( 'init', array( $this, 'add_notice' ) ); add_filter( 'um_site_health_extend', array( $this, 'change_site_health' ) ); } else { add_filter( 'um_settings_structure', array( $this, 'add_setting' ) ); // Since 2.10.3 we load library as soon as there are required library files. // Options above are used for enable/disable some Action Scheduler hooks e.g. um_dispatch_email. $this->enabled = true; $this->load_library( true ); } } public function is_enabled() { return $this->enabled; } public function add_notice() { UM()->admin()->notices()->add_notice( 'um-action-scheduler', array( 'class' => 'notice-warning is-dismissible', // translators: %1$s - Plugin name, %1$s - Plugin Version 'message' => '<p>' . sprintf( __( '<strong>%1$s %2$s</strong> The file needed to enable the Action Scheduler is missing. The plugin will continue to function as it did before, but without the new benefits offered by the Action Scheduler.', 'ultimate-member' ), UM_PLUGIN_NAME, UM_VERSION ) . '</p>', ) ); } /** * Adds the Action Scheduler setting to Ultimate Member feature settings * * @param array $settings * * @return array */ public function change_site_health( $site_health ) { $site_health['ultimate-member']['fields']['enable_as_email_sending']['value'] = __( 'No', 'ultimate-member' ); return $site_health; } /** * Adds the Action Scheduler setting to Ultimate Member feature settings * * @param array $settings * * @return array */ public function add_setting( $settings ) { $settings['advanced']['sections']['features']['form_sections']['features']['fields'][] = array( 'id' => 'enable_as_email_sending', 'type' => 'checkbox', 'label' => __( 'Email sending by Action Scheduler', 'ultimate-member' ), 'checkbox_label' => __( 'Enable Action Scheduler for Ultimate Member emails sending', 'ultimate-member' ), 'description' => __( 'Check this box if you want to use the Action Scheduler for Ultimate Member emails sending. By enabling it, sending system emails will be scheduled to run at optimal times, which can help reduce the load on your server', 'ultimate-member' ), ); return $settings; } /** * Verifies whether WooCommerce is installed and activated, * and checks for the existence of the WooCommerce Action Scheduler file. * * @return bool */ public function verify_wc_action_scheduler() { if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) { return false; } $action_scheduler_file = WP_PLUGIN_DIR . '/woocommerce/packages/action-scheduler/action-scheduler.php'; return file_exists( $action_scheduler_file ); } /** * Tries to load Action Scheduler from Ultimate Member if file exists * * @param bool $force * * @return bool */ public function load_library( $force = false ) { if ( file_exists( $this->lib_path ) ) { if ( $force ) { require_once $this->lib_path; } return true; } return false; } /** * Checks whenever Action Scheduler can be active * * @return bool */ public function can_be_active() { return $this->verify_wc_action_scheduler() || $this->load_library(); } public function is_hook_enabled( $hook ) { return apply_filters( 'um_action_scheduler_is_hook_enabled', $this->is_enabled(), $hook ); } /** * Enqueue an action to run one time, as soon as possible. * If Action Scheduler is disabled then do_action_ref_array is called to run action right away. * * @param string $hook Required. Name of the action hook. * @param array $args Arguments to pass to callbacks when the hook triggers. Default: array(). * @param string $group The group to assign this job to. Default: ''. * @param bool $unique Whether the action should be unique. Default: false. * @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255. * * @return int Еhe action’s ID. Zero if there was an error scheduling the action. The error will be sent to error_log */ public function enqueue_async_action( $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) { if ( $this->is_hook_enabled( $hook ) ) { $group = $this->set_group( $group ); return as_enqueue_async_action( $hook, $args, $group, $unique, $priority ); } // Make then standard action without Action Scheduler. do_action_ref_array( $hook, $args ); return 0; } /** * Schedule an action to run one time at some defined point in the future. * * @param int $timestamp Required. The Unix timestamp representing the date you want the action to run. * @param string $hook Required. Name of the action hook. * @param array $args Arguments to pass to callbacks when the hook triggers. Default: array() * @param string $group The group to assign this job to. Default: ''. * @param bool $unique Whether the action should be unique. Default: false. * @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255. * * @return int The action’s ID. Zero if there was an error scheduling the action. The error will be sent to error_log. */ public function schedule_single_action( $timestamp, $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) { if ( $this->is_hook_enabled( $hook ) ) { $group = $this->set_group( $group ); return as_schedule_single_action( $timestamp, $hook, $args, $group, $unique, $priority ); } // Make then standard action without Action Scheduler. do_action_ref_array( $hook, $args ); return 0; } /** * Schedule an action to run repeatedly with a specified interval in seconds. * * @param int $timestamp Required. The Unix timestamp representing the date you want the action to run. * @param int $interval_in_seconds Required. How long to wait between runs. * @param string $hook Required. Name of the action hook. * @param array $args Arguments to pass to callbacks when the hook triggers. Default: array(). * @param string $group The group to assign this job to. Default: ''. * @param bool $unique Whether the action should be unique. Default: false. * @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255. * * @return int The action’s ID. Zero if there was an error scheduling the action. The error will be sent to error_log. */ public function schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) { $group = $this->set_group( $group ); return as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args, $group, $unique, $priority ); } /** * Schedule an action that recurs on a cron-like schedule. * * If execution of a cron-like action is delayed, the next attempt will still be scheduled according to the provided cron expression. * * @param int $timestamp Required. The Unix timestamp representing the date you want the action to run. * @param string $schedule Required. A cron-like schedule string, see http://en.wikipedia.org/wiki/Cron. * @param string $hook Required Name of the action hook. * @param array $args Arguments to pass to callbacks when the hook triggers. Default: array(). * @param string $group The group to assign this job to. Default: ''. * @param bool $unique Whether the action should be unique. Default: false. * @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255. * * @return int The action’s ID. Zero if there was an error scheduling the action. The error will be sent to error_log. */ public function schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) { $group = $this->set_group( $group ); return as_schedule_cron_action( $timestamp, $schedule, $hook, $args, $group, $unique, $priority ); } /** * Cancel the next occurrence of a scheduled action. * * @param string $hook Required. Name of the action hook. * @param array $args Arguments passed to callbacks when the hook triggers. Default: array(). * @param string $group The group the job is assigned to. Default: ''. * * @return int|null The scheduled action ID if a scheduled action was found, or null if no matching action found. */ public function unschedule_action( $hook, $args = array(), $group = '' ) { $group = $this->set_group( $group ); return as_unschedule_action( $hook, $args, $group ); } /** * Cancel all occurrences of a scheduled action. * * @param string $hook The hook that the job will trigger. * @param array $args Args that would have been passed to the job. * @param string $group The group the job is assigned to. */ public function unschedule_all_actions( $hook, $args = array(), $group = '' ) { $group = $this->set_group( $group ); as_unschedule_all_actions( $hook, $args, $group ); } /** * Returns the next timestamp for a scheduled action. * * @param string $hook Required. Name of the action hook. Default: none. * @param array $args Arguments passed to callbacks when the hook triggers. Default: array(). * @param string $group The group the job is assigned to. Default: ''. * * @return int|bool The timestamp for the next occurrence of a pending scheduled action, true for an async or in-progress action or false if there is no matching action. */ public function next_scheduled_action( $hook, $args = array(), $group = '' ) { $group = $this->set_group( $group ); return as_next_scheduled_action( $hook, $args, $group ); } /** * Check if there is a scheduled action in the queue, but more efficiently than as_next_scheduled_action(). * It’s recommended to use this function when you need to know whether a specific action is currently scheduled. * * @param string $hook Required. Name of the action hook. Default: none. * @param array $args Arguments passed to callbacks when the hook triggers. Default: array(). * @param string $group The group the job is assigned to. Default: ''. * * @return bool True if a matching action is pending or in-progress, false otherwise. */ public function has_scheduled_action( $hook, $args = array(), $group = '' ) { $group = $this->set_group( $group ); return as_has_scheduled_action( $hook, $args, $group ); } /** * @param array $args Arguments to search and filter results by. Possible arguments, with their default values: * 'hook' => '' - the name of the action that will be triggered * 'args' => NULL - the args array that will be passed with the action * 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). * 'date_compare' => '<=' - operator for testing “date”. accepted values are ‘!=’, ‘>’, ‘>=’, ‘<’, ‘<=’, ‘=’ * 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). * 'modified_compare' => '<=' - operator for testing “modified”. accepted values are ‘!=’, ‘>’, ‘>=’, ‘<’, ‘<=’, ‘=’ * 'group' => '' - the group the action belongs to * 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING * 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID * 'per_page' => 5 - Number of results to return * 'offset' => 0 * 'orderby' => 'date' - accepted values are ‘hook’, ‘group’, ‘modified’, or ‘date’ * 'order' => 'ASC' * * @param string $return_format The format in which to return the scheduled actions: 'OBJECT', 'ARRAY_A', or 'ids'. Default: 'OBJECT'. * * @return array Array of action rows matching the criteria specified with $args. */ public function get_scheduled_actions( $args, $return_format = 'OBJECT' ) { if ( ! empty( $args['group'] ) ) { $args['group'] = $this->set_group( $args['group'] ); } return as_get_scheduled_actions( $args, $return_format ); } public function set_group( $group ) { if ( empty( $group ) ) { return $this->default_group; } return $this->default_group . '_' . $group; } } } PK KB0]�$�( ( includes/class-extensions.phpnu �[��� <?php namespace um; // Exit if executed directly if ( ! defined( 'ABSPATH' ) ) exit; if ( ! class_exists( 'um\Extensions' ) ) { /** * Class Extensions * * @package um * * @method void bbpress_activation() */ class Extensions { /** * Extensions list * * @var array */ var $list = array(); /** * Extensions data * * @var array */ var $plugin_data = array(); /** * Extensions constructor. */ function __construct() { } /** * */ function check_dependencies() { $extensions = $this->get_list(); foreach ( $extensions as $slug ) { $extension = $this->get_info( $slug ); list( $run, $slug, $message ) = apply_filters_ref_array( 'um_extension_custom_dependencies', array( true, $slug, '' ) ); if ( $run ) { $compare_version_result = UM()->dependencies()->compare_versions( $extension['min_core_version'], $extension['version'], $slug, $extension['title'] ); if ( true !== $compare_version_result ) { UM()->admin()->notices()->add_notice( "{$slug}_dependencies", array( 'class' => 'error', 'message' => '<p>' . $compare_version_result . '</p>', ), 1 ); } } elseif ( ! $run && ! empty( $message ) ) { UM()->admin()->notices()->add_notice( "{$slug}_dependencies", array( 'class' => 'error', 'message' => $message, ), 1 ); } if ( $run ) { UM()->call_class( "um_ext\um_{$slug}\Init" ); } } } /** * @param $settings * * @return mixed */ function license_options( $settings ) { $extensions = $this->get_list(); if ( empty( $extensions ) ) { return $settings; } foreach ( $extensions as $slug ) { $extension = $this->get_info( $slug ); if ( isset( $extension['plan'] ) && $extension['plan'] == 'free' ) { continue; } $settings['licenses']['fields'][] = array( 'id' => "um_{$slug}_license_key", // translators: %s: extension name. 'label' => sprintf( __( '%s License Key', 'ultimate-member' ), $extension['title'] ), 'item_name' => $extension['item_name'], 'author' => 'Ultimate Member', 'version' => $extension['version'], ); } return $settings; } /** * Loading Extensions localizations */ function localization() { $extensions = $this->get_list(); foreach ( $extensions as $slug ) { $extension = $this->get_info( $slug ); $locale = ( get_locale() != '' ) ? get_locale() : 'en_US'; load_textdomain( $extension['textdomain'], WP_LANG_DIR . '/plugins/' . $extension['textdomain'] . '-' . $locale . '.mo'); load_plugin_textdomain( $extension['textdomain'], false, dirname( $extension['plugin'] ) . '/languages/' ); } } /** * @param $slug * * @return string */ function get_version( $slug ) { $version = ''; return $version; } /** * @param $slug * @param bool $field * * @return array|bool */ function get_info( $slug, $field = false ) { if ( ! $field ) { return ! empty( $this->plugin_data[ $slug ] ) ? $this->plugin_data[ $slug ] : array(); } else { return ! empty( $this->plugin_data[ $slug ][ $field ] ) ? $this->plugin_data[ $slug ][ $field ] : false; } } /** * @param string $slug * @param array $plugin_data */ function add( $slug, $plugin_data ) { $this->list[] = $slug; $this->plugin_data[ $slug ] = $plugin_data; } /** * Activate Extension Process * Common functions in activation * * @param $slug */ function activate( $slug ) { $plugin_data = $this->get_info( $slug ); //if extension wasn't inited, init it firstly via "um_{$slug}_add" function //"um_{$slug}_add" must be in the preset structure of UM extension if ( empty( $plugin_data ) && function_exists( "um_{$slug}_add" ) ) { call_user_func( "um_{$slug}_add" ); $plugin_data = $this->get_info( $slug ); } //first install $version = get_option( "um_{$slug}_version" ); if ( ! $version ) { update_option( "um_{$slug}_last_version_upgrade", $plugin_data['version'] ); } if ( $version != $plugin_data['version'] ) { update_option( "um_{$slug}_version", $plugin_data['version'] ); } //start setup UM()->extension( $slug )->setup()->start(); } /** * @return array */ function get_list() { return $this->list; } function get_packages( $slug ) { $plugin_info = $this->get_info( $slug ); $packages_dir = $plugin_info['path'] . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'packages'; $update_versions = array(); $handle = opendir( $packages_dir ); if ( $handle ) { while ( false !== ( $filename = readdir( $handle ) ) ) { if ( $filename != '.' && $filename != '..' ) { if ( is_dir( $packages_dir . DIRECTORY_SEPARATOR . $filename ) ) { $update_versions[] = $filename; } } } closedir( $handle ); usort( $update_versions, array( UM()->admin_upgrade(), 'version_compare_sort' ) ); } return $update_versions; } } } PK KB0]�z�[ �[ includes/class-functions.phpnu �[��� <?php if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'UM_Functions' ) ) { /** * Class UM_Functions */ class UM_Functions { /** * Store URL * * @var string */ public static $store_url = 'https://ultimatemember.com/?edd-request=get-info'; /** * WP remote Post timeout * @var int */ public static $request_timeout = 60; /** * Check if AJAX now * * @return bool */ function is_ajax() { return function_exists( 'wp_doing_ajax' ) ? wp_doing_ajax() : defined( 'DOING_AJAX' ); } /** * Check frontend nonce * * @param bool $action */ function check_ajax_nonce( $action = false ) { $nonce = isset( $_REQUEST['nonce'] ) ? sanitize_text_field( $_REQUEST['nonce'] ) : ''; $action = empty( $action ) ? 'um-frontend-nonce' : $action; if ( ! wp_verify_nonce( $nonce, $action ) ) { wp_send_json_error( esc_js( __( 'Wrong Nonce', 'ultimate-member' ) ) ); } } /** * Check if the user rate limit has been reached based on the provided context * * @param string $context The context for which the rate limit check is being performed * @param int|null $requests_num Number requests per minute. Default 10. * * @return bool True if the rate limit has been reached, false otherwise */ public function is_rate_limited( $context, $requests_num = 10 ) { if ( is_user_logged_in() ) { return false; } if ( ! UM()->options()->get( 'ajax_nopriv_rate_limit' ) ) { return false; } $transient_name = 'um_ajax_nopriv_rate_limit_' . md5( $context . '_' . $_SERVER['REMOTE_ADDR'] ); $rate_limit = get_transient( $transient_name ); $requests_num = apply_filters( 'um_ajax_rate_limit_requests_num', $requests_num, $context ); // 10 requests per minute per IP if ( false === $rate_limit ) { set_transient( $transient_name, 1, MINUTE_IN_SECONDS ); } elseif ( $rate_limit < $requests_num ) { set_transient( $transient_name, $rate_limit + 1, MINUTE_IN_SECONDS ); } else { return true; } return false; } /** * What type of request is this? * * @param string $type String containing name of request type (ajax, frontend, cron or admin) * * @return bool */ public function is_request( $type ) { switch ( $type ) { case 'admin' : return is_admin(); case 'ajax' : return defined( 'DOING_AJAX' ); case 'cron' : return defined( 'DOING_CRON' ); case 'frontend' : return ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ); } return false; } /** * Help Tip displaying * * Function for render/displaying UltimateMember help tip * * @since 2.0.0 * * @param string $tip Help tip text * @param bool $allow_html Allow sanitized HTML if true or escape * @param bool $echo Return HTML or echo * @return string */ function tooltip( $tip, $allow_html = false, $echo = true ) { if ( $allow_html ) { $tip = htmlspecialchars( wp_kses( html_entity_decode( $tip ), array( 'br' => array(), 'em' => array(), 'strong' => array(), 'small' => array(), 'span' => array(), 'ul' => array(), 'li' => array(), 'ol' => array(), 'p' => array(), ) ) ); } else { $tip = esc_attr( $tip ); } ob_start(); ?> <span class="um_tooltip dashicons dashicons-editor-help" title="<?php echo $tip ?>"></span> <?php if ( $echo ) { ob_get_flush(); return ''; } else { return ob_get_clean(); } } /** * @return mixed|void */ function excluded_taxonomies() { $taxes = array( 'nav_menu', 'link_category', 'post_format', ); /** * UM hook * * @type filter * @title um_excluded_taxonomies * @description Exclude taxonomies for UM * @input_vars * [{"var":"$taxes","type":"array","desc":"Taxonomies keys"}] * @change_log * ["Since: 2.0"] * @usage * <?php add_filter( 'um_excluded_taxonomies', 'function_name', 10, 1 ); ?> * @example * <?php * add_filter( 'um_excluded_taxonomies', 'my_excluded_taxonomies', 10, 1 ); * function my_excluded_taxonomies( $taxes ) { * // your code here * return $taxes; * } * ?> */ return apply_filters( 'um_excluded_taxonomies', $taxes ); } /** * Output templates * * @access public * @param string $template_name * @param string $basename (default: '') * @param array $t_args (default: array()) * @param bool $echo * * @return string|void */ public function get_template( $template_name, $basename = '', $t_args = array(), $echo = false ) { if ( ! empty( $t_args ) && is_array( $t_args ) ) { /* * This use of extract() cannot be removed. There are many possible ways that * templates could depend on variables that it creates existing, and no way to * detect and deprecate it. * * Passing the EXTR_SKIP flag is the safest option, ensuring globals and * function variables cannot be overwritten. */ // phpcs:ignore WordPress.PHP.DontExtract.extract_extract extract( $t_args, EXTR_SKIP ); } $path = ''; if ( $basename ) { // use '/' instead of "DIRECTORY_SEPARATOR", because wp_normalize_path makes the correct replacement $array = explode( '/', wp_normalize_path( trim( $basename ) ) ); $path = $array[0]; } $located = $this->locate_template( $template_name, $path ); if ( ! file_exists( $located ) ) { _doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $located ), '2.1' ); return; } /** * UM hook * * @type filter * @title um_get_template * @description Change template location * @input_vars * [{"var":"$located","type":"string","desc":"template Located"}, * {"var":"$template_name","type":"string","desc":"Template Name"}, * {"var":"$path","type":"string","desc":"Template Path at server"}, * {"var":"$t_args","type":"array","desc":"Template Arguments"}] * @change_log * ["Since: 2.0"] * @usage add_filter( 'um_get_template', 'function_name', 10, 4 ); * @example * <?php * add_filter( 'um_get_template', 'my_get_template', 10, 4 ); * function my_get_template( $located, $template_name, $path, $t_args ) { * // your code here * return $located; * } * ?> */ $located = apply_filters( 'um_get_template', $located, $template_name, $path, $t_args ); ob_start(); /** * UM hook * * @type action * @title um_before_template_part * @description Make some action before include template file * @input_vars * [{"var":"$template_name","type":"string","desc":"Template Name"}, * {"var":"$path","type":"string","desc":"Template Path at server"}, * {"var":"$located","type":"string","desc":"template Located"}, * {"var":"$t_args","type":"array","desc":"Template Arguments"}] * @change_log * ["Since: 2.0"] * @usage add_action( 'um_before_template_part', 'function_name', 10, 4 ); * @example * <?php * add_action( 'um_before_template_part', 'my_before_template_part', 10, 4 ); * function my_before_template_part( $template_name, $path, $located, $t_args ) { * // your code here * } * ?> */ do_action( 'um_before_template_part', $template_name, $path, $located, $t_args ); include $located; /** * UM hook * * @type action * @title um_after_template_part * @description Make some action after include template file * @input_vars * [{"var":"$template_name","type":"string","desc":"Template Name"}, * {"var":"$path","type":"string","desc":"Template Path at server"}, * {"var":"$located","type":"string","desc":"template Located"}, * {"var":"$t_args","type":"array","desc":"Template Arguments"}] * @change_log * ["Since: 2.0"] * @usage add_action( 'um_after_template_part', 'function_name', 10, 4 ); * @example * <?php * add_action( 'um_after_template_part', 'my_after_template_part', 10, 4 ); * function my_after_template_part( $template_name, $path, $located, $t_args ) { * // your code here * } * ?> */ do_action( 'um_after_template_part', $template_name, $path, $located, $t_args ); $html = ob_get_clean(); if ( ! $echo ) { return $html; } else { echo $html; return; } } /** * Locate a template and return the path for inclusion. * * @access public * @param string $template_name * @param string $path (default: '') * @return string */ function locate_template( $template_name, $path = '' ) { // check if there is template at theme folder $template = locate_template( array( trailingslashit( 'ultimate-member' . DIRECTORY_SEPARATOR . $path ) . $template_name ) ); if ( ! $template ) { if ( $path ) { $template = trailingslashit( trailingslashit( WP_PLUGIN_DIR ) . $path ); } else { $template = trailingslashit( UM_PATH ); } $template .= 'templates' . DIRECTORY_SEPARATOR . $template_name; } /** * UM hook * * @type filter * @title um_locate_template * @description Change template locate * @input_vars * [{"var":"$template","type":"string","desc":"Template locate"}, * {"var":"$template_name","type":"string","desc":"Template Name"}, * {"var":"$path","type":"string","desc":"Template Path at server"}] * @change_log * ["Since: 2.0"] * @usage add_filter( 'um_locate_template', 'function_name', 10, 3 ); * @example * <?php * add_filter( 'um_locate_template', 'my_locate_template', 10, 3 ); * function my_locate_template( $template, $template_name, $path ) { * // your code here * return $template; * } * ?> */ return apply_filters( 'um_locate_template', $template, $template_name, $path ); } /** * @deprecated 2.8.0 * * @return array */ public function cpt_list() { _deprecated_function( __METHOD__, '2.8.0', 'UM()->common()->cpt()->get_list()' ); return UM()->common()->cpt()->get_list(); } /** * @param array $array * @param string $key * @param array $insert_array * * @return array */ function array_insert_before( $array, $key, $insert_array ) { $index = array_search( $key, array_keys( $array ) ); if ( $index === false ) { return $array; } $array = array_slice( $array, 0, $index, true ) + $insert_array + array_slice( $array, $index, count( $array ) - 1, true ); return $array; } /** * @since 2.1.0 * * @param $var * @return array|string */ function clean_array( $var ) { if ( is_array( $var ) ) { return array_map( array( $this, 'clean_array' ), $var ); } else { return ! is_scalar( $var ) ? sanitize_text_field( $var ) : $var; } } /** * Replace the first match in the string, alternative for the `str_replace()` function * * @param string $search * @param string $replace * @param string $subject * * @return string */ function str_replace_first( $search, $replace, $subject ) { $search = '/' . preg_quote( $search, '/' ) . '/'; return preg_replace( $search, $replace, $subject, 1 ); } /** * @param string $context * * @return array */ public function get_allowed_html( $context = '' ) { switch ( $context ) { case 'wp-admin': $allowed_html = array( 'img' => array( 'alt' => true, 'align' => true, 'border' => true, 'height' => true, 'hspace' => true, 'loading' => true, 'longdesc' => true, 'vspace' => true, 'src' => true, 'srcset' => true, 'usemap' => true, 'width' => true, ), 'ol' => array(), 'ul' => array(), 'li' => array(), 'h1' => array( 'align' => true, ), 'h2' => array( 'align' => true, ), 'h3' => array( 'align' => true, ), 'p' => array( 'align' => true, 'dir' => true, 'lang' => true, ), 'form' => array( 'action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true, ), 'label' => array( 'for' => true, ), 'select' => array( 'name' => true, 'multiple' => true, 'disabled' => true, 'readonly' => true, 'required' => true, 'autocomplete' => true, ), 'option' => array( 'value' => true, 'selected' => true, 'disabled' => true, ), 'input' => array( 'type' => true, 'name' => true, 'value' => true, 'placeholder' => true, 'readonly' => true, 'disabled' => true, 'checked' => true, 'selected' => true, 'required' => true, 'autocomplete' => true, ), 'textarea' => array( 'cols' => true, 'rows' => true, 'disabled' => true, 'name' => true, 'readonly' => true, 'required' => true, 'autocomplete' => true, ), 'table' => array( 'align' => true, 'bgcolor' => true, 'border' => true, 'cellpadding' => true, 'cellspacing' => true, 'dir' => true, 'rules' => true, 'summary' => true, 'width' => true, ), 'tbody' => array( 'align' => true, 'char' => true, 'charoff' => true, 'valign' => true, ), 'td' => array( 'abbr' => true, 'align' => true, 'axis' => true, 'bgcolor' => true, 'char' => true, 'charoff' => true, 'colspan' => true, 'dir' => true, 'headers' => true, 'height' => true, 'nowrap' => true, 'rowspan' => true, 'scope' => true, 'valign' => true, 'width' => true, ), 'tfoot' => array( 'align' => true, 'char' => true, 'charoff' => true, 'valign' => true, ), 'th' => array( 'abbr' => true, 'align' => true, 'axis' => true, 'bgcolor' => true, 'char' => true, 'charoff' => true, 'colspan' => true, 'headers' => true, 'height' => true, 'nowrap' => true, 'rowspan' => true, 'scope' => true, 'valign' => true, 'width' => true, ), 'thead' => array( 'align' => true, 'char' => true, 'charoff' => true, 'valign' => true, ), 'tr' => array( 'align' => true, 'bgcolor' => true, 'char' => true, 'charoff' => true, 'valign' => true, ), 'a' => array( 'onclick' => array(), ), ); break; case 'templates': $allowed_html = array( 'style' => array(), 'link' => array( 'rel' => true, 'href' => true, 'media' => true, ), 'svg' => array( 'xmlns' => true, 'height' => true, 'preserveaspectratio' => true, 'viewbox' => true, 'width' => true, 'x' => true, 'y' => true, 'fill' => true, 'stroke' => true, 'stroke-linecap' => true, 'stroke-linejoin' => true, 'stroke-width' => true, ), 'path' => array( 'd' => true, 'stroke' => true, 'stroke-width' => true, 'stroke-linecap' => true, 'stroke-linejoin' => true, 'fill' => true, ), 'form' => array( 'action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true, 'novalidate' => true, ), 'label' => array( 'for' => true, ), 'select' => array( 'name' => true, 'multiple' => true, 'disabled' => true, 'readonly' => true, 'required' => true, 'autocomplete' => true, ), 'option' => array( 'value' => true, 'selected' => true, 'disabled' => true, ), 'input' => array( 'type' => true, 'name' => true, 'value' => true, 'placeholder' => true, 'readonly' => true, 'disabled' => true, 'checked' => true, 'selected' => true, 'required' => true, 'autocomplete' => true, 'size' => true, 'step' => true, 'min' => true, 'max' => true, 'minlength' => true, 'maxlength' => true, 'pattern' => true, ), 'textarea' => array( 'cols' => true, 'rows' => true, 'disabled' => true, 'name' => true, 'readonly' => true, 'required' => true, 'autocomplete' => true, 'placeholder' => true, ), 'button' => array( 'type' => true, 'name' => true, 'value' => true, 'placeholder' => true, 'readonly' => true, 'disabled' => true, 'checked' => true, 'selected' => true, 'required' => true, 'autocomplete' => true, ), 'img' => array( 'alt' => true, 'align' => true, 'border' => true, 'height' => true, 'hspace' => true, 'loading' => true, 'longdesc' => true, 'vspace' => true, 'src' => true, 'srcset' => true, 'usemap' => true, 'width' => true, ), 'h1' => array( 'align' => true, ), 'h2' => array( 'align' => true, ), 'h3' => array( 'align' => true, ), 'h4' => array( 'align' => true, ), 'h5' => array( 'align' => true, ), 'h6' => array( 'align' => true, ), 'p' => array( 'align' => true, 'dir' => true, 'lang' => true, ), 'ol' => array(), 'ul' => array(), 'li' => array(), 'time' => array( 'datetime' => true, ), 'section' => array(), 'table' => array( 'align' => true, 'bgcolor' => true, 'border' => true, 'cellpadding' => true, 'cellspacing' => true, 'dir' => true, 'rules' => true, 'summary' => true, 'width' => true, ), 'tbody' => array( 'align' => true, 'char' => true, 'charoff' => true, 'valign' => true, ), 'thead' => array( 'align' => true, 'char' => true, 'charoff' => true, 'valign' => true, ), 'th' => array( 'abbr' => true, 'align' => true, 'axis' => true, 'bgcolor' => true, 'char' => true, 'charoff' => true, 'colspan' => true, 'headers' => true, 'height' => true, 'nowrap' => true, 'rowspan' => true, 'scope' => true, 'valign' => true, 'width' => true, ), 'tr' => array( 'align' => true, 'bgcolor' => true, 'char' => true, 'charoff' => true, 'valign' => true, ), 'td' => array( 'abbr' => true, 'align' => true, 'axis' => true, 'bgcolor' => true, 'char' => true, 'charoff' => true, 'colspan' => true, 'dir' => true, 'headers' => true, 'height' => true, 'nowrap' => true, 'rowspan' => true, 'scope' => true, 'valign' => true, 'width' => true, ), 'tfoot' => array( 'align' => true, 'char' => true, 'charoff' => true, 'valign' => true, ), 'noscript' => array(), 'del' => array(), 'blockquote' => array( 'cite' => true, ), ); break; case 'admin_notice': $allowed_html = array( 'p' => array( 'align' => true, 'dir' => true, 'lang' => true, ), 'label' => array( 'for' => true, ), 'strong' => array( 'style' => true, ), ); break; default: $allowed_html = array(); break; } $global_allowed = array( 'a' => array( 'href' => array(), 'rel' => true, 'rev' => true, 'name' => true, 'target' => true, 'download' => array( 'valueless' => 'y', ), ), 'em' => array(), 'i' => array(), 'b' => array(), 'q' => array( 'cite' => true, ), 's' => array(), 'strike' => array(), 'strong' => array(), 'br' => array(), 'div' => array( 'align' => true, 'dir' => true, 'lang' => true, ), 'span' => array( 'dir' => true, 'align' => true, 'lang' => true, ), 'code' => array(), 'hr' => array( 'style' => true, ), ); $allowed_html = array_merge_recursive( $global_allowed, $allowed_html ); $allowed_html = array_map( '_wp_add_global_attributes', $allowed_html ); /** * Filters the allowed HTML tags and their attributes in the late escaping before echo. * * Note: Please use the `wp_kses()` allowed tags structure. * * @since 2.5.4 * @hook um_late_escaping_allowed_tags * * @param {array} $allowed_html Allowed HTML tags with attributes. * @param {string} $context Function context 'wp-admin' for Admin Dashboard echo, 'templates' for the frontend. * * @return {array} Allowed HTML tags with attributes. * * @example <caption>It adds iframe HTML tag and 'onclick' attribute for strong tag.</caption> * function add_extra_kses_allowed_tags( $allowed_html, $context ) { * if ( 'templates' === $context ) { * $allowed_html['iframe'] = array( * 'src' => true, * ); * $allowed_html['strong']['onclick'] = true; * } * return $allowed_html; * } * add_filter( 'um_late_escaping_allowed_tags', 'add_extra_kses_allowed_tags', 10, 2 ); */ $allowed_html = apply_filters( 'um_late_escaping_allowed_tags', $allowed_html, $context ); return $allowed_html; } } } PK KB0]����� � + includes/widgets/class-um-search-widget.phpnu �[��� <?php namespace um\widgets; // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) exit; /** * Class UM_Search_Widget * @package um\widgets */ class UM_Search_Widget extends \WP_Widget { /** * UM_Search_Widget constructor. */ function __construct() { parent::__construct( // Base ID of your widget 'um_search_widget', // Widget name will appear in UI __( 'Ultimate Member - Search', 'ultimate-member' ), // Widget description array( 'description' => __( 'Shows the search member form.', 'ultimate-member' ), ) ); } /** * Creating widget front-end * * @param array $args * @param array $instance */ public function widget( $args, $instance ) { if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) { return; } if ( ! empty( $_GET['legacy-widget-preview'] ) && defined( 'IFRAME_REQUEST' ) && IFRAME_REQUEST ) { return; } $title = array_key_exists( 'title', $instance ) ? $instance['title'] : ''; $title = apply_filters( 'widget_title', $title ); // before and after widget arguments are defined by themes echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } // display the search form echo apply_shortcodes( '[ultimatemember_searchform /]' ); echo $args['after_widget']; } /** * Widget Backend * * @param array $instance */ public function form( $instance ) { if ( isset( $instance[ 'title' ] ) ) { $title = $instance[ 'title' ]; } else { $title = __( 'Search Users', 'ultimate-member' ); } if ( isset( $instance[ 'max' ] ) ) { $max = $instance[ 'max' ]; } else { $max = 11; } // Widget admin form ?> <p> <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title', 'ultimate-member' ); ?>:</label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /> </p> <?php } /** * Updating widget replacing old instances with new * * @param array $new_instance * @param array $old_instance * * @return array */ public function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; return $instance; } } PK KB0]y� �?>