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 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 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 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 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 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
/* Enfold theme: using a url param to show the selected portfolio grid category */ | |
jQuery(window).on('load', function ($) { | |
jQuery.QueryString = (function(a) { | |
if (a == "") return {}; | |
var b = {}; | |
for (var i = 0; i < a.length; ++i) | |
{ | |
var p=a[i].split('='); |
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
/* | |
first enqueue a javascript file | |
place it in the childtheme dir | |
*/ | |
function hhdev_enqueue_assets() { | |
wp_enqueue_script( | |
'hhdev-remove-block-styles', | |
get_stylesheet_directory_uri().'/remove-block-styles.js', | |
array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ), |
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
function getParameter(p) | |
{ | |
var url = window.location.search.substring(1); | |
var varUrl = url.split('&'); | |
for (var i = 0; i < varUrl.length; i++) | |
{ | |
var parameter = varUrl[i].split('='); | |
if (parameter[0] == p) | |
{ | |
return parameter[1]; |
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
<div id="form"> | |
<form action="#" class="search"> | |
<input type="text" placeholder="typ een zoekwoord" class="filterinput" /> | |
<small><a href="#" id="filter_reset">Maak zoekveld leeg</a></small> | |
</form> | |
</div> | |
<script> | |
jQuery("#filter_reset").click(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 | |
/** | |
* WordPress | |
* Add Featured Image to RSS feed | |
* works with Active campaign feeds | |
**/ | |
// haha.nl - herbert hoekstra - 20201210 | |
function hahadev_rss_add_thumbnail() { | |
global $post; |
NewerOlder