Skip to content

Instantly share code, notes, and snippets.


Mark Warren markandcurry

View GitHub Profile
markandcurry / Extend Recent Posts
Last active Sep 21, 2017 — forked from paulruescher/Extend Recent Posts
Used this to change the output of WordPress' Recent Posts Widget
View Extend Recent Posts
* Extend Recent Posts Widget
* Adds different formatting to the default WordPress Recent Posts Widget
Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts {
function widget($args, $instance) {
markandcurry / no_urls_allowed.php
Created Aug 30, 2016 — forked from galbaras/no_urls_allowed.php
Function to invalidate Contact Form 7 input, unless the fields is of type "url" or has "url" in its name, i.e. it is meant for URLs
View no_urls_allowed.php
function no_urls_allowed( $result, $tag ) {
$tag = new WPCF7_Shortcode( $tag );
$type = $tag->type;
$name = $tag->name;
$value = isset( $_POST[$name] )
? trim( wp_unslash( strtr( (string) $_POST[$name], "\n", " " ) ) )
: '';
You can’t perform that action at this time.