Redefines the functions plugin_dir_url, plugins_url to work properly if you have symbolic links in your WordPress installation.
Author: | Manoj Thulasidas (profile at wordpress.org) |
WordPress version required: | 3.1 |
WordPress version tested: | 4.8 |
Plugin version: | 2.50 |
Added to WordPress repository: | 05-03-2012 |
Last updated: | 01-08-2017
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 1 |
Plugin URI: | http://www.thulasidas.com/adsense |
Total downloads: | 2 673 |
Active installs: | 10+ |
Click to start download
|
Screenshots
Admin page for Function Tweaker
FAQ
Installation Instructions
Searching
The easiest way to install this plugin is to use the WordPress Admin interface. Go to your admin dashboard, find the “Plugins” menu, and click on “Add New”. Search for this plugin and click on “Install Now” and follow the WordPress instructions.
Uploading
If you want to download it and manually install, you can again use the WordPress dashboard interface. First download the plugin zip file to your local computer. Then go to your admin dashboard, find the “Plugins” menu, and click on “Add New”. After clicking on the “Add New” menu item as above, click on “Upload” (below the title “Install Plugins” near the top). Browse for your downloaded zip file, upload it and activate the plugin.
FTP
- Upload the Function Tweaker plugin (the whole
a-function-hitman
folder) to the ‘/wp-content/plugins/’ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to the Setup -> Function Tweaker and kill or revive the functions.
If you have other functions you would like to modify, please edit the plugin code hitman.php
and look for the variable $funs
around line 82. Add to the list the name of the function you want to redefine.
You the provide your own defintions of the function in the file redefinedFunctions.php
.
What does this plugin do?
Function Tweaker helps you troubleshoot and redefine the functions plugin_dir_url
, plugins_url
and plugin_basename
to work properly. These functions may not work as expected if you have symbolic links in your WordPress installation.
Here is an example of the wrong output:
- Output of
plugin_dir_url()
: http://localhost/dev/blog/wp-content/plugins/Applications/XAMPP/xamppfiles/htdocs/dev/blog-assets/wp-content/plugins/hitman/
- Output of
plugins_url()
: http://localhost/dev/blog/wp-content/plugins/Applications/XAMPP/xamppfiles/htdocs/dev/blog-assets/wp-content/plugins/hitman/hitman.php
- Output of
plugin_basename()
: Applications/XAMPP/xamppfiles/htdocs/dev/blog-assets/wp-content/plugins/hitman/hitman.php
After correcting the issue, the right output is:
- Output of
plugin_dir_url()
: http://localhost/dev/blog/wp-content/plugins/hitman/
- Output of
plugins_url()
: http://localhost/dev/blog/wp-content/plugins/hitman/hitman.php
- Output of
plugin_basename()
: hitman/hitman.php
How do I use it?
Go to the Function Tweaker admin page. You will see the following help text message:
- First hit the “Test Functions” button.
- Look at the output above. Especially the one against plugins_url()
- If it looks incorrect, you may be able to fix it in two ways.
- If the plugin is offering to define
WP_CONTENT_DIR
, please do so.
- If the plugin is advising you to define it in your wp_config.php, please do so.
- Hit the “Test Functions” button again. Does the output look fine?
- If the function output still does not look right, click on the “Kill Functions” button and then hit the “Test Functions” button again.
- The output should have the right values now.
- If not, sorry, I am out of ideas. You may look at the plugin code in redefinedFunctions*.php and may be able to fix your issues.
- If you do, please leave a comment here so that others can benefit from your efforts.
How does it do it?
In most cases, defining your WP_CONTENT_DIR
properly is good enough to solve the issue. The “Kill Functions” button basically removes the current definitions of the functions and replaces them with what is in the redefinedFunctions1.php
. For it to work, your PHP installation will need to have a function called rename_function
, which is part of the APD package. If this package is not found, the plugin will gracefully exit.
ChangeLog
- V2.50: Compatibility with WP4.8. Sunset edition. [Aug 1, 2017]
- V2.40: Compatibility with WP4.5. [May 14, 2016]
- V2.30: Compatibility with WordPress 4.4. [Dec 5, 2015]
- V2.21: Enhancements in the admin interface. [Oct 17, 2015]
- V2.20: Compatibility with WP4.3. [Aug 10, 2015]
- V2.10: Compatibility with WP4.0. [Sep 8, 2014]
- V2.00: Removing tail-text for compatibility with other plugins. [Mar 24, 2014]
- V1.51: Minor admin page changes. [Dec 21, 2013]
- V1.50: Compatibility checks for WordPress V3.8. [Dec 20, 2013]
- V1.40: Compatibility checks for WordPress V3.7. [Nov 11, 2013]
- V1.30: Admin interface modifications. [Sep 30, 2012]
- V1.21: Minor documentation change. [Sep 9, 2012]
- V1.20: Quite a bit of improvements and documentation changes. [Sep 9, 2012]
- V1.10: Renaming the plugin to Function Tweaker since Hitman probably did not make any sense. [Mar 6. 2012]
- V1.00: Initial release. [Mar 5, 2012]