• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

JNews - Best WordPress Newspaper Magazine Blog AMP Theme

JNews - Best WordPress Newspaper Magazine Blog AMP Theme v11.5.0

No permission to download
This is what works for me. Add the following to the child theme functions.php. I have used untouched jnews theme and a child theme where I added the following snippets.

1.
PHP:
add_filter( 'jnews_check_is_license_validated', '__return_true' );

2.
Add this snippet , open wp admin once and then remove or disable it by commenting it. Needed just in case the theme shows unregistered. Once done, the theme will show a migration message.
PHP:
update_option( 'jnews_license', [ 'validated' => true, 'token' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'purchase_code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ] );
update_option( 'jnews_dismiss_license_notice', true );
$options = get_option( 'jnews_option', array() );
$options[ 'interval_validation' ] = null;
update_option( 'jnews_option', $options );

3.
This snippet is needed just in case the theme automatically resets the license information. Keep this added always, since this will counter any attempt by theme to reset the license.
PHP:
add_action('updated_option', function( $option_name, $old_value, $value ) {
     if ($option_name == 'jnews_license') {
        $value[ 'validated'] = true;
        $value[ 'token'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
        $value[ 'purchase_code'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     }
  
     if ( $option_name == 'jnews_dismiss_license_notice' ) {
        $value = true;
     }
  
     if ( $option_name == 'jnews_option' ) {
            $value[ 'interval_validation'] = time() * 2;
            $value[ 'tm_exp' ] = time() * 2;
     }
  
     update_option ($option_name, $value);
  
}, 10, 3);

4.
These REST endpoints are what validate and reset the license info in the background. This snippet will remove the check.
PHP:
add_filter( 'rest_endpoints', function( $endpoints ){
    if ( isset( $endpoints['/jnews/v1/resetLicense'] ) ) {
        unset( $endpoints['/jnews/v1/resetLicense'] );
    }
    if ( isset( $endpoints['/jnews/v1/getValidateNoticeLength'] ) ) {
        unset( $endpoints['/jnews/v1/getValidateNoticeLength'] );
    }
    return $endpoints;
});

5.
There is another check in /assets/js/admin/jnews-essential.local.js file. The js file calls the same REST endpoints again in the background. DId not have enough time and patience to mess with the minified js so simply removed it with the following snippet. Works fine for me except that the theme plugin install page lost the plugins sections toggle and plugin update link opens the default wp update screen to update the plugin. If someone has enough patience they may mess with the js to null the REST calls. Nulling these two REST API endpoints will get the theme working just fine.
PHP:
add_action( 'admin_print_styles', 'jnews_remove_admin_styles', 1 );
function jnews_remove_admin_styles() {
    wp_dequeue_script( 'jnews-essential-local' );
    wp_deregister_script( 'jnews-essential-local' );
}
THANKS BRO IF U CAN Share and upload your edited version too
@lijoe
 
THANKS BRO IF U CAN Share and upload your edited version too
@lijoe
@Babak I have used the untouched jnews theme. All the changes are to be made in the child theme only. I have already shared the snippets to be added in the child theme. I prefer keeping the core files untouched and doing all modifications via overrides in a custom plugin or child theme functions.php as far as possible. In this case the only core file to be touched would be the js file i have mentioned in my reply earlier. All other modifications can be kept in the child theme functions.php. This is a minified js file which will take a little time and patience to null so as a quick workaround I just prevented it from loading since it does not provide any significant features when it comes to theme usage except for theme license check and demo import etc. I will try to dig into the js file tater if i have time but i cannot give any assurance exactly when i will be able to do it.
 
@lijoe I added the 4 snippets to child functions.php and last to .js file, which it took away activation on original untouched theme. However, the plugins still ask to be activated (see image)

@Babak I tried with your uploaded null, combined with lijoes additions and plugin activation requirement is still there
 

Attachments

  • plugs.jpg
    plugs.jpg
    41.7 KB · Views: 35
@lijoe I added the 4 snippets to child functions.php and last to .js file, which it took away activation on original untouched theme. However, the plugins still ask to be activated (see image)

@Babak I tried with your uploaded null, combined with lijoes additions and plugin activation requirement is still there

You were not supposed to add anything to the js file. The js file also needs nulling for the theme to be called properly nulled, but the js is minified and it needs patience and time to go through it. Since it does not provice any significant features i found it much easier to simply prevent it from loading.

For me the theme works just fine as you can see from the attached screenshot. I am using untouched theme. and have all the modifications only in the child theme functions.php

Screenshot.png

Make sure you have the following added to the child theme fucntions.php
This is what i have in my child theme fucntions.php and it works just fine for me.


PHP:
add_filter( 'jnews_check_is_license_validated', '__return_true' );


/* Uncomment the following block only once if you have upgraded from v9.x to v10.x
After uncommenting, the theme will stop showing migration message. You may then comment it back.
*/

/*
update_option( 'jnews_license', [ 'validated' => true, 'token' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'purchase_code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ] );
update_option( 'jnews_dismiss_license_notice', true );
//jnews_update_option( 'interval_validation', 'finish' );
$options = get_option( 'jnews_option', array() );
$options[ 'interval_validation' ] = null;
update_option( 'jnews_option', $options );
*/

add_action('updated_option', function( $option_name, $old_value, $value ) {
   
    if ($option_name == 'jnews_license') {
        $value[ 'validated'] = true;
        $value[ 'token'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
        $value[ 'purchase_code'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     }
   
     if ( $option_name == 'jnews_dismiss_license_notice' ) {
        $value = true;
     }
   
     if ( $option_name == 'jnews_option' ) {
            $value[ 'interval_validation'] = time() * 2;
            $value[ 'tm_exp' ] = time() * 2;
     }
   
     update_option ($option_name, $value);
   
}, 10, 3);

add_filter( 'rest_endpoints', function( $endpoints ){
    if ( isset( $endpoints['/jnews/v1/resetLicense'] ) ) {
        unset( $endpoints['/jnews/v1/resetLicense'] );
    }
    if ( isset( $endpoints['/jnews/v1/getValidateNoticeLength'] ) ) {
        unset( $endpoints['/jnews/v1/getValidateNoticeLength'] );
    }
    return $endpoints;
});

add_action( 'admin_print_styles', 'jnews_remove_admin_styles', 1 );
function jnews_remove_admin_styles() {
    wp_dequeue_script( 'jnews-essential-local' );
    wp_deregister_script( 'jnews-essential-local' );
}
 
You were not supposed to add anything to the js file. The js file also needs nulling for the theme to be called properly nulled, but the js is minified and it needs patience and time to go through it. Since it does not provice any significant features i found it much easier to simply prevent it from loading.

For me the theme works just fine as you can see from the attached screenshot. I am using untouched theme. and have all the modifications only in the child theme functions.php

Screenshot.png

Make sure you have the following added to the child theme fucntions.php
This is what i have in my child theme fucntions.php and it works just fine for me.


PHP:
add_filter( 'jnews_check_is_license_validated', '__return_true' );


/* Uncomment the following block only once if you have upgraded from v9.x to v10.x
After uncommenting, the theme will stop showing migration message. You may then comment it back.
*/

/*
update_option( 'jnews_license', [ 'validated' => true, 'token' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'purchase_code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ] );
update_option( 'jnews_dismiss_license_notice', true );
//jnews_update_option( 'interval_validation', 'finish' );
$options = get_option( 'jnews_option', array() );
$options[ 'interval_validation' ] = null;
update_option( 'jnews_option', $options );
*/

add_action('updated_option', function( $option_name, $old_value, $value ) {
  
    if ($option_name == 'jnews_license') {
        $value[ 'validated'] = true;
        $value[ 'token'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
        $value[ 'purchase_code'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     }
  
     if ( $option_name == 'jnews_dismiss_license_notice' ) {
        $value = true;
     }
  
     if ( $option_name == 'jnews_option' ) {
            $value[ 'interval_validation'] = time() * 2;
            $value[ 'tm_exp' ] = time() * 2;
     }
  
     update_option ($option_name, $value);
  
}, 10, 3);

add_filter( 'rest_endpoints', function( $endpoints ){
    if ( isset( $endpoints['/jnews/v1/resetLicense'] ) ) {
        unset( $endpoints['/jnews/v1/resetLicense'] );
    }
    if ( isset( $endpoints['/jnews/v1/getValidateNoticeLength'] ) ) {
        unset( $endpoints['/jnews/v1/getValidateNoticeLength'] );
    }
    return $endpoints;
});

add_action( 'admin_print_styles', 'jnews_remove_admin_styles', 1 );
function jnews_remove_admin_styles() {
    wp_dequeue_script( 'jnews-essential-local' );
    wp_deregister_script( 'jnews-essential-local' );
}
Work as well. Thank you bro.
 
You were not supposed to add anything to the js file. The js file also needs nulling for the theme to be called properly nulled, but the js is minified and it needs patience and time to go through it. Since it does not provice any significant features i found it much easier to simply prevent it from loading.

For me the theme works just fine as you can see from the attached screenshot. I am using untouched theme. and have all the modifications only in the child theme functions.php

Screenshot.png

Make sure you have the following added to the child theme fucntions.php
This is what i have in my child theme fucntions.php and it works just fine for me.


PHP:
add_filter( 'jnews_check_is_license_validated', '__return_true' );


/* Uncomment the following block only once if you have upgraded from v9.x to v10.x
After uncommenting, the theme will stop showing migration message. You may then comment it back.
*/

/*
update_option( 'jnews_license', [ 'validated' => true, 'token' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'purchase_code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ] );
update_option( 'jnews_dismiss_license_notice', true );
//jnews_update_option( 'interval_validation', 'finish' );
$options = get_option( 'jnews_option', array() );
$options[ 'interval_validation' ] = null;
update_option( 'jnews_option', $options );
*/

add_action('updated_option', function( $option_name, $old_value, $value ) {
  
    if ($option_name == 'jnews_license') {
        $value[ 'validated'] = true;
        $value[ 'token'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
        $value[ 'purchase_code'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     }
  
     if ( $option_name == 'jnews_dismiss_license_notice' ) {
        $value = true;
     }
  
     if ( $option_name == 'jnews_option' ) {
            $value[ 'interval_validation'] = time() * 2;
            $value[ 'tm_exp' ] = time() * 2;
     }
  
     update_option ($option_name, $value);
  
}, 10, 3);

add_filter( 'rest_endpoints', function( $endpoints ){
    if ( isset( $endpoints['/jnews/v1/resetLicense'] ) ) {
        unset( $endpoints['/jnews/v1/resetLicense'] );
    }
    if ( isset( $endpoints['/jnews/v1/getValidateNoticeLength'] ) ) {
        unset( $endpoints['/jnews/v1/getValidateNoticeLength'] );
    }
    return $endpoints;
});

add_action( 'admin_print_styles', 'jnews_remove_admin_styles', 1 );
function jnews_remove_admin_styles() {
    wp_dequeue_script( 'jnews-essential-local' );
    wp_deregister_script( 'jnews-essential-local' );
}

can u share the untouched theme v10.0.3 please?
 
You were not supposed to add anything to the js file. The js file also needs nulling for the theme to be called properly nulled, but the js is minified and it needs patience and time to go through it. Since it does not provice any significant features i found it much easier to simply prevent it from loading.

For me the theme works just fine as you can see from the attached screenshot. I am using untouched theme. and have all the modifications only in the child theme functions.php

Screenshot.png

Make sure you have the following added to the child theme fucntions.php
This is what i have in my child theme fucntions.php and it works just fine for me.


PHP:
add_filter( 'jnews_check_is_license_validated', '__return_true' );


/* Uncomment the following block only once if you have upgraded from v9.x to v10.x
After uncommenting, the theme will stop showing migration message. You may then comment it back.
*/

/*
update_option( 'jnews_license', [ 'validated' => true, 'token' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'purchase_code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ] );
update_option( 'jnews_dismiss_license_notice', true );
//jnews_update_option( 'interval_validation', 'finish' );
$options = get_option( 'jnews_option', array() );
$options[ 'interval_validation' ] = null;
update_option( 'jnews_option', $options );
*/

add_action('updated_option', function( $option_name, $old_value, $value ) {
  
    if ($option_name == 'jnews_license') {
        $value[ 'validated'] = true;
        $value[ 'token'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
        $value[ 'purchase_code'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     }
  
     if ( $option_name == 'jnews_dismiss_license_notice' ) {
        $value = true;
     }
  
     if ( $option_name == 'jnews_option' ) {
            $value[ 'interval_validation'] = time() * 2;
            $value[ 'tm_exp' ] = time() * 2;
     }
  
     update_option ($option_name, $value);
  
}, 10, 3);

add_filter( 'rest_endpoints', function( $endpoints ){
    if ( isset( $endpoints['/jnews/v1/resetLicense'] ) ) {
        unset( $endpoints['/jnews/v1/resetLicense'] );
    }
    if ( isset( $endpoints['/jnews/v1/getValidateNoticeLength'] ) ) {
        unset( $endpoints['/jnews/v1/getValidateNoticeLength'] );
    }
    return $endpoints;
});

add_action( 'admin_print_styles', 'jnews_remove_admin_styles', 1 );
function jnews_remove_admin_styles() {
    wp_dequeue_script( 'jnews-essential-local' );
    wp_deregister_script( 'jnews-essential-local' );
}
Ah thanks @lijoe ! It works now! Mistake was putting code into .js file and not functions.
 
This is what works for me. Add the following to the child theme functions.php. I have used untouched jnews theme and a child theme where I added the following snippets.

1.
PHP:
add_filter( 'jnews_check_is_license_validated', '__return_true' );

2.
Add this snippet , open wp admin once and then remove or disable it by commenting it. Needed just in case the theme shows unregistered. Once done, the theme will show a migration message.
PHP:
update_option( 'jnews_license', [ 'validated' => true, 'token' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'purchase_code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ] );
update_option( 'jnews_dismiss_license_notice', true );
$options = get_option( 'jnews_option', array() );
$options[ 'interval_validation' ] = null;
update_option( 'jnews_option', $options );

3.
This snippet is needed just in case the theme automatically resets the license information. Keep this added always, since this will counter any attempt by theme to reset the license.
PHP:
add_action('updated_option', function( $option_name, $old_value, $value ) {
     if ($option_name == 'jnews_license') {
        $value[ 'validated'] = true;
        $value[ 'token'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
        $value[ 'purchase_code'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     }
  
     if ( $option_name == 'jnews_dismiss_license_notice' ) {
        $value = true;
     }
  
     if ( $option_name == 'jnews_option' ) {
            $value[ 'interval_validation'] = time() * 2;
            $value[ 'tm_exp' ] = time() * 2;
     }
  
     update_option ($option_name, $value);
  
}, 10, 3);

4.
These REST endpoints are what validate and reset the license info in the background. This snippet will remove the check.
PHP:
add_filter( 'rest_endpoints', function( $endpoints ){
    if ( isset( $endpoints['/jnews/v1/resetLicense'] ) ) {
        unset( $endpoints['/jnews/v1/resetLicense'] );
    }
    if ( isset( $endpoints['/jnews/v1/getValidateNoticeLength'] ) ) {
        unset( $endpoints['/jnews/v1/getValidateNoticeLength'] );
    }
    return $endpoints;
});

5.
There is another check in /assets/js/admin/jnews-essential.local.js file. The js file calls the same REST endpoints again in the background. DId not have enough time and patience to mess with the minified js so simply removed it with the following snippet. Works fine for me except that the theme plugin install page lost the plugins sections toggle and plugin update link opens the default wp update screen to update the plugin. If someone has enough patience they may mess with the js to null the REST calls. Nulling these two REST API endpoints will get the theme working just fine.
PHP:
add_action( 'admin_print_styles', 'jnews_remove_admin_styles', 1 );
function jnews_remove_admin_styles() {
    wp_dequeue_script( 'jnews-essential-local' );
    wp_deregister_script( 'jnews-essential-local' );
}
Thanks, I just tried to import the demo, but I can't click it
 
That's right, I confirm @lijoe's method won't be able to import demos.
That's because there is another license check in the minified js file i mentioned above. I have prevented that js from loading since it does not provide any significant features w.r.t. general theme usage. Removal of that js also breaks the section toggles on jnews plugins install page. But then these are something I never needed. Minified js can be definitely nulled but it needs time and patience to do it. For me simply unloading the js file was easier.


You may try manual demo import which should work since they are just json and text files in jnews/data/import folder. The style.json file should be inported from within jnews customizer. There is a plugin for customizer import/export in the official WP repo which should work for this purpose. Widgets.json should also be importable via similar widget import/export plugin. If you are using wpbakery visual composer, you may copy the contents of the txt file in demo's post folder in jnews/data/import. If you are using elementor you may try importing json files from the same folder. I haven'ttried it but looking at the files I can say manual import shouldn't be very difficult.
 
Last edited:
  • Like
Reactions: VicktorS2
You were not supposed to add anything to the js file. The js file also needs nulling for the theme to be called properly nulled, but the js is minified and it needs patience and time to go through it. Since it does not provice any significant features i found it much easier to simply prevent it from loading.

For me the theme works just fine as you can see from the attached screenshot. I am using untouched theme. and have all the modifications only in the child theme functions.php

Screenshot.png

Make sure you have the following added to the child theme fucntions.php
This is what i have in my child theme fucntions.php and it works just fine for me.


PHP:
add_filter( 'jnews_check_is_license_validated', '__return_true' );


/* Uncomment the following block only once if you have upgraded from v9.x to v10.x
After uncommenting, the theme will stop showing migration message. You may then comment it back.
*/

/*
update_option( 'jnews_license', [ 'validated' => true, 'token' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'purchase_code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ] );
update_option( 'jnews_dismiss_license_notice', true );
//jnews_update_option( 'interval_validation', 'finish' );
$options = get_option( 'jnews_option', array() );
$options[ 'interval_validation' ] = null;
update_option( 'jnews_option', $options );
*/

add_action('updated_option', function( $option_name, $old_value, $value ) {
  
    if ($option_name == 'jnews_license') {
        $value[ 'validated'] = true;
        $value[ 'token'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
        $value[ 'purchase_code'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     }
  
     if ( $option_name == 'jnews_dismiss_license_notice' ) {
        $value = true;
     }
  
     if ( $option_name == 'jnews_option' ) {
            $value[ 'interval_validation'] = time() * 2;
            $value[ 'tm_exp' ] = time() * 2;
     }
  
     update_option ($option_name, $value);
  
}, 10, 3);

add_filter( 'rest_endpoints', function( $endpoints ){
    if ( isset( $endpoints['/jnews/v1/resetLicense'] ) ) {
        unset( $endpoints['/jnews/v1/resetLicense'] );
    }
    if ( isset( $endpoints['/jnews/v1/getValidateNoticeLength'] ) ) {
        unset( $endpoints['/jnews/v1/getValidateNoticeLength'] );
    }
    return $endpoints;
});

add_action( 'admin_print_styles', 'jnews_remove_admin_styles', 1 );
function jnews_remove_admin_styles() {
    wp_dequeue_script( 'jnews-essential-local' );
    wp_deregister_script( 'jnews-essential-local' );
}
Bro I have to thank you, I just did this method and it worked perfectly. Only the plugins that must be updated manually is no big deal. Thanks bro
 
That's because there is another license check in the minified js file i mentioned above. I have prevented that js from loading since it does not provide any significant features w.r.t. general theme usage. Removal of that js also breaks the section toggles on jnews plugins install page. But then these are something I never needed. Minified js can be definitely nulled but it needs time and patience to do it. For me simply unloading the js file was easier.


You may try manual demo import which should work since they are just json and text files in jnews/data/import folder. The style.json file should be inported from within jnews customizer. There is a plugin for customizer import/export in the official WP repo which should work for this purpose. Widgets.json should also be importable via similar widget import/export plugin. If you are using wpbakery visual composer, you may copy the contents of the txt file in demo's post folder in jnews/data/import. If you are using elementor you may try importing json files from the same folder. I haven'ttried it but looking at the files I can say manual import shouldn't be very difficult.
So far I just needed to replace the files from the old installation to update the theme. When I do this now, the replacement breaks the entire layout I had customized.

Is there any way to solve this, bro?
 
Bro I have to thank you, I just did this method and it worked perfectly. Only the plugins that must be updated manually is no big deal. Thanks bro
You may simply right click on plugin update button in jnews plugins installer page and it should be able to update the plugin.
 
  • Like
Reactions: Mrce21
I have now managed to get the demo import working.

Plugin sections are also enabled in page editor. No more disabled section with red activation button in post editor.

The only issue that remains now is with jnews plugins installer page where you cannot directly click the plugin install link to install or activate it. You have to right click the install/ activate button and open the link in new page for it to happen. This is something that I can live with but will still see to it if I have some free time some day.

1. Add this to child theme finctions.php

PHP:
add_filter( 'jnews_check_is_license_validated', '__return_true' );

/* Uncomment the following block only once if you have upgraded from v9.x to v10.x
After uncommenting, the theme will stop showing migration message. You may then comment it back.
*/

/*
update_option( 'jnews_license', [ 'validated' => true, 'token' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'purchase_code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ] );
update_option( 'jnews_dismiss_license_notice', true );
//jnews_update_option( 'interval_validation', 'finish' );
$options = get_option( 'jnews_option', array() );
$options[ 'interval_validation' ] = null;
update_option( 'jnews_option', $options );
*/

add_action('updated_option', function( $option_name, $old_value, $value ) {
  
    if ($option_name == 'jnews_license') {
        $value[ 'validated'] = true;
        $value[ 'token'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
        $value[ 'purchase_code'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     }
  
     if ( $option_name == 'jnews_dismiss_license_notice' ) {
        $value = true;
     }
  
     if ( $option_name == 'jnews_option' ) {
            $value[ 'interval_validation'] = time() * 2;
            $value[ 'tm_exp' ] = time() * 2;
     }
  
     update_option ($option_name, $value);
  
}, 10, 3);

add_filter( 'rest_endpoints', function( $endpoints ){
    if ( isset( $endpoints['/jnews/v1/resetLicense'] ) ) {
        unset( $endpoints['/jnews/v1/resetLicense'] );
    }
    if ( isset( $endpoints['/jnews/v1/getValidateNoticeLength'] ) ) {
        unset( $endpoints['/jnews/v1/getValidateNoticeLength'] );
    }
    return $endpoints;
});

2. Edit the js file in this location
Code:
/wp-content/themes/jnews/assets/js/admin/jnews-admin.js
   --- at the end of the js file search for return _0xd2828b
   --- change it to return null
jnews.PNG
jnews2.PNG
 
Another heads up !!

Demo import works fine. Plugin installer is now able to install and activate plugins. Plugin update from plugin installer page kind of works. When you update the plugin, the response says the plugin was updated but it gets uninstalled actually. You have to refresh the page and install the plugin again and this time it will install the updated version of the plugin. This is still a little inconvenient but we are slowly getting there. The next time i sit down with this, I will try to dig further and see if I can get this work as it is originally supposed to be.

1. Add this to child theme functions.php
PHP:
add_filter( 'jnews_check_is_license_validated', '__return_true' );

/* Uncomment the following block only once if you have upgraded from v9.x to v10.x
After uncommenting, the theme will stop showing migration message. You may then comment it back.
*/

/*
update_option( 'jnews_license', [ 'validated' => true, 'token' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'purchase_code' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ] );
update_option( 'jnews_dismiss_license_notice', true );
//jnews_update_option( 'interval_validation', 'finish' );
$options = get_option( 'jnews_option', array() );
$options[ 'interval_validation' ] = null;
update_option( 'jnews_option', $options );
*/

add_action('updated_option', function( $option_name, $old_value, $value ) {
 
    if ($option_name == 'jnews_license') {
        $value[ 'validated'] = true;
        $value[ 'token'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
        $value[ 'purchase_code'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     }
 
     if ( $option_name == 'jnews_dismiss_license_notice' ) {
        $value = true;
     }
 
     if ( $option_name == 'jnews_option' ) {
            $value[ 'interval_validation'] = time() * 2;
            $value[ 'tm_exp' ] = time() * 2;
     }
 
     update_option ($option_name, $value);
 
}, 10, 3);

2. replace these js files with the ones from the attached zip.
/wp-content/themes/jnews/assets/js/admin/jnews-admin.js
wp-content/themes/jnews/assets/js/admin/jnews-dashboard.js​
These js files are from jnews-theme v10.0.3
 

Attachments

  • assets-js-admin.zip
    9.5 KB · Views: 21
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock