Make WordPress Themes

Changeset 356201


Ignore:
Timestamp:
10/29/2026 04:59:56 PM (5 hours ago)
Author:
themedropbox
Message:

New version of KopaNews - 1.0.3

Location:
kopanews/1.0.3
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • kopanews/1.0.3/header.php

    r356035 r356201  
    2828
    2929<?php
    30 if ( is_customize_preview() && ( get_option( 'fresh_site' ) || ( isset( $GLOBALS['wp_customize'] ) && $GLOBALS['wp_customize']->get_setting( 'nav_menus_created_posts' ) ) ) ) :
     30if ( is_customize_preview() && get_option( 'fresh_site' ) ) :
    3131        ?>
    3232        <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' ); ?>">
    … …  
    9898                                                else :
    9999                                                        ?>
    100                                                         <span class="me-4"><?php esc_html_e( 'No ticker news found', 'kopanews' ); ?> &mdash; <?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' ); ?> &mdash; <?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>
    101101                                                        <?php
    102102                                                endif;
  • kopanews/1.0.3/inc/customizer.php

    r356035 r356201  
    122122                        }
    123123                }
    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                                 <?php
    149                         }
    150                 }
    151124        }
    152125
    … …  
    157130                'kopanews_demo_starter_section',
    158131                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',
    181136                )
    182137        );
    … …  
    667622
    668623/**
     624 * Callback to check if current site is fresh for starter content.
     625 *
     626 * @return bool
     627 */
     628function kopanews_is_fresh_site() {
     629        return (bool) get_option( 'fresh_site' );
     630}
     631
     632/**
    669633 * 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.
    671635 */
    672636function 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                        });
    680653                }
    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
    702657}
    703658add_action( 'customize_controls_print_scripts', 'kopanews_customize_controls_starter_feedback' );
  • kopanews/1.0.3/inc/starter-content.php

    r356035 r356201  
    88 *
    99 * @package KopaNews
    10  * @version 1.0.2
     10 * @version 1.0.3
    1111 */
    1212
  • kopanews/1.0.3/readme.txt

    r356035 r356201  
    44Tested up to: 7.1
    55Requires PHP: 7.4
    6 Stable tag: 1.0.2
     6Stable tag: 1.0.3
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
    99Tags: 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
    1010
    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.
     11KopaNews 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.
    1212
    1313== Description ==
    1414
    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.
     15KopaNews 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
     17The 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
     19KopaNews 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.
    1620
    1721= Built-in Starter Content =
    … …  
    141145== Changelog ==
    142146
     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
    143153= 1.0.2 =
    144154* 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  
    44Author: RastryDesign
    55Author 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.2
     6Description: 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.
     7Version: 1.0.3
    88Tested up to: 7.1
    99Requires at least: 6.0
Note: See TracChangeset for help on using the changeset viewer.