-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
~ Show note: addons has new version.
- Loading branch information
Showing
7 changed files
with
110 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* Template for display error wrong permalink structure. | ||
* | ||
* @version 1.0.1 | ||
* @since 3.0.0 | ||
*/ | ||
|
||
use LearnPress\Helpers\Template; | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; // Exit if accessed directly | ||
} | ||
|
||
if ( ! isset( $data ) || empty( $data['addons'] ) ) { | ||
return; | ||
} | ||
?> | ||
<div id="notice-install" class="lp-notice notice notice-info"> | ||
<?php | ||
Template::instance()->get_admin_template( 'admin-notices/button-dismiss.php', array( 'key' => 'lp-addons-new-version' ) ); | ||
?> | ||
<p><?php echo sprintf( '<strong>%s</strong>', __( 'LearnPress has new version Addons.', 'learnpress' ) ); ?></p> | ||
<p style="display: flex;gap: 5px"> | ||
<?php | ||
foreach ( $data['addons'] as $addon ) { | ||
echo sprintf( | ||
'<a href="%s" class="button button-primary">%s</a>', | ||
admin_url( 'admin.php?page=learn-press-addons&tab=update' ), | ||
$addon->name | ||
); | ||
} | ||
?> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* Template button dismiss notice. | ||
*/ | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; // Exit if accessed directly | ||
} | ||
|
||
if ( ! isset( $key ) ) { | ||
return; | ||
} | ||
?> | ||
|
||
<button type="button" class="notice-dismiss btn-lp-notice-dismiss" data-dismiss="<?php echo $key; ?>" title="Dismiss notice"> | ||
<span class="screen-reader-text">Dismiss this notice.</span> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters