-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52aec86
commit 7802c7b
Showing
6 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
describe.skip('Lore', () => { | ||
|
||
before(function () { | ||
cy.login(); | ||
}); | ||
|
||
it('can ensure the Lore theme is activated', () => { | ||
cy.checkThemeActivation('lore'); | ||
}); | ||
|
||
it('can ensure the site title shows the custom link', () => { | ||
cy.checkSiteTitleLink('a.header-title__link'); | ||
}); | ||
|
||
it('can ensure the site logo shows the custom link', () => { | ||
cy.checkSiteLogoLink('a.header-logo__image'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
describe.only('Suffice', () => { | ||
describe('Suffice', () => { | ||
|
||
before(function () { | ||
cy.login(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
/** | ||
* Handle custom logo link for Lore theme | ||
* | ||
* Neve: https://themeforest.net/item/lore-elegant-knowledge-base-wordpress-theme/16965024 | ||
* @category Plugin | ||
* @package WordPress | ||
* @subpackage SMNTCS Custom Logo Link | ||
* @author Niels Lange <info@nielslange.de>, Derek Smith <derek@timbre-design.com> | ||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License | ||
*/ | ||
|
||
if ( get_option( 'smntcs_custom_logo_link_url' ) ) { ?> | ||
<script> | ||
document.addEventListener("DOMContentLoaded", function() { | ||
if ( document.querySelector("a.header-title__link") ) { | ||
document.querySelector("a.header-title__link").setAttribute("href", "<?php print( esc_url( get_option( 'smntcs_custom_logo_link_url' ) ) ); ?>"); | ||
} | ||
if ( document.querySelector("a.header-logo__image") ) { | ||
document.querySelector("a.header-logo__image").setAttribute("href", "<?php print( esc_url( get_option( 'smntcs_custom_logo_link_url' ) ) ); ?>"); | ||
} | ||
}); | ||
</script> | ||
<?php | ||
if ( get_option( 'smntcs_custom_logo_link_target' ) ) { | ||
?> | ||
<script> | ||
document.addEventListener("DOMContentLoaded", function() { | ||
if ( document.querySelector("a.header-title__link") ) { | ||
document.querySelector("a.header-title__link").setAttribute("target", "_blank"); | ||
} | ||
if (document.querySelector("a.header-logo__image")) { | ||
document.querySelector("a.header-logo__image").setAttribute("target", "_blank"); | ||
} | ||
}); | ||
</script> | ||
<?php | ||
} else { | ||
?> | ||
<script> | ||
document.addEventListener("DOMContentLoaded", function() { | ||
if ( document.querySelector("a.header-title__link") ) { | ||
document.querySelector("a.header-title__link").setAttribute("target", "_self"); | ||
} | ||
if (document.querySelector("a.header-logo__image")) { | ||
document.querySelector("a.header-logo__image").setAttribute("target", "_self"); | ||
} | ||
}); | ||
</script> | ||
<?php | ||
} | ||
} |