Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions assets/css/custom-typekit-fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,43 @@
.ctf-kit-not-active {
color: #ae5842;
}

.astra-review-notice-container {
display: flex;
align-items: center;
padding-top: 10px;
}

.astra-review-notice-container .dashicons {
font-size: 1.4em;
padding-left: 10px;
}

.astra-review-notice-container a {
padding-left: 5px;
text-decoration: none;
}

.astra-review-notice-container .dashicons:first-child {
padding-left: 0;
}

.notice-image img {
max-width: 90px;
}

.notice-content .notice-heading {
padding-bottom: 5px;
}

.notice-content {
margin-left: 15px;
}

.notice-container {
padding-top: 10px;
padding-bottom: 10px;
display: flex;
justify-content: left;
align-items: center;
}
Binary file added assets/images/custom-typekit-fonts-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions custom-typekit-fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,59 @@
* BSF Custom Fonts
*/
require_once CUSTOM_TYPEKIT_FONTS_DIR . 'classes/class-custom-typekit-fonts.php';
require_once CUSTOM_TYPEKIT_FONTS_DIR . 'inc/lib/notices/class-astra-notices.php';

if ( ! function_exists( 'register_notices' ) ) :

/**
* Ask Theme Rating
*
* @since 1.4.0
*/
function register_notices() {
$image_path = CUSTOM_TYPEKIT_FONTS_URI . 'assets/images/custom-typekit-fonts-icon.png';
Astra_Notices::add_notice(
array(
'id' => 'custom-typekit-fonts-rating',
'type' => '',
'message' => sprintf(
'<div class="notice-image">
<img src="%1$s" class="custom-logo" alt="Astra" itemprop="logo"></div>
<div class="notice-content">
<div class="notice-heading">
%2$s
</div>
%3$s<br />
<div class="astra-review-notice-container">
<a href="%4$s" class="astra-notice-close astra-review-notice button-primary" target="_blank">
%5$s
</a>
<span class="dashicons dashicons-calendar"></span>
<a href="#" data-repeat-notice-after="%6$s" class="astra-notice-close astra-review-notice">
%7$s
</a>
<span class="dashicons dashicons-smiley"></span>
<a href="#" class="astra-notice-close astra-review-notice">
%8$s
</a>
</div>
</div>',
$image_path,
__( 'Hello! Seems like you have used Custom Typekit Fonts to build this website — Thanks a ton!', 'custom-typekit-fonts' ),
__( 'Could you please do us a BIG favor and give it a 5-star rating on WordPress? This would boost our motivation and help other users make a comfortable decision while choosing the Custom Typekit Fonts.', 'custom-typekit-fonts' ),
'https://wordpress.org/support/plugin/custom-typekit-fonts/reviews/?filter=5#new-post',
__( 'Ok, you deserve it', 'custom-typekit-fonts' ),
MONTH_IN_SECONDS,
__( 'Nope, maybe later', 'custom-typekit-fonts' ),
__( 'I already did', 'custom-typekit-fonts' )
),
'repeat-notice-after' => MONTH_IN_SECONDS,
'priority' => 25,
'display-with-other-notices' => false,
)
);
}

add_action( 'admin_notices', 'register_notices' );

endif;
Loading