Skip to content

Commit 6739f71

Browse files
committed
chore: update banner
1 parent 4681cfd commit 6739f71

File tree

7 files changed

+62
-89
lines changed

7 files changed

+62
-89
lines changed

assets/css/src/welcome-notice.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
}
113113

114114

115-
.wpfp-preview {
115+
.masteriyo-preview {
116116
max-height: 300px;
117117
width: auto;
118118
justify-self: center;
@@ -125,7 +125,7 @@
125125
}
126126
}
127127

128-
.wpfp-logo {
128+
.masteriyo-logo {
129129
bottom: 30px;
130130
right: 30px;
131131
opacity: 0.75;

assets/img/welcome-notice.png

-84.5 KB
Binary file not shown.

assets/img/welcome-notice.webp

443 KB
Binary file not shown.

assets/js/src/welcome-notice.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ function handleWelcomeNotice( $ ) {
1111
redirectUrl,
1212
ajaxUrl,
1313
nonce,
14-
wpfpRefNonce,
15-
wpfpStatus,
14+
masteriyoRefNonce,
15+
masteriyoStatus,
1616
} = lmscourseFSEData;
1717

1818
const installBtn = $(
19-
'.lmscourse-fse-welcome-notice #lmscourse-fse-install-wpfp'
19+
'.lmscourse-fse-welcome-notice #lmscourse-fse-install-masteriyo'
2020
);
2121
const dismissBtn = $( '.lmscourse-fse-welcome-notice .notice-dismiss' );
2222
const notice = $( '.lmscourse-fse-welcome-notice' );
@@ -31,13 +31,13 @@ function handleWelcomeNotice( $ ) {
3131
} );
3232
};
3333

