From b5521da43ccbbf4a17bfe809d953f33003f2afb3 Mon Sep 17 00:00:00 2001 From: metodiew Date: Mon, 19 Jun 2023 15:15:34 +0300 Subject: [PATCH 01/10] twentytwelve theme: removing instances of old IE fixes and patches --- src/wp-content/themes/twentytwelve/css/ie.css | 273 ------------------ .../themes/twentytwelve/editor-style.css | 3 - .../themes/twentytwelve/functions.php | 4 - src/wp-content/themes/twentytwelve/header.php | 13 - .../themes/twentytwelve/inc/custom-header.php | 1 - .../themes/twentytwelve/js/html5.js | 8 - src/wp-content/themes/twentytwelve/readme.txt | 4 - 7 files changed, 306 deletions(-) delete mode 100644 src/wp-content/themes/twentytwelve/css/ie.css delete mode 100644 src/wp-content/themes/twentytwelve/js/html5.js diff --git a/src/wp-content/themes/twentytwelve/css/ie.css b/src/wp-content/themes/twentytwelve/css/ie.css deleted file mode 100644 index 706f5103ede61..0000000000000 --- a/src/wp-content/themes/twentytwelve/css/ie.css +++ /dev/null @@ -1,273 +0,0 @@ -/* -Styles for older IE versions (previous to IE9). -*/ - -body { - background-color: #e6e6e6; -} -body.custom-background-empty { - background-color: #fff; -} -body.custom-background-empty .site, -body.custom-background-white .site { - box-shadow: none; - margin-bottom: 0; - margin-top: 0; - padding: 0; -} -.assistive-text, -.site .screen-reader-text { - clip: rect(1px 1px 1px 1px); -} -.full-width .site-content { - float: none; - width: 100%; -} -img.size-full, -img.size-large, -img.header-image, -img.wp-post-image, -img[class*="align"], -img[class*="wp-image-"], -img[class*="attachment-"] { - width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */ -} -.author-avatar { - float: left; - margin-top: 8px; - margin-top: 0.571428571rem; -} -.author-description { - float: right; - width: 80%; -} -.site { - box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); - margin: 48px auto; - max-width: 960px; - overflow: hidden; - padding: 0 40px; -} -.site-content { - float: left; - width: 65.104166667%; -} -body.template-front-page .site-content, -body.attachment .site-content, -body.full-width .site-content { - width: 100%; -} -.widget-area { - float: right; - width: 26.041666667%; -} -.site-header h1, -.site-header h2 { - text-align: left; -} -.site-header h1 { - font-size: 26px; - line-height: 1.846153846; -} -.main-navigation ul.nav-menu, -.main-navigation div.nav-menu > ul { - border-bottom: 1px solid #ededed; - border-top: 1px solid #ededed; - display: inline-block !important; - text-align: left; - width: 100%; -} -.main-navigation ul { - margin: 0; - text-indent: 0; -} -.main-navigation li a, -.main-navigation li { - display: inline-block; - text-decoration: none; -} -.ie7 .main-navigation li a, -.ie7 .main-navigation li { - display: inline; -} -.main-navigation li a { - border-bottom: 0; - color: #6a6a6a; - line-height: 3.692307692; - text-transform: uppercase; -} -.main-navigation li a:hover { - color: #000; -} -.main-navigation li { - margin: 0 40px 0 0; - position: relative; -} -.main-navigation li ul { - margin: 0; - padding: 0; - position: absolute; - top: 100%; - z-index: 1; - height: 1px; - width: 1px; - overflow: hidden; - clip: rect(1px, 1px, 1px, 1px); -} -.ie7 .main-navigation li ul { - clip: inherit; - display: none; - left: 0; - overflow: visible; -} -.main-navigation li ul ul, -.ie7 .main-navigation li ul ul { - top: 0; - left: 100%; -} -.main-navigation ul li:hover > ul, -.main-navigation ul li:focus > ul, -.main-navigation .focus > ul { - border-left: 0; - clip: inherit; - overflow: inherit; - height: inherit; - width: inherit; -} -.ie7 .main-navigation ul li:hover > ul, -.ie7 .main-navigation ul li:focus > ul { - display: block; -} -.main-navigation li ul li a { - background: #efefef; - border-bottom: 1px solid #ededed; - display: block; - font-size: 11px; - line-height: 2.181818182; - padding: 8px 10px; - width: 180px; -} -.main-navigation li ul li a:hover { - background: #e3e3e3; - color: #444; -} -.main-navigation .current-menu-item > a, -.main-navigation .current-menu-ancestor > a, -.main-navigation .current_page_item > a, -.main-navigation .current_page_ancestor > a { - color: #636363; - font-weight: bold; -} -.main-navigation .menu-toggle { - display: none; -} -.entry-header .entry-title { - font-size: 22px; -} -#respond form input[type="text"] { - width: 46.333333333%; -} -#respond form textarea.blog-textarea { - width: 79.666666667%; -} -.template-front-page .site-content, -.template-front-page article { - overflow: hidden; -} -.template-front-page.has-post-thumbnail article { - float: left; - width: 47.916666667%; -} -.entry-page-image { - float: right; - margin-bottom: 0; - width: 47.916666667%; -} -/* IE Front Page Template Widget fix */ -.template-front-page .widget-area { - clear: both; -} -.template-front-page .widget { - width: 100% !important; - border: none; -} -.template-front-page .widget-area .widget, -.template-front-page .first.front-widgets, -.template-front-page.two-sidebars .widget-area .front-widgets { - float: left; - margin-bottom: 24px; - width: 51.875%; -} -.template-front-page .second.front-widgets, -.template-front-page .widget-area .widget:nth-child(odd) { - clear: right; -} -.template-front-page .first.front-widgets, -.template-front-page .second.front-widgets, -.template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { - float: right; - margin: 0 0 24px; - width: 39.0625%; -} -.template-front-page.two-sidebars .widget, -.template-front-page.two-sidebars .widget:nth-child(even) { - float: none; - width: auto; -} -/* add input font for ul { - text-align: right; -} -.rtl .main-navigation ul li ul li, -.rtl .main-navigation ul li ul li ul li { - margin-left: 40px; - margin-right: auto; -} -.rtl .main-navigation li ul ul { - position: absolute; - bottom: 0; - right: 100%; - z-index: 1; -} -.ie7 .rtl .main-navigation li ul ul { - position: absolute; - bottom: 0; - right: 100%; - z-index: 1; -} -.ie7 .rtl .main-navigation ul li { - z-index: 99; -} -.ie7 .rtl .main-navigation li ul { - position: absolute; - bottom: 100%; - right: 0; - z-index: 1; -} -.ie7 .rtl .main-navigation li { - margin-right: auto; - margin-left: 40px; -} -.ie7 .rtl .main-navigation li ul ul ul { - position: relative; - z-index: 1; -} \ No newline at end of file diff --git a/src/wp-content/themes/twentytwelve/editor-style.css b/src/wp-content/themes/twentytwelve/editor-style.css index d3934a9151dfa..5dfcb9331611d 100644 --- a/src/wp-content/themes/twentytwelve/editor-style.css +++ b/src/wp-content/themes/twentytwelve/editor-style.css @@ -296,9 +296,6 @@ img, box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); max-width: 100%; } -img.size-full { - width: auto/9; /* Prevent stretching of full-size images in IE8 */ -} img[class*="wp-image-"] { height: auto; max-width: 100%; diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 8021515f69105..d2c8b5c8d14b9 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -201,10 +201,6 @@ function twentytwelve_scripts_styles() { // Theme block stylesheet. wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20230213' ); - - // Loads the Internet Explorer specific stylesheet. - wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20150214' ); - $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' ); } add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); diff --git a/src/wp-content/themes/twentytwelve/header.php b/src/wp-content/themes/twentytwelve/header.php index 0d4cf9441a47d..d1ad798029742 100644 --- a/src/wp-content/themes/twentytwelve/header.php +++ b/src/wp-content/themes/twentytwelve/header.php @@ -9,25 +9,12 @@ * @since Twenty Twelve 1.0 */ ?> - - - -> - <?php wp_title( '|', true, 'right' ); ?> - - diff --git a/src/wp-content/themes/twentytwelve/inc/custom-header.php b/src/wp-content/themes/twentytwelve/inc/custom-header.php index 84b3556c244aa..99d35d50584c3 100644 --- a/src/wp-content/themes/twentytwelve/inc/custom-header.php +++ b/src/wp-content/themes/twentytwelve/inc/custom-header.php @@ -85,7 +85,6 @@ function twentytwelve_header_style() { .site-title, .site-description { position: absolute; - clip: rect(1px 1px 1px 1px); /* IE7 */ clip: rect(1px, 1px, 1px, 1px); } article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}"; -c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| -"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); -if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d Date: Mon, 19 Jun 2023 15:18:29 +0300 Subject: [PATCH 02/10] restore src/wp-content/themes/twentytwelve/js/html5.js --- src/wp-content/themes/twentytwelve/js/html5.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/wp-content/themes/twentytwelve/js/html5.js diff --git a/src/wp-content/themes/twentytwelve/js/html5.js b/src/wp-content/themes/twentytwelve/js/html5.js new file mode 100644 index 0000000000000..448cebd79e723 --- /dev/null +++ b/src/wp-content/themes/twentytwelve/js/html5.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); +if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d Date: Mon, 19 Jun 2023 20:33:49 +0300 Subject: [PATCH 03/10] Apply the feedback notes: - Restore the html tag deleted by mistake - Restore the credits - Restore the deleted file --- src/wp-content/themes/twentytwelve/css/ie.css | 273 ++++++++++++++++++ .../themes/twentytwelve/functions.php | 3 + src/wp-content/themes/twentytwelve/header.php | 1 + 3 files changed, 277 insertions(+) create mode 100644 src/wp-content/themes/twentytwelve/css/ie.css diff --git a/src/wp-content/themes/twentytwelve/css/ie.css b/src/wp-content/themes/twentytwelve/css/ie.css new file mode 100644 index 0000000000000..cc0dcab450fea --- /dev/null +++ b/src/wp-content/themes/twentytwelve/css/ie.css @@ -0,0 +1,273 @@ +/* +Styles for older IE versions (previous to IE9). +*/ + +body { + background-color: #e6e6e6; +} +body.custom-background-empty { + background-color: #fff; +} +body.custom-background-empty .site, +body.custom-background-white .site { + box-shadow: none; + margin-bottom: 0; + margin-top: 0; + padding: 0; +} +.assistive-text, +.site .screen-reader-text { + clip: rect(1px 1px 1px 1px); +} +.full-width .site-content { + float: none; + width: 100%; +} +img.size-full, +img.size-large, +img.header-image, +img.wp-post-image, +img[class*="align"], +img[class*="wp-image-"], +img[class*="attachment-"] { + width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */ +} +.author-avatar { + float: left; + margin-top: 8px; + margin-top: 0.571428571rem; +} +.author-description { + float: right; + width: 80%; +} +.site { + box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); + margin: 48px auto; + max-width: 960px; + overflow: hidden; + padding: 0 40px; +} +.site-content { + float: left; + width: 65.104166667%; +} +body.template-front-page .site-content, +body.attachment .site-content, +body.full-width .site-content { + width: 100%; +} +.widget-area { + float: right; + width: 26.041666667%; +} +.site-header h1, +.site-header h2 { + text-align: left; +} +.site-header h1 { + font-size: 26px; + line-height: 1.846153846; +} +.main-navigation ul.nav-menu, +.main-navigation div.nav-menu > ul { + border-bottom: 1px solid #ededed; + border-top: 1px solid #ededed; + display: inline-block !important; + text-align: left; + width: 100%; +} +.main-navigation ul { + margin: 0; + text-indent: 0; +} +.main-navigation li a, +.main-navigation li { + display: inline-block; + text-decoration: none; +} +.ie7 .main-navigation li a, +.ie7 .main-navigation li { + display: inline; +} +.main-navigation li a { + border-bottom: 0; + color: #6a6a6a; + line-height: 3.692307692; + text-transform: uppercase; +} +.main-navigation li a:hover { + color: #000; +} +.main-navigation li { + margin: 0 40px 0 0; + position: relative; +} +.main-navigation li ul { + margin: 0; + padding: 0; + position: absolute; + top: 100%; + z-index: 1; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); +} +.ie7 .main-navigation li ul { + clip: inherit; + display: none; + left: 0; + overflow: visible; +} +.main-navigation li ul ul, +.ie7 .main-navigation li ul ul { + top: 0; + left: 100%; +} +.main-navigation ul li:hover > ul, +.main-navigation ul li:focus > ul, +.main-navigation .focus > ul { + border-left: 0; + clip: inherit; + overflow: inherit; + height: inherit; + width: inherit; +} +.ie7 .main-navigation ul li:hover > ul, +.ie7 .main-navigation ul li:focus > ul { + display: block; +} +.main-navigation li ul li a { + background: #efefef; + border-bottom: 1px solid #ededed; + display: block; + font-size: 11px; + line-height: 2.181818182; + padding: 8px 10px; + width: 180px; +} +.main-navigation li ul li a:hover { + background: #e3e3e3; + color: #444; +} +.main-navigation .current-menu-item > a, +.main-navigation .current-menu-ancestor > a, +.main-navigation .current_page_item > a, +.main-navigation .current_page_ancestor > a { + color: #636363; + font-weight: bold; +} +.main-navigation .menu-toggle { + display: none; +} +.entry-header .entry-title { + font-size: 22px; +} +#respond form input[type="text"] { + width: 46.333333333%; +} +#respond form textarea.blog-textarea { + width: 79.666666667%; +} +.template-front-page .site-content, +.template-front-page article { + overflow: hidden; +} +.template-front-page.has-post-thumbnail article { + float: left; + width: 47.916666667%; +} +.entry-page-image { + float: right; + margin-bottom: 0; + width: 47.916666667%; +} +/* IE Front Page Template Widget fix */ +.template-front-page .widget-area { + clear: both; +} +.template-front-page .widget { + width: 100% !important; + border: none; +} +.template-front-page .widget-area .widget, +.template-front-page .first.front-widgets, +.template-front-page.two-sidebars .widget-area .front-widgets { + float: left; + margin-bottom: 24px; + width: 51.875%; +} +.template-front-page .second.front-widgets, +.template-front-page .widget-area .widget:nth-child(odd) { + clear: right; +} +.template-front-page .first.front-widgets, +.template-front-page .second.front-widgets, +.template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { + float: right; + margin: 0 0 24px; + width: 39.0625%; +} +.template-front-page.two-sidebars .widget, +.template-front-page.two-sidebars .widget:nth-child(even) { + float: none; + width: auto; +} +/* add input font for ul { + text-align: right; +} +.rtl .main-navigation ul li ul li, +.rtl .main-navigation ul li ul li ul li { + margin-left: 40px; + margin-right: auto; +} +.rtl .main-navigation li ul ul { + position: absolute; + bottom: 0; + right: 100%; + z-index: 1; +} +.ie7 .rtl .main-navigation li ul ul { + position: absolute; + bottom: 0; + right: 100%; + z-index: 1; +} +.ie7 .rtl .main-navigation ul li { + z-index: 99; +} +.ie7 .rtl .main-navigation li ul { + position: absolute; + bottom: 100%; + right: 0; + z-index: 1; +} +.ie7 .rtl .main-navigation li { + margin-right: auto; + margin-left: 40px; +} +.ie7 .rtl .main-navigation li ul ul ul { + position: relative; + z-index: 1; +} diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index d2c8b5c8d14b9..5de84eb3393f0 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -201,6 +201,9 @@ function twentytwelve_scripts_styles() { // Theme block stylesheet. wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20230213' ); + + // Loads the Internet Explorer specific stylesheet. + wp_register_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20150214' ); } add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); diff --git a/src/wp-content/themes/twentytwelve/header.php b/src/wp-content/themes/twentytwelve/header.php index d1ad798029742..398bd1133eef4 100644 --- a/src/wp-content/themes/twentytwelve/header.php +++ b/src/wp-content/themes/twentytwelve/header.php @@ -9,6 +9,7 @@ * @since Twenty Twelve 1.0 */ ?> +> From 0ae4be1bc23328114fdc34f4c1f40e8a24b5533b Mon Sep 17 00:00:00 2001 From: metodiew Date: Mon, 19 Jun 2023 20:36:03 +0300 Subject: [PATCH 04/10] Apply the feedback notes: - Restore the html tag deleted by mistake - Restore the credits - Restore the deleted file --- src/wp-content/themes/twentytwelve/readme.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-content/themes/twentytwelve/readme.txt b/src/wp-content/themes/twentytwelve/readme.txt index 28d6c50187274..eb15a807892bc 100644 --- a/src/wp-content/themes/twentytwelve/readme.txt +++ b/src/wp-content/themes/twentytwelve/readme.txt @@ -36,6 +36,10 @@ GNU General Public License for more details. Twenty Twelve Theme bundles the following third-party resources: +HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas +Licenses: MIT/GPL2 +Source: https://github.com/aFarkas/html5shiv + Open Sans Font Copyright 2020 The Open Sans Project Authors (https://github.com/googlefonts/opensans) License: SIL Open Font License, 1.1, https://opensource.org/licenses/OFL-1.1 From fdbbe9404d1b117d0f67d9e190094c3a2218a4da Mon Sep 17 00:00:00 2001 From: metodiew Date: Mon, 19 Jun 2023 21:01:14 +0300 Subject: [PATCH 05/10] Restore wp_styles->add_data --- src/wp-content/themes/twentytwelve/functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 5de84eb3393f0..3c32732e543d5 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -204,6 +204,7 @@ function twentytwelve_scripts_styles() { // Loads the Internet Explorer specific stylesheet. wp_register_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20150214' ); + $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' ); } add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); From 69683f3c3bd242596e25e7b5b05c7401576ab3e8 Mon Sep 17 00:00:00 2001 From: metodiew Date: Tue, 27 Jun 2023 12:24:49 +0300 Subject: [PATCH 06/10] Twenty Twelve: update load with register and restore ie.css and html5.js files --- src/wp-content/themes/twentytwelve/css/ie.css | 2 +- src/wp-content/themes/twentytwelve/functions.php | 2 +- src/wp-content/themes/twentytwelve/js/html5.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-content/themes/twentytwelve/css/ie.css b/src/wp-content/themes/twentytwelve/css/ie.css index cc0dcab450fea..706f5103ede61 100644 --- a/src/wp-content/themes/twentytwelve/css/ie.css +++ b/src/wp-content/themes/twentytwelve/css/ie.css @@ -270,4 +270,4 @@ input[type="password"] { .ie7 .rtl .main-navigation li ul ul ul { position: relative; z-index: 1; -} +} \ No newline at end of file diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 3c32732e543d5..9e41c09a0c77b 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -202,7 +202,7 @@ function twentytwelve_scripts_styles() { // Theme block stylesheet. wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20230213' ); - // Loads the Internet Explorer specific stylesheet. + // Register the Internet Explorer specific stylesheet. wp_register_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20150214' ); $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' ); } diff --git a/src/wp-content/themes/twentytwelve/js/html5.js b/src/wp-content/themes/twentytwelve/js/html5.js index 448cebd79e723..6168aacd5ed78 100644 --- a/src/wp-content/themes/twentytwelve/js/html5.js +++ b/src/wp-content/themes/twentytwelve/js/html5.js @@ -5,4 +5,4 @@ a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); -if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d Date: Fri, 17 Oct 2025 09:26:34 -0500 Subject: [PATCH 07/10] Remove conditional data and source from registered IE stylesheet --- src/wp-content/themes/twentytwelve/functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 3f16846a4237d..232997a6b3176 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -218,8 +218,7 @@ function twentytwelve_scripts_styles() { wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20240812' ); // Register the Internet Explorer specific stylesheet. - wp_register_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20240722' ); - $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' ); + wp_register_style( 'twentytwelve-ie', false, array( 'twentytwelve-style' ) ); } add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); From d8ec51bf001d8899d3ccae57c4a983fccb4a50f7 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" Date: Fri, 17 Oct 2025 09:27:53 -0500 Subject: [PATCH 08/10] Remove contents of `ie.css` --- src/wp-content/themes/twentytwelve/css/ie.css | 274 +----------------- 1 file changed, 1 insertion(+), 273 deletions(-) diff --git a/src/wp-content/themes/twentytwelve/css/ie.css b/src/wp-content/themes/twentytwelve/css/ie.css index 134647da1287e..a916825934c20 100644 --- a/src/wp-content/themes/twentytwelve/css/ie.css +++ b/src/wp-content/themes/twentytwelve/css/ie.css @@ -1,273 +1 @@ -/* -Styles for older IE versions (previous to IE9). -*/ - -body { - background-color: #e6e6e6; -} -body.custom-background-empty { - background-color: #fff; -} -body.custom-background-empty .site, -body.custom-background-white .site { - box-shadow: none; - margin-bottom: 0; - margin-top: 0; - padding: 0; -} -.assistive-text, -.site .screen-reader-text { - clip: rect(1px 1px 1px 1px); -} -.full-width .site-content { - float: none; - width: 100%; -} -img.size-full, -img.size-large, -img.header-image, -img.wp-post-image, -img[class*="align"], -img[class*="wp-image-"], -img[class*="attachment-"] { - width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */ -} -.author-avatar { - float: left; - margin-top: 8px; - margin-top: 0.571428571rem; -} -.author-description { - float: right; - width: 80%; -} -.site { - box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); - margin: 48px auto; - max-width: 960px; - overflow: hidden; - padding: 0 40px; -} -.site-content { - float: left; - width: 65.104166667%; -} -body.template-front-page .site-content, -body.attachment .site-content, -body.full-width .site-content { - width: 100%; -} -.widget-area { - float: right; - width: 26.041666667%; -} -.site-header h1, -.site-header h2 { - text-align: left; -} -.site-header h1 { - font-size: 26px; - line-height: 1.846153846; -} -.main-navigation ul.nav-menu, -.main-navigation div.nav-menu > ul { - border-bottom: 1px solid #ededed; - border-top: 1px solid #ededed; - display: inline-block !important; - text-align: left; - width: 100%; -} -.main-navigation ul { - margin: 0; - text-indent: 0; -} -.main-navigation li a, -.main-navigation li { - display: inline-block; - text-decoration: none; -} -.ie7 .main-navigation li a, -.ie7 .main-navigation li { - display: inline; -} -.main-navigation li a { - border-bottom: 0; - color: #6a6a6a; - line-height: 3.692307692; - text-transform: uppercase; -} -.main-navigation li a:hover { - color: #000; -} -.main-navigation li { - margin: 0 40px 0 0; - position: relative; -} -.main-navigation li ul { - margin: 0; - padding: 0; - position: absolute; - top: 100%; - z-index: 99999; - height: 1px; - width: 1px; - overflow: hidden; - clip: rect(1px, 1px, 1px, 1px); -} -.ie7 .main-navigation li ul { - clip: inherit; - display: none; - left: 0; - overflow: visible; -} -.main-navigation li ul ul, -.ie7 .main-navigation li ul ul { - top: 0; - left: 100%; -} -.main-navigation ul li:hover > ul, -.main-navigation ul li:focus > ul, -.main-navigation .focus > ul { - border-left: 0; - clip: inherit; - overflow: inherit; - height: inherit; - width: inherit; -} -.ie7 .main-navigation ul li:hover > ul, -.ie7 .main-navigation ul li:focus > ul { - display: block; -} -.main-navigation li ul li a { - background: #efefef; - border-bottom: 1px solid #ededed; - display: block; - font-size: 11px; - line-height: 2.181818182; - padding: 8px 10px; - width: 180px; -} -.main-navigation li ul li a:hover { - background: #e3e3e3; - color: #444; -} -.main-navigation .current-menu-item > a, -.main-navigation .current-menu-ancestor > a, -.main-navigation .current_page_item > a, -.main-navigation .current_page_ancestor > a { - color: #636363; - font-weight: bold; -} -.main-navigation .menu-toggle { - display: none; -} -.entry-header .entry-title { - font-size: 22px; -} -#respond form input[type="text"] { - width: 46.333333333%; -} -#respond form textarea.blog-textarea { - width: 79.666666667%; -} -.template-front-page .site-content, -.template-front-page article { - overflow: hidden; -} -.template-front-page.has-post-thumbnail article { - float: left; - width: 47.916666667%; -} -.entry-page-image { - float: right; - margin-bottom: 0; - width: 47.916666667%; -} -/* IE Front Page Template Widget fix */ -.template-front-page .widget-area { - clear: both; -} -.template-front-page .widget { - width: 100% !important; - border: none; -} -.template-front-page .widget-area .widget, -.template-front-page .first.front-widgets, -.template-front-page.two-sidebars .widget-area .front-widgets { - float: left; - margin-bottom: 24px; - width: 51.875%; -} -.template-front-page .second.front-widgets, -.template-front-page .widget-area .widget:nth-child(odd) { - clear: right; -} -.template-front-page .first.front-widgets, -.template-front-page .second.front-widgets, -.template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { - float: right; - margin: 0 0 24px; - width: 39.0625%; -} -.template-front-page.two-sidebars .widget, -.template-front-page.two-sidebars .widget:nth-child(even) { - float: none; - width: auto; -} -/* add input font for ul { - text-align: right; -} -.rtl .main-navigation ul li ul li, -.rtl .main-navigation ul li ul li ul li { - margin-left: 40px; - margin-right: auto; -} -.rtl .main-navigation li ul ul { - position: absolute; - bottom: 0; - right: 100%; - z-index: 1; -} -.ie7 .rtl .main-navigation li ul ul { - position: absolute; - bottom: 0; - right: 100%; - z-index: 1; -} -.ie7 .rtl .main-navigation ul li { - z-index: 99; -} -.ie7 .rtl .main-navigation li ul { - position: absolute; - bottom: 100%; - right: 0; - z-index: 1; -} -.ie7 .rtl .main-navigation li { - margin-right: auto; - margin-left: 40px; -} -.ie7 .rtl .main-navigation li ul ul ul { - position: relative; - z-index: 1; -} \ No newline at end of file +/* This theme does not support Internet Explorer since version 4.7. */ From f89499456441fc5e56bed6724cb09ba681629d63 Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" Date: Fri, 17 Oct 2025 09:28:48 -0500 Subject: [PATCH 09/10] Replace contents of `html5.js` --- src/wp-content/themes/twentytwelve/js/html5.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/wp-content/themes/twentytwelve/js/html5.js b/src/wp-content/themes/twentytwelve/js/html5.js index 6168aacd5ed78..1aa313ec31111 100644 --- a/src/wp-content/themes/twentytwelve/js/html5.js +++ b/src/wp-content/themes/twentytwelve/js/html5.js @@ -1,8 +1 @@ -/* - HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed -*/ -(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); -a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; -c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| -"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); -if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d Date: Fri, 17 Oct 2025 09:29:43 -0500 Subject: [PATCH 10/10] Remove HTML5 Shiv credit from `readme.txt` --- src/wp-content/themes/twentytwelve/readme.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/wp-content/themes/twentytwelve/readme.txt b/src/wp-content/themes/twentytwelve/readme.txt index f8aec0e0d2d46..57c53a44dd06c 100644 --- a/src/wp-content/themes/twentytwelve/readme.txt +++ b/src/wp-content/themes/twentytwelve/readme.txt @@ -38,10 +38,6 @@ GNU General Public License for more details. Twenty Twelve Theme bundles the following third-party resources: -HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas -Licenses: MIT/GPL2 -Source: https://github.com/aFarkas/html5shiv - Open Sans Font Copyright 2020 The Open Sans Project Authors (https://github.com/googlefonts/opensans) License: SIL Open Font License, 1.1, https://opensource.org/licenses/OFL-1.1