Skip to content

Instantly share code, notes, and snippets.

Avatar

Kees Meijer keesiemeijer

View GitHub Profile
View gist:0b844fc4e43f6fcb0740f34697aff7fa
// ==UserScript==
// @name Imbd SkipAd
// @namespace Imbdskipad
// @version 0.1
// @description Remove IMBD header ad
// @author keesiemeijer
// @match https://www.imdb.com/*
// @grant none
// ==/UserScript==
@keesiemeijer
keesiemeijer / wp-topic-redirect.user.js
Last active Jan 20, 2020
A Greasemonkey user script that forces https, adds view=all to topic urls and redirects if needed
View wp-topic-redirect.user.js
// ==UserScript==
// @name WordPress topic redirect
// @namespace WordPress_topic_redirect
// @description Forces https, adds view=all to topic urls and redirects if needed in the WordPress support forums.
// @version 1
// @grant none
// @run-at document-start
// @include *://*wordpress.org/support/topic/*
// @include *://wordpress.org/support/users/*
// @include *://wordpress.org/support/theme/*
@keesiemeijer
keesiemeijer / wp-word-frequency.txt
Last active Mar 20, 2018
WordPress functions and hooks word frequency
View wp-word-frequency.txt
1118 wp
714 get
389 post
242 comment
217 link
190 user
158 update
156 the
141 meta
139 admin
@keesiemeijer
keesiemeijer / youtube-remove-ads.js
Last active Mar 14, 2021
Youtube skip ads and remove overlay ads after 3 seconds
View youtube-remove-ads.js
// ==UserScript==
// @name Youtube SkipAd
// @namespace keesiemeijer
// @version 0.1
// @description Automatically skips ads after 5 seconds
// @author keesiemeijer
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
@keesiemeijer
keesiemeijer / widget.php
Last active Sep 13, 2017
Wiget with dropdown and back compatibility
View widget.php
<?php
add_action( 'widgets_init', 'register_my_scheduled_posts_widget' );
function register_my_scheduled_posts_widget() {
register_widget( 'My_Scheduled_Posts_Widget' );
}
class My_Scheduled_Posts_Widget extends WP_Widget {
@keesiemeijer
keesiemeijer / widget.php
Last active Sep 13, 2017
Widget with checkbox
View widget.php
<?php
add_action( 'widgets_init', 'register_my_scheduled_posts_widget' );
function register_my_scheduled_posts_widget() {
register_widget( 'My_Scheduled_Posts_Widget' );
}
class My_Scheduled_Posts_Widget extends WP_Widget {
@keesiemeijer
keesiemeijer / functions.php
Created Sep 2, 2017
Override related posts with the WordPress Related Posts by Taxonomy plugin
View functions.php
add_action( 'widget_display_callback', 'page_widget_output', 10, 3 );
function page_widget_output( $instance, $widget, $args ) {
$plugin = function_exists( 'km_rpbt_plugin' ) ? km_rpbt_plugin() : false;
// Check if the plugin is activated and this is the related posts widget.
if ( ! $plugin || ( 'Related Posts By Taxonomy' !== $args['widget_name'] ) ) {
return $instance;
}
@keesiemeijer
keesiemeijer / gist:3cfbdd39f09ba30aff915287d67af6e7
Last active Mar 20, 2018
WordPress function word frequency
View gist:3cfbdd39f09ba30aff915287d67af6e7
869 wp
559 get
225 post
124 link
113 is
106 comment
99 update
99 add
97 the
89 ajax
View gist:9287b4881ae0e46c470616c13a33286a
about
absint
absolute
accents
access
accordion
account
action
actions
activate
View WordPress function names
absint
access_denied_splash
activate_plugin
activate_plugins
add_action
add_blog_option
add_clean_index
add_comment_meta
add_comments_page
add_cssclass