Skip to content

Commit

Permalink
#44 premium templates fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YahyaTec committed Dec 21, 2022
1 parent 5726876 commit 2878cb3
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 4 deletions.
73 changes: 73 additions & 0 deletions assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion templates/classes/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,12 @@ function( $file ) {
$name = basename( $file, '.php' );
ob_start();
include $file;
printf( '<script type="text/html" id="tmpl-mas-premium-pro%1$s">%2$s</script>', $name, ob_get_clean() ); //phpcs:ignore
printf( '<script type="text/html" id="tmpl-mas-premium-%1$s">%2$s</script>', $name, ob_get_clean() ); //phpcs:ignore

},
$scripts
);

}

/**
Expand Down
2 changes: 1 addition & 1 deletion templates/classes/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct() {
'pro_message' => $this->get_pro_message(),
'api' => array(
'enabled' => true,
'base' => 'https://dali.madrasthemes.com/elementor',
'base' => 'https://dali.madrasthemes.com/elementor/',
'path' => 'wp-json/mastemp/v1',
'endpoints' => array(
'templates' => '/templates/',
Expand Down
4 changes: 2 additions & 2 deletions templates/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class Premium_Templates_Manager {
public function __construct() {

// Register AJAX hooks
add_action( 'wp_ajax_si_premium_get_templates', array( $this, 'get_templates' ) );
add_action( 'wp_ajax_si_premium_inner_template', array( $this, 'insert_inner_template' ) );
add_action( 'wp_ajax_mas_premium_get_templates', array( $this, 'get_templates' ) );
add_action( 'wp_ajax_mas_premium_inner_template', array( $this, 'insert_inner_template' ) );

if ( defined( 'ELEMENTOR_VERSION' ) && version_compare( ELEMENTOR_VERSION, '2.2.8', '>' ) ) {
add_action( 'elementor/ajax/register_actions', array( $this, 'register_ajax_actions' ), 20 );
Expand Down

0 comments on commit 2878cb3

Please sign in to comment.