WordPress permet la surcharge de certaines fonctions avc un mécanisme assez simple: Avant la définition de la fonction, il y a un test pour savoir si elle existe déjà!
Cela permet de définir la fonction ailleurs. Typiquement dans un plugin ou un thème.
Pour pousser plus loin le hacking, il est possible de modifier le fichier wp-config.php. A priori, pour ce qui concerne WP, le fichier wp-config.php est appelé tout le temps et il n'est pas écrasé par les nouvelles versions.
En installant WP dans un sous-dossier, on doit aussi créer un fichier index.php à la racine. Ce fichier est alors hors de l'arborescence WP. Ce qui laisse aussi la liberté d'insérer du code personnel.
./wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php:26: if (!function_exists("pspell_new")) { ./wp-includes/compat.php:8:if (!function_exists('floatval')) { ./wp-includes/compat.php:14:if (!function_exists('is_a')) { ./wp-includes/compat.php:25:if (!function_exists('ob_clean')) { ./wp-includes/compat.php:52:if ( !function_exists('file_get_contents') ) { ./wp-includes/compat.php:80:if (!function_exists('array_change_key_case')) { ./wp-includes/compat.php:102:if(!function_exists('http_build_query')) { ./wp-includes/compat.php:115:if ( !function_exists('_') ) { ./wp-includes/compat.php:122:if (!function_exists('stripos')) { ./wp-includes/pluggable.php:6:if ( !function_exists('set_current_user') ) : ./wp-includes/pluggable.php:12:if ( !function_exists('wp_set_current_user') ) : ./wp-includes/pluggable.php:29:if ( !function_exists('wp_get_current_user') ) : ./wp-includes/pluggable.php:39:if ( !function_exists('get_currentuserinfo') ) : ./wp-includes/pluggable.php:60:if ( !function_exists('get_userdata') ) : ./wp-includes/pluggable.php:104:if ( !function_exists('update_user_cache') ) : ./wp-includes/pluggable.php:110:if ( !function_exists('get_userdatabylogin') ) : ./wp-includes/pluggable.php:159:if ( !function_exists( 'wp_mail' ) ) : ./wp-includes/pluggable.php:223:if ( !function_exists('wp_login') ) : ./wp-includes/pluggable.php:257:if ( !function_exists('is_user_logged_in') ) : ./wp-includes/pluggable.php:268:if ( !function_exists('auth_redirect') ) : ./wp-includes/pluggable.php:282:if ( !function_exists('check_admin_referer') ) : ./wp-includes/pluggable.php:294:if ( !function_exists('check_ajax_referer') ) : ./wp-includes/pluggable.php:311:if ( !function_exists('wp_redirect') ) : ./wp-includes/pluggable.php:336:if ( !function_exists('wp_get_cookie_login') ): ./wp-includes/pluggable.php:346:if ( !function_exists('wp_setcookie') ) : ./wp-includes/pluggable.php:379:if ( !function_exists('wp_clearcookie') ) : ./wp-includes/pluggable.php:466:if ( !function_exists('wp_notify_moderator') ) : ./wp-includes/pluggable.php:504:if ( !function_exists('wp_new_user_notification') ) : ./wp-includes/pluggable.php:529:if ( !function_exists('wp_verify_nonce') ) : ./wp-includes/pluggable.php:543:if ( !function_exists('wp_create_nonce') ) : ./wp-includes/pluggable.php:554:if ( !function_exists('wp_salt') ) : ./wp-includes/pluggable.php:564:if ( !function_exists('wp_hash') ) : ./wp-includes/class-IXR.php:338: } else if (!function_exists($method)) { ./wp-includes/functions.php:1505: if ( !function_exists( 'dynamic_sidebar' ) ) { ./wp-includes/rss.php:42: if ( !function_exists('xml_parser_create') ) ./wp-content/plugins/akismet/akismet.php:27:if ( !function_exists('wp_nonce_field') ) { ./wp-content/themes/classic/sidebar.php:7: if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> ./wp-content/themes/default/sidebar.php:4: if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> ./wp-admin/upgrade-functions.php:10:if ( !function_exists('wp_install') ) : ./wp-admin/upgrade-functions.php:61:if ( !function_exists('wp_install_defaults') ) : ./wp-admin/upgrade-functions.php:108:if ( !function_exists('wp_new_blog_notification') ) : ./wp-admin/upgrade-functions.php:133:if ( !function_exists('wp_upgrade') ) : ./wp-admin/import/dotclear.php:10:if(!function_exists('get_catbynicename')) ./wp-admin/import/dotclear.php:23:if(!function_exists('get_comment_count')) ./wp-admin/import/dotclear.php:32:if(!function_exists('link_cat_exists')) ./wp-admin/import/dotclear.php:41:if(!function_exists('link_exists')) ./wp-admin/import/textpattern.php:5:if(!function_exists('get_catbynicename')) ./wp-admin/import/textpattern.php:18:if(!function_exists('get_comment_count')) ./wp-admin/import/textpattern.php:27:if(!function_exists('link_exists')) ./wp-admin/admin-functions.php:2248: if (!function_exists( 'imagegif' ) && $type[2] == 1 ) { ./wp-admin/admin-functions.php:2251: elseif (!function_exists( 'imagejpeg' ) && $type[2] == 2 ) { ./wp-admin/admin-functions.php:2254: elseif (!function_exists( 'imagepng' ) && $type[2] == 3 ) { ./wp-app.php:46:if ( !function_exists('wp_set_current_user') ) :