34-
const activateWpfp = async () => {
34+
const activateMasteriyo = async () => {
3535
installText.text( activating );
3636
await activatePlugin( activationUrl );
3737

3838
await $.post( ajaxUrl, {
39-
nonce: wpfpRefNonce,
40-
action: 'lmscourse_fse_set_wpfp_ref',
39+
nonce: masteriyoRefNonce,
40+
action: 'lmscourse_fse_set_masteriyo_ref',
4141
} );
4242

4343
installSpinner.removeClass( 'dashicons-update' );
@@ -51,18 +51,18 @@ function handleWelcomeNotice( $ ) {
5151
installSpinner.removeClass( 'hidden' );
5252
installBtn.attr( 'disabled', true );
5353

54-
if ( wpfpStatus === 'active' ) {
54+
if ( masteriyoStatus === 'active' ) {
5555
return;
5656
}
5757

58-
if ( wpfpStatus === 'installed' ) {
59-
await activateWpfp();
58+
if ( masteriyoStatus === 'installed' ) {
59+
await activateMasteriyo();
6060
return;
6161
}
6262

6363
installText.text( installing );
64-
await installPlugin( 'wp-full-stripe-free' );
65-
await activateWpfp();
64+
await installPlugin( 'learning-management-system' );
65+
await activateMasteriyo();
6666
} );
6767

6868
$( dismissBtn ).on( 'click', () => {

inc/Admin.php

Lines changed: 46 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
class Admin {
1616

1717
/**
18-
* WP Full Pay reference key.
18+
* Masteriyo LMS reference key.
1919
*
2020
* @var string
2121
*/
22-
const WPFP_REF = 'wpfp_reference_key';
22+
const MASTERIYO_REF = 'masteriyo_reference_key';
2323

2424
/**
2525
* Admin constructor.
@@ -51,12 +51,11 @@ private function add_install_time() {
5151
*/
5252
public function setup_admin_hooks() {
5353
add_action( 'admin_notices', array( $this, 'render_welcome_notice' ), 0 );
54-
add_action( 'activated_plugin', array( $this, 'after_wpfs_activation' ) );
54+
add_action( 'activated_plugin', array( $this, 'after_masteriyo_activation' ) );
5555
add_action( 'wp_ajax_lmscourse_fse_dismiss_welcome_notice', array( $this, 'remove_welcome_notice' ) );
56-
add_action( 'wp_ajax_lmscourse_fse_set_wpfp_ref', array( $this, 'set_wpfp_ref' ) );
56+
add_action( 'wp_ajax_lmscourse_fse_set_masteriyo_ref', array( $this, 'set_masteriyo_ref' ) );
5757

5858
add_action( 'admin_enqueue_scripts', array( $this, 'register_internal_page' ) );
59-
add_filter( 'themeisle_sdk_blackfriday_data', array( $this, 'add_black_friday_data' ) );
6059
}
6160

6261
/**
@@ -69,7 +68,7 @@ public function render_welcome_notice() {
6968
return;
7069
}
7170

72-
$wpfp_status = $this->get_wpfp_status();
71+
$masteriyo_status = $this->get_masteriyo_status();
7372

7473
Assets_Manager::enqueue_style( Assets_Manager::ASSETS_SLUGS['welcome-notice'], 'welcome-notice' );
7574
Assets_Manager::enqueue_script(
@@ -78,26 +77,26 @@ public function render_welcome_notice() {
7877
true,
7978
array(),
8079
array(
81-
'nonce' => wp_create_nonce( 'lmscourse-fse-dismiss-welcome-notice' ),
82-
'wpfpRefNonce' => wp_create_nonce( 'lmscourse-fse-set-wpfp-ref' ),
83-
'ajaxUrl' => esc_url( admin_url( 'admin-ajax.php' ) ),
84-
'wpfpStatus' => $wpfp_status,
85-
'activationUrl' => esc_url(
80+
'nonce' => wp_create_nonce( 'lmscourse-fse-dismiss-welcome-notice' ),
81+
'masteriyoRefNonce' => wp_create_nonce( 'lmscourse-fse-set-masteriyo-ref' ),
82+
'ajaxUrl' => esc_url( admin_url( 'admin-ajax.php' ) ),
83+
'masteriyoStatus' => $masteriyo_status,
84+
'activationUrl' => esc_url(
8685
add_query_arg(
8786
array(
8887
'plugin_status' => 'all',
8988
'paged' => '1',
9089
'action' => 'activate',
91-
'plugin' => rawurlencode( 'wp-full-stripe-free/wp-full-stripe.php' ),
92-
'_wpnonce' => wp_create_nonce( 'activate-plugin_wp-full-stripe-free/wp-full-stripe.php' ),
90+
'plugin' => rawurlencode( 'learning-management-system/lms.php' ),
91+
'_wpnonce' => wp_create_nonce( 'activate-plugin_learning-management-system/lms.php' ),
9392
),
9493
admin_url( 'plugins.php' )
9594
)
9695
),
97-
'redirectUrl' => esc_url( admin_url( 'admin.php?page=wpfs-settings-stripe&onboarding=true' ) ),
98-
'activating' => __( 'Activating', 'lmscourse-fse' ) . '…',
99-
'installing' => __( 'Installing', 'lmscourse-fse' ) . '…',
100-
'done' => __( 'Done', 'lmscourse-fse' ),
96+
'redirectUrl' => esc_url( admin_url( 'admin.php?page=masteriyo-onboard' ) ),
97+
'activating' => __( 'Activating', 'lmscourse-fse' ) . '…',
98+
'installing' => __( 'Installing', 'lmscourse-fse' ) . '…',
99+
'done' => __( 'Done', 'lmscourse-fse' ),
101100
)
102101
);
103102

@@ -108,36 +107,37 @@ public function render_welcome_notice() {
108107
$notice_html .= '<div class="notice-copy">';
109108

110109
$notice_html .= '<h2 class="notice-subtitle">';
111-
$notice_html .= '<span class="dashicons dashicons-star-filled"></span>';
110+
$notice_html .= '<span class="dashicons dashicons-welcome-learn-more"></span>';
112111
/* translators: %s: 🎉 emoji */
113-
$notice_html .= sprintf( __( 'Accept Donations on Your Church Site %s', 'lmscourse-fse' ), '🎉' );
112+
$notice_html .= __( 'The theme was designed to work best with Masteriyo LMS', 'lmscourse-fse' );
114113
$notice_html .= '</h2>';
115114

116115
$notice_html .= '<h1 class="notice-title">';
117-
/* translators: %s: WP Full Pay */
118-
$notice_html .= sprintf( __( 'Start Collecting Funds with %s!', 'lmscourse-fse' ), '<span>WP Full Pay</span>' );
116+
/* translators: %s: Masteriyo LMS */
117+
$notice_html .= sprintf( __( 'Create and Sell Online Courses with %s!', 'lmscourse-fse' ), '<span>Masteriyo LMS</span>' );
119118

120119
$notice_html .= '</h1>';
121120

122-
$notice_html .= '<p class="description">' . __( 'The simplest way to accept donations and payments on your WordPress site. Set up in minutes with no technical knowledge required.', 'lmscourse-fse' ) . '</p>';
123-
$notice_html .= '<p class="description"><span class="dashicons dashicons-yes"></span><strong>' . __( 'Quick setup', 'lmscourse-fse' ) . '</strong> - ' . __( 'Connect to Stripe and create your first donation form in minutes', 'lmscourse-fse' ) . '</p>';
124-
$notice_html .= '<p class="description"><span class="dashicons dashicons-yes"></span><strong>' . __( 'Multiple payment options', 'lmscourse-fse' ) . '</strong> - ' . __( 'One-time and recurring donations with customizable amounts', 'lmscourse-fse' ) . '</p>';
121+
$notice_html .= '<p class="description">' . __( 'The complete WordPress LMS solution for educators and businesses. Build engaging courses, track student progress, and monetize your knowledge with zero coding required. ', 'lmscourse-fse' ) . '</p>';
122+
$notice_html .= '<p class="description"><span class="dashicons dashicons-yes"></span><strong>' . __( 'Quick setup', 'lmscourse-fse' ) . '</strong> - ' . __( 'Install and create your first course in minutes', 'lmscourse-fse' ) . '</p>';
123+
$notice_html .= '<p class="description"><span class="dashicons dashicons-yes"></span><strong>' . __( 'Multiple payment options', 'lmscourse-fse' ) . '</strong> - ' . __( 'Built-in payment system with Stripe, PayPal & more', 'lmscourse-fse' ) . '</p>';
124+
$notice_html .= '<p class="description"><span class="dashicons dashicons-yes"></span><strong>' . __( 'Complete course builder', 'lmscourse-fse' ) . '</strong> - ' . __( 'Drag & drop builder with quizzes, certificates & assignments', 'lmscourse-fse' ) . '</p>';
125125

126126
$notice_html .= '<div class="actions">';
127127

128-
/* translators: %s: WP Full Pay */
129-
$notice_html .= '<button id="lmscourse-fse-install-wpfp" class="button button-primary button-hero">';
128+
/* translators: %s: Masteriyo LMS */
129+
$notice_html .= '<button id="lmscourse-fse-install-masteriyo" class="button button-primary button-hero">';
130130
$notice_html .= '<span class="dashicons dashicons-update hidden"></span>';
131131
$notice_html .= '<span class="text">';
132-
$notice_html .= 'installed' === $wpfp_status ?
133-
/* translators: %s: WP Full Pay */
134-
sprintf( __( 'Activate %s', 'lmscourse-fse' ), 'WP Full Pay' ) :
135-
/* translators: %s: WP Full Pay */
136-
sprintf( __( 'Install & Activate %s', 'lmscourse-fse' ), 'WP Full Pay' );
132+
$notice_html .= 'installed' === $masteriyo_status ?
133+
/* translators: %s: Masteriyo LMS */
134+
sprintf( __( 'Activate %s', 'lmscourse-fse' ), 'Masteriyo LMS' ) :
135+
/* translators: %s: Masteriyo LMS */
136+
sprintf( __( 'Install & Activate %s', 'lmscourse-fse' ), 'Masteriyo LMS' );
137137
$notice_html .= '</span>';
138138
$notice_html .= '</button>';
139139

140-
$notice_html .= '<a href="https://wordpress.org/plugins/wp-full-stripe-free/" target="_blank" class="button button-secondary button-hero">';
140+
$notice_html .= '<a href="https://wordpress.org/plugins/learning-management-system/" target="_blank" class="button button-secondary button-hero">';
141141
$notice_html .= '<span>' . __( 'Learn More', 'lmscourse-fse' ) . '</span>';
142142
$notice_html .= '<span class="dashicons dashicons-external"></span>';
143143
$notice_html .= '</a>';
@@ -146,7 +146,7 @@ public function render_welcome_notice() {
146146

147147
$notice_html .= '</div>';
148148

149-
$notice_html .= '<img class="wpfp-preview" src="' . esc_url( Assets_Manager::get_image_url( 'welcome-notice.png' ) ) . '" alt="' . esc_attr__( 'WP Full Pay preview', 'lmscourse-fse' ) . '"/>';
149+
$notice_html .= '<img class="masteriyo-preview" src="' . esc_url( Assets_Manager::get_image_url( 'welcome-notice.webp' ) ) . '" alt="' . esc_attr__( 'Masteriyo LMS preview', 'lmscourse-fse' ) . '"/>';
150150
$notice_html .= '</div>';
151151
$notice_html .= '</div>';
152152

@@ -176,8 +176,8 @@ public function remove_welcome_notice() {
176176
* @return bool
177177
*/
178178
private function should_show_welcome_notice(): bool {
179-
// Already using WPFP.
180-
if ( is_plugin_active( 'wp-full-stripe-free/wp-full-stripe.php' ) ) {
179+
// Already using Masteriyo.
180+
if ( is_plugin_active( 'learning-management-system/lms.php' ) ) {
181181
return false;
182182
}
183183

@@ -231,33 +231,33 @@ private function should_show_welcome_notice(): bool {
231231
}
232232

233233
/**
234-
* Get the WP Full Pay plugin status.
234+
* Get the Masteriyo LMS plugin status.
235235
*
236236
* @return string
237237
*/
238-
private function get_wpfp_status(): string {
238+
private function get_masteriyo_status(): string {
239239
$status = 'not-installed';
240240

241-
if ( is_plugin_active( 'wp-full-stripe-free/wp-full-stripe.php' ) ) {
241+
if ( is_plugin_active( 'learning-management-system/lms.php' ) ) {
242242
return 'active';
243243
}
244244

245-
if ( file_exists( ABSPATH . 'wp-content/plugins/wp-full-stripe-free/wp-full-stripe.php' ) ) {
245+
if ( file_exists( ABSPATH . 'wp-content/plugins/learning-management-system/lms.php' ) ) {
246246
return 'installed';
247247
}
248248

249249
return $status;
250250
}
251251

252252
/**
253-
* Run after WP Full Pay activation.
253+
* Run after Masteriyo LMS activation.
254254
*
255255
* @param string $plugin Plugin name.
256256
*
257257
* @return void
258258
*/
259-
public function after_wpfs_activation( $plugin ) {
260-
if ( 'wp-full-stripe-free/wp-full-stripe.php' !== $plugin ) {
259+
public function after_masteriyo_activation( $plugin ) {
260+
if ( 'learning-management-system/lms.php' !== $plugin ) {
261261
return;
262262
}
263263

@@ -266,47 +266,20 @@ public function after_wpfs_activation( $plugin ) {
266266
}
267267

268268
/**
269-
* Update WP Full Pay reference key.
269+
* Update Masteriyo LMS reference key.
270270
*
271271
* @return void
272272
*/
273-
public function set_wpfp_ref() {
274-
if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'lmscourse-fse-set-wpfp-ref' ) ) {
273+
public function set_masteriyo_ref() {
274+
if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'lmscourse-fse-set-masteriyo-ref' ) ) {
275275
return;
276276
}
277277

278-
update_option( self::WPFP_REF, 'lmscourse-fse' );
278+
update_option( self::MASTERIYO_REF, 'lmscourse-fse' );
279279

280280
wp_send_json_success();
281281
}
282282

283-
/**
284-
* Add Black Friday data.
285-
*
286-
* @param array $configs The configuration array for the loaded products.
287-
*
288-
* @return array
289-
*/
290-
public function add_black_friday_data( $configs ) {
291-
$config = $configs['default'];
292-
293-
// translators: %1$s - plugin name, %2$s - discount.
294-
$message_template = __( 'Need to accept payments or donations? Try %1$s, built by the same team as your theme — now up to %2$s OFF, for a limited time only.', 'lmscourse-fse' );
295-
296-
$config['dismiss'] = true; // Note: Allow dismiss since it appears on `/wp-admin`.
297-
$config['message'] = sprintf( $message_template, 'WP Full Pay', '70%' );
298-
$config['sale_url'] = add_query_arg(
299-
array(
300-
'utm_term' => 'free',
301-
),
302-
tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/wpfp-bf', 'bfcm', 'lmscourse-fse' ) )
303-
);
304-
305-
$configs[ LMSCOURSE_FSE_PRODUCT_SLUG ] = $config;
306-
307-
return $configs;
308-
}
309-
310283
/**
311284
* Register internal pages.
312285
*

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lmscourse-fse",
3-
"version": "1.0.3",
3+
"version": "0.1",
44
"description": "A lightweight theme for the full site editing WordPress experience.",
55
"author": "Themeisle <friends@themeisle.com>",
66
"license": "GPL-2.0-or-later",

parts/header_s1.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<!-- /wp:group --></div>
1515
<!-- /wp:group -->
1616

17-
<!-- wp:group {"style":{"spacing":{"padding":{"top":"20px","bottom":"20px"},"margin":{"top":"0px","bottom":"0px"}}},"backgroundColor":"raft-bg-alt","layout":{"inherit":true,"type":"constrained"}} -->
18-
<div class="wp-block-group has-raft-bg-alt-background-color has-background" style="margin-top:0px;margin-bottom:0px;padding-top:20px;padding-bottom:20px"><!-- wp:group {"className":"alignwide","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
17+
<!-- wp:group {"style":{"spacing":{"padding":{"top":"20px","bottom":"20px"},"margin":{"top":"0px","bottom":"0px"}}},"layout":{"inherit":true,"type":"constrained"}} -->
18+
<div class="wp-block-group has-background" style="margin-top:0px;margin-bottom:0px;padding-top:20px;padding-bottom:20px"><!-- wp:group {"className":"alignwide","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
1919
<div class="wp-block-group alignwide"><!-- wp:group {"layout":{"type":"flex"}} -->
2020
<div class="wp-block-group"><!-- wp:site-title {"level":0,"style":{"typography":{"textTransform":"uppercase"}},"fontSize":"normal"} /--></div>
2121
<!-- /wp:group -->

0 commit comments

Comments
 (0)