Skip to content

Commit a18b020

Browse files
refactor: use VISUALIZER_DIRNAME for internal pages
1 parent a680d60 commit a18b020

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

classes/Visualizer/Module/Admin.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function __construct( Visualizer_Plugin $plugin ) {
8080
$this->_addFilter( 'admin_footer_text', 'render_review_notice' );
8181

8282
if ( ! defined( 'TI_CYPRESS_TESTING' ) ) {
83-
$this->_addFilter( 'themeisle-sdk/survey/' . VISUALIZER_PRODUCT_SLUG, 'get_survey_metadata', 10, 2 );
83+
$this->_addFilter( 'themeisle-sdk/survey/' . VISUALIZER_DIRNAME, 'get_survey_metadata', 10, 2 );
8484
}
8585

8686
if ( defined( 'TI_CYPRESS_TESTING' ) ) {
@@ -938,7 +938,7 @@ private function getQuery() {
938938
*/
939939
public function renderSupportPage() {
940940
wp_enqueue_style( 'visualizer-upsell', VISUALIZER_ABSURL . 'css/upsell.css', array(), Visualizer_Plugin::VERSION );
941-
do_action( 'themeisle_internal_page', VISUALIZER_PRODUCT_SLUG, 'support' );
941+
do_action( 'themeisle_internal_page', VISUALIZER_DIRNAME, 'support' );
942942
include_once VISUALIZER_ABSPATH . '/templates/support.php';
943943
}
944944

@@ -1095,7 +1095,7 @@ public function renderLibraryPage() {
10951095
)
10961096
);
10971097

1098-
do_action( 'themeisle_internal_page', VISUALIZER_PRODUCT_SLUG, 'library' );
1098+
do_action( 'themeisle_internal_page', VISUALIZER_DIRNAME, 'library' );
10991099

11001100
if ( ! apply_filters( 'visualizer_is_business', false ) ) {
11011101
do_action( 'themeisle_sdk_load_banner', 'visualizer' );

index.php

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ function visualizer_launch() {
6969
define( 'VISUALIZER_ABSPATH', dirname( __FILE__ ) );
7070
define( 'VISUALIZER_DIRNAME', basename( VISUALIZER_ABSPATH ) );
7171
define( 'VISUALIZER_REST_VERSION', 1 );
72-
define( 'VISUALIZER_PRODUCT_SLUG', VISUALIZER_DIRNAME );
7372
// if the below is true, then the js/customization.js in the plugin folder will be used instead of the one in the uploads folder (if it exists).
7473
// this is also used in Block.php
7574
if ( ! defined( 'VISUALIZER_TEST_JS_CUSTOMIZATION' ) ) {

0 commit comments

Comments
 (0)