theme_info example



    /** * Performs an action following a single theme update. * * @since 2.8.0 */
    public function after() {
        $this->decrement_update_count( 'theme' );

        $update_actions = array();
        $theme_info     = $this->upgrader->theme_info();
        if ( $theme_info ) {
            $name       = $theme_info->display( 'Name' );
            $stylesheet = $this->upgrader->result['destination_name'];
            $template   = $theme_info->get_template();

            $activate_link = add_query_arg(
                array(
                    'action'     => 'activate',
                    'template'   => urlencode( $template ),
                    'stylesheet' => urlencode( $stylesheet ),
                ),
                

    public function after() {
        if ( $this->do_overwrite() ) {
            return;
        }

        if ( empty( $this->upgrader->result['destination_name'] ) ) {
            return;
        }

        $theme_info = $this->upgrader->theme_info();
        if ( empty( $theme_info ) ) {
            return;
        }

        $name       = $theme_info->display( 'Name' );
        $stylesheet = $this->upgrader->result['destination_name'];
        $template   = $theme_info->get_template();

        $activate_link = add_query_arg(
            array(
                'action'     => 'activate',
                

    public function check_parent_theme_filter( $install_result$hook_extra$child_result ) {
        // Check to see if we need to install a parent theme.         $theme_info = $this->theme_info();

        if ( ! $theme_info->parent() ) {
            return $install_result;
        }

        $this->skin->feedback( 'parent_theme_search' );

        if ( ! $theme_info->parent()->errors() ) {
            $this->skin->feedback( 'parent_theme_currently_installed', $theme_info->parent()->display( 'Name' )$theme_info->parent()->display( 'Version' ) );
            // We already have the theme, fall through.             return $install_result;
        }
Home | Imprint | This part of the site doesn't use cookies.