admin管理员组

文章数量:1425798

I installed Lilaea child theme configuration plugin and I created a child theme and then editted the style.css in the child theme. But then I do not know why my web is crashed. I copied all lines in style.css of the parent theme and then overwrited all of them into the style.css of the child theme and then just adjusted the font-size of the logo-title.

I asked my hosting supplier for the reason then he gave me the testing error notification, which said that the below code was not working:

 public function prepare_class() {
            $theme = wp_get_theme();
            if ( is_child_theme() ) {
                $this->theme_name = esc_attr( $theme->parent()->get( 'Name' ) );
            } else {
                $this->theme_name = esc_attr ( $theme->get( 'Name' ) );
            }
            $this->theme_slug    = esc_attr( $theme->get_template() );
            $this->theme_version = esc_attr( $theme->get( 'Version' ) );
            $this->page_title    = isset( $this->config['page_title'] ) ? $this->config['page_title'] : esc_html__('Info','online-shop'). $this->theme_name;
            $this->menu_title    = isset( $this->config['menu_title'] ) ? $this->config['menu_title'] : esc_html__('Info','online-shop') . $this->theme_name;
            $this->notification  = isset( $this->config['notification'] ) ? $this->config['notification'] : ( '<p>' . sprintf( esc_html__('Welcome! Thank you for choosing %1$s! To fully take advantage of the best our theme can offer please make sure you visit our %2$swelcome page%3$s.','online-shop'), $this->theme_name, '<a href="' . esc_url( admin_url( 'themes.php?page=' . $this->theme_slug . '-info' ) ) . '">', '</a>' ) . '</p><p><a href="' . esc_url( admin_url( 'themes.php?page=' . $this->theme_slug . '-info' ) ) . '" class="button" style="text-decoration: none;">' . sprintf( __('Get started with %s','online-shop'), $this->theme_name ) . '</a></p>' );
            $this->tabs          = isset( $this->config['tabs'] ) ? $this->config['tabs'] : array();
        }

exactly, the error happened from this line:

  $this->theme_name = esc_attr( $theme->parent()->get( 'Name' ) );

Those code line is in the file called "class-at-theme-info.php"

My current solution to login the admin control pannel of my web is to rename the "themes" folder. But then I can not load any other theme to rebuild my web.

Pls, help me to find the solution for this problem.

The php file: link to download php file in googledrive

本文标签: My wordpress site is crash due to excute child theme