403Webshell
Server IP : 62.60.133.156  /  Your IP : 216.73.217.51
Web Server : LiteSpeed
System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User : mimradmin ( 1166)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /proc/self/cwd/wp-content/plugins/wp-ultimate-csv-importer/extensionModules/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /proc/self/cwd/wp-content/plugins/wp-ultimate-csv-importer/extensionModules/TotalPressExtension.php
<?php
/**
 * WP Ultimate CSV Importer plugin file.
 *
 * Copyright (C) 2010-2020, Smackcoders Inc - info@smackcoders.com
 */ 

namespace Smackcoders\FCSV;

if ( ! defined( 'ABSPATH' ) )
    exit; // Exit if accessed directly

class TotalpressExtension extends ExtensionHandler{
	private static $instance = null;

    public static function getInstance() {
		
		if (TotalpressExtension::$instance == null) {
			TotalpressExtension::$instance = new TotalpressExtension;
		}
		return TotalpressExtension::$instance;
    }

	/**
	* Provides SEOPress fields for specific post type
	* @param string $data - selected import type
	* @return array - mapping fields
	*/
    public function processExtension($data) {
	    $response = []; 
        global $wpdb;
		$customFields = $cfs_field = array();
		$getTPGroups = $wpdb->get_results($wpdb->prepare("select ID from {$wpdb->prefix}posts where post_type = %s and post_status = %s", 'manage_cpt_field' , 'publish'),ARRAY_A);
		$groupIdArr = [];
		foreach ( $getTPGroups as $item => $groupRules ) {
			$groupIdArr[] .= $groupRules['ID'] . ',';
		}
			
		if($groupIdArr != '') {
			foreach($groupIdArr as $groupId){	
				$getTPFields= $wpdb->get_results( $wpdb->prepare("SELECT meta_value FROM {$wpdb->prefix}postmeta WHERE post_id IN (%s) and meta_key =%s ",$groupId,'fields'), ARRAY_A);		
			}
		}
		
		$temp = 0;
		if (!empty($getTPFields)) {
			foreach ($getTPFields as $key => $value) {
				$getTPField = @unserialize($value['meta_value']);
				
				foreach($getTPField as $fk => $fv){
					$customFields["TOTALPRESS"][$temp]['label'] = $fv['label'];
					$customFields["TOTALPRESS"][$temp]['name'] = $fv['key'];
					$temp++;
				}
			}
		}
		$tpValue = $this->convert_fields_to_array($customFields);
		$response['totalpress_fields'] =  $tpValue;
		return $response;	
    }

	/**
	* Yoast SEOPress extension supported import types
	* @param string $import_type - selected import type
	* @return boolean
	*/
    public function extensionSupportedImportType($import_type ){		
		if(is_plugin_active('custom-post-types/custom-post-types.php') ){
			if($import_type == 'nav_menu_item'){
				return false;
			}

			$import_type = $this->import_name_as($import_type);
			if($import_type == 'Posts' || $import_type == 'Pages' || $import_type == 'CustomPosts') {	
			
				return true;
			}
			else{
				return false;
			}
		}
	}
}

Youez - 2016 - github.com/yon3zu