Skip to content

Commit

Permalink
show tumblr button on theme install page
Browse files Browse the repository at this point in the history
  • Loading branch information
roccotrip committed Jan 9, 2025
1 parent bba9447 commit 5c75884
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/js/build/theme-install.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'ecc70649d772274a02cd');
<?php return array('dependencies' => array(), 'version' => '7168407eaa5966650690');
2 changes: 1 addition & 1 deletion assets/js/build/theme-install.js

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

6 changes: 3 additions & 3 deletions assets/js/src/theme-install.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/* global ttgardenInstall */
/* global TumblrThemeGarden_Install */
window.addEventListener(
'DOMContentLoaded',
function () {
const body = document.getElementById( 'wpbody-content' );
const filterLinks = body.getElementsByClassName( 'filter-links' );

const handleClick = function () {
window.location = ttgardenInstall.browseUrl;
window.location = TumblrThemeGarden_Install.browseUrl;

Check failure on line 9 in assets/js/src/theme-install.js

View workflow job for this annotation

GitHub Actions / lint-js_css-files

Identifier 'TumblrThemeGarden_Install' is not in camel case
};

if ( filterLinks[ 0 ] && filterLinks[ 0 ].tagName.toLowerCase() === 'ul' ) {
const list = filterLinks[ 0 ];
const listItem = document.createElement( 'li' );
const link = document.createElement( 'button' );
listItem.setAttribute( 'class', 'tumblr-theme-garden-list-item' );
link.setAttribute( 'title', ttgardenInstall.buttonText );
link.setAttribute( 'title', TumblrThemeGarden_Install.buttonText );

Check failure on line 17 in assets/js/src/theme-install.js

View workflow job for this annotation

GitHub Actions / lint-js_css-files

Identifier 'TumblrThemeGarden_Install' is not in camel case
link.addEventListener( 'click', handleClick );
link.setAttribute( 'class', 'tumblr-theme-garden-link' );
listItem.appendChild( link );
Expand Down

0 comments on commit 5c75884

Please sign in to comment.