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
{ | |
"name": "nickdavis/project-name", | |
"description": "", | |
"type": "project", | |
"license": "proprietary", | |
"prefer-stable": true, | |
"minimum-stability": "dev", | |
"repositories": [ | |
{ | |
"type": "composer", |
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
<?php | |
add_filter( 'genesis_pre_get_option_content_archive_limit', __NAMESPACE__ . '\set_content_archive_limit', 11, 1 ); | |
/** | |
* Forces the Genesis > Settings > Content Archives > Limit Content value to | |
* prevent an error with Events Calendar (v4.8.2) Archive pages in Genesis | |
* themes. | |
*/ | |
function set_content_archive_limit() { | |
return 0; |
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
/** | |
* Adds specified Carbon Field to the Yoast SEO content analysis. | |
* | |
* @link https://return-true.com/adding-content-to-yoast-seo-analysis-using-yoastseojs/ | |
* @link https://kb.yoast.com/kb/can-i-add-data-to-the-page-analysis/ | |
* @link https://github.com/Yoast/YoastSEO.js/blob/master/README.md | |
* @link https://github.com/Yoast/YoastSEO.js/issues/181#issuecomment-163162489 | |
*/ | |
(function($) { |
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
<?php | |
/** | |
* Debug. | |
*/ | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
define( 'WP_DEBUG_LOG', true ); | |
/** |
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
<?php | |
add_filter( 'my_filter', '__return_true' ); | |
add_filter( 'my_filter', '__return_false' ); | |
add_filter( 'my_filter', '__return_zero' ); | |
add_filter( 'my_filter', '__return_null' ); | |
add_filter( 'my_filter', '__return_empty_string' ); | |
add_filter( 'my_filter', '__return_empty_array' ); |
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
<?php | |
/** | |
* Removes the text (short way). | |
*/ | |
add_filter( 'my_filter', '__return_empty_string' ); |
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
<?php | |
add_filter( 'my_filter', 'remove_my_filter_text' ); | |
/** | |
* Removes the text (long way). | |
*/ | |
function remove_my_filter_text() { | |
return ''; | |
} |
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
<?php | |
add_filter( 'my_filter', 'modify_my_filter_text' ); | |
/** | |
* Modifies the text. | |
*/ | |
function modify_my_filter_text() { | |
return 'Something else'; | |
} |
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
<?php if ( has_nav_menu( 'how-can-we-help-you' ) ) : | |
$menu_slug = get_term( get_nav_menu_locations()['how-can-we-help-you'], 'nav_menu' )->slug; | |
$menu_items = wp_get_nav_menu_items( $menu_slug ); | |
?> | |
<ul> | |
<?php foreach ( $menu_items as $menu_item ) : ?> | |
<li><a href="<?= $menu_item->url; ?>"><?= $menu_item->title; ?></li> | |
<?php endforeach; ?> |
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
<?php | |
if ( has_nav_menu( 'footer-1' ) ) { | |
wp_nav_menu( array( | |
'theme_location' => 'footer-1', | |
'container' => '', | |
'menu_class' => 'footer_links', // You may want to add a particular CSS class to make it easier to identify | |
) ); | |
} |
NewerOlder