Plugin Directory

Changeset 3384467


Ignore:
Timestamp:
10/25/2025 01:38:12 PM (5 months ago)
Author:
awesomefootnotes
Message:

Adding the first version of my plugin

Location:
0-day-analytics
Files:
40 edited
1 copied

Legend:

Unmodified
Added
Removed
  • 0-day-analytics/tags/3.7.4/classes/vendor/helpers/class-php-helper.php

    r3375967 r3384467  
    55 * @package    0-day
    66 * @subpackage helpers
    7  * @since      latest
     7 * @since 3.9.1
    88 * @license    https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
    99 */
     
    2121     * All the user related settings must go trough this class.
    2222     *
    23      * @since latest
     23     * @since 3.9.1
    2424     */
    2525    class PHP_Helper {
     
    3030         * @var array
    3131         *
    32          * @since latest
     32         * @since 3.9.1
    3333         */
    3434        private static $class_map = array();
     
    3939         * @return array
    4040         *
    41          * @since latest
     41         * @since 3.9.1
    4242         */
    4343        public static function get_class_map(): array {
     
    7373         * @return string|false
    7474         *
    75          * @since latest
     75         * @since 3.9.1
    7676         */
    7777        public static function get_class_by_filename( string $file ) {
     
    9696         * @return array
    9797         *
    98          * @since latest
     98         * @since 3.9.1
    9999         */
    100100        public static function get_subclasses_of_class( string $current_class, string $base_class, bool $exclude_abstracts = true ): array {
     
    120120         * @return array
    121121         *
    122          * @since latest
     122         * @since 3.9.1
    123123         */
    124124        public static function get_classes_by_namespace( string $namespace ) {
     
    169169         * @return array
    170170         *
    171          * @since latest
     171         * @since 3.9.1
    172172         */
    173173        public static function get_classes_with_term( $term ) {
  • 0-day-analytics/tags/3.7.5/classes/vendor/helpers/class-ajax-helper.php

    r3377720 r3384467  
    643643         * @return void
    644644         *
    645          * @since latest
     645         * @since 3.9.1
    646646         */
    647647        public static function error_log_filtering_dismiss_notice() {
  • 0-day-analytics/tags/3.7.5/classes/vendor/helpers/class-php-helper.php

    r3375967 r3384467  
    55 * @package    0-day
    66 * @subpackage helpers
    7  * @since      latest
     7 * @since 3.9.1
    88 * @license    https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
    99 */
     
    2121     * All the user related settings must go trough this class.
    2222     *
    23      * @since latest
     23     * @since 3.9.1
    2424     */
    2525    class PHP_Helper {
     
    3030         * @var array
    3131         *
    32          * @since latest
     32         * @since 3.9.1
    3333         */
    3434        private static $class_map = array();
     
    3939         * @return array
    4040         *
    41          * @since latest
     41         * @since 3.9.1
    4242         */
    4343        public static function get_class_map(): array {
     
    7373         * @return string|false
    7474         *
    75          * @since latest
     75         * @since 3.9.1
    7676         */
    7777        public static function get_class_by_filename( string $file ) {
     
    9696         * @return array
    9797         *
    98          * @since latest
     98         * @since 3.9.1
    9999         */
    100100        public static function get_subclasses_of_class( string $current_class, string $base_class, bool $exclude_abstracts = true ): array {
     
    120120         * @return array
    121121         *
    122          * @since latest
     122         * @since 3.9.1
    123123         */
    124124        public static function get_classes_by_namespace( string $namespace ) {
     
    169169         * @return array
    170170         *
    171          * @since latest
     171         * @since 3.9.1
    172172         */
    173173        public static function get_classes_with_term( $term ) {
  • 0-day-analytics/tags/3.7.5/classes/vendor/lists/entity/class-common-table.php

    r3377720 r3384467  
    478478         * @return int bool
    479479         *
    480          * @since latest
     480         * @since 3.9.1
    481481         */
    482482        public static function find( array $data ) {
  • 0-day-analytics/tags/3.7.6/classes/vendor/helpers/class-ajax-helper.php

    r3377720 r3384467  
    643643         * @return void
    644644         *
    645          * @since latest
     645         * @since 3.9.1
    646646         */
    647647        public static function error_log_filtering_dismiss_notice() {
  • 0-day-analytics/tags/3.7.6/classes/vendor/helpers/class-php-helper.php

    r3375967 r3384467  
    55 * @package    0-day
    66 * @subpackage helpers
    7  * @since      latest
     7 * @since 3.9.1
    88 * @license    https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
    99 */
     
    2121     * All the user related settings must go trough this class.
    2222     *
    23      * @since latest
     23     * @since 3.9.1
    2424     */
    2525    class PHP_Helper {
     
    3030         * @var array
    3131         *
    32          * @since latest
     32         * @since 3.9.1
    3333         */
    3434        private static $class_map = array();
     
    3939         * @return array
    4040         *
    41          * @since latest
     41         * @since 3.9.1
    4242         */
    4343        public static function get_class_map(): array {
     
    7373         * @return string|false
    7474         *
    75          * @since latest
     75         * @since 3.9.1
    7676         */
    7777        public static function get_class_by_filename( string $file ) {
     
    9696         * @return array
    9797         *
    98          * @since latest
     98         * @since 3.9.1
    9999         */
    100100        public static function get_subclasses_of_class( string $current_class, string $base_class, bool $exclude_abstracts = true ): array {
     
    120120         * @return array
    121121         *
    122          * @since latest
     122         * @since 3.9.1
    123123         */
    124124        public static function get_classes_by_namespace( string $namespace ) {
     
    169169         * @return array
    170170         *
    171          * @since latest
     171         * @since 3.9.1
    172172         */
    173173        public static function get_classes_with_term( $term ) {
  • 0-day-analytics/tags/3.7.6/classes/vendor/lists/entity/class-common-table.php

    r3378902 r3384467  
    478478         * @return int bool
    479479         *
    480          * @since latest
     480         * @since 3.9.1
    481481         */
    482482        public static function find( array $data ) {
     
    10641064         * @return string
    10651065         *
    1066          * @since latest
     1066         * @since 3.9.1
    10671067         */
    10681068        private static function format_value_for_html( $value ) {
  • 0-day-analytics/tags/3.8.0/classes/vendor/entities/class-abstract-entity.php

    r3380967 r3384467  
    776776         * @return array
    777777         *
    778          * @since latest
     778         * @since 3.9.1
    779779         */
    780780        public static function get_all_columns(): array {
  • 0-day-analytics/tags/3.8.0/classes/vendor/helpers/class-ajax-helper.php

    r3380967 r3384467  
    652652         * @return void
    653653         *
    654          * @since latest
     654         * @since 3.9.1
    655655         */
    656656        public static function error_log_filtering_dismiss_notice() {
     
    665665         * @return void
    666666         *
    667          * @since latest
     667         * @since 3.9.1
    668668         */
    669669        public static function export_large_csv() {
     
    916916         * @return void
    917917         *
    918          * @since latest
     918         * @since 3.9.1
    919919         */
    920920        public static function export_large_csv_cleanup() {
  • 0-day-analytics/tags/3.8.0/classes/vendor/helpers/class-miscellaneous.php

    r3380967 r3384467  
    77 * @package advanced-analytics
    88 *
    9  * @since latest
     9 * @since 3.9.1
    1010 */
    1111
     
    2323     * Responsible for general repeating stuff.
    2424     *
    25      * @since latest
     25     * @since 3.9.1
    2626     */
    2727    class Miscellaneous {
     
    3232         * @return string
    3333         *
    34          * @since latest
     34         * @since 3.9.1
    3535         */
    3636        public static function get_flex_style(): string {
  • 0-day-analytics/tags/3.8.0/classes/vendor/helpers/class-php-helper.php

    r3375967 r3384467  
    55 * @package    0-day
    66 * @subpackage helpers
    7  * @since      latest
     7 * @since 3.9.1
    88 * @license    https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
    99 */
     
    2121     * All the user related settings must go trough this class.
    2222     *
    23      * @since latest
     23     * @since 3.9.1
    2424     */
    2525    class PHP_Helper {
     
    3030         * @var array
    3131         *
    32          * @since latest
     32         * @since 3.9.1
    3333         */
    3434        private static $class_map = array();
     
    3939         * @return array
    4040         *
    41          * @since latest
     41         * @since 3.9.1
    4242         */
    4343        public static function get_class_map(): array {
     
    7373         * @return string|false
    7474         *
    75          * @since latest
     75         * @since 3.9.1
    7676         */
    7777        public static function get_class_by_filename( string $file ) {
     
    9696         * @return array
    9797         *
    98          * @since latest
     98         * @since 3.9.1
    9999         */
    100100        public static function get_subclasses_of_class( string $current_class, string $base_class, bool $exclude_abstracts = true ): array {
     
    120120         * @return array
    121121         *
    122          * @since latest
     122         * @since 3.9.1
    123123         */
    124124        public static function get_classes_by_namespace( string $namespace ) {
     
    169169         * @return array
    170170         *
    171          * @since latest
     171         * @since 3.9.1
    172172         */
    173173        public static function get_classes_with_term( $term ) {
  • 0-day-analytics/tags/3.8.0/classes/vendor/helpers/class-transients-helper.php

    r3380967 r3384467  
    155155         *
    156156         * @since 1.8.5
    157          * @since latest - Added $request parameter.
     157         * @since 3.9.1 - Added $request parameter.
    158158         */
    159159        public static function get_transient_by_id( ?\WP_REST_Request $request = null, $id = 0 ) {
  • 0-day-analytics/tags/3.8.0/classes/vendor/lists/class-requests-list.php

    r3380967 r3384467  
    324324         *
    325325         * @since 1.0.0
    326          * @since latest - added $args param.
     326         * @since 3.9.1 - added $args param.
    327327         *
    328328         * @return  Array
  • 0-day-analytics/tags/3.8.0/classes/vendor/lists/class-table-list.php

    r3380967 r3384467  
    270270         *
    271271         * @since 1.0.0
    272          * @since latest - added $args param.
     272         * @since 3.9.1 - added $args param.
    273273         *
    274274         * @return  Array
  • 0-day-analytics/tags/3.8.0/classes/vendor/lists/entity/class-common-table.php

    r3380967 r3384467  
    478478         * @return int bool
    479479         *
    480          * @since latest
     480         * @since 3.9.1
    481481         */
    482482        public static function find( array $data ) {
     
    10641064         * @return string
    10651065         *
    1066          * @since latest
     1066         * @since 3.9.1
    10671067         */
    10681068        public static function format_value_for_html( $value ) {
  • 0-day-analytics/tags/3.8.0/classes/vendor/lists/traits/class-list-trait.php

    r3380967 r3384467  
    199199         * @return int
    200200         *
    201          * @since latest
     201         * @since 3.9.1
    202202         */
    203203        public function get_count() {
  • 0-day-analytics/tags/3.9.1/advanced-analytics.php

    r3384334 r3384467  
    1111 * Plugin Name:     0 Day Analytics
    1212 * Description:     Take full control of error log, crons, transients, plugins, requests, mails and DB tables.
    13  * Version:         3.9.0
     13 * Version:         3.9.1
    1414 * Author:          Stoil Dobrev
    1515 * Author URI:      https://github.com/sdobreff/
     
    3737// Constants.
    3838if ( ! defined( 'ADVAN_VERSION' ) ) {
    39     define( 'ADVAN_VERSION', '3.9.0' );
     39    define( 'ADVAN_VERSION', '3.9.1' );
    4040    define( 'ADVAN_TEXTDOMAIN', '0-day-analytics' );
    4141    define( 'ADVAN_NAME', '0 Day Analytics' );
     
    9191
    9292\register_shutdown_function( array( WP_Error_Handler::class, 'shutdown' ) );
    93 if ( ! Settings::get_option( 'plugin_exception_handler_disable' ) ) {
    94     \set_exception_handler( array( WP_Error_Handler::class, 'exception_handler' ) );
    95 }
    9693
    9794\add_action( 'doing_it_wrong_trigger_error', array( WP_Error_Handler::class, 'trigger_error' ), 0, 4 );
     
    10097
    10198\add_action( 'doing_it_wrong_run', array( WP_Error_Handler::class, 'action_doing_it_wrong_run' ), 99, 3 );
     99
     100if ( ! Settings::get_option( 'plugin_exception_handler_disable' ) ) {
     101    \set_exception_handler( array( WP_Error_Handler::class, 'exception_handler' ) );
     102}
    102103
    103104// All deprecated error following their own idea of what to pass and how to pass it. That list covers the most common ones.
  • 0-day-analytics/tags/3.9.1/classes/vendor/controllers/class-endpoints.php

    r3384334 r3384467  
    288288                    'endpoints' => array(
    289289                        array(
    290                             '(?P<transient_id>\w+)' => array(
     290                            '(?P<transient_id>\d+)' => array(
    291291                                'methods'          => array(
    292292                                    'method'   => \WP_REST_Server::READABLE,
  • 0-day-analytics/tags/3.9.1/classes/vendor/controllers/connectors/class-slack-api.php

    r3384334 r3384467  
    123123
    124124                return false;
    125             } else {
    126                 $response_data = json_decode( $response['body'], true );
     125            } elseif ( ! empty( $response['body'] ) ) {
     126
     127                    $response_data = json_decode( $response['body'], true );
    127128                if ( $response_data['ok'] ) {
    128129                    self::$valid_message = $response_data;
  • 0-day-analytics/tags/3.9.1/classes/vendor/controllers/connectors/class-slack.php

    r3374674 r3384467  
    1414use ADVAN\Helpers\Settings;
    1515use ADVAN\Controllers\Slack_API;
     16use ADVAN\Helpers\Miscellaneous;
    1617
    1718defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
     
    131132        public static function set_settings( array $options ): void {
    132133            // Sanitize each setting value.
    133             $sanitized_options = array_map( 'sanitize_text_field', $options );
     134            $sanitized_options = Miscellaneous::sanitize_options_recursive( $options );
    134135
    135136            $current_options = Settings::get_current_options();
     
    158159            return self::$auth_key;
    159160        }
     161
    160162        /**
    161          * Returns the currently stored Slack AUTH key or false if there is none.
     163         * Returns the currently stored Slack channel or an empty string if there is none.
    162164         *
    163          * @return bool|string
     165         * @return string
    164166         *
    165167         * @since 1.8.0
     
    179181         */
    180182        public static function get_slack_setting( string $setting ) {
    181             if ( ! isset( $setting ) ) {
    182                 return '';
    183             }
    184 
    185183            if ( isset( self::get_settings()[ $setting ] ) ) {
    186184                return self::get_settings()[ $setting ];
  • 0-day-analytics/tags/3.9.1/classes/vendor/controllers/connectors/class-telegram-api.php

    r3374674 r3384467  
    115115
    116116                return false;
    117             } else {
    118                 $response_data = json_decode( wp_remote_retrieve_body( $response ), true );
     117            }  elseif ( ! empty( $response['body'] ) ) {
     118                $response_data = json_decode( \wp_remote_retrieve_body( $response ), true );
    119119                if ( ! empty( $response_data['ok'] ) && ! empty( $response_data['result']['is_bot'] ) && true === $response_data['result']['is_bot'] ) {
    120120                    self::$valid_message = $response_data;
  • 0-day-analytics/tags/3.9.1/classes/vendor/controllers/connectors/class-telegram.php

    r3374674 r3384467  
    1313
    1414use ADVAN\Helpers\Settings;
     15use ADVAN\Helpers\Miscellaneous;
    1516use ADVAN\Controllers\Telegram_API;
    1617
     
    131132        public static function set_settings( array $options ): void {
    132133            // Sanitize each setting value.
    133             $sanitized_options = array_map( 'sanitize_text_field', $options );
     134            $sanitized_options = Miscellaneous::sanitize_options_recursive( $options );
    134135
    135136            $current_options = Settings::get_current_options();
     
    159160        }
    160161        /**
    161          * Returns the currently stored Telegram AUTH key or false if there is none.
     162         * Returns the currently stored Telegram channel or an empty string if there is none.
    162163         *
    163          * @return bool|string
     164         * @return string
    164165         *
    165166         * @since 1.8.5
     
    179180         */
    180181        public static function get_telegram_setting( string $setting ) {
    181             if ( ! isset( $setting ) ) {
    182                 return '';
    183             }
    184 
    185182            if ( isset( self::get_settings()[ $setting ] ) ) {
    186183                return self::get_settings()[ $setting ];
  • 0-day-analytics/tags/3.9.1/classes/vendor/helpers/class-miscellaneous.php

    r3384334 r3384467  
    380380            );
    381381        }
     382
     383        /**
     384         * Recursively sanitize all values in an array.
     385         *
     386         * @param mixed $options Array or value to sanitize.
     387         *
     388         * @return mixed
     389         *
     390         * @since 3.9.1
     391         */
     392        public static function sanitize_options_recursive( $options ) {
     393            if ( is_array( $options ) ) {
     394                $sanitized = array();
     395                foreach ( $options as $key => $value ) {
     396                    $sanitized[ $key ] = self::sanitize_options_recursive( $value );
     397                }
     398
     399                return $sanitized;
     400            } else {
     401                if ( is_string( $options ) ) {
     402                    return \sanitize_text_field( $options );
     403                }
     404                return $options;
     405            }
     406        }
    382407    }
    383408}
  • 0-day-analytics/tags/3.9.1/classes/vendor/lists/views/class-fatals-view.php

    r3384334 r3384467  
    212212                                                <div class=""><span title="<?php \esc_html_e( 'Copy to clipboard (as raw HTML)', '0-day-analytics' ); ?>" class="dashicons dashicons-clipboard" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span> <span title="<?php esc_html_e( 'Share', '0-day-analytics' ); ?>" class="dashicons dashicons-share" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span></div>
    213213                                            </div>
    214                                             <div class="http-request-args aadvana-pre-300" style="background: #fff;color:#000;">
     214                                            <div class="http-request-args aadvana-pre-300">
    215215                                                <?php
    216216                                                \esc_html_e( 'Loading please wait...', '0-day-analytics' );
  • 0-day-analytics/tags/3.9.1/classes/vendor/lists/views/class-table-view.php

    r3384334 r3384467  
    220220                                                    <div class=""><span title="<?php \esc_html_e( 'Copy to clipboard (as raw HTML)', '0-day-analytics' ); ?>" class="dashicons dashicons-clipboard" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span> <span title="<?php esc_html_e( 'Share', '0-day-analytics' ); ?>" class="dashicons dashicons-share" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span></div>
    221221                                                </div>
    222                                                 <div class="http-request-args aadvana-pre-300" style="background: #fff;color:#000;">
     222                                                <div class="http-request-args aadvana-pre-300">
    223223                                                    <?php
    224224                                                    \esc_html_e( 'Loading please wait...', '0-day-analytics' );
  • 0-day-analytics/tags/3.9.1/classes/vendor/lists/views/class-transients-view.php

    r3380967 r3384467  
    411411                                                    <div class=""><span title="<?php \esc_html_e( 'Copy to clipboard (as raw HTML)', '0-day-analytics' ); ?>" class="dashicons dashicons-clipboard" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span> <span title="<?php esc_html_e( 'Share', '0-day-analytics' ); ?>" class="dashicons dashicons-share" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span></div>
    412412                                                </div>
    413                                                 <div class="http-request-args aadvana-pre-300" style="background: #fff;color:#000;">
     413                                                <div class="http-request-args aadvana-pre-300">
    414414                                                    <?php
    415415                                                    \esc_html_e( 'Loading please wait...', '0-day-analytics' );
  • 0-day-analytics/tags/3.9.1/classes/vendor/lists/views/class-wp-mail-view.php

    r3380967 r3384467  
    369369                                                    <div class=""><span title="<?php echo __( 'Copy to clipboard (as raw HTML)', '0-day-analytics' ); ?>" class="dashicons dashicons-clipboard" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span> <span title="<?php esc_html_e( 'Share', '0-day-analytics' ); ?>" class="dashicons dashicons-share" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span></div>
    370370                                                </div>
    371                                                 <div class="http-request-args aadvana-pre-300" style="background: #fff;color:#000;">
     371                                                <div class="http-request-args aadvana-pre-300">
    372372                                                    <?php
    373373                                                    \esc_html_e( 'Loading please wait...', '0-day-analytics' );
  • 0-day-analytics/tags/3.9.1/readme.txt

    r3384334 r3384467  
    44Tested up to: 6.8
    55Requires PHP: 7.4
    6 Stable tag: 3.9.0
     6Stable tag: 3.9.1
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.txt
     
    110110== Changelog ==
    111111
     112= 3.9.1 =
     113Fixes translation called too early on settings save. FE fixes for darkskin.
     114
    112115= 3.9.0 =
    113116Added DB table for PHP errors which collects data from the PHP environment. Code optimizations and bug fixes.
  • 0-day-analytics/trunk/advanced-analytics.php

    r3384334 r3384467  
    1111 * Plugin Name:     0 Day Analytics
    1212 * Description:     Take full control of error log, crons, transients, plugins, requests, mails and DB tables.
    13  * Version:         3.9.0
     13 * Version:         3.9.1
    1414 * Author:          Stoil Dobrev
    1515 * Author URI:      https://github.com/sdobreff/
     
    3737// Constants.
    3838if ( ! defined( 'ADVAN_VERSION' ) ) {
    39     define( 'ADVAN_VERSION', '3.9.0' );
     39    define( 'ADVAN_VERSION', '3.9.1' );
    4040    define( 'ADVAN_TEXTDOMAIN', '0-day-analytics' );
    4141    define( 'ADVAN_NAME', '0 Day Analytics' );
     
    9191
    9292\register_shutdown_function( array( WP_Error_Handler::class, 'shutdown' ) );
    93 if ( ! Settings::get_option( 'plugin_exception_handler_disable' ) ) {
    94     \set_exception_handler( array( WP_Error_Handler::class, 'exception_handler' ) );
    95 }
    9693
    9794\add_action( 'doing_it_wrong_trigger_error', array( WP_Error_Handler::class, 'trigger_error' ), 0, 4 );
     
    10097
    10198\add_action( 'doing_it_wrong_run', array( WP_Error_Handler::class, 'action_doing_it_wrong_run' ), 99, 3 );
     99
     100if ( ! Settings::get_option( 'plugin_exception_handler_disable' ) ) {
     101    \set_exception_handler( array( WP_Error_Handler::class, 'exception_handler' ) );
     102}
    102103
    103104// All deprecated error following their own idea of what to pass and how to pass it. That list covers the most common ones.
  • 0-day-analytics/trunk/classes/vendor/controllers/class-endpoints.php

    r3384334 r3384467  
    288288                    'endpoints' => array(
    289289                        array(
    290                             '(?P<transient_id>\w+)' => array(
     290                            '(?P<transient_id>\d+)' => array(
    291291                                'methods'          => array(
    292292                                    'method'   => \WP_REST_Server::READABLE,
  • 0-day-analytics/trunk/classes/vendor/controllers/connectors/class-slack-api.php

    r3384334 r3384467  
    123123
    124124                return false;
    125             } else {
    126                 $response_data = json_decode( $response['body'], true );
     125            } elseif ( ! empty( $response['body'] ) ) {
     126
     127                    $response_data = json_decode( $response['body'], true );
    127128                if ( $response_data['ok'] ) {
    128129                    self::$valid_message = $response_data;
  • 0-day-analytics/trunk/classes/vendor/controllers/connectors/class-slack.php

    r3374674 r3384467  
    1414use ADVAN\Helpers\Settings;
    1515use ADVAN\Controllers\Slack_API;
     16use ADVAN\Helpers\Miscellaneous;
    1617
    1718defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
     
    131132        public static function set_settings( array $options ): void {
    132133            // Sanitize each setting value.
    133             $sanitized_options = array_map( 'sanitize_text_field', $options );
     134            $sanitized_options = Miscellaneous::sanitize_options_recursive( $options );
    134135
    135136            $current_options = Settings::get_current_options();
     
    158159            return self::$auth_key;
    159160        }
     161
    160162        /**
    161          * Returns the currently stored Slack AUTH key or false if there is none.
     163         * Returns the currently stored Slack channel or an empty string if there is none.
    162164         *
    163          * @return bool|string
     165         * @return string
    164166         *
    165167         * @since 1.8.0
     
    179181         */
    180182        public static function get_slack_setting( string $setting ) {
    181             if ( ! isset( $setting ) ) {
    182                 return '';
    183             }
    184 
    185183            if ( isset( self::get_settings()[ $setting ] ) ) {
    186184                return self::get_settings()[ $setting ];
  • 0-day-analytics/trunk/classes/vendor/controllers/connectors/class-telegram-api.php

    r3374674 r3384467  
    115115
    116116                return false;
    117             } else {
    118                 $response_data = json_decode( wp_remote_retrieve_body( $response ), true );
     117            }  elseif ( ! empty( $response['body'] ) ) {
     118                $response_data = json_decode( \wp_remote_retrieve_body( $response ), true );
    119119                if ( ! empty( $response_data['ok'] ) && ! empty( $response_data['result']['is_bot'] ) && true === $response_data['result']['is_bot'] ) {
    120120                    self::$valid_message = $response_data;
  • 0-day-analytics/trunk/classes/vendor/controllers/connectors/class-telegram.php

    r3374674 r3384467  
    1313
    1414use ADVAN\Helpers\Settings;
     15use ADVAN\Helpers\Miscellaneous;
    1516use ADVAN\Controllers\Telegram_API;
    1617
     
    131132        public static function set_settings( array $options ): void {
    132133            // Sanitize each setting value.
    133             $sanitized_options = array_map( 'sanitize_text_field', $options );
     134            $sanitized_options = Miscellaneous::sanitize_options_recursive( $options );
    134135
    135136            $current_options = Settings::get_current_options();
     
    159160        }
    160161        /**
    161          * Returns the currently stored Telegram AUTH key or false if there is none.
     162         * Returns the currently stored Telegram channel or an empty string if there is none.
    162163         *
    163          * @return bool|string
     164         * @return string
    164165         *
    165166         * @since 1.8.5
     
    179180         */
    180181        public static function get_telegram_setting( string $setting ) {
    181             if ( ! isset( $setting ) ) {
    182                 return '';
    183             }
    184 
    185182            if ( isset( self::get_settings()[ $setting ] ) ) {
    186183                return self::get_settings()[ $setting ];
  • 0-day-analytics/trunk/classes/vendor/helpers/class-miscellaneous.php

    r3384334 r3384467  
    380380            );
    381381        }
     382
     383        /**
     384         * Recursively sanitize all values in an array.
     385         *
     386         * @param mixed $options Array or value to sanitize.
     387         *
     388         * @return mixed
     389         *
     390         * @since 3.9.1
     391         */
     392        public static function sanitize_options_recursive( $options ) {
     393            if ( is_array( $options ) ) {
     394                $sanitized = array();
     395                foreach ( $options as $key => $value ) {
     396                    $sanitized[ $key ] = self::sanitize_options_recursive( $value );
     397                }
     398
     399                return $sanitized;
     400            } else {
     401                if ( is_string( $options ) ) {
     402                    return \sanitize_text_field( $options );
     403                }
     404                return $options;
     405            }
     406        }
    382407    }
    383408}
  • 0-day-analytics/trunk/classes/vendor/lists/views/class-fatals-view.php

    r3384334 r3384467  
    212212                                                <div class=""><span title="<?php \esc_html_e( 'Copy to clipboard (as raw HTML)', '0-day-analytics' ); ?>" class="dashicons dashicons-clipboard" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span> <span title="<?php esc_html_e( 'Share', '0-day-analytics' ); ?>" class="dashicons dashicons-share" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span></div>
    213213                                            </div>
    214                                             <div class="http-request-args aadvana-pre-300" style="background: #fff;color:#000;">
     214                                            <div class="http-request-args aadvana-pre-300">
    215215                                                <?php
    216216                                                \esc_html_e( 'Loading please wait...', '0-day-analytics' );
  • 0-day-analytics/trunk/classes/vendor/lists/views/class-table-view.php

    r3384334 r3384467  
    220220                                                    <div class=""><span title="<?php \esc_html_e( 'Copy to clipboard (as raw HTML)', '0-day-analytics' ); ?>" class="dashicons dashicons-clipboard" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span> <span title="<?php esc_html_e( 'Share', '0-day-analytics' ); ?>" class="dashicons dashicons-share" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span></div>
    221221                                                </div>
    222                                                 <div class="http-request-args aadvana-pre-300" style="background: #fff;color:#000;">
     222                                                <div class="http-request-args aadvana-pre-300">
    223223                                                    <?php
    224224                                                    \esc_html_e( 'Loading please wait...', '0-day-analytics' );
  • 0-day-analytics/trunk/classes/vendor/lists/views/class-transients-view.php

    r3380967 r3384467  
    411411                                                    <div class=""><span title="<?php \esc_html_e( 'Copy to clipboard (as raw HTML)', '0-day-analytics' ); ?>" class="dashicons dashicons-clipboard" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span> <span title="<?php esc_html_e( 'Share', '0-day-analytics' ); ?>" class="dashicons dashicons-share" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span></div>
    412412                                                </div>
    413                                                 <div class="http-request-args aadvana-pre-300" style="background: #fff;color:#000;">
     413                                                <div class="http-request-args aadvana-pre-300">
    414414                                                    <?php
    415415                                                    \esc_html_e( 'Loading please wait...', '0-day-analytics' );
  • 0-day-analytics/trunk/classes/vendor/lists/views/class-wp-mail-view.php

    r3380967 r3384467  
    369369                                                    <div class=""><span title="<?php echo __( 'Copy to clipboard (as raw HTML)', '0-day-analytics' ); ?>" class="dashicons dashicons-clipboard" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span> <span title="<?php esc_html_e( 'Share', '0-day-analytics' ); ?>" class="dashicons dashicons-share" style="cursor:pointer;font-family: dashicons !important;" aria-hidden="true"></span></div>
    370370                                                </div>
    371                                                 <div class="http-request-args aadvana-pre-300" style="background: #fff;color:#000;">
     371                                                <div class="http-request-args aadvana-pre-300">
    372372                                                    <?php
    373373                                                    \esc_html_e( 'Loading please wait...', '0-day-analytics' );
  • 0-day-analytics/trunk/readme.txt

    r3384334 r3384467  
    44Tested up to: 6.8
    55Requires PHP: 7.4
    6 Stable tag: 3.9.0
     6Stable tag: 3.9.1
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.txt
     
    110110== Changelog ==
    111111
     112= 3.9.1 =
     113Fixes translation called too early on settings save. FE fixes for darkskin.
     114
    112115= 3.9.0 =
    113116Added DB table for PHP errors which collects data from the PHP environment. Code optimizations and bug fixes.
Note: See TracChangeset for help on using the changeset viewer.