Phlox Pro - Elementor Multi-Purpose WordPress Theme

Phlox Pro - Elementor Multi-Purpose WordPress Theme v5.17.6

No permission to download

NullMaster

Well-known member
Null Master
Trusted Uploader
Jul 25, 2018
12,059
22,063
120
please wait.
Code:
public function import() {

        if ( ! isset( $_POST['ID'] ) || ! wp_verify_nonce( $_POST['verify'], 'aux-import-demo-' . $_POST['ID'] ) ) {
            // This nonce is not valid.
            wp_send_json_error( array( 'message' => __( 'Invalid Inputs.', 'auxin-elements' ) ) );
        }

        // Put demo ID in a variable
        $demo_ID = $_POST['ID'];

        $demo_path = ABSPATH . '/wp-content/plugins/auxin-elements/demos/' . $demo_ID . '.json';
        
        if ( file_exists( $demo_path ) ) {
            $data = file_get_contents( $demo_path );
            file_put_contents( ABSPATH . '/wp-content/uploads/phlox-pro/demo.json', $data );
        } else {
            $data = json_decode( $this->parse( 'https://demo.phlox.pro/api/v2/data/' . $demo_ID, 'insert', 'post' ), true );
        }

already so.
 
  • Like
Reactions: RogerM

RogerM

Well-known member
Mar 3, 2020
461
439
63
Maracaibo, Venezuela
Code:
public function import() {

        if ( ! isset( $_POST['ID'] ) || ! wp_verify_nonce( $_POST['verify'], 'aux-import-demo-' . $_POST['ID'] ) ) {
            // This nonce is not valid.
            wp_send_json_error( array( 'message' => __( 'Invalid Inputs.', 'auxin-elements' ) ) );
        }

        // Put demo ID in a variable
        $demo_ID = $_POST['ID'];

        $demo_path = ABSPATH . '/wp-content/plugins/auxin-elements/demos/' . $demo_ID . '.json';
       
        if ( file_exists( $demo_path ) ) {
            $data = file_get_contents( $demo_path );
            file_put_contents( ABSPATH . '/wp-content/uploads/phlox-pro/demo.json', $data );
        } else {
            $data = json_decode( $this->parse( 'https://demo.phlox.pro/api/v2/data/' . $demo_ID, 'insert', 'post' ), true );
        }

already so.
Do we add this as @inmygreed mentions in post #398?
 

RogerM

Well-known member
Mar 3, 2020
461
439
63
Maracaibo, Venezuela
what's r problem.
I would like to access the demo sites on Phlox but I am reading through the latest comment about issues people are having with that and a solution that a random guy with 5 posts posted.

That´s why I was requesting a second opinion/feedback from more experienced, trusted, and established members of this community. So I know I am on the safe side of things before editing the content of a theme or plugin by adding code.
 

RogerM

Well-known member
Mar 3, 2020
461
439
63
Maracaibo, Venezuela
I found the solution. If u can't import demo, u need to do this :

Download Demo JSON Here :

And then extract it on "wp-content/plugins/auxin-elements/"

After that, edit file "wp-content/plugins/auxin-elements/includes/classes/class-auxin-demo-importer.php"

Go to line 204 or find text :

PHP:
$data = json_decode( $this->parse( 'https://demo.phlox.pro/api/v2/data/' . $demo_ID, 'insert', 'post' ), true );

Replace with :

PHP:
$demo_path = ABSPATH . '/wp-content/plugins/auxin-elements/demos/' . $demo_ID . '.json';
        if ( file_exists( $demo_path ) ) {
            $data = file_get_contents( $demo_path );
            file_put_contents( ABSPATH . '/wp-content/uploads/phlox-pro/demo.json', $data );
        } else {
            $data = json_decode( $this->parse( 'https://demo.phlox.pro/api/v2/data/' . $demo_ID, 'insert', 'post' ), true );
        }

Done.
Code:
public function import() {

        if ( ! isset( $_POST['ID'] ) || ! wp_verify_nonce( $_POST['verify'], 'aux-import-demo-' . $_POST['ID'] ) ) {
            // This nonce is not valid.
            wp_send_json_error( array( 'message' => __( 'Invalid Inputs.', 'auxin-elements' ) ) );
        }

        // Put demo ID in a variable
        $demo_ID = $_POST['ID'];

        $demo_path = ABSPATH . '/wp-content/plugins/auxin-elements/demos/' . $demo_ID . '.json';
       
        if ( file_exists( $demo_path ) ) {
            $data = file_get_contents( $demo_path );
            file_put_contents( ABSPATH . '/wp-content/uploads/phlox-pro/demo.json', $data );
        } else {
            $data = json_decode( $this->parse( 'https://demo.phlox.pro/api/v2/data/' . $demo_ID, 'insert', 'post' ), true );
        }

already so.
I already try both methods and I am still getting this error when trying to import the Magazine demo site.

2020-05-13 18_54_26-.png
 

TassieNZ

Premium Uploader and Sometimes Hacker!
Jan 17, 2019
9,017
19,812
120
New Zealand
I will upload my nulled one tomorrow. Had quite a few requests. Been trying to avoid the computer chair due to a slipped disc. :)
 
  • Love
Reactions: RogerM

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu