Skip to content

Instantly share code, notes, and snippets.

View sun's full-sized avatar
👌
Happy

Daniel Kudwien sun

👌
Happy
View GitHub Profile
@retgef
retgef / wordpress-remove-404-attachments
Created October 20, 2012 03:09
Remove attachment rows where the associated file on the disk doesn't exist.
<?php
/**
* Usage when logged in: http://yourdomain.com/wp-admin/remove-404-attachments=secretpassword
*/
# Hook late into admin_init
add_action('admin_init', 'remove_404_attachments', 9999999);
function remove_404_attachments(){
@sun
sun / ConfigObject.php
Created May 29, 2012 05:59
simple config object
<?php
namespace Drupal\Core\Config;
use Drupal\Core\Config\StorageInterface;
class ConfigObject {
protected $name = '';