Skip to content

Instantly share code, notes, and snippets.

@wadmiraal
Last active December 28, 2015 16:59
Show Gist options
  • Save wadmiraal/7532696 to your computer and use it in GitHub Desktop.
Save wadmiraal/7532696 to your computer and use it in GitHub Desktop.
My first Wordpress plugin.
<?php
$all_functions = get_defined_functions();
$user_functions = $all_functions['user'];
foreach ($user_functions as $function_name) {
if (preg_match('/^wp_/', $function_name)) {
override_function($function_name, '', 'die("Use Drupal.");');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment