403Webshell
Server IP : 104.21.93.192  /  Your IP : 216.73.216.233
Web Server : LiteSpeed
System : Linux premium900.web-hosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : redwjova ( 1790)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /proc/self/root/home/redwjova/sort.llc/wp-content/plugins/ultimate-post/classes/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/redwjova/sort.llc/wp-content/plugins/ultimate-post/classes/Compatibility.php
<?php
/**
 * Compatibility Action.
 * 
 * @package ULTP\Compatibility
 * @since v.1.1.0
*/

namespace ULTP;
defined('ABSPATH') || exit;

/**
 * Compatibility class.
*/
class Compatibility {

    /**
	 * Setup class.
	 *
	 * @since v.1.1.0
	*/
    public function __construct() {
        add_action( 'admin_init', array( $this, 'handle_front_page_builder' ) );
        
        // PublishPress Revisions Plugin Compatibility Add
        add_action('revisionary_copy_postmeta', array($this, 'ultp_revisionary_copy_postmeta_callback'), 10, 3);
    }

    /**
	 * Compatibility for Front Page Builder
     * 
	 * @since 4.1.12
	*/
    public function handle_front_page_builder() {
    
        if ( get_option('ultp_frontpage_builder_comp') != "yes" ) {
            $builder_condition = get_option('ultp_builder_conditions', array());
            if ( 
                !empty($builder_condition) &&
                !empty($builder_condition['singular'])
            ) {
                $f_pages = array();
                foreach ( $builder_condition['singular'] as $id => $paths ) {
                    if ( in_array('include/singular/front_page', $paths) ) {
                        $f_pages[$id] = ["include/front_page"]; // Add the ID to the list
                        update_post_meta($id, '__ultp_builder_type', 'front_page');
                        unset($builder_condition['singular'][$id]);
                    }
                }
                if ( empty($builder_condition['front_page']) ) {
                    $builder_condition['front_page'] = $f_pages;
                } else {
                    $builder_condition['front_page'] = $builder_condition['front_page'] + $f_pages;
                }
                update_option("ultp_frontpage_builder_comp", "yes");
                update_option("ultp_builder_conditions", $builder_condition);
            }
        }
    }

    /**
	 * Compatibility for PublishPress Revisions Plugin
	 * @url https://wordpress.org/plugins/revisionary/
     * 
	 * @since v.2.9.8
	*/
    public function ultp_revisionary_copy_postmeta_callback($from_post, $to_post_id, $args) {
        global $wp_filesystem;
        if (! $wp_filesystem ) {
            require_once( ABSPATH . 'wp-admin/includes/file.php' );
            WP_Filesystem();
        }
        $css_meta = get_post_meta( $to_post_id, '_ultp_css', true );
        $upload_dir_url = wp_get_upload_dir();
        $upload_css_dir_url = trailingslashit( $upload_dir_url['basedir'] );
        $css_dir_path = $upload_css_dir_url."ultimate-post/ultp-css-{$to_post_id}.css";
        
        if ( file_exists( $css_dir_path ) ) {
            $css = $wp_filesystem->get_contents($css_dir_path);
            if ($css_meta != $css) {
                $wp_filesystem->put_contents( $css_dir_path, $css_meta ); 
            }
        }
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit