正在查看 2 个帖子:1-2 (共 2 个帖子)
-
作者帖子
-
The7 主题为原版源码,是需要授权码进行授权的,安装主题之后,后台会提示未注册,不注册并不会影响使用,只影响到在线升级和演式内容的导入,若想把未注册变为注册,请接着往下看。
修改主题里面的 dt-the7/incmods/demo-content/includes/class-the7-demo-content-remote-server-api.php 文件,具体修改如下:
第 8 行添加以下代码:
update_site_option( 『the7_registered』, 『yes』 ); update_site_option( 『the7_purchase_code』, 『the7_purchase_code』 );
如下:
<?php /** * DTDummy remote API. Used to communicate with DTdummy server. * * @since 2.0.0 * @package dt-dummy/includes */ update_site_option( 'the7_registered', 'yes'); update_site_option( 'the7_purchase_code','the7_purchase_code'); class The7_demo_Content_Remote_Server_API {
目前是最新版本 v.5.6.0.1 (Oct 13, 2017),
修改后保存,安装主题后,主题将显示为已注册,如下图:
若想要导放官方的演式内容,接着往下修改:
删除 95 行至 110 行的内容,红色为要删除的代码
$request_url = add_query_arg( array( 『item』 => $id, 『code』 => $code ), $this->api_remote_download_url ); $remote_response = wp_safe_remote_get( $request_url, array( 『timeout』 => 300, 『user-agent』 => 『WordPress/』 . get_bloginfo( 『version』 ) . 『; 『 . network_site_url(), ) ); if ( is_wp_error( $remote_response ) ) { return $remote_response; } $response_code = wp_remote_retrieve_response_code( $remote_response ); if ( ! is_array( $remote_response ) || 200 != $response_code ) { return new WP_Error( 『download_failed』, $this->strings[『download_failed』] ); }
删除 114 行的内容,红色为要删除的代码
$file_content = wp_remote_retrieve_body( $remote_response );
删除 116 行的内容,红色为要删除的代码
$wp_filesystem->put_contents( $zip_file_name, $file_content );
-
作者帖子
正在查看 2 个帖子:1-2 (共 2 个帖子)
- 哎呀,回复话题必需登录。