403Webshell
Server IP : 172.67.75.225  /  Your IP : 216.73.216.185
Web Server : nginx/1.27.1
System : Linux us-1 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User : vinodai ( 3134)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v1396/vinoddoshi2/public_html/wp-content/themes/oceanwp/inc/activation-notice/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v1396/vinoddoshi2/public_html/wp-content/themes/oceanwp/inc/activation-notice//api.php
<?php

add_action(
	'wp_ajax_oceanwp_dismissed_notice',
	function () {
		update_option( 'dismissed-oceanwp_plugin_notice', true );
		wp_die();
	}
);


add_action(
	'wp_ajax_oceanwp_check_notice_actions',
	function () {

		$manager      = new Oceanwp_Plugin_Manager();
		$status       = $manager->get_ocean_extra_status();
		$actions_html = '';
		if ( $status['status'] == 'installed' ) {
			$actions_html = '<div class="notice-actions">
        <button type="button" class="button button-primary" data-action="activate">' . __( 'Activate Ocean Extra', 'oceanwp' ) . '</button>
        </div>';
		} elseif ( $status['status'] == 'uninstalled' ) {
			$actions_html = '<div class="notice-actions">
        <button type="button" class="button button-primary" data-action="install_activate">' . __( 'Install & Activate Ocean Extra', 'oceanwp' ) . '</button>
        </div>';
		}
		wp_send_json_success(
			$actions_html
		);
	}
);


add_action(
	'wp_ajax_oceanwp_notice_button_click',
	function () {
		if ( ! current_user_can( 'activate_plugins' ) ) {
			return;
		}

		$manager = new Oceanwp_Plugin_Manager();
		$status  = $manager->get_ocean_extra_status();

		if ( $status['status'] === 'active' ) {
			wp_send_json_success(
				array(
					'status'    => 'active',
					'pluginUrl' => admin_url( 'admin.php?page=oceanwp' ),
				)
			);
		}

		if ( $status['status'] === 'uninstalled' ) {
			$manager->download_and_install( $status['slug'] );
			$manager->plugin_activation( $status['slug'] );

			wp_send_json_success(
				array(
					'status'    => 'active',
					'pluginUrl' => admin_url( 'admin.php?page=oceanwp' ),
				)
			);
		}

		if ( $status['status'] === 'installed' ) {
			$manager->plugin_activation( $status['slug'] );

			wp_send_json_success(
				array(
					'status'    => 'active',
					'pluginUrl' => admin_url( 'admin.php?page=oceanwp' ),
				)
			);
		}

		wp_die();
	}
);

Youez - 2016 - github.com/yon3zu
LinuXploit