Skip to content

Instantly share code, notes, and snippets.

View AsifMahsud's full-sized avatar
👨‍💻
coding...

Asif Khan AsifMahsud

👨‍💻
coding...
View GitHub Profile
@bappi-d-great
bappi-d-great / How to load a wordpress plugin at very last.php
Created September 6, 2014 14:47
How to load a wordpress plugin at very last - change plugin order to load last
<?php
/*
*
* Use the code at the beginning of a plugin that you want to be laoded at last
*
*/
function this_plugin_last() {
$wp_path_to_this_file = preg_replace('/(.*)plugins\/(.*)$/', WP_PLUGIN_DIR."/$2", __FILE__);
$this_plugin = plugin_basename(trim($wp_path_to_this_file));
$active_plugins = get_option('active_plugins');