Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Plugin Name: WP reCaptcha comment form fix
Plugin URI: https://gist.github.com/mcguffin/97d7f442ee3e92b7412e
Description: Will bring back reCaptcha to comment form
Author: Jörn Lund
Author URI: http://github.org/mcguffin
Version: 0.0.1
*/
<?php
/**
* Change Admin URL
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
@mcguffin
mcguffin / generate-ratio-grid.php
Last active August 29, 2015 14:17
Generate SASS code for fixed aspect ratio layout grid.
<?php
/* Copyright 2015 Jörn Lund https://github.com/mcguffin/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@mcguffin
mcguffin / comment-form.php
Created March 23, 2015 19:35
WP-Recaptcha-Integration: A working custom comment form.
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if (is_user_logged_in()) : ?>
<p>
<?php printf(__('Logged in as <a href="%s/wp-admin/profile.php">%s</a>.', 'shoestrap'), get_option('siteurl'), $user_identity); ?>
<a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php __('Log out of this account', 'shoestrap'); ?>"><?php _e('Log out &raquo;', 'shoestrap'); ?></a>
</p>
<?php else : ?>
<div class="form-group">
<label for="author"><?php _e('Name', 'shoestrap'); if ($req) _e(' (required)', 'shoestrap'); ?></label>
<input type="text" class="form-control" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" <?php if ($req) echo 'aria-required="true"'; ?>>
@mcguffin
mcguffin / grey-out-disabled.php
Last active August 29, 2015 14:12
WordPress Plugin greying out disabled buttons
<?php
/*
Plugin Name: Grey out Disabled
Plugin URI: https://gist.github.com/mcguffin/7cbfb0dab73eb32cb4a2
Description: Grey out disabled submit buttons
Author: Jörn Lund
Author URI: http://github.org/mcguffin
Version: 0.0.1
*/
<?php
/*
Plugin Name: Universal Media Library
Description: Make the pretty post/page media library accessibe from anywhere
Author: Jörn Lund
Author URI: http://github.org/mcguffin
Version: 0.0.1
*/