Changeset 342277
- Timestamp:
- 08/05/2026 12:01:06 PM (3 months ago)
- Location:
- linnea/1.1.0
- Files:
-
- 5 added
- 3 edited
- 1 copied
-
. (copied) (copied from linnea/1.0.0 )
-
assets/css (added)
-
assets/css/admin-about.css (added)
-
assets/css/admin-notice.css (added)
-
assets/js (added)
-
assets/js/admin-notice.js (added)
-
functions.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
linnea/1.1.0/functions.php
r333571 r342277 70 70 } 71 71 add_action( 'init', 'linnea_register_pattern_categories' ); 72 73 /** 74 * Dismissible welcome notice in the admin. 75 */ 76 function linnea_setup_notice() { 77 if ( ! current_user_can( 'edit_theme_options' ) || get_option( 'linnea_setup_notice_dismissed' ) ) { 78 return; 79 } 80 81 $notice_text = '<div class="linnea-notice-text"> 82 <p class="linnea-notice-kicker">' . __( 'Elfia Themes', 'linnea' ) . '</p> 83 <h3>' . __( 'Thank you for choosing Linnea!', 'linnea' ) . '</h3> 84 <p>' . __( 'Linnea PRO adds 4 homepage designs, an editorial post template, 9 post patterns, and 6 color styles including dark Noir.', 'linnea' ) . '</p> 85 <p class="linnea-notice-cta"> 86 <a href="https://elfiathemes.com/product/linnea-pro/?utm_source=linnea-theme" target="_blank" rel="noopener">' . __( 'Discover Linnea PRO', 'linnea' ) . '</a> 87 </p> 88 <p class="linnea-notice-links">🌐 <a href="https://elfiathemes.com" target="_blank" rel="noopener">elfiathemes.com</a> · 💌 <a href="mailto:hello@elfiathemes.com">hello@elfiathemes.com</a></p> 89 <p class="linnea-notice-dismiss-hint">' . __( 'Close this notice to hide it forever.', 'linnea' ) . '</p> 90 </div>'; 91 92 echo '<div id="linnea-notice" class="notice is-dismissible">' . wp_kses_post( $notice_text ) . '</div>'; 93 } 94 add_action( 'admin_notices', 'linnea_setup_notice' ); 95 96 /** 97 * Notice assets (only while the notice is visible). 98 */ 99 function linnea_notice_assets() { 100 if ( ! current_user_can( 'edit_theme_options' ) || get_option( 'linnea_setup_notice_dismissed' ) ) { 101 return; 102 } 103 104 wp_enqueue_style( 'linnea-admin-notice', get_template_directory_uri() . '/assets/css/admin-notice.css', array(), wp_get_theme()->get( 'Version' ) ); 105 wp_enqueue_script( 'linnea-notice-script', get_template_directory_uri() . '/assets/js/admin-notice.js', array( 'jquery' ), wp_get_theme()->get( 'Version' ), true ); 106 wp_localize_script( 'linnea-notice-script', 'linneaNotice', array( 107 'nonce' => wp_create_nonce( 'linnea_dismiss_notice' ), 108 ) ); 109 } 110 add_action( 'admin_enqueue_scripts', 'linnea_notice_assets' ); 111 112 /** 113 * AJAX: remember that the notice was dismissed. 114 */ 115 function linnea_dismiss_notice() { 116 check_ajax_referer( 'linnea_dismiss_notice' ); 117 if ( ! current_user_can( 'edit_theme_options' ) ) { 118 wp_die(); 119 } 120 update_option( 'linnea_setup_notice_dismissed', true ); 121 wp_die(); 122 } 123 add_action( 'wp_ajax_linnea_dismiss_notice', 'linnea_dismiss_notice' ); 124 125 /** 126 * "About Linnea" page under Appearance. 127 */ 128 function linnea_add_about_page() { 129 add_theme_page( 130 __( 'About Linnea', 'linnea' ), 131 __( 'About Linnea', 'linnea' ), 132 'edit_theme_options', 133 'linnea-about', 134 'linnea_about_page_html' 135 ); 136 } 137 add_action( 'admin_menu', 'linnea_add_about_page' ); 138 139 function linnea_about_page_styles( $hook ) { 140 if ( 'appearance_page_linnea-about' !== $hook ) { 141 return; 142 } 143 wp_enqueue_style( 'linnea-about-page', get_template_directory_uri() . '/assets/css/admin-about.css', array(), wp_get_theme()->get( 'Version' ) ); 144 } 145 add_action( 'admin_enqueue_scripts', 'linnea_about_page_styles' ); 146 147 function linnea_about_page_html() { 148 $theme = wp_get_theme(); 149 $version = $theme->get( 'Version' ); 150 ?> 151 <div class="wrap linnea-about-wrap"> 152 <p class="linnea-about-kicker"><?php esc_html_e( 'Elfia Themes', 'linnea' ); ?></p> 153 <h1><?php esc_html_e( 'Linnea', 'linnea' ); ?> <span class="linnea-version"><?php echo esc_html( $version ); ?></span></h1> 154 155 <div class="linnea-about-pro-hero"> 156 <p class="linnea-about-pro-kicker"><?php esc_html_e( 'Premium Edition', 'linnea' ); ?></p> 157 <h2><?php esc_html_e( 'Linnea PRO', 'linnea' ); ?></h2> 158 <p class="linnea-about-pro-intro"><?php esc_html_e( 'Everything in Linnea — and the whole wardrobe to go with it.', 'linnea' ); ?></p> 159 <ul class="linnea-about-pro-features"> 160 <li><?php esc_html_e( '4 homepage designs — Classic, Magazine, Editorial, Grid Gallery', 'linnea' ); ?></li> 161 <li><?php esc_html_e( 'Single — Editorial post template', 'linnea' ); ?></li> 162 <li><?php esc_html_e( 'Archive — List Layout pattern', 'linnea' ); ?></li> 163 <li><?php esc_html_e( '9 post patterns + a ready-made demo article', 'linnea' ); ?></li> 164 <li><?php esc_html_e( '6 color styles, including the dark Noir palette', 'linnea' ); ?></li> 165 <li><?php esc_html_e( 'Automatic updates with your license', 'linnea' ); ?></li> 166 </ul> 167 <a href="https://elfiathemes.com/product/linnea-pro/?utm_source=linnea-theme-about" class="linnea-about-btn linnea-about-btn-light" target="_blank" rel="noopener"> 168 <?php esc_html_e( 'Discover Linnea PRO', 'linnea' ); ?> 169 </a> 170 </div> 171 172 <div class="linnea-about-columns"> 173 <div class="linnea-about-card linnea-about-author"> 174 <h2><?php esc_html_e( 'Elfia Themes', 'linnea' ); ?></h2> 175 <p><?php esc_html_e( 'Elegant, feminine themes for bloggers. Designed by Anastasi.', 'linnea' ); ?></p> 176 <ul class="linnea-about-links"> 177 <li>🌐 <a href="https://elfiathemes.com" target="_blank" rel="noopener">elfiathemes.com</a></li> 178 <li>💌 <a href="mailto:hello@elfiathemes.com">hello@elfiathemes.com</a></li> 179 </ul> 180 </div> 181 182 <div class="linnea-about-card linnea-about-help"> 183 <h2><?php esc_html_e( 'Need a hand?', 'linnea' ); ?></h2> 184 <p><?php esc_html_e( 'Questions about the theme? Write me.', 'linnea' ); ?></p> 185 <p><a href="mailto:hello@elfiathemes.com"><strong>hello@elfiathemes.com</strong></a></p> 186 </div> 187 </div> 188 </div> 189 <?php 190 } -
linnea/1.1.0/readme.txt
r333571 r342277 6 6 Tested up to: 7.0 7 7 Requires PHP: 7.4 8 Stable tag: 1. 0.08 Stable tag: 1.1.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 67 67 == Changelog == 68 68 69 = 1.1.0 = 70 * Added "About Linnea" page under Appearance. 71 * Added dismissible welcome notice in the admin. 72 69 73 = 1.0.0 = 70 74 * Initial release. -
linnea/1.1.0/style.css
r333571 r342277 7 7 Tested up to: 7.0 8 8 Requires PHP: 7.4 9 Version: 1. 0.09 Version: 1.1.0 10 10 License: GNU General Public License v2 or later 11 11 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)