Skip to content

Commit

Permalink
feat: add SDK banner support
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Nov 4, 2024
1 parent d6dedfc commit 982da51
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ public function enqueue_options_assets() {
]
)
);

$has_pro = apply_filters( 'product_hyve_license_status', false );
if ( ! $has_pro ) {
do_action( 'themeisle_sdk_load_banner', 'hyve' );
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/backend/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ const App = () => {

setSettings( response );
setLoading();

const sdkEvent = new Event( 'themeisle:banner:init' );
document.dispatchEvent( sdkEvent );
};

fetchData();
Expand Down Expand Up @@ -80,6 +83,7 @@ const App = () => {
)}

<div className="mx-auto max-w-screen-2xl p-4 md:p-6 2xl:p-10">
<div id="tsdk_banner" class="hyve-banner mb-4 md:mb-6 2xl:mb-10 hidden"></div>
<div className="mx-auto max-w-270">
<div className="grid grid-cols-6 gap-8">
<Sidebar/>
Expand Down
4 changes: 4 additions & 0 deletions src/backend/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@
color: #333;
}
}

.hyve-banner:has(.tsdk-banner-cta) {
display: block;
}

0 comments on commit 982da51

Please sign in to comment.