public static function getInstance()
 {
     if (!is_object(self::$_instance)) {
         //or if( is_null(self::$_instance) ) or if( self::$_instance == null )
         self::$_instance = new WPAdvImporter_includes_helper();
     }
     return self::$_instance;
 }
Example #2
0
<?php

require_once '../includes/WPAdvImporter_includes_helper.php';
#require_once('../../../../wp-load.php');
$parse_uri = explode('wp-content', $_SERVER['SCRIPT_FILENAME']);
require_once $parse_uri[0] . 'wp-load.php';
$impObj = CallWPAdvImporterObj::getInstance();
//print_r($impObj);//die;
$filename = $_POST['file_name'];
$result = $impObj->xml_file_data($filename, 'xml');
print_r(json_encode($result[$_REQUEST['record_no']]));
Example #3
0
<?php

if (!defined('ABSPATH')) {
    die('Exit if accessed directly');
}
require_once WP_CONST_ADVANCED_XML_IMP_DIRECTORY . 'lib/skinnymvc/core/base/SkinnyBaseActions.php';
require_once WP_CONST_ADVANCED_XML_IMP_DIRECTORY . 'lib/skinnymvc/core/SkinnyActions.php';
$skinnyObj = new CallWPAdvImporterObj();
$all_arr = array();
$postcount = $authorcount = $total = $get_file = $new_user = $ex_user = $attach_id = $file_name = $type = $attach = $implimit = $duptitle = $dupcontent = '';
$get_file = $_POST['postdata'][0]['get_file'];
$postcount = $_POST['postdata'][0]['postcount'];
$authorcount = $_POST['postdata'][0]['authorcount'];
$total = $_POST['postdata'][0]['total'];
$ex_user = $_POST['postdata'][0]['ex_user'];
$authcnt = $_POST['postdata'][0]['authcnt'];
$implimit = $_POST['postdata'][0]['implimit'];
$attach = $_POST['postdata'][0]['attach'];
$duptitle = $_POST['postdata'][0]['duptitle'];
$dupcontent = $_POST['postdata'][0]['dupcontent'];
$type = $_POST['postdata'][0]['type'];
$get_file = trim($get_file);
$attach = trim($attach);
$all_arr = $skinnyObj->get_xml_details($get_file);
for ($j = 1; $j <= $authcnt; $j++) {
    $user_id = $skinnyObj->processAuthor($all_arr, $j, $type, $ex_user);
    foreach ($skinnyObj->detailedLog as $logKey => $logVal) {
        echo " </p>" . $logVal['verify_here'] . "</p>";
        unset($skinnyObj->detailedLog[$logKey]);
    }
}