This file contains hidden or 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
<!-- add this directly into the popup screen of WordPress popupmaker plugin, might need some css styling. --> | |
<div id="close-auto-text"></div> | |
<a class="popmake-close pum-close news-popup-close" href="#" onclick="setPUMcookie();">Click here to hide this popup for 1 month.</a> | |
<code><script>function setPUMcookie() { var CookieDate = new Date; | |
CookieDate.setFullYear(CookieDate.getFullYear()); | |
document.cookie = "pum-4830=true; expires=' + CookieDate.toUTCString() + '; path=/";} | |
var timeLeft = 30; var elem = document.getElementById('close-auto-text'); | |
var timerId = setInterval(countdown, 1000); | |
function countdown() { | |
if (timeLeft == -1) { |
This file contains hidden or 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 | |
// Bedrock mu-plugin: redirect all emails to developer email on staging site | |
// Don't forget to set your email address! | |
add_filter( 'wp_mail', 'hhdev_staging_email_filter', 10, 1 ); | |
function hhdev_staging_email_filter( $args ) { | |
if (getenv('WP_ENV') == 'staging') { |
This file contains hidden or 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: HHdev Force 2fa email for all users | |
* Version: 1.0.1 | |
* Description: Needs 2FA plugin to work. Forces alle users to 2fa with email. | |
* Plugin URI: https://haha.nl/wordpress-plug-in-op-maat/ | |
*/ | |
/* | |
There is also an open issue for enabling 2FA for all users which includes a temporary solution for doing that through a filter: |
This file contains hidden or 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 to child theme functions.php | |
// remove download rss feed | |
// wp-downloadmanager - lester chan | |
add_action( 'wp_head', 'hhdev_remove_action', 5 ); | |
function hhdev_remove_action() { | |
remove_action('wp_head', 'download_rss_link'); | |
} |
This file contains hidden or 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
/** | |
* Change the breakpoint of the Astra tablet view | |
* | |
* @return int Screen width when the header should change to the mobile header. | |
*/ | |
function hhdev_change_header_breakpoint() { | |
return 1174; // change as you see fit | |
}; | |
add_filter( 'astra_tablet_breakpoint', 'hhdev_change_header_breakpoint' ); |
This file contains hidden or 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 | |
// used on postcard blocks for Avada theme | |
// use the hook fusion_post_cards_shortcode_query_args to change to multiple post types on the postcard | |
// ----------------------------- | |
// change the number 75012 in fusion_is_post_card to match the required ID of the post card! | |
// also change the cpt names as required | |
// place this snippet in functions.php of child theme or use a code snippet plugin to add it | |
// ----------------------------- | |
function hhdev_my_post_card_add_cpt( $query_args ) { |
This file contains hidden or 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 | |
// Avada post cards: exclude current post from post card | |
// when using post cards in a show other on a single post page | |
// ---------------------------- | |
// change the post card id (2700) to your own post card id! | |
// ---------------------------- | |
function hhdev_post_card_blog_exclude_current_post( $query_args ) { | |
if(fusion_is_post_card(2700) && !is_archive()) $query_args['post__not_in'] = array(get_the_ID()); |
This file contains hidden or 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: Obfuscate all version from css and js sources | |
* Plugin URI: https://haha.nl/wordpress-plug-in-op-maat/ | |
* Description: Encode version numbers from the source files so to keep files version dependant but obscure the WP version but still maintain version control on these files. | |
* Version: 1.0.1 | |
* Author: herbert hoekstra - haha! | |
* Author URI: https://haha.nl | |
* Documentation URI: https://haha.nl/wordpress-plug-in-op-maat/ | |
*/ |
This file contains hidden or 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 | |
// Invoice Plane adapted function with date parameters | |
// ===================================== | |
/* | |
Changed functionality to have an option to use from - until dates in the description of a product. | |
Example product description: from 12-07-{{{year}}} until 12-07-{{{year+1}}} | |
Only get_items_and_replace_vars function has been changed from the original set up | |
Please check the original documentation for the correct set up: https://jefferytay.wordpress.com/2016/11/29/invoiceplane-v1-4-10-enabling-date-parameters/ | |
Working and tested in version 1.6.1 | |
July 07, 2025 |
OlderNewer