首页 WordPress函数大全 resume_theme()

resume_theme()

2020-05-02 / 2574阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

resume_theme( string $theme, string $redirect = '' )

尝试恢复单个主题。

描述

如果提供了重定向并找到了functions.php文件,则我们首先要确保functions.php文件不再引发致命错误。

它的工作方式是在尝试包含文件之前,将重定向设置为错误。如果主题失败,那么重定向将不会被成功消息覆盖,并且主题也不会恢复。

参数

$theme

(string)
(Required)
Single theme to resume.

$redirect

(string)
(Optional)
URL to redirect to.

Default value: ''

返回

(bool|WP_Error) True on success, false if $theme was not paused, WP_Error on failure.

大家谈论
    我的见解