diff --git a/css/admin/theme-review-notice.css b/css/admin/theme-review-notice.css new file mode 100644 index 0000000..0b9637d --- /dev/null +++ b/css/admin/theme-review-notice.css @@ -0,0 +1,16 @@ +/* Theme review notice CSS */ +.notice.updated.theme-review-notice { + padding-right: 40px; +} + +.theme-review-notice .links { + margin: 0.5em 0; +} + +.theme-review-notice .links a { + margin: 2px; +} + +.theme-review-notice .links .dashicons { + line-height: 30px; +} diff --git a/functions.php b/functions.php index 51a0c3e..3b43281 100644 --- a/functions.php +++ b/functions.php @@ -381,6 +381,7 @@ function masonic_meta_box_display_toggle() { if ( is_admin() ) { require get_template_directory() . '/inc/admin/class-masonic-admin.php'; require get_template_directory() . '/inc/admin/class-masonic-tdi-notice.php'; + require get_template_directory() . '/inc/admin/class-masonic-theme-review-notice.php'; /** * Load TGMPA Configs. diff --git a/inc/admin/class-masonic-theme-review-notice.php b/inc/admin/class-masonic-theme-review-notice.php new file mode 100644 index 0000000..35542e7 --- /dev/null +++ b/inc/admin/class-masonic-theme-review-notice.php @@ -0,0 +1,183 @@ + strtotime( '-15 day' ) ) || ( $ignored_notice_partially > strtotime( '-15 day' ) ) || ( $ignored_notice ) ) { + return; + } + ?> + +
+ + ID, 'masonic_ignore_theme_review_notice', true ); + $ignored_notice_partially = get_user_meta( $user->ID, 'nag_masonic_ignore_theme_review_notice_partially', true ); + + // Delete permanent notice remove data. + if ( $ignored_notice ) { + delete_user_meta( $user->ID, 'masonic_ignore_theme_review_notice' ); + } + + // Delete partial notice remove data. + if ( $ignored_notice_partially ) { + delete_user_meta( $user->ID, 'nag_masonic_ignore_theme_review_notice_partially' ); + } + } + } + + /** + * Enqueue the required CSS file for theme review notice on admin page. + */ + public function masonic_theme_rating_notice_enqueue() { + + wp_enqueue_style( 'masonic-theme-review-notice', get_template_directory_uri() . '/css/admin/theme-review-notice.css' ); + + } +} + +new Masonic_Theme_Review_Notice(); diff --git a/readme.txt b/readme.txt index 2567fb7..8bebdbf 100644 --- a/readme.txt +++ b/readme.txt @@ -43,6 +43,9 @@ and we will include it within the theme from next version update. /**********************************************************/ == Changelog == += Version TBD = +* Tweak - Add review notice message. + = Version 1.3.3 - 2020-02-20 = * Fix - Link for `skip-link` to content area. * Tweak - Update `screen-reader-text` CSS.