<commit_before><?php

namespace Modularity\Editor;

class Tabs
{
    protected $tabs = array();

    public function __construct()
    {
        add_action('edit_form_top', array($this, 'output'));
    }

    /**
     * Outputs the tabbar html
     * @param  integer $activeIndex Current active tab index
     * @return void
     */
    public function output()
    {
        if (!$this->shouldOutput()) {
            return false;
        }

        echo '<h2 class="modularity-nav-tab-wrapper" id="modularity-tabs">';

        foreach ($this->tabs as $tab => $url) {
            if (strpos($url, $_SERVER['REQUEST_URI']) !== false || (strpos($_SERVER['REQUEST_URI'], 'post-new.php') !== false && strpos($url, 'post.php') !== false)) {<commit_msg>Fixes current tab highlight after post save<commit_after><?php

namespace Modularity\Editor;

class Tabs
{
    protected $tabs = array();

    public function __construct()
    {
        add_action('edit_form_top', array($this, 'output'));
    }

    /**
     * Outputs the tabbar html
     * @param  integer $activeIndex Current active tab index
     * @return void
     */
    public function output()
    {
        if (!$this->shouldOutput()) {
            return false;
        }

        echo '<h2 class="modularity-nav-tab-wrapper" id="modularity-tabs">';

        $requestUri = str_replace('&message=1', '', $_SERVER['REQUEST_URI']);

        foreach ($this->tabs as $tab => $url) {
            if (strpos($url, $requestUri) !== false) {
{'fraction_non_alphanumeric': 0.15616621983914208, 'fraction_numerical': 0.0020107238605898124, 'mean_word_length': 2.606280193236715, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '487283', 'n_tokens_mistral': 448, 'n_tokens_neox': 442, 'n_words': 109}