[wordpress插件] Function Tweaker功能调节器

wordpress 插件 文章 2020-01-22 23:20 782 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

Some of the built in functions (eg, plugin_dir_url and plugins_url) may not work properly if you have non-standard WP installation with wp-content<

如果您具有 wp-content <的非标准WP安装,则某些内置功能(例如 plugin_dir_url plugins_url )可能无法正常工作。

/code> as a symbolic link.

/ code>作为符号链接。

This plugin lets you redefine such functions without having to edit the WP core files.

该插件使您无需编辑WP核心文件即可重新定义此类功能。

This plugin is meant for advanced users or plugin developers.

此插件适用于高级用户或插件开发人员。

The reason for developing it was that some of my favorite plugins (term-management-tools, subscribe2, wp-dtree-30) didn’t work properly when I had a non-standard WP installation.

开发它的原因是,当我安装了非标准的WP时,我最喜欢的某些插件(term-management-tools,subscribe2,wp-dtree-30)无法正常工作。

My installation consists of a blog assets folder containing all the stuff that I want to keep unchanged acrross multiple WP versions, and it contains wp-content as well.

我的安装包含一个Blog资产文件夹,其中包含我想在多个WP版本中保持不变的所有内容,并且还包含 wp-content

But unfortunately, the functions plugin_dir_url and plugins_url that many plugin authors make use of give unexpected results in this setup.

但是不幸的是,许多插件作者使用的 plugin_dir_url plugins_url 函数在此设置中给出了意外的结果。

If I modified the plugin code, it would be impossible to updrade the plugins automatically (without obliterating my modifications).

如果我修改了插件代码,将不可能自动升级插件(不删除我的修改)。

If I modified the functions in WP core files to make the plugins work again, it would be impossible to painlessly upgrade my WP installation.

如果我修改了WP核心文件中的功能以使插件再次正常工作,那么就可以毫不费力地升级WP安装。

Redefining the offending functions using a separate plugin was the right choice.

使用单独的插件重新定义有问题的功能是正确的选择。

Note that this plugin uses a pecl package called apd which provides the rename_function.

请注意,此插件使用名为 apd pecl 软件包,该软件包提供 rename_function

You could easily change the code to make it use runkit, but it didn’t work for me.

您可以轻松地更改代码以使其使用 runkit ,但是它对我不起作用。

If all that is Greek to you, perhaps you shouldn’t use this plugin.

如果这一切对您来说都是希腊文,也许您不应该使用此插件。

Once again, this plugin is meant for advanced users and may make your blog installation unstable or even unusable.

再次,此插件适用于高级用户,并且可能使您的博客安装不稳定甚至无法使用。

It gives a very niche, non-standard functionality that may be useful for some plugin or PHP developers.

它提供了非常利基的非标准功能,可能对某些插件或PHP开发人员很有用。

安装步骤

Searching

搜索

The easiest way to install this plugin is to use the WordPress Admin interface.

安装此插件的最简单方法是使用WordPress Admin界面。

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.

搜索此插件,然后单击“立即安装”,然后按照WordPress的说明进行操作。

Uploading

上传

If you want to download it and manually install, you can again use the WordPress dashboard interface.

如果要下载并手动安装,可以再次使用WordPress仪表板界面。

First download the plugin zip file to your local computer.

首先将插件zip文件下载到本地计算机。

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.

浏览下载的zip文件,上传并激活插件。

FTP

FTP

    1. Upload the Function Tweaker plugin (the whole a-function-hitman folder) to the ‘/wp-content/plugins/’ directory.
    2. 将Function Tweaker插件(整个 a-function-hitman 文件夹)上传到“ / wp-content / plugins /”目录。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress.
    4. 通过WordPress中的“插件”菜单激活插件。

    5. Go to the Setup -> Function Tweaker and kill or revive the functions.
    6. 转到“设置”->“功能微调器”,然后杀死或恢复功能。

    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

    如果您要修改其他功能,请编辑插件代码 hitman.php 并在第82行附近查找变量 $ funs

    list the name of the function you want to redefine.

    列出要重新定义的函数的名称。

    You the provide your own defintions of the function in the file redefinedFunctions.php.

    您可以在文件 redefinedFunctions.php 中提供自己的函数定义。

下载地址

https://downloads.wordpress.org/plugin/a-function-hitman.2.50.zip

https://downloads.wordpress.org/plugin/a-function-hitman.2.50.zip

-EOF-

AI助手支持GPT4.0