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 | |
/** | |
* Filter the post search arguments allow for cross-post-type connections in MultilingualPress. | |
* | |
* MultilingualPress (MLP) connects translated posts and pages, but by default doesn't connection across post types. | |
* This changes that behavior by allowing other post types to be chosen in the interface. No other modifications are | |
* needed to achieve this, because MLP uses the post_id and doesn't care about post_type outside of the search query. | |
* | |
* @param array $args the WP_Term_Query arguments used. | |
* @return 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 | |
/** | |
* Plugin Name: Duplicated Child Term Url Slugs | |
* Description: Duplicate child term urls slugs in hierarchical taxonomies. | |
* Version: 0.1.0 | |
* Author: joshuadnelson | |
* License: GPLv2 or later | |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
* | |
* This is setup like a plugin, but can be included in a theme or as a class in a plugin. |
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 | |
/** | |
* Filter the post search arguments allow for cross-post-type connections. | |
* | |
* @param array $args the WP_Query arguments used. | |
* @return array | |
*/ | |
function remote_post_search_arguments( $args ) { | |
$translated_post_types = array( 'post', 'page', 'product' ); |
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 | |
/** | |
* Filter the hreflang urls and remove any that are indicative of draft or otherwise non-published content. | |
* | |
* Linked translations that are not yet published will show up as /?p=123 instead of pretty permalink. | |
* | |
* @param array $urls the array of language => url hreflang urls. | |
* @return array | |
*/ | |
add_filter( 'multilingualpress.hreflang_translations', 'filter_mlp_hreflang_translations' ); |
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 | |
/** | |
* Use this filter to force jquery to remain in the head section of the page on archives. | |
* | |
* @see https://wordpress.org/support/topic/exclude-jquery-for-other-archive-pages/ | |
* @date 2021-07-02 | |
*/ | |
add_filter( 'stf_jquery_header', 'jdn_archive_header_scripts', 10 ); | |
function jdn_archive_header_scripts( $bool ) { |
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 | |
/** | |
* Create a new redirect within the Yoast redirect system. | |
* | |
* @param string $origin_url redirecting from. | |
* @param string $destination_url redirecting to. | |
* @param int $type redirect code, defaults to 301. | |
* @param string $format the format, either 'plain' or 'regex', defaults to 'plain'. | |
* @return void | |
*/ |
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 | |
// Remove layout settings from customizer | |
add_filter( 'genesis_customizer_theme_settings_config', 'jdn_filter_genesis_customizer_theme_settings' ); | |
function jdn_filter_genesis_customizer_theme_settings( $config ) { | |
if( isset( $config['genesis']['sections']['genesis_layout'] ) ) | |
unset( $config['genesis']['sections']['genesis_layout'] ); | |
return $config; |
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
.grid-block { | |
float: left; | |
} | |
.grid { | |
$grid-gap: 9px; | |
// Columns! | |
@media screen and ( min-width: 600px ) { // responsive grid | |
display: grid; |
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
UPDATE wp_users | |
SET user_pass = MD5('newpassword') | |
WHERE ID = 55; |
NewerOlder