!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/packages/action-scheduler/classes/   drwxr-xr-x
Free 293.31 GB of 429.69 GB (68.26%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ActionScheduler_WPCommentCleaner.php (4.29 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * Class ActionScheduler_WPCommentCleaner
 *
 * @since 3.0.0
 */
class ActionScheduler_WPCommentCleaner {

    
/**
     * Post migration hook used to cleanup the WP comment table.
     *
     * @var string
     */
    
protected static $cleanup_hook 'action_scheduler/cleanup_wp_comment_logs';

    
/**
     * An instance of the ActionScheduler_wpCommentLogger class to interact with the comments table.
     *
     * This instance should only be used as an interface. It should not be initialized.
     *
     * @var ActionScheduler_wpCommentLogger
     */
    
protected static $wp_comment_logger null;

    
/**
     * The key used to store the cached value of whether there are logs in the WP comment table.
     *
     * @var string
     */
    
protected static $has_logs_option_key 'as_has_wp_comment_logs';

    
/**
     * Initialize the class and attach callbacks.
     */
    
public static function init() {
        if ( empty( 
self::$wp_comment_logger ) ) {
            
self::$wp_comment_logger = new ActionScheduler_wpCommentLogger();
        }

        
add_actionself::$cleanup_hook, array( __CLASS__'delete_all_action_comments' ) );

        
// While there are orphaned logs left in the comments table, we need to attach the callbacks which filter comment counts.
        
add_action'pre_get_comments', array( self::$wp_comment_logger'filter_comment_queries' ), 10);
        
add_action'wp_count_comments', array( self::$wp_comment_logger'filter_comment_count' ), 20); // run after KKART_Comments::wp_count_comments() to make sure we exclude order notes and action logs
        
add_action'comment_feed_where', array( self::$wp_comment_logger'filter_comment_feed' ), 10);

        
// Action Scheduler may be displayed as a Tools screen or Kkart > Status administration screen
        
add_action'load-tools_page_action-scheduler', array( __CLASS__'register_admin_notice' ) );
        
add_action'load-'.KKART_SCREEN_PREFIX.'_page_kkart-status', array( __CLASS__'register_admin_notice' ) );
    }

    
/**
     * Determines if there are log entries in the wp comments table.
     *
     * Uses the flag set on migration completion set by @see self::maybe_schedule_cleanup().
     *
     * @return boolean Whether there are scheduled action comments in the comments table.
     */
    
public static function has_logs() {
        return 
'yes' === get_optionself::$has_logs_option_key );
    }

    
/**
     * Schedules the WP Post comment table cleanup to run in 6 months if it's not already scheduled.
     * Attached to the migration complete hook 'action_scheduler/migration_complete'.
     */
    
public static function maybe_schedule_cleanup() {
        if ( (bool) 
get_comments( array( 'type' => ActionScheduler_wpCommentLogger::TYPE'number' => 1'fields' => 'ids' ) ) ) {
            
update_optionself::$has_logs_option_key'yes' );

            if ( ! 
as_next_scheduled_actionself::$cleanup_hook ) ) {
                
as_schedule_single_actiongmdate'U' ) + ( MONTH_IN_SECONDS ), self::$cleanup_hook );
            }
        }
    }

    
/**
     * Delete all action comments from the WP Comments table.
     */
    
public static function delete_all_action_comments() {
        global 
$wpdb;
        
$wpdb->delete$wpdb->comments, array( 'comment_type' => ActionScheduler_wpCommentLogger::TYPE'comment_agent' => ActionScheduler_wpCommentLogger::AGENT ) );
        
delete_optionself::$has_logs_option_key );
    }

    
/**
     * Registers admin notices about the orphaned action logs.
     */
    
public static function register_admin_notice() {
        
add_action'admin_notices', array( __CLASS__'print_admin_notice' ) );
    }
    
    
/**
     * Prints details about the orphaned action logs and includes information on where to learn more.
     */
    
public static function print_admin_notice() {
        
$next_cleanup_message        '';
        
$next_scheduled_cleanup_hook as_next_scheduled_actionself::$cleanup_hook );

        if ( 
$next_scheduled_cleanup_hook ) {
            
/* translators: %s: date interval */
            
$next_cleanup_message sprintf__'This data will be deleted in %s.''kkart' ), human_time_diffgmdate'U' ), $next_scheduled_cleanup_hook ) );
        }

        
$notice sprintf(
            
/* translators: 1: next cleanup message 2: github issue URL */
            
__'Action Scheduler has migrated data to custom tables; however, orphaned log entries exist in the WordPress Comments table. %1$s <a href="%2$s">Learn more &raquo;</a>''kkart' ),
            
$next_cleanup_message,
            
'https://github.com/kkart/action-scheduler/issues/368'
        
);

        echo 
'<div class="notice notice-warning"><p>' wp_kses_post$notice ) . '</p></div>';
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0918 ]--