<commit_before><?php

function wpunity_create_default_scenes_for_game($gameSlug,$gameTitle,$gameID){

    $allScenePGame = get_term_by('slug', $gameSlug, 'wpunity_scene_pgame');
    $allScenePGameID = $allScenePGame->term_id;

    $all_game_category = get_the_terms( $gameID, 'wpunity_game_type' );
    $game_category  = $all_game_category[0]->slug;

    $mainmenuSceneTitle = 'Main Menu'; //Title for Main Menu
    $mainmenuSceneSlug = $gameSlug . '-main-menu' ; //Slug for Main Menu
    $firstSceneTitle = 'First Scene'; //Title for First Menu
    $firstSceneSlug = $gameSlug . '-first-scene'; //Slug for First Menu
    $credentialsSceneTitle = 'Credits'; //Title for Credentials Menu
    $credentialsSceneSlug = $gameSlug . '-credits-scene'; //Slug for Credentials Menu

    $mainmenuSceneYAML = get_term_by('slug', 'mainmenu-yaml', 'wpunity_scene_yaml'); //Yaml Tax for Main Menu
    $mainmenuSceneYAMLID = $mainmenuSceneYAML->term_id;
    $credentialsSceneYAML = get_term_by('slug', 'credentials-yaml', 'wpunity_scene_yaml'); //Yaml Tax for Credentials Scene
    $credentialsSceneYAMLID = $credentialsSceneYAML->term_id;
    if($game_category == 'energy_games'){
        $firstSceneYAML = get_term_by('slug', 'educational-energy', 'wpunity_scene_yaml'); //Yaml Tax for First Scene
        $firstSceneYAMLID = $firstSceneYAML->term_id;
    }elseif($game_category == 'archaeology_games'){
        $firstSceneYAML = get_term_by('slug', 'wonderaround-yaml', 'wpunity_scene_yaml'); //Yaml Tax for First Scene
        $firstSceneYAMLID = $firstSceneYAML->term_id;
    }

    $default_json = '{
	"metadata": {
		"formatVersion" : 4.0,
		"type"		    : "scene",
		"generatedBy"	: "SceneExporter.js",
		"objects"       : 1},

	"urlBaseType": "relativeToScene",

	"objects" :
	{
		"avatarYawObject" : {
			"position" : [0,0,0],
			"rotation" : [0,0,0],
			"scale"	   : [1,1,1],
			"visible"  : true,
			"children" : {
			}
		}

	}

}
';

    // Create Main Menu Scene Data
    $mainmenuSceneData = array(
        'post_title'    => $mainmenuSceneTitle,
        'post_name' => $mainmenuSceneSlug,
        'post_type' => 'wpunity_scene',
        'post_status'   => 'publish',
        'tax_input'    => array(
            'wpunity_scene_pgame'     => array( $allScenePGameID ),
            'wpunity_scene_yaml'     => array( $mainmenuSceneYAMLID ),
        ),'meta_input'   => array(
            'wpunity_scene_default' => 1,
            'wpunity_scene_metatype' => 'menu',
            'wpunity_menu_has_help' => 1,
            'wpunity_menu_has_login' => 1,
            'wpunity_menu_has_options' => 1,
        ),
    );

    // Create First Scene Data
    $firstSceneData = array(
        'post_title'    => $firstSceneTitle,
        'post_name' => $firstSceneSlug,
        'post_type' => 'wpunity_scene',
        'post_status'   => 'publish',
        'tax_input'    => array(
            'wpunity_scene_pgame'     => array( $allScenePGameID ),
            'wpunity_scene_yaml'     => array( $firstSceneYAMLID ),
        ),'meta_input'   => array(
            'wpunity_scene_default' => 1,
            'wpunity_scene_metatype' => 'scene',
            'wpunity_scene_json_input' => $default_json,
        ),
    );

    // Create Credentials Scene Data
    $credentialsSceneData = array(
        'post_title'    => $credentialsSceneTitle,
        'post_name' => $credentialsSceneSlug,
        'post_type' => 'wpunity_scene',
        'post_status'   => 'publish',
        'tax_input'    => array(
            'wpunity_scene_pgame'     => array( $allScenePGameID ),
            'wpunity_scene_yaml'     => array( $credentialsSceneYAMLID ),
        ),'meta_input'   => array(
            'wpunity_scene_default' => 1,
            'wpunity_scene_metatype' => 'credits',
        ),
    );
<commit_msg>Fixed #17 -> Project Editor: Add a short description to auto generated scenes<commit_after><?php

