Make WordPress Themes

Changeset 358231


Ignore:
Timestamp:
11/09/2026 06:38:13 PM (7 days ago)
Author:
themedropbox
Message:

New version of Hamilton - 2.1.4

Location:
hamilton/2.1.4
Files:
13 edited
1 copied

Legend:

Unmodified
Added
Removed
  • hamilton/2.1.4/404.php

    r130234 r358231  
    77                <div>
    88
    9                         <h1 class="title"><?php _e( 'Error 404', 'hamilton' ); ?></h1>
     9                        <h1 class="title"><?php esc_html_e( 'Error 404', 'hamilton' ); ?></h1>
    1010
    11                         <p><?php _e( "The page you're looking for could not be found. It may have been removed, renamed, or maybe it didn't exist in the first place.", "hamilton" ); ?></p>
     11                        <p><?php esc_html_e( "The page you're looking for could not be found. It may have been removed, renamed, or maybe it didn't exist in the first place.", "hamilton" ); ?></p>
    1212
    1313                        <div class="meta">
    1414                       
    15                                 <a href="<?php echo esc_url( home_url() ); ?>"><?php _e( 'To the front page', 'hamilton' ); ?></a>
     15                                <a href="<?php echo esc_url( home_url() ); ?>"><?php esc_html_e( 'To the front page', 'hamilton' ); ?></a>
    1616                       
    1717                        </div>
  • hamilton/2.1.4/assets/css/hamilton-block-editor-styles.css

    r130234 r358231  
    407407        font-size: .7em;
    408408        padding: 20px;
    409         white-space: pre-wrap;       /* css-3 */
    410         white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
    411         white-space: -pre-wrap;      /* Opera 4-6 */
    412         white-space: -o-pre-wrap;    /* Opera 7 */
    413         word-wrap: break-word;       /* Internet Explorer 5.5+ */
     409        white-space: pre-wrap;
     410        word-wrap: break-word;
    414411}
    415412
  • hamilton/2.1.4/assets/css/hamilton-classic-editor-styles.css

    r130234 r358231  
    1414
    1515body#tinymce.wp-editor * {
    16                 -webkit-box-sizing: border-box;
    17                 -moz-box-sizing: border-box;
    1816        box-sizing: border-box;
    1917        -webkit-font-smoothing: antialiased;
    … …  
    314312        font-size: 0.9em;
    315313        padding: 14px 16px;
    316         -webkit-appearance: none;
    317         -moz-appearance: none;
     314        appearance: none;
    318315        width: 100%;
    319316}
    … …  
    347344        margin: 0;
    348345        padding: 12px 16px;
    349         -webkit-appearance: none;
     346        appearance: none;
    350347}
    351348
  • hamilton/2.1.4/assets/js/global.js

    r356895 r358231  
    9494        $( '.nav-toggle' ).on( 'click', function(){     
    9595                $( this ).add( '.site-nav' ).toggleClass( 'active' );
     96                $( this ).attr( 'aria-expanded', $( this ).hasClass( 'active' ) ? 'true' : 'false' );
    9697                $( 'body' ).toggleClass( 'lock-screen' );
     98        } );
     99
     100        // Close the navigation with the Escape key
     101        $( document ).on( 'keydown', function( e ) {
     102                if ( 'Escape' === e.key && $( '.nav-toggle' ).hasClass( 'active' ) ) {
     103                        $( '.nav-toggle' ).trigger( 'click' ).trigger( 'focus' );
     104                }
    97105        } );
    98106       
  • hamilton/2.1.4/comments.php

    r130234 r358231  
    1818                <div class="comments">
    1919               
    20                         <h3 class="comment-reply-title"><?php _e( 'Comments', 'hamilton' ) ?></h3>
     20                        <h3 class="comment-reply-title"><?php esc_html_e( 'Comments', 'hamilton' ) ?></h3>
    2121                       
    2222                        <?php
  • hamilton/2.1.4/content.php

    r130234 r358231  
    3434       
    3535                <?php if ( is_sticky() ) : ?>
    36                         <span class="sticky-post"><?php _e( 'Sticky', 'hamilton' ); ?></span>
     36                        <span class="sticky-post"><?php esc_html_e( 'Sticky', 'hamilton' ); ?></span>
    3737                <?php endif; ?>
    3838       
  • hamilton/2.1.4/footer.php

    r170702 r358231  
    44
    55                        <p>&copy; <?php echo date( 'Y' ); ?> <a href="<?php echo esc_url( home_url() ); ?>" class="site-name"><?php bloginfo( 'name' ); ?></a></p>
    6                         <p class="theme-by"><?php _e( 'Theme by', 'hamilton' ); ?> <a href="https://andersnoren.se">Anders Nor&eacute;n</a></p>
     6                        <p class="theme-by"><?php esc_html_e( 'Theme by', 'hamilton' ); ?> <a href="https://andersnoren.se">Anders Nor&eacute;n</a></p>
    77
    88                </footer><!-- footer -->
  • hamilton/2.1.4/functions.php

    r356895 r358231  
    119119                $theme_version = wp_get_theme( 'hamilton' )->get( 'Version' );
    120120
    121                 wp_register_style( 'hamilton-fonts', get_theme_file_uri( '/assets/css/fonts.css' ) );
     121                wp_register_style( 'hamilton-fonts', get_theme_file_uri( '/assets/css/fonts.css' ), array(), $theme_version );
    122122                wp_enqueue_style( 'hamilton-style', get_stylesheet_uri(), array( 'hamilton-fonts' ), $theme_version );
    123123               
    … …  
    156156        function hamilton_enqueue_scripts() {
    157157
    158                 wp_enqueue_script( 'hamilton_global', get_template_directory_uri() . '/assets/js/global.js', array( 'jquery', 'imagesloaded', 'masonry' ), '', true );
     158                $theme_version = wp_get_theme( 'hamilton' )->get( 'Version' );
     159
     160                wp_enqueue_script( 'hamilton_global', get_template_directory_uri() . '/assets/js/global.js', array( 'jquery', 'imagesloaded', 'masonry' ), $theme_version, true );
    159161
    160162                if ( ( ! is_admin() ) && is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    … …  
    415417                $theme_version = wp_get_theme( 'hamilton' )->get( 'Version' );
    416418
    417                 wp_register_style( 'hamilton-block-editor-styles-font', get_theme_file_uri( '/assets/css/fonts.css' ) );
     419                wp_register_style( 'hamilton-block-editor-styles-font', get_theme_file_uri( '/assets/css/fonts.css' ), array(), $theme_version );
    418420                wp_enqueue_style( 'hamilton-block-editor-styles', get_theme_file_uri( '/assets/css/hamilton-block-editor-styles.css' ), array( 'hamilton-block-editor-styles-font' ), $theme_version, 'all' );
    419421
  • hamilton/2.1.4/header.php

    r130234 r358231  
    2222                ?>
    2323
    24                 <a class="skip-link button" href="#site-content"><?php _e( 'Skip to the content', 'hamilton' ); ?></a>
     24                <a class="skip-link button" href="#site-content"><?php esc_html_e( 'Skip to the content', 'hamilton' ); ?></a>
    2525   
    2626        <header class="section-inner site-header">
    … …  
    5454                                       
    5555                                        <a href="<?php echo esc_url( home_url() ); ?>" class="custom-logo" style="background-image: url( <?php echo esc_url( $logo_url ); ?> );">
    56                                                 <img src="<?php echo esc_url( $logo_url ); ?>" />
    57                                                 <span class="screen-reader-text"><?php echo $site_title; ?></span>
     56                                                <img src="<?php echo esc_url( $logo_url ); ?>" alt="" />
     57                                                <span class="screen-reader-text"><?php echo esc_html( $site_title ); ?></span>
    5858                                        </a>
    5959
    6060                                <?php else : ?>
    61                                         <a href="<?php echo esc_url( home_url() ); ?>" class="site-name"><?php echo $site_title; ?></a>
     61                                        <a href="<?php echo esc_url( home_url() ); ?>" class="site-name"><?php echo esc_html( $site_title ); ?></a>
    6262                                <?php endif; ?>
    6363
    6464                        </<?php echo $site_title_elem; ?>>
    6565                       
    66                         <button class="nav-toggle">
    67                                 <span class="screen-reader-text"><?php _e( 'Toggle menu', 'hamilton' ); ?></span>
    68                                 <div class="bars">
    69                                         <div class="bar"></div>
    70                                         <div class="bar"></div>
    71                                         <div class="bar"></div>
    72                                 </div>
     66                        <button type="button" class="nav-toggle" aria-expanded="false">
     67                                <span class="screen-reader-text"><?php esc_html_e( 'Toggle menu', 'hamilton' ); ?></span>
     68                                <span class="bars" aria-hidden="true">
     69                                        <span class="bar"></span>
     70                                        <span class="bar"></span>
     71                                        <span class="bar"></span>
     72                                </span>
    7373                        </button><!-- .nav-toggle -->
    7474
    … …  
    139139
    140140                                        <p>&copy; <?php echo date( 'Y' ); ?> <a href="<?php echo esc_url( home_url() ); ?>" class="site-name"><?php bloginfo( 'name' ); ?></a></p>
    141                                         <p class="theme-by"><?php _e( 'Theme by', 'hamilton' ); ?> <a href="https://www.andersnoren.se">Anders Nor&eacute;n</a></p>
     141                                        <p class="theme-by"><?php esc_html_e( 'Theme by', 'hamilton' ); ?> <a href="https://andersnoren.se">Anders Nor&eacute;n</a></p>
    142142                               
    143143                                </div>
  • hamilton/2.1.4/readme.txt

    r356895 r358231  
    7070
    7171== Changelog ==
     72
     73Version 2.1.4 (2026-11-09)
     74-------------------------
     75- Added an aria-expanded attribute to the menu toggle, so screen readers announce whether the menu is open, and replaced the block elements inside it with valid button content.
     76- The menu can now be closed with the Escape key, which also returns focus to the menu toggle.
     77- Removed the underline from the links in the desktop menu, and added it with a slight offset on hover and focus instead.
     78- Added an empty alt attribute to the logo image, since the logo link already contains the site title as screen reader text.
     79- Removed vendor prefixes that are no longer needed, and replaced the rest with their standard equivalents where available.
     80- Updated the theme author link to https://andersnoren.se.
     81- Escaped the site title and translated strings in the templates.
     82- Added the theme version to the global.js and fonts.css URLs, so browsers load the updated files after a theme update.
     83- Recompressed screenshot.jpg, reducing its file size by more than half.
    7284
    7385Version 2.1.3 (2026-11-03)
    … …  
    311323== Upgrade Notice ==
    312324
     325= 2.1.4 =
     326Improves the accessibility of the menu, makes sure browsers load the updated scripts, removes outdated CSS, and updates the author link.
     327
    313328= 2.1.3 =
    314329Tested with WordPress 7.1. Fixes Jetpack Infinite Scroll and the block editor styles in the iframed editor.
  • hamilton/2.1.4/singular.php

    r130234 r358231  
    2626
    2727                                                        <?php
    28                                                         echo __( 'In', 'hamilton' ) . ' '; the_category( ', ' );
     28                                                        esc_html_e( 'In', 'hamilton' ); echo ' '; the_category( ', ' );
    2929
    3030                                                        if ( comments_open() ) : ?>
  • hamilton/2.1.4/style.css

    r356895 r358231  
    33        Theme Name: Hamilton
    44    Text Domain: hamilton
    5         Version: 2.1.3
     5        Version: 2.1.4
    66        Description: Hamilton is a clean WordPress portfolio theme for creatives. It displays posts in a beautiful image grid that can be set to either two or three columns, which makes it a perfect fit for photographers, illustrators or graphic designers looking for a theme for their portfolio. It also features Block Editor/Gutenberg support, a dark mode, custom background color support, a resume page template, responsive design, Jetpack infinite scroll support, editor styling, and much more. Demo: https://hamilton.andersnoren.se
    77        Tags: blog, two-columns, three-columns, custom-menu, featured-images, threaded-comments, translation-ready, grid-layout, custom-background, custom-logo, editor-style, sticky-post, theme-options, portfolio, photography, block-styles, wide-blocks
    … …  
    150150
    151151body * {
    152         -webkit-box-sizing: border-box;
    153         -moz-box-sizing: border-box;
    154152        box-sizing: border-box;
    155153        -moz-osx-font-smoothing: grayscale;
    … …  
    186184}
    187185
    188 input::-webkit-input-placeholder { color: #767676; }
    189 input:-ms-input-placeholder { color: #767676; }
    190 input::-moz-placeholder { color: #767676; }
     186input::placeholder { color: #767676; opacity: 1; }
    191187
    192188
    … …  
    516512        text-align: center;
    517513        transition: background-color .2s ease-in-out;
    518         -moz-appearance: none;
    519         -webkit-appearance: none;
     514        appearance: none;
    520515}
    521516
    … …  
    856851        margin: -10px 0 0 -40px;
    857852        position: relative;
     853        text-underline-offset: 0.2em;
    858854        z-index: 1;
    859855}
    … …  
    898894.alt-nav li a {
    899895        display: block;
     896        text-decoration: none;
     897}
     898
     899.alt-nav li a:hover,
     900.alt-nav li a:focus {
     901        text-decoration: underline;
    900902}
    901903
    … …  
    959961}
    960962
    961 .alt-nav ul a:hover {
    962         text-decoration: none;
    963 }
    964 
    965963.alt-nav ul li:hover { background: rgba( 255, 255, 255, 0.2 ); }
    966964.dark-mode .alt-nav ul li:hover { background: rgba( 0, 0, 0, 0.2 ); }
    … …  
    10881086
    10891087.post-preview header {
    1090                 display: -webkit-box;
    1091                 display: -ms-flexbox;
    10921088        display: flex;
    1093                 -webkit-box-orient: vertical;
    1094                 -webkit-box-direction: normal;
    1095                 -ms-flex-direction: column;
    10961089        flex-direction: column;
    1097                 -webkit-box-pack: center;
    1098                 -ms-flex-pack: center;
    10991090        justify-content: center;
    11001091        opacity: 0;
    … …  
    21402131.infinite-loader:before,
    21412132.infinite-loader:after {
    2142                 -webkit-animation: sk-bounce 2.0s infinite ease-in-out;
    21432133        animation: sk-bounce 2.0s infinite ease-in-out;
    21442134        background: rgba( 0, 0, 0, .25 );
    … …  
    21592149
    21602150.infinite-loader:after {
    2161                 -webkit-animation-delay: -1.0s;
    21622151        animation-delay: -1.0s;
    2163 }
    2164 
    2165 @-webkit-keyframes sk-bounce {
    2166         0%, 100% { -webkit-transform: scale(0.0) }
    2167         50% { -webkit-transform: scale(1.0) }
    21682152}
    21692153
    21702154@keyframes sk-bounce {
    21712155        0%, 100% {
    2172                         -webkit-transform: scale(0.0);
    21732156                transform: scale(0.0);
    21742157        } 50% {
    2175                         -webkit-transform: scale(1.0);
    21762158                transform: scale(1.0);
    21772159        }
    … …  
    24872469        }
    24882470       
    2489         @supports ( display: -webkit-flex ) or ( display: -moz-flex ) or ( display: flex ) {
     2471        @supports ( display: flex ) {
    24902472                .page-header {
    24912473                        min-height: 150px;
Note: See TracChangeset for help on using the changeset viewer.