Changeset 356259
- Timestamp:
- 10/30/2026 08:08:19 AM (3 hours ago)
- Location:
- pressora/1.0.11
- Files:
-
- 6 edited
- 1 copied
-
. (copied) (copied from pressora/1.0.10 )
-
functions.php (modified) (1 diff)
-
header.php (modified) (2 diffs)
-
inc/customizer.php (modified) (5 diffs)
-
languages/pressora.pot (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pressora/1.0.11/functions.php
r352897 r356259 15 15 16 16 if ( ! defined( 'prssa_VERSION' ) ) { 17 define( 'prssa_VERSION', '1.0.1 0' );17 define( 'prssa_VERSION', '1.0.11' ); 18 18 } 19 19 -
pressora/1.0.11/header.php
r349173 r356259 13 13 14 14 <link rel="profile" href="https://gmpg.org/xfn/11"> 15 16 <?php17 // Output favicon from Customizer if provided18 $prssa_favicon = get_theme_mod( 'prssa_header_favicon', '' );19 if ( $prssa_favicon ) : ?>20 <link rel="icon" href="<?php echo esc_url( $prssa_favicon ); ?>">21 <?php endif; ?>22 15 23 16 <?php wp_head(); ?> … … 67 60 <div class="site-branding"> 68 61 69 <?php 70 // ========================================= 71 // CUSTOM LOGO (Customizer prssa_header_logo) 72 // ========================================= 73 $header_logo = get_theme_mod( 'prssa_header_logo', '' ); 62 <?php the_custom_logo(); ?> 74 63 75 // Logo width & height customizer76 $logo_width = absint( get_theme_mod( 'prssa_logo_width', 0 ) );77 $logo_height = absint( get_theme_mod( 'prssa_logo_height', 0 ) );78 79 $logo_styles = array();80 81 if ( $logo_width ) {82 $logo_styles[] = 'width:' . $logo_width . 'px';83 $logo_styles[] = 'max-width:' . $logo_width . 'px';84 }85 86 if ( $logo_height ) {87 $logo_styles[] = 'height:' . $logo_height . 'px';88 $logo_styles[] = 'max-height:' . $logo_height . 'px';89 }90 91 $logo_style_attr = $logo_styles ? ' style="' . esc_attr( implode( ';', $logo_styles ) ) . '"' : '';92 93 // Show customizer logo if exists94 if ( $header_logo ) :95 ?>96 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="custom-logo-link" rel="home">97 <img src="<?php echo esc_url( $header_logo ); ?>" alt="<?php bloginfo( 'name' ); ?>"<?php echo $logo_style_attr; ?>>98 </a>99 <?php100 else :101 // Fallback: default WP logo102 the_custom_logo();103 endif;104 ?>105 106 107 <?php108 // =========================================109 // SITE TITLE (Customizer: prssa_site_title)110 // =========================================111 $site_title = get_theme_mod( 'prssa_site_title', get_bloginfo( 'name' ) );112 ?>113 64 <?php if ( is_front_page() && is_home() ) : ?> 114 <h1 class="site-title"> 115 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> 116 <?php echo esc_html( $site_title ); ?> 117 </a> 118 </h1> 65 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> 119 66 <?php else : ?> 120 <p class="site-title"> 121 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> 122 <?php echo esc_html( $site_title ); ?> 123 </a> 124 </p> 67 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> 125 68 <?php endif; ?> 126 69 127 128 <?php 129 // ========================================= 130 // SITE TAGLINE (Customizer: prssa_site_des) 131 // ========================================= 132 $site_desc = get_theme_mod( 'prssa_site_des', get_bloginfo( 'description' ) ); 133 134 if ( $site_desc || is_customize_preview() ) : 135 ?> 136 <p class="site-description"><?php echo esc_html( $site_desc ); ?></p> 70 <?php if ( get_bloginfo( 'description', 'display' ) || is_customize_preview() ) : ?> 71 <p class="site-description"><?php bloginfo( 'description' ); ?></p> 137 72 <?php endif; ?> 138 73 -
pressora/1.0.11/inc/customizer.php
r349173 r356259 19 19 20 20 // 21 // GENERAL SECTION22 //23 $wp_customize->add_section( 'prssa_general_section', array(24 'title' => __( 'General', 'pressora' ),25 'panel' => 'prssa_theme_panel',26 'priority' => 10,27 ) );28 29 $wp_customize->add_setting( 'prssa_site_title', array(30 'default' => '',31 'sanitize_callback' => 'sanitize_text_field',32 'transport' => 'refresh',33 ) );34 $wp_customize->add_control( 'prssa_site_title', array(35 'label' => __( 'Site Title', 'pressora' ),36 'section' => 'prssa_general_section',37 'type' => 'text',38 ) );39 40 $wp_customize->add_setting( 'prssa_site_des', array(41 'default' => '',42 'sanitize_callback' => 'sanitize_textarea_field',43 'transport' => 'refresh',44 ) );45 $wp_customize->add_control( 'prssa_site_des', array(46 'label' => __( 'Site Description', 'pressora' ),47 'section' => 'prssa_general_section',48 'type' => 'textarea',49 ) );50 51 // Favicon (favicon should normally be added via Site Identity; still we provide one)52 $wp_customize->add_setting( 'prssa_header_favicon', array(53 'default' => '',54 'sanitize_callback' => 'esc_url_raw',55 'transport' => 'refresh',56 ) );57 $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'prssa_header_favicon', array(58 'label' => __( 'Favicon', 'pressora' ),59 'section' => 'prssa_general_section',60 'settings' => 'prssa_header_favicon',61 ) ) );62 63 //64 21 // HEADER SECTION 65 22 // … … 69 26 'priority' => 20, 70 27 ) ); 71 72 $wp_customize->add_setting( 'prssa_header_logo', array(73 'default' => '',74 'sanitize_callback' => 'esc_url_raw',75 'transport' => 'refresh',76 ) );77 $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'prssa_header_logo', array(78 'label' => __( 'Header Logo', 'pressora' ),79 'section' => 'prssa_header_section',80 'settings' => 'prssa_header_logo',81 ) ) );82 28 83 29 $wp_customize->add_setting( 'prssa_header_contact', array( … … 99 45 ) ); 100 46 $wp_customize->add_control( 'prssa_logo_width', array( 101 'label' => __( 'Logo Width (px)', 'pressora' ), 102 'section' => 'prssa_header_section', 103 'type' => 'number', 47 'label' => __( 'Logo Width (px)', 'pressora' ), 48 'description' => __( 'Optional display size for the logo set in Site Identity.', 'pressora' ), 49 'section' => 'prssa_header_section', 50 'type' => 'number', 104 51 'input_attrs' => array( 'min' => 0, 'step' => 1 ), 105 52 ) ); … … 111 58 ) ); 112 59 $wp_customize->add_control( 'prssa_logo_height', array( 113 'label' => __( 'Logo Height (px)', 'pressora' ), 114 'section' => 'prssa_header_section', 115 'type' => 'number', 60 'label' => __( 'Logo Height (px)', 'pressora' ), 61 'description' => __( 'Optional display size for the logo set in Site Identity.', 'pressora' ), 62 'section' => 'prssa_header_section', 63 'type' => 'number', 116 64 'input_attrs' => array( 'min' => 0, 'step' => 1 ), 117 65 ) ); … … 373 321 ), 374 322 ) ); 323 324 /* 325 * Site Title, Tagline, and header text color are WordPress core settings. 326 * Enable live preview for the markup this theme already prints. 327 */ 328 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 329 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 330 331 if ( $wp_customize->get_setting( 'header_textcolor' ) ) { 332 $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 333 } 334 335 if ( isset( $wp_customize->selective_refresh ) ) { 336 $wp_customize->selective_refresh->add_partial( 337 'blogname', 338 array( 339 'selector' => '.site-title a', 340 'render_callback' => 'prssa_customize_partial_blogname', 341 ) 342 ); 343 $wp_customize->selective_refresh->add_partial( 344 'blogdescription', 345 array( 346 'selector' => '.site-description', 347 'render_callback' => 'prssa_customize_partial_blogdescription', 348 ) 349 ); 350 } 375 351 } 376 352 add_action( 'customize_register', 'prssa_customize_register' ); 353 354 /** 355 * Render the site title for the Customizer selective refresh partial. 356 */ 357 function prssa_customize_partial_blogname() { 358 bloginfo( 'name' ); 359 } 360 361 /** 362 * Render the site tagline for the Customizer selective refresh partial. 363 */ 364 function prssa_customize_partial_blogdescription() { 365 bloginfo( 'description' ); 366 } 367 368 /** 369 * Apply optional logo dimensions to the core Custom Logo image. 370 * 371 * @param array $attr Image attributes. 372 * @return array 373 */ 374 function prssa_custom_logo_image_attributes( $attr ) { 375 $logo_width = absint( get_theme_mod( 'prssa_logo_width', 0 ) ); 376 $logo_height = absint( get_theme_mod( 'prssa_logo_height', 0 ) ); 377 $styles = array(); 378 379 if ( $logo_width ) { 380 $styles[] = 'width:' . $logo_width . 'px'; 381 $styles[] = 'max-width:' . $logo_width . 'px'; 382 } 383 384 if ( $logo_height ) { 385 $styles[] = 'height:' . $logo_height . 'px'; 386 $styles[] = 'max-height:' . $logo_height . 'px'; 387 } 388 389 if ( $styles ) { 390 $attr['style'] = implode( ';', $styles ); 391 } 392 393 return $attr; 394 } 395 add_filter( 'get_custom_logo_image_attributes', 'prssa_custom_logo_image_attributes' ); 377 396 378 397 -
pressora/1.0.11/languages/pressora.pot
r352897 r356259 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Pressora 1.0.1 0\n"5 "Project-Id-Version: Pressora 1.0.11\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/theme/pressora\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 157 157 158 158 #: inc/customizer.php:24 159 msgid "General" 159 #: inc/customizer.php:318 160 msgid "Header" 160 161 msgstr "" 161 162 162 163 #: inc/customizer.php:35 163 msgid "Site Title"164 msgstr ""165 166 #: inc/customizer.php:46167 msgid "Site Description"168 msgstr ""169 170 #: inc/customizer.php:58171 msgid "Favicon"172 msgstr ""173 174 #: inc/customizer.php:370175 #: inc/customizer.php:67176 msgid "Header"177 msgstr ""178 179 #: inc/customizer.php:78180 msgid "Header Logo"181 msgstr ""182 183 #: inc/customizer.php:89184 164 msgid "Header Contact" 185 165 msgstr "" 186 166 187 #: inc/customizer.php: 90167 #: inc/customizer.php:36 188 168 msgid "Phone, email, or short contact text displayed in the header." 189 169 msgstr "" 190 170 191 #: inc/customizer.php: 101171 #: inc/customizer.php:47 192 172 msgid "Logo Width (px)" 193 173 msgstr "" 194 174 195 #: inc/customizer.php:113 175 #: inc/customizer.php:48 176 #: inc/customizer.php:61 177 msgid "Optional display size for the logo set in Site Identity." 178 msgstr "" 179 180 #: inc/customizer.php:60 196 181 msgid "Logo Height (px)" 197 182 msgstr "" -
pressora/1.0.11/readme.txt
r352897 r356259 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.0.1 07 Stable tag: 1.0.11 8 8 License: GNU General Public License v2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 48 48 == Changelog == 49 49 50 = 1.0.11 = 51 * Fixed wp org team changes 52 50 53 = 1.0.10 = 51 54 * Show the full mobile menu instead of a clipped strip beside the toggle. -
pressora/1.0.11/style.css
r352897 r356259 5 5 Author URI: https://profiles.wordpress.org/solankisoftware/ 6 6 Description: Pressora is a free news magazine WordPress theme for newspapers, magazines, and editorial sites. It focuses on a clean headline layout, category labels, featured stories, and readable typography without plugin-style features. 7 Version: 1.0.1 07 Version: 1.0.11 8 8 Tested up to: 7.1 9 9 Requires PHP: 7.4
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)