function wpunity_create_default_scenes_for_game($gameSlug,$gameTitle,$gameID){

    $allScenePGame = get_term_by('slug', $gameSlug, 'wpunity_scene_pgame');
    $allScenePGameID = $allScenePGame->term_id;

    $all_game_category = get_the_terms( $gameID, 'wpunity_game_type' );
    $game_category  = $all_game_category[0]->slug;

    $mainmenuSceneTitle = 'Main Menu'; //Title for Main Menu
    $mainmenuSceneSlug = $gameSlug . '-main-menu' ; //Slug for Main Menu
    $firstSceneTitle = 'First Scene'; //Title for First Menu
    $firstSceneSlug = $gameSlug . '-first-scene'; //Slug for First Menu
    $credentialsSceneTitle = 'Credits'; //Title for Credentials Menu
    $credentialsSceneSlug = $gameSlug . '-credits-scene'; //Slug for Credentials Menu

    $mainmenuSceneYAML = get_term_by('slug', 'mainmenu-yaml', 'wpunity_scene_yaml'); //Yaml Tax for Main Menu
    $mainmenuSceneYAMLID = $mainmenuSceneYAML->term_id;
    $credentialsSceneYAML = get_term_by('slug', 'credentials-yaml', 'wpunity_scene_yaml'); //Yaml Tax for Credentials Scene
    $credentialsSceneYAMLID = $credentialsSceneYAML->term_id;
    if($game_category == 'energy_games'){
        $firstSceneYAML = get_term_by('slug', 'educational-energy', 'wpunity_scene_yaml'); //Yaml Tax for First Scene
        $firstSceneYAMLID = $firstSceneYAML->term_id;
    }elseif($game_category == 'archaeology_games'){
        $firstSceneYAML = get_term_by('slug', 'wonderaround-yaml', 'wpunity_scene_yaml'); //Yaml Tax for First Scene
        $firstSceneYAMLID = $firstSceneYAML->term_id;
    }

    $default_json = '{
	"metadata": {
		"formatVersion" : 4.0,
		"type"		    : "scene",
		"generatedBy"	: "SceneExporter.js",
		"objects"       : 1},

	"urlBaseType": "relativeToScene",

	"objects" :
	{
		"avatarYawObject" : {
			"position" : [0,0,0],
			"rotation" : [0,0,0],
			"scale"	   : [1,1,1],
			"visible"  : true,
			"children" : {
			}
		}

	}

}
';

    // Create Main Menu Scene Data
    $mainmenuSceneData = array(
        'post_title'    => $mainmenuSceneTitle,
        'post_content' => 'Main Menu of the Game',
        'post_name' => $mainmenuSceneSlug,
        'post_type' => 'wpunity_scene',
        'post_status'   => 'publish',
        'tax_input'    => array(
            'wpunity_scene_pgame'     => array( $allScenePGameID ),
            'wpunity_scene_yaml'     => array( $mainmenuSceneYAMLID ),
        ),'meta_input'   => array(
            'wpunity_scene_default' => 1,
            'wpunity_scene_metatype' => 'menu',
            'wpunity_menu_has_help' => 1,
            'wpunity_menu_has_login' => 1,
            'wpunity_menu_has_options' => 1,
        ),
    );

    // Create First Scene Data
    $firstSceneData = array(
        'post_title'    => $firstSceneTitle,
        'post_content' => 'Auto-created scene',
        'post_name' => $firstSceneSlug,
        'post_type' => 'wpunity_scene',
        'post_status'   => 'publish',
        'tax_input'    => array(
            'wpunity_scene_pgame'     => array( $allScenePGameID ),
            'wpunity_scene_yaml'     => array( $firstSceneYAMLID ),
        ),'meta_input'   => array(
            'wpunity_scene_default' => 1,
            'wpunity_scene_metatype' => 'scene',
            'wpunity_scene_json_input' => $default_json,
        ),
    );

    // Create Credentials Scene Data
    $credentialsSceneData = array(
        'post_title'    => $credentialsSceneTitle,
        'post_content' => 'Credits of the Game',
        'post_name' => $credentialsSceneSlug,
        'post_type' => 'wpunity_scene',
        'post_status'   => 'publish',
        'tax_input'    => array(
            'wpunity_scene_pgame'     => array( $allScenePGameID ),
            'wpunity_scene_yaml'     => array( $credentialsSceneYAMLID ),
        ),'meta_input'   => array(
            'wpunity_scene_default' => 1,
            'wpunity_scene_metatype' => 'credits',
        ),
    );

{'fraction_non_alphanumeric': 0.14124293785310735, 'fraction_numerical': 0.005136106831022085, 'mean_word_length': 2.8445212240868707, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 87, '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': '2125996', 'n_tokens_mistral': 2742, 'n_tokens_neox': 2624, 'n_words': 465}