Skip to content

Commit

Permalink
Merge pull request #1014 from Codeinwp/feat/sdk-banner
Browse files Browse the repository at this point in the history
feat: add SDK support for banner
  • Loading branch information
Soare-Robert-Daniel authored Nov 11, 2024
2 parents dd7bfdd + a66a223 commit 3430ef0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Binary file added assets/img/black-friday.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions includes/admin/class-rop-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ public function enqueue_scripts() {
if ( empty( $page ) ) {
return;
}

wp_enqueue_media();
wp_register_script( $this->plugin_name . '-dashboard', ROP_LITE_URL . 'assets/js/build/dashboard.js', array('wp-url'), ( ROP_DEBUG ) ? time() : $this->version, false );
wp_register_script( $this->plugin_name . '-exclude', ROP_LITE_URL . 'assets/js/build/exclude.js', array(), ( ROP_DEBUG ) ? time() : $this->version, false );
Expand Down Expand Up @@ -421,6 +422,9 @@ public function enqueue_scripts() {
}

$this->register_survey();
if ( ! defined( 'ROP_PRO_VERSION' ) ) {
do_action( 'themeisle_sdk_load_banner', 'rop' );
}
}

/**
Expand Down
12 changes: 12 additions & 0 deletions vue/src/vue-elements/main-page-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
</h1>
</div>
</div>
<div
id="tsdk_banner"
class="rop-banner"
/>
<toast />
<div
v-if=" is_rest_api_error "
Expand Down Expand Up @@ -380,6 +384,8 @@
}, 1000);
this.get_toast_message(false);
document.dispatchEvent(new Event('themeisle:banner:init'));
},
created() {
this.$root.$refs.main_page = this;
Expand Down Expand Up @@ -567,4 +573,10 @@
font-weight: bold;
text-decoration: underline;
}
.rop-banner:has(.tsdk-banner-cta) {
width: 100%;
margin-top: 15px;
margin-bottom: 30px;
}
</style>

0 comments on commit 3430ef0

Please sign in to comment.