Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WordPress是否像Joomla那样提供插件覆盖功能?_Joomla_Wordpress - Fatal编程技术网

WordPress是否像Joomla那样提供插件覆盖功能?

WordPress是否像Joomla那样提供插件覆盖功能?,joomla,wordpress,Joomla,Wordpress,我想用与Joomla类似的方式覆盖WordPress插件的输出,这可能吗?您可以在输出数据之前使用过滤器更改数据 或者可以使用模板\u include过滤器提供不同的自定义模板。 e、 g function choose_template($template) { if( $template == 'plugin-template-page.php' ) { $template = 'my-template-page.php'; } return $template;

我想用与Joomla类似的方式覆盖WordPress插件的输出,这可能吗?

您可以在输出数据之前使用过滤器更改数据

或者可以使用
模板\u include
过滤器提供不同的自定义模板。 e、 g

function choose_template($template)
{
  if( $template == 'plugin-template-page.php' )
  {
    $template = 'my-template-page.php';
  }
  return $template;
}
add_filter('template_include','choose_template');