<commit_before><?php
/*
 * ==============================================
 * Search the kind of file we are looking for.
 * ==============================================
 * If we're in this file means the original file doesn't exists
 * on the root directory. So come on to looking for on Knob default files.
 */
$wp_the_query = $GLOBALS['wp_the_query'];
$query = $wp_the_query->query;

if (isset($query) && isset($query['pagename'])) {
	$kindFile = 'page';
	$fileName = PAGES_DIR . '/' . $query['pagename'] . '.php';
} else {
	foreach ( $wp_the_query as $k => $v ) {
		if ((substr($k, 0, 3) == 'is_') && $v) {
			$kindFile = substr($k, 3);
			$fileName = $kindFile . '.php';
			break;
		}
	}
}

$fileNameInBase = VENDOR_KNOB_BASE_DIR . '/' . $fileName;

if (file_exists($fileName)) {
	// get the file from the "knob-mvc/app/pages/$fileName"
	require_once $fileName;
} else if (file_exists($fileNameInBase)) {
	// get the file from the "knob-base/$fileNameInBase"
	require_once $fileNameInBase;
} else if ('page' == $kindFile) {
	// get the file from the "knob-base/page.php"
	require_once VENDOR_KNOB_BASE_DIR . '/page.php';
} else {
	// the file doesnt exists
	die('the file doesn\'t exists');
}<commit_msg>Take the WP files from knob-base/wp/file_name<commit_after><?php
/*
 * ==============================================
 * Search the kind of file we are looking for.
 * ==============================================
 * If we're in this file means the original file doesn't exists
 * on the root directory. So come on to looking for on Knob default files.
 */
$wp_the_query = $GLOBALS['wp_the_query'];
$query = $wp_the_query->query;

if (isset($query) && isset($query['pagename'])) {
    $kindFile = 'page';
    $fileName = PAGES_DIR . '/' . $query['pagename'] . '.php';
} else {
    foreach ($wp_the_query as $k => $v) {
        if ((substr($k, 0, 3) == 'is_') && $v) {
            $kindFile = substr($k, 3);
            $fileName = $kindFile . '.php';
            break;
        }
    }
}

if (file_exists($fileName)) {
    // get the file from the "knob-mvc/app/pages/$fileName"
    require_once $fileName;
} else if (file_exists($fileNameInBase = VENDOR_KNOB_BASE_DIR . '/wp/' . $fileName)) {
    // get the file from the "knob-base/wp/$fileNameInBase"
    require_once $fileNameInBase;
} else if ('page' == $kindFile) {
    // get the file from the "knob-base/page.php"
    require_once VENDOR_KNOB_BASE_DIR . '/page.php';
} else {
    // the file doesn't exists
    die('the file doesn\'t exists');
}
{'fraction_non_alphanumeric': 0.22752585521081942, 'fraction_numerical': 0.002386634844868735, 'mean_word_length': 3.556159420289855, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '438477', 'n_tokens_mistral': 863, 'n_tokens_neox': 857, 'n_words': 231}