Skip to content

Instantly share code, notes, and snippets.

<?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
*/
@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
*/
@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 / 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
<?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.
<?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
*/
@mcguffin
mcguffin / acf-nested-repeater.json
Created December 16, 2017 21:57
basic nested repeater
[
{
"key": "group_5a3593ed877c0",
"title": "Nested Repeaeter",
"fields": [
{
"key": "field_5a3593f76e021",
"label": "Outer",
"name": "outer",
"type": "repeater",
@mcguffin
mcguffin / polylang-fix-acf-relational.php
Created October 26, 2015 17:13
Polylang: Fix missing value on ACF relational fields
<?php
/*
Plugin Name: Polylang: Fix missing value on ACF relational fields
Plugin Description: ACF relational Field value for translated posts types where not displayed when Admin langauge differs from post language.
Author: Jörn Lund
Author URI: http://github.org/mcguffin
Version: 0.0.1
*/
<?php
/*
Plugin Name: Fix core issue 42656
Description: Fix PHP Warning undefined index pagenow on login popup. Place this into wp-content/mu-plugins/
Author: McGuffin
Author URI: http://github.org/mcguffin
Version: 0.0.1
*/
@mcguffin
mcguffin / acf-quick-edit-rgba-color-picker.php
Last active June 29, 2021 16:57
ACF RGBA Color Picker + ACF Quick Edit Fields
<?php
/**
* Bringing ACF RGBA Color Picker and ACF QuickEdit Fields together.
* https://github.com/mcguffin/acf-quick-edit-fields
* https://wordpress.org/plugins/acf-rgba-color-picker/
*/
/**
* Add field support
*/