Changeset 356201
- Timestamp:
- 10/29/2026 04:59:56 PM (5 hours ago)
- Location:
- kopanews/1.0.3
- Files:
-
- 5 edited
- 1 copied
-
. (copied) (copied from kopanews/1.0.2 )
-
header.php (modified) (2 diffs)
-
inc/customizer.php (modified) (3 diffs)
-
inc/starter-content.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kopanews/1.0.3/header.php
r356035 r356201 28 28 29 29 <?php 30 if ( is_customize_preview() && ( get_option( 'fresh_site' ) || ( isset( $GLOBALS['wp_customize'] ) && $GLOBALS['wp_customize']->get_setting( 'nav_menus_created_posts' ) )) ) :30 if ( is_customize_preview() && get_option( 'fresh_site' ) ) : 31 31 ?> 32 32 <aside class="kopanews-starter-preview-banner py-2 px-3 text-center text-white" style="background:#0066cc;font-size:0.85rem;font-weight:500;z-index:99999;position:relative;" aria-label="<?php esc_attr_e( 'Demo Content Preview Notice', 'kopanews' ); ?>"> … … 98 98 else : 99 99 ?> 100 <span class="me-4"><?php esc_html_e( 'No ticker news found', 'kopanews' ); ?> — <?php esc_html_e( ' A fast, modern, and responsive news and magazine WordPress theme for news websites, entertainment sites, blogs, online magazines, and publishers, featuring WordPress Starter Content in the Customizer, customizable category sections, ticker news, and flexible layout options.', 'kopanews' ); ?></span>100 <span class="me-4"><?php esc_html_e( 'No ticker news found', 'kopanews' ); ?> — <?php esc_html_e( 'KopaNews is a powerful, modern, and professional news and magazine WordPress theme with pixel-perfect design and outstanding functionality.', 'kopanews' ); ?></span> 101 101 <?php 102 102 endif; -
kopanews/1.0.3/inc/customizer.php
r356035 r356201 122 122 } 123 123 } 124 125 class KopaNews_Demo_Info_Control extends WP_Customize_Control {126 public $type = 'kopanews_demo_info';127 128 public function render_content() {129 ?>130 <div class="kopanews-demo-info-card" style="padding:14px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-size:13px;line-height:1.5;color:#166534;">131 <h4 style="margin:0 0 8px 0;font-size:14px;font-weight:700;color:#15803d;display:flex;align-items:center;gap:6px;">132 <span class="dashicons dashicons-yes-alt" style="color:#16a34a;"></span>133 <?php esc_html_e( 'Demo Layout Active in Preview', 'kopanews' ); ?>134 </h4>135 <p style="margin:0 0 10px 0;color:#14532d;">136 <?php esc_html_e( 'All sample news stories, images, category sections, and menus are currently staged in this live preview.', 'kopanews' ); ?>137 </p>138 <div style="background:#ffffff;border:1px solid #dcfce7;border-radius:6px;padding:10px 12px;margin-bottom:12px;">139 <strong style="display:block;color:#1e293b;margin-bottom:4px;"><?php esc_html_e( 'To install permanently on your site:', 'kopanews' ); ?></strong>140 <p style="margin:0;color:#475569;font-size:12px;">141 <?php esc_html_e( 'Click the blue "Publish" button at the top of the Customizer panel (or use the button below).', 'kopanews' ); ?>142 </p>143 </div>144 <button type="button" class="button button-primary button-large" onclick="if(window.wp&&wp.customize&&wp.customize.previewer){wp.customize.previewer.save();}" style="width:100%;text-align:center;font-weight:600;">145 <?php esc_html_e( 'Publish & Install Demo Data', 'kopanews' ); ?>146 </button>147 </div>148 <?php149 }150 }151 124 } 152 125 … … 157 130 'kopanews_demo_starter_section', 158 131 array( 159 'title' => esc_html__( '⭐ Install Demo Content', 'kopanews' ), 160 'description' => esc_html__( 'Preview and permanently install KopaNews sample news articles, categories, and homepage layout.', 'kopanews' ), 161 'priority' => 1, 162 ) 163 ); 164 165 $wp_customize->add_setting( 166 'kopanews_demo_info_display', 167 array( 168 'default' => '', 169 'sanitize_callback' => 'sanitize_text_field', 170 ) 171 ); 172 173 $wp_customize->add_control( 174 new KopaNews_Demo_Info_Control( 175 $wp_customize, 176 'kopanews_demo_info_display', 177 array( 178 'section' => 'kopanews_demo_starter_section', 179 'priority' => 1, 180 ) 132 'title' => esc_html__( 'Install Demo Content', 'kopanews' ), 133 'description' => esc_html__( 'Sample news stories, images, category sections, and menus are currently staged in this live preview. Click the "Publish" button above to install this demo layout permanently on your site.', 'kopanews' ), 134 'priority' => 1, 135 'active_callback' => 'kopanews_is_fresh_site', 181 136 ) 182 137 ); … … 667 622 668 623 /** 624 * Callback to check if current site is fresh for starter content. 625 * 626 * @return bool 627 */ 628 function kopanews_is_fresh_site() { 629 return (bool) get_option( 'fresh_site' ); 630 } 631 632 /** 669 633 * Display native Customizer notification banner informing users to click Publish 670 * to install the starter content .634 * to install the starter content on fresh sites. 671 635 */ 672 636 function kopanews_customize_controls_starter_feedback() { 673 $is_fresh = (bool) get_option( 'fresh_site' ); 674 global $wp_customize; 675 $has_drafts = false; 676 if ( $wp_customize ) { 677 $created = $wp_customize->get_setting( 'nav_menus_created_posts' ); 678 if ( $created && ! empty( $created->value() ) ) { 679 $has_drafts = true; 637 if ( ! kopanews_is_fresh_site() ) { 638 return; 639 } 640 ?> 641 <script> 642 (function() { 643 if (typeof wp !== 'undefined' && wp.customize) { 644 wp.customize.bind('ready', function() { 645 if (wp.customize.notifications) { 646 wp.customize.notifications.add(new wp.customize.Notification('kopanews_starter_demo_notice', { 647 message: <?php echo wp_json_encode( __( 'KopaNews demo content is loaded in the preview. Click "Publish" above to save and install the demo layout permanently on your site.', 'kopanews' ) ); ?>, 648 type: 'info', 649 dismissible: true 650 })); 651 } 652 }); 680 653 } 681 } 682 683 if ( $is_fresh || $has_drafts ) : 684 ?> 685 <script> 686 (function() { 687 if (typeof wp !== 'undefined' && wp.customize) { 688 wp.customize.bind('ready', function() { 689 if (wp.customize.notifications) { 690 wp.customize.notifications.add(new wp.customize.Notification('kopanews_starter_demo_notice', { 691 message: <?php echo wp_json_encode( __( 'KopaNews demo content is loaded in the preview. Click "Publish" above to save and install the demo layout permanently on your site.', 'kopanews' ) ); ?>, 692 type: 'info', 693 dismissible: true 694 })); 695 } 696 }); 697 } 698 })(); 699 </script> 700 <?php 701 endif; 654 })(); 655 </script> 656 <?php 702 657 } 703 658 add_action( 'customize_controls_print_scripts', 'kopanews_customize_controls_starter_feedback' ); -
kopanews/1.0.3/inc/starter-content.php
r356035 r356201 8 8 * 9 9 * @package KopaNews 10 * @version 1.0. 210 * @version 1.0.3 11 11 */ 12 12 -
kopanews/1.0.3/readme.txt
r356035 r356201 4 4 Tested up to: 7.1 5 5 Requires PHP: 7.4 6 Stable tag: 1.0. 26 Stable tag: 1.0.3 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 9 Tags: news, entertainment, grid-layout, two-columns, three-columns, right-sidebar, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-image-header, featured-images, theme-options, translation-ready 10 10 11 KopaNews is a fast, modern, and responsive news and magazine WordPress theme for news websites, entertainment sites, blogs, online magazines, and publishers, featuring WordPress Starter Content in the Customizer, customizable category sections, ticker news, and flexible layout options.11 KopaNews is a powerful, modern, and professional news and magazine WordPress theme with pixel-perfect design and outstanding functionality. KopaNews features native WordPress Core Starter Content for instant live setup in the Customizer, clean code, news ticker, sticky menu, logo upload, header image, custom background, and Bootstrap 5 framework, built with SEO and accessibility in mind, mobile ready, translation ready (WPML, Polylang), and beautiful on all screen sizes. Perfectly suited for news agencies, digital newspapers, editorial portals, online magazines, broadcast media, world news, politics, business, finance, sports, technology, entertainment, travel, and personal blogs. Includes visual wireframe layout pickers, theme color presets, breaking news ticker, and compatibility with popular plugins like Yoast SEO, Rank Math, Contact Form 7, and Jetpack. 12 12 13 13 == Description == 14 14 15 KopaNews brings editorial design to WordPress. Built with Bootstrap 5, KopaNews features built-in starter content, customizable front-page sections, sticky navigation, ticker news bar, responsive layout grids, and full accessibility support. 15 KopaNews is a powerful, modern, and professional news and magazine WordPress theme with pixel-perfect design and outstanding functionality. KopaNews features native WordPress Core Starter Content for instant live setup in the Customizer, clean code, news ticker, sticky menu, search modal, logo upload, header image, custom background, and the Bootstrap 5 framework, designed with SEO and web accessibility in mind, besides being mobile ready, translation ready (WPML, Polylang compatible), and built to be beautiful on all screen sizes. 16 17 The theme is perfectly suited for news agencies, digital newspapers, editorial portals, online magazines, broadcast media, world news, politics, business, finance, sports, technology, entertainment, fashion, travel, science, investigative journalism, lifestyle, and personal blogs. 18 19 KopaNews provides pure CSS visual wireframe layout pickers, dynamic theme color presets with hover tints, and an animated live breaking news ticker bar. It supports popular WordPress plugins such as Yoast SEO, Rank Math, Contact Form 7, Jetpack, Google Analytics, and caching plugins, while functioning completely out of the box with zero external dependencies. 16 20 17 21 = Built-in Starter Content = … … 141 145 == Changelog == 142 146 147 = 1.0.3 = 148 * Fixed: Added active_callback to the starter content Customizer section so it only displays on fresh sites, keeping it consistent with the Customizer notification. 149 * Fixed: Replaced custom demo card control and duplicate onclick Publish button with native core Customizer section description UI. 150 * Fixed: Removed emoji from translatable section title string for clean internationalization. 151 * Fixed: Removed hardcoded section background fallback so all homepage sections seamlessly inherit custom-background color settings. 152 143 153 = 1.0.2 = 144 154 * Fixed: Replaced all bundled and screenshot images with Creative Commons CC0 1.0 Universal images from PxHere (https://pxhere.com/), completely removing all Pexels-licensed resources for 100% GPL compatibility. -
kopanews/1.0.3/style.css
r356035 r356201 4 4 Author: RastryDesign 5 5 Author URI: https://rastrydesign.com 6 Description: A fast, modern, and responsive news and magazine WordPress theme for news websites, entertainment sites, blogs, online magazines, and publishers, featuring WordPress Starter Content in the Customizer, customizable category sections, ticker news, and flexible layout options.7 Version: 1.0. 26 Description: KopaNews is a powerful, modern, and professional news and magazine WordPress theme with pixel-perfect design and outstanding functionality. KopaNews features native WordPress Core Starter Content for instant live setup in the Customizer, clean code, news ticker, sticky menu, logo upload, header image, custom background, and Bootstrap 5 framework, built with SEO and accessibility in mind, mobile ready, translation ready (WPML, Polylang), and beautiful on all screen sizes. Perfectly suited for news agencies, digital newspapers, editorial portals, online magazines, broadcast media, world news, politics, business, finance, sports, technology, entertainment, travel, and personal blogs. Includes visual wireframe layout pickers, theme color presets, breaking news ticker, and compatibility with popular plugins like Yoast SEO, Rank Math, Contact Form 7, and Jetpack. 7 Version: 1.0.3 8 8 Tested up to: 7.1 9 9 Requires at least: 6.0
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)