Fragen\GitHub_Updater\Theme::remove_after_theme_row PHP Метод

remove_after_theme_row() публичный Метод

Remove default after_theme_row_$stylesheet.
Автор: @grappler
public remove_after_theme_row ( $theme_key, $theme )
$theme_key
$theme
    public function remove_after_theme_row($theme_key, $theme)
    {
        foreach (parent::$git_servers as $server) {
            $repo_header = $server . ' Theme URI';
            $repo_uri = $theme->get($repo_header);
            $themes = $this->get_theme_configs();
            /**
             * Filter to add themes not containing appropriate header line.
             *
             * @since   5.4.0
             * @access  public
             *
             * @param   array $additions    Listing of themes to add.
             *                              Default null.
             * @param   array $themes       Listing of all themes.
             * @param         string        'theme'    Type being passed.
             */
            $additions = apply_filters('github_updater_additions', null, $themes, 'theme');
            foreach ((array) $additions as $addition) {
                if ($theme_key === $addition['slug']) {
                    if (!empty($addition[$server . ' Theme URI'])) {
                        $repo_uri = $addition[$server . ' Theme URI'];
                        break;
                    }
                }
            }
            if (empty($repo_uri)) {
                continue;
            }
            remove_action("after_theme_row_{$theme_key}", 'wp_theme_update_row', 10);
            break;
        }
    }