<commit_before><?php
// Starts the session
session_start();

// Cosmetics variable exchange
define('DS', DIRECTORY_SEPARATOR);

// Extended function collection
require_once get_template_directory()
  .DS
  .'inc'
  .DS
  .'Facade'
  .DS
  .'WP'
  .DS
  .'functions.php';

// Include classes
spl_autoload_register(function($class_name)
{
  $file = get_template_directory()
    .DS
    .'inc'
    .DS
    .implode(
      DS,
      explode(
      '_',
      $class_name))
    .'.php';

  if(is_file($file))
    include_once $file;
});

// Handles certain post data
Facade_Form::mapper(
  array(),
  $_POST['ns']);

// Register menus
function init_custome_menu()
{
  register_nav_menu('menu-main', __('Huvud meny', 'BBO'));
}
add_action('init', 'init_custome_menu');

// Custome post types
require_once get_template_directory()
  .DS
  .'inc'
  .DS
  .'functions.cpt.php';

// Register Meta boxes for pages
function init_meta_boxes()
{

}
add_action('init', 'init_meta_boxes');

// Register sidebars | widgets
function init_dynamic_sidebars()
{

}
add_action('widgets_init', 'init_dynamic_sidebars');

// Enqueue scripts
function init_script_enqueue()
{<commit_msg>added functionality for removing the texteditor for specific templates<commit_after><?php
// Starts the session
session_start();

// Cosmetics variable exchange
define('DS', DIRECTORY_SEPARATOR);

// Extended function collection
require_once get_template_directory()
  .DS
  .'inc'
  .DS
  .'Facade'
  .DS
  .'WP'
  .DS
  .'functions.php';

// Include classes
spl_autoload_register(function($class_name)
{
  $file = get_template_directory()
    .DS
    .'inc'
    .DS
    .implode(
      DS,
      explode(
      '_',
      $class_name))
    .'.php';

  if(is_file($file))
    include_once $file;
});

// Handles certain post data
Facade_Form::mapper(
  array(),
  $_POST['ns']);

// Register menus
function init_custome_menu()
{
  register_nav_menu('menu-main', __('Huvud meny', 'BBO'));
}
add_action('init', 'init_custome_menu');

// Custome post types
require_once get_template_directory()
  .DS
  .'inc'
  .DS
  .'functions.cpt.php';

// Register Meta boxes for pages
function init_meta_boxes()
{

}
add_action('init', 'init_meta_boxes');

// Hides the editor for process template
function hide_editor()
{
  // Get the Post ID.
  $post_id = $_GET['post']
           ? $_GET['post']
           : $_POST['post_ID'];

  if(!isset($post_id))
    return;

  // Get the name of the Page Template file.
  $template_file = get_post_meta($post_id, '_wp_page_template', true);

  switch ($template_file)
  {
    // add correct template file name
    case '?.php':
      remove_post_type_support('page', 'editor');
      break;
  }
}
add_action('admin_init', 'hide_editor');

// Register sidebars | widgets
function init_dynamic_sidebars()
{

}
add_action('widgets_init', 'init_dynamic_sidebars');

// Enqueue scripts
function init_script_enqueue()
{
{'fraction_non_alphanumeric': 0.14600550964187328, 'fraction_numerical': 0.0, 'mean_word_length': 3.6405750798722045, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '451043', 'n_tokens_mistral': 1033, 'n_tokens_neox': 1007, 'n_words': 222}