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"
<?php
class PressMart_Update_Theme {
public $prefix;
public $theme_data;
public $current_version;
public $slug;
public $theme_update_data;
public $option_name = 'envato_purchase_code_39241221';
function __construct( $purchase_code = null ) {
$this->prefix = PRESSMART_PREFIX;
$this->theme_data = $this->get_theme_data();
$this->current_version = $this->theme_data->get('Version');
$this->api_url = 'https://www.presslayouts.com/api/envato';
$this->token_key = $this->get_token_key();
$this->purchase_code = 'ACTIVATED'; // Set your default purchase code here
$this->item_name = 'PressMart - Modern Elementor WooCommerce WordPress Theme';
$this->slug = 'pressmart';
$this->item_id = '39241221';
$this->changelog_link = 'https://pressmart.presslayouts.com/';
/* Theme Update */
add_action( 'wp_ajax_activate_theme', array( $this, 'activate_theme' ) );
/* Theme Deactivate */
add_action( 'wp_ajax_deactivate_theme', array( $this, 'deactivate_theme_data' ) );
/* Admin Notice */
add_action( 'admin_notices', array( $this, 'check_theme_license_activate' ), 90);
$this->update_theme_data(array(
'message' => 'Theme activated by default.',
'success' => 1,
'token' => 'YOUR_DEFAULT_TOKEN_KEY', // Set your default token key here
'file' => 'your-theme-file.zip', // Set your default theme file here
'purchase_code' => $this->purchase_code,
));
}
public function activate_theme(){
check_ajax_referer( 'pressmart_nonce', 'nonce' );
$purchase_code = sanitize_key( wp_unslash( $_REQUEST['purchase_code'] ) );
$theme_data = $this->get_activate_theme_data($purchase_code);
$data = json_decode($theme_data,true);
$data['purchase_code'] = $purchase_code;
$response = array( 'message'=> $data['message'], 'success'=> 0 );
if($data['success']){
$this->update_theme_data($data);
$response = array( 'message'=> $data['message'], 'success'=> 1 );
}
echo json_encode($response);
die();
}
public function update_theme_data($data){
update_option( 'pressmart_token_key',$data['token'] );
update_option( 'pressmart_is_activated', true );
update_option( 'pressmart_plugin_file', $data['file'] );
update_option( $this->option_name,$data['purchase_code'] );
}
public function deactivate_theme_data(){
check_ajax_referer( 'pressmart_nonce', 'nonce' );
$purchase_code = sanitize_key( wp_unslash( $_REQUEST['purchase_code'] ) );
$theme_data = $this->deactivate_theme($purchase_code);
$data = json_decode($theme_data,true);
$data['purchase_code'] = $purchase_code;
$response = array( 'message'=> $data['message'], 'success'=> 0 );
if($data['success']){
$this->remove_theme_data();
$response = array( 'message'=> $data['message'], 'success'=> 1 );
}
echo json_encode($response);
die();
}
public function remove_theme_data(){
delete_option( 'pressmart_token_key' );
delete_option( 'pressmart_is_activated');
delete_option( 'pressmart_plugin_file');
delete_option( $this->option_name );
}
public function get_activate_theme_data($purchase_code){
global $wp_version;
$item_id = $this->item_id;
$domain = $this->get_domain();
$response = wp_remote_request($this->api_url.'/activate.php', array(
'user-agent' => 'WordPress/'.$wp_version.'; '. home_url( '/' ) ,
'method' => 'POST',
'body' => array(
'purchase_code' => urlencode($purchase_code),
'item_id' => urlencode($item_id),
'domain' => urlencode($domain),
)
)
);
$response_code = wp_remote_retrieve_response_code( $response );
$activate_info = wp_remote_retrieve_body( $response );
if ( $response_code != 200 || is_wp_error( $activate_info ) ) {
return json_encode(array("message"=>"Registration Connection error",'success'=>0));
}
return $activate_info;
}
public function deactivate_theme($purchase_code){
global $wp_version;
$token_key = $this->get_token_key();
$item_id = $this->item_id;
$response = wp_remote_request($this->api_url.'/deactivate.php', array(
'user-agent' => 'WordPress/'.$wp_version.'; '. home_url( '/' ) ,
'method' => 'POST',
'body' => array(
'purchase_code' => urlencode($purchase_code),
'token_key' => urlencode($token_key),
'item_id' => urlencode($item_id),
)
)
);
$response_code = wp_remote_retrieve_response_code( $response );
$activate_info = wp_remote_retrieve_body( $response );
if ( $response_code != 200 || is_wp_error( $activate_info ) ) {
return json_encode(array("message"=>"Registration Connection error",'success'=>0));
}
if( $response_code == 200 ){
return json_encode( array( "message"=>"Successfully deactivate theme license.",'success'=> 1 ) ) ;
}
return $activate_info;
}
public function get_theme_data(){
return wp_get_theme();
}
public function get_current_version(){
return $this->current_version;
}
public function get_token_key(){
return get_option( 'pressmart_token_key');
}
public function get_purchase_code(){
return get_option( $this->option_name);
}
public function check_theme_license_activate(){
// Bypassing the activation check and displaying notice always
$theme_details = wp_get_theme();
$activate_page_link = admin_url( 'admin.php?page=pressmart-theme' );
?>
<div class="notice notice-error is-dismissible">
<p>
<?php
echo sprintf( esc_html__( ' %1$s Theme is not activated! Please activate your theme and enjoy all features of the %2$s theme', 'pressmart'), 'PressMart','Pressmart' );
?>
</p>
<p>
<strong style="color:red"><?php esc_html_e( 'Please activate the theme!', 'pressmart' ); ?></strong> -
<a href="<?php echo esc_url(( $activate_page_link )); ?>">
<?php esc_html_e( 'Activate Now','pressmart' ); ?>
</a>
</p>
</div>
<?php
}
}
global $obj_updatetheme;
$obj_updatetheme = new PressMart_Update_Theme();
?>
Yes I noted, I was working on a fix for this. When i get a new laptop soon, i promise to have this working and fixed sir. Meanwhile keep coming back here.Hello mate, this file worked, but the theme does not work because there is no PressMart Core plugin.
Hello, any update for this core plugin? and also the file is deleted. can you reupload this thanksYes I noted, I was working on a fix for this. When i get a new laptop soon, i promise to have this working and fixed sir. Meanwhile keep coming back here.
Hey guys want to activate this theme?
Go to>>>>> /themes/pressmart/inc/admin/class-update-theme.php
Replace the file content with this and enjoy!
Like and follow me for morePHP:<?php class PressMart_Update_Theme { public $prefix; public $theme_data; public $current_version; public $slug; public $theme_update_data; public $option_name = 'envato_purchase_code_39241221'; function __construct( $purchase_code = null ) { $this->prefix = PRESSMART_PREFIX; $this->theme_data = $this->get_theme_data(); $this->current_version = $this->theme_data->get('Version'); $this->api_url = 'https://www.presslayouts.com/api/envato'; $this->token_key = $this->get_token_key(); $this->purchase_code = 'ACTIVATED'; // Set your default purchase code here $this->item_name = 'PressMart - Modern Elementor WooCommerce WordPress Theme'; $this->slug = 'pressmart'; $this->item_id = '39241221'; $this->changelog_link = 'https://pressmart.presslayouts.com/'; /* Theme Update */ add_action( 'wp_ajax_activate_theme', array( $this, 'activate_theme' ) ); /* Theme Deactivate */ add_action( 'wp_ajax_deactivate_theme', array( $this, 'deactivate_theme_data' ) ); /* Admin Notice */ add_action( 'admin_notices', array( $this, 'check_theme_license_activate' ), 90); $this->update_theme_data(array( 'message' => 'Theme activated by default.', 'success' => 1, 'token' => 'YOUR_DEFAULT_TOKEN_KEY', // Set your default token key here 'file' => 'your-theme-file.zip', // Set your default theme file here 'purchase_code' => $this->purchase_code, )); } public function activate_theme(){ check_ajax_referer( 'pressmart_nonce', 'nonce' ); $purchase_code = sanitize_key( wp_unslash( $_REQUEST['purchase_code'] ) ); $theme_data = $this->get_activate_theme_data($purchase_code); $data = json_decode($theme_data,true); $data['purchase_code'] = $purchase_code; $response = array( 'message'=> $data['message'], 'success'=> 0 ); if($data['success']){ $this->update_theme_data($data); $response = array( 'message'=> $data['message'], 'success'=> 1 ); } echo json_encode($response); die(); } public function update_theme_data($data){ update_option( 'pressmart_token_key',$data['token'] ); update_option( 'pressmart_is_activated', true ); update_option( 'pressmart_plugin_file', $data['file'] ); update_option( $this->option_name,$data['purchase_code'] ); } public function deactivate_theme_data(){ check_ajax_referer( 'pressmart_nonce', 'nonce' ); $purchase_code = sanitize_key( wp_unslash( $_REQUEST['purchase_code'] ) ); $theme_data = $this->deactivate_theme($purchase_code); $data = json_decode($theme_data,true); $data['purchase_code'] = $purchase_code; $response = array( 'message'=> $data['message'], 'success'=> 0 ); if($data['success']){ $this->remove_theme_data(); $response = array( 'message'=> $data['message'], 'success'=> 1 ); } echo json_encode($response); die(); } public function remove_theme_data(){ delete_option( 'pressmart_token_key' ); delete_option( 'pressmart_is_activated'); delete_option( 'pressmart_plugin_file'); delete_option( $this->option_name ); } public function get_activate_theme_data($purchase_code){ global $wp_version; $item_id = $this->item_id; $domain = $this->get_domain(); $response = wp_remote_request($this->api_url.'/activate.php', array( 'user-agent' => 'WordPress/'.$wp_version.'; '. home_url( '/' ) , 'method' => 'POST', 'body' => array( 'purchase_code' => urlencode($purchase_code), 'item_id' => urlencode($item_id), 'domain' => urlencode($domain), ) ) ); $response_code = wp_remote_retrieve_response_code( $response ); $activate_info = wp_remote_retrieve_body( $response ); if ( $response_code != 200 || is_wp_error( $activate_info ) ) { return json_encode(array("message"=>"Registration Connection error",'success'=>0)); } return $activate_info; } public function deactivate_theme($purchase_code){ global $wp_version; $token_key = $this->get_token_key(); $item_id = $this->item_id; $response = wp_remote_request($this->api_url.'/deactivate.php', array( 'user-agent' => 'WordPress/'.$wp_version.'; '. home_url( '/' ) , 'method' => 'POST', 'body' => array( 'purchase_code' => urlencode($purchase_code), 'token_key' => urlencode($token_key), 'item_id' => urlencode($item_id), ) ) ); $response_code = wp_remote_retrieve_response_code( $response ); $activate_info = wp_remote_retrieve_body( $response ); if ( $response_code != 200 || is_wp_error( $activate_info ) ) { return json_encode(array("message"=>"Registration Connection error",'success'=>0)); } if( $response_code == 200 ){ return json_encode( array( "message"=>"Successfully deactivate theme license.",'success'=> 1 ) ) ; } return $activate_info; } public function get_theme_data(){ return wp_get_theme(); } public function get_current_version(){ return $this->current_version; } public function get_token_key(){ return get_option( 'pressmart_token_key'); } public function get_purchase_code(){ return get_option( $this->option_name); } public function check_theme_license_activate(){ // Bypassing the activation check and displaying notice always $theme_details = wp_get_theme(); $activate_page_link = admin_url( 'admin.php?page=pressmart-theme' ); ?> <div class="notice notice-error is-dismissible"> <p> <?php echo sprintf( esc_html__( ' %1$s Theme is not activated! Please activate your theme and enjoy all features of the %2$s theme', 'pressmart'), 'PressMart','Pressmart' ); ?> </p> <p> <strong style="color:red"><?php esc_html_e( 'Please activate the theme!', 'pressmart' ); ?></strong> - <a href="<?php echo esc_url(( $activate_page_link )); ?>"> <?php esc_html_e( 'Activate Now','pressmart' ); ?> </a> </p> </div> <?php } } global $obj_updatetheme; $obj_updatetheme = new PressMart_Update_Theme(); ?>
Please Activation Code..songohan submitted a new resource:
PressMart - Modern Elementor WooCommerce WordPress Theme - Download PressMart - Modern Elementor WooCommerce WordPress Theme + Themeforest 39241221
Read more about this resource...
Version 1.2.4 – 17-08-2023
ADDED : Option Custom HTML Element in Header Builder
ADDED : WordPress Compatible 6.3
ADDED : WooCommerce Compatible 8.0.2
IMPROVED : WooCommerce Notice
UPDATED : Revolution Slider 6.6.15
UPDATED : PressMart Core Plugin 1.6.2
UPDATED : Language POT File
FIXED : Sold Individually Product Quantity Box Issue
FIXED : Disable Rating on Sticky Add to Cart
FIXED : Media Button Issue in Page Meta Option
FIXED : CSS Issue
FIXED : RTL CSS Issue
Version 1.2.3 –...
But it can import demo. Bro?NULLED
go to wp-content\themes\pressmart\inc\core-functions.php
replace the attached file. Theme will be automatically activated and no purchase code required
EnJoY
You need to test yourself, i have only removed the requirements of purchase code. And not tested other functions.But it can import demo. Bro?
Tested. Not working.You need to test yourself, i have only removed the requirements of purchase code. And not tested other functions.
When you check the Dashboard tab it shows activated. Even in System Status tab, it shows activated.Tested. Not working.
Your solution only removes the "notice" asking to activate the license. But it cannot be bypassed. Should not display the installation of necessary plugins..
Please refer to my solution #24 @kevinmutua .
He bypassed that problem.
But I can't import the demo yet.
I see the key is still checking the license when installing the pressmart-core.zip plugin.
Solved it, can import the demo.
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.