Skip to content

Commit

Permalink
Merge pull request #268 from uriweb/release-4.0-gtm-removal
Browse files Browse the repository at this point in the history
Release 4.0
  • Loading branch information
bjcfuller authored Oct 25, 2024
2 parents 5aa665f + 10f2afd commit 1ffe7b0
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 52 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@

URI Modern is a WordPress theme designed for the University of Rhode Island. It's designed to replace all themes currently being used on the university's websites, and unify the online brand and experience.

## What's new in 3.1.3
## What's new in 4.0

URI Modern 3.1.3 is a fix release.
* Removes Google Tag Manager scripts

* Fixes styles for captions in the image block
> Note: Installing this version without another means of GTM or GA injection will cease all analytics tracking. Think carefully!

For complete details, see the [commit history](https://github.com/uriweb/uri-modern/pull/243/commits) and the [issue tracker](https://github.com/uriweb/uri-modern/issues).
For complete details, see the [commit history](https://github.com/uriweb/uri-modern/pull/268/commits) and the [issue tracker](https://github.com/uriweb/uri-modern/issues).


## How do I get set up?
Expand All @@ -42,6 +41,6 @@ __Contributors:__ [bjcfuller](https://github.com/bjcfuller), [johnpennypacker](h
__Tags:__ themes
__Requires at least:__ 5.8
__Tested up to:__ 6.4.5
__Stable tag:__ 3.1.3
__Stable tag:__ 4.0.0
__License:__ GPL-3.0
__Licence URI:__ https://www.gnu.org/licenses/gpl-3.0.html
30 changes: 0 additions & 30 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,36 +278,6 @@ function uri_modern_the_gs_id() {
echo '016863979916529535900:17qai8akniu';
}

/**
* Set the Google Tag Manager property ID
*
* @return str
*/
function uri_modern_gtm_value() {

return 'GTM-K5GL9W';

}


/**
* Adds Google Tag Manager code to <head>
*/
function uri_modern_gtm() {
$gtm = uri_modern_gtm_value();
if ( ! empty( $gtm ) ) :
?>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','<?php echo $gtm; ?>');</script>
<?php
endif;
}
add_action( 'wp_head', 'uri_modern_gtm' );


/**
* Register widget area.
*
Expand Down
7 changes: 0 additions & 7 deletions header-parts/head.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@

<body <?php body_class(); ?>>

<?php
$gtm = uri_modern_gtm_value();
if ( ! empty( $gtm ) ) {
echo '<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=' . $gtm . '" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>';
}
?>

<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'uri' ); ?></a>

4 changes: 2 additions & 2 deletions js/script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uri-modern",
"version": "3.1.3",
"version": "4.0.0",
"description": "URI Modern is a WordPress theme designed for the University of Rhode Island. It's designed to replace all themes currently being used on the university's websites, and unify the online brand and experience.",
"themeName": "URI Modern",
"textDomain": "uri",
Expand Down
4 changes: 2 additions & 2 deletions static/script.static.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions static/style.static.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ffe7b0

Please sign in to comment.