<?php
function ds1_mf_init_settings() {
    return [
    	'ds1_dev_info' 	=> [
    		'dev_name' 	=> 'Right Mind',
    		'dev_url' 	=> 'https://r-m.dev',
    		'website_id'=> 'def',
    		'message' 	=> '',
    	],
		'remove_meta_boxes_editor' => [2],

    	'reg_post_types' => [
    		[
    			'key' 		=> 'real-estate',
    			'name' 		=> 'Real Estate',
    			'menu_icon' => 'dashicons-admin-multisite',
    			'rewrite' 	=> array('slug' => 'real-estate/%locations%', 'with_front' => false),
    			'supports' 	=> array('title', "editor", 'thumbnail'),
    			'description'=> "Projects available for sale of any kind, whether commercial, administrative, residential or coastal, and fully sold projects can be added, but their construction has not been completed. \n <br> المشروعات المتاحة للبيع أيا كان نوعها سواء تجارية أو ادارية او سكنية أو ساحلية، كما يمكن اضافة المشروعات المباعة بالكامل ولكن لم يتم الانتهاء من بناءها ",
    		],
    		[
    			'key' 		=> 'previous-projects',
    			'name' 		=> 'Previous projects',
    			'menu_icon' => 'dashicons-admin-multisite',
    			'rewrite' 	=> array('slug' => 'previous-projects', 'with_front' => false),
    			'supports' 	=> array('title', "editor", 'thumbnail'),
    			'description'=> "Projects that have already been completed and sold, including construction specifications, photos of the property, delivery data, an overview of the handover ceremony and... \n <br> المشروعات التى تم الانتهاء من بناءها وبيعها بالفعل، ويشمل مواصفات البناء وصور من العقار وبيانات التسليم ونبذة عن حفل التسليم و...",
    		],
    		[
    			'key' 		=> 'follow-projects',
    			'name' 		=> 'Under Constructions',
    			'menu_icon' => 'dashicons-admin-multisite',
    			'rewrite' 	=> array('slug' => 'under-constructions', 'with_front' => false),
    			'supports' 	=> array('title', "editor", 'thumbnail'),
    			'description'=> "..",
    		],
    // 		[
    // 			'key' 		=> 're-units',
    // 			'name' 		=> 'Project units',
    // 			'menu_icon' => 'dashicons-admin-multisite',
    // 			'rewrite' 	=> array('slug' => 'real-estate-units', 'with_front' => false),
    // 			'supports' 	=> array('title', "editor", 'thumbnail'),
    // 			'description'=> "",
    // 		],
    	],
    	'reg_taxonomy' => [
    		[
    			'key' 		=> 'locations',
    			'name' 		=> 'Locations',
    			'rewrite' 	=> array('slug' => 'real-estate' ),
    			'ptypes' 	=> ['real-estate', 'follow-projects', 'previous-projects'],
    		],
    		[
    			'key' 		=> 'types',
    			'name' 		=> 'Types',
    			//'rewrite' 	=> array('slug' => 'real-estate' ),
    			'ptypes' 	=> ['real-estate', 're-units', 'follow-projects', 'previous-projects'],
    		],
    		[
    			'key' 		=> 'ct_template_custom_tt',
    			'name' 		=> 'Template custom Types',
    			//'rewrite' 	=> array('slug' => 'real-estate' ),
    			'ptypes' 	=> ['ct_template'],
    		],
    	],
    	'modif_post_permalink'=> [
    		[
    			'slug'		=>'%locations%',
    			'taxonomy'	=>'locations',
    		]
    	],


    	// 'change_admin_area' => true,
    	// 'change_admin_area_advanced' => false,
    	'remove_dashboard_meta_items' => [
    		['aioseo-overview', 'dashboard', 'normal'],
    		['wpseo-dashboard-overview', 'dashboard', 'normal']
    	],
    	'remove_meta_boxes_items' => [
    		['commentstatusdiv',['page','post',],'normal'],
    		['commentsdiv',['page', 'post',],'normal'],
    		['authordiv',['page', 'post',],'normal'],
    		// ['pageparentdiv',['page',],'normal'],
    		// ['postimagediv',['page',],'normal'],
    	],
    	
    	'admin_menu_elements_list' => [
            'remove_menu' => [
                'all' => [
                    'edit-comments.php',
                    'hfcm-list',
                ],
                'not_support' => [
					'limit-login-attempts',
				],
                'not_admin' => [
                    'tools.php',
                    'elementor',
                    'ct_dashboard_page',
                    'edit.php?post_type=elementor_library',
                    'edit.php?post_type=acf-field-group',
                    'upload.php',
                    'mlang',
                    'wpseo_dashboard',
                    'wpseo_workouts',
                ],
            ],
            
            'remove_submenu' => [
                'all' => [
                    ['parent' => 'elementor', 'slug' => 'go_elementor_pro'],
                    ['parent' => 'elementor', 'slug' => 'elementor-apps'],
                    ['parent' => 'elementor', 'slug' => 'go_knowledge_base_site'],
                    ['parent' => 'edit.php', 'slug' => 'post-new.php'],
                    ['parent' => 'edit.php?post_type=page', 'slug' => 'post-new.php?post_type=page'],
                    ['parent' => 'users.php', 'slug' => 'user-new.php'],
                    ['parent' => 'users.php', 'slug' => 'profile.php'],
                    ['parent' => 'options-general.php', 'slug' => 'options-privacy.php'],
                    ['parent' => 'options-general.php', 'slug' => 'mlcf7pll-plugin-settings'],
                    ['parent' => 'cfdb7-list.php', 'slug' => 'cfdb7-extensions'],
                ],
                'not_support' => [
					['parent' => 'options-general.php', 'slug' => 'mainwp_child_tab'],
					['parent' => 'options-general.php', 'slug' => 'akismet-key-config'],
					['parent' => 'options-general.php', 'slug' => 'cfturnstile'],
                    ['parent' => 'options-general.php', 'slug' => 'options-reading.php'],
                    ['parent' => 'options-general.php', 'slug' => 'options-writing.php'],
                    ['parent' => 'options-general.php', 'slug' => 'options-privacy.php'],
                    ['parent' => 'options-general.php', 'slug' => 'settings-user-role-editor.php'],
                ],
                'not_admin' => [
                    ['parent' => 'options-general.php', 'slug' => 'options-discussion.php'],
                    ['parent' => 'options-general.php', 'slug' => 'options-media.php'],
                ],
				
            ],
            'add_menu' => [
                'all' => [
                    ['title' => 'SEO', 'menu' => 'SEO', 'cap' => 'wpseo_manage_options', 'slug' => 'admin.php?page=wpseo_dashboard', 'icon' => 'dashicons-edit', 'pos' => 20, 'callback' => ''],
                    ['title' => 'Code Snippets', 'menu' => 'Code Snippets', 'cap' => 'edit_pages', 'slug' => 'admin.php?page=hfcm-list', 'icon' => 'dashicons-media-code', 'pos' => 20, 'callback' => ''],
                    ['title' => 'Support', 'menu' => 'Support', 'cap' => 'edit_pages', 'slug' => 'rm_main_support', 'icon' => 'dashicons-editor-help', 'pos' => 999, 'callback' => 'rm_main_support_service'],
                    // ['title' => 'More Control items', 'menu' => 'More Control items', 'cap' => 'edit_pages', 'slug' => '#show-more-items', 'icon' => 'dashicons-edit', 'pos' => 1000, 'callback' => ''],
                    ['title' => 'General', 'menu' => 'General', 'cap' => 'read', 'slug' => '#menu-section-title-general-1', 'icon' => 'dashicons-edit', 'pos' => 1, 'callback' => ''],
                    ['title' => 'Content', 'menu' => 'Content', 'cap' => 'read', 'slug' => '#menu-section-title-general-content', 'icon' => 'dashicons-edit', 'pos' => 2, 'callback' => ''],
                    ['title' => 'Manage', 'menu' => 'Manage', 'cap' => 'read', 'slug' => '#menu-section-title-general-manage', 'icon' => 'dashicons-edit', 'pos' => 3, 'callback' => ''],
                    ['title' => 'Settings', 'menu' => 'Settings', 'cap' => 'read', 'slug' => '#menu-section-title-general-settings', 'icon' => 'dashicons-edit', 'pos' => 3, 'callback' => ''],
                    ['title' => 'Advanced', 'menu' => 'Advanced', 'cap' => 'read', 'slug' => '#menu-section-title-general-advanced', 'icon' => 'dashicons-edit', 'pos' => 3, 'callback' => ''],
                ],
            ],
            'add_submenu' => [
                'all' => [
                    [ 'title' => 'Search Appearance', 'parent' => 'admin.php?page=wpseo_dashboard','menu' => 'Search Appearance', 'cap' => 'wpseo_manage_options', 'slug' => 'admin.php?page=wpseo_titles', 'callback' => '','pos' 	=> 1],
                    [ 'title' => 'Social','parent' => 'admin.php?page=wpseo_dashboard',  'menu' => 'Social', 'cap' => 'wpseo_manage_options', 'slug' => 'admin.php?page=wpseo_social', 'callback' => '','pos' 	=> 1],
                    [ 'title' => 'Tools','parent' => 'admin.php?page=wpseo_dashboard',  'menu' => 'Tools', 'cap' => 'wpseo_manage_options', 'slug' => 'admin.php?page=wpseo_tools', 'callback' => '','pos' 	=> 1],
                ],
            ],
        ],
    	'admin_bar_elements' => [
    		[
    			'for' 	=> 'all',
    			'type' 	=> 'remove',
    			'id' 	=> 'search',
    		],
			[
    			'for' 	=> 'all',
    			'type' 	=> 'remove',
    			'id' 	=> 'llar-root',
    		],
    		[
    			'for' 	=> 'admin_only',
    			'type' 	=> 'remove',
    			'id' 	=> 'updates',
    		],
    		// [
    		// 	'for' 	=> 'admin_only',
    		// 	'type' 	=> 'add',
    		// 	'id' 	=> 'screen-xx',
    		// 	'title' => '..',
    		// 	'href' 	=> '#',
    		// 	'parent'=> 'user-actions',
    		// ],
    		[
    			'for' 	=> 'all',
    			'type' 	=> 'remove',
    			'id' 	=> 'site-editor',
    		],
    		[
    			'for' 	=> 'all',
    			'type' 	=> 'remove',
    			'id' 	=> 'new-content',
    		],
    		/*[
    			'for' 	=> 'all',
    			'type' 	=> 'remove',
    			'id' 	=> 'site-name',
    		],*/
    		[
    			'for' 	=> 'all',
    			'type' 	=> 'remove',
    			'id' 	=> 'wpseo-menu',
    		],
    		[
    			'for' 	=> 'all',
    			'type' 	=> 'remove',
    			'id' 	=> 'aioseo-main',
    		],
    		[
    			'for' 	=> 'all',
    			'type' 	=> 'remove',
    			'id' 	=> 'monsterinsights_frontend_button',
    		],
    	],
    	'admin_menu_order' => [
            '#menu-section-title-general-1',
    		'index.php',
    		'cfdb7-list.php',
     		'contact-info',
            '#menu-section-title-general-content',
    		'edit.php?post_type=real-estate',
    		'edit.php?post_type=re-units',
    		'edit.php?post_type=previous-projects',
    		'edit.php?post_type=follow-projects',
    		'edit.php',
    		'edit.php?post_type=events',
    		'edit.php?post_type=page',
            '#menu-section-title-general-manage',
    		'users.php',
    		'upload.php',
    		'edit-comments.php',
            '#menu-section-title-general-settings',
    		'admin.php?page=hfcm-list',
    		'options-general.php',
    		'link-manager.php',
    		'themes.php',
			'elementor',
			'edit.php?post_type=elementor_library',
            '#menu-section-title-general-advanced',
            'admin.php?page=wpcf7',
    		'plugins.php',
     		'tools.php',
   			'edit.php?post_type=acf-field-group',
     		'limit-login-attempts',
    		'add_init_func_data',
    		'rm_main_support',
    	],

		// 'sync_meta_items_real_estate' => [
		// 	''
		// ],
    	// 'contact_f_dequeue' 	=> true,
    	'remove_feed_links' 	=> true,
    	'load_ds1_breadcrumb' 	=> false,
    	'init_frontend_js'      => true,
    	'count_post_views' 	    => false,
    	'stop_empty_trash' 	    => false,
    	'allow_html_in_terms' 	=> true,
    	'polylang_slug' 	    => false,

    	'types_table_columns' => [
    		[
    			'post_type' => 'real-estate',
    			'cols' => [
    				[
    					'id' 	=> 'location',
    					'title' => 'Locations',
    					'q_type'=> 'terms',
    					'q_id' 	=> 'locations',
    				],
    				[
    					'id' 	=> 'last_modified',
    					'title' => 'Last modified',
    					'q_type'=> 'modified_date',
    					'q_id' 	=> 'last_modified',
    				],
    				[
    					'id' 	=> 'image',
    					'title' => 'Cover',
    					'q_type'=> 'image',
    					'q_id' 	=> 'image',
    				],
    			],
    		],
			[
    			'post_type' => 'previous-projects',
    			'cols' => [
    				[
    					'id' 	=> 'image',
    					'title' => 'Cover',
    					'q_type'=> 'image',
    					'q_id' 	=> 'image',
    				],
    			],
    		],
			[
    			'post_type' => 'follow-projects',
    			'cols' => [
    				[
    					'id' 	=> 'image',
    					'title' => 'Cover',
    					'q_type'=> 'image',
    					'q_id' 	=> 'image',
    				],
    			],
    		],
    	],

    	'elements_tiny_mce' 	=> true,
    	'elements_filter_date' 	=> false,

    	'elements_filter_taxonomy' => [
    		[
    			'post_type' 	=> 'real-estate',
    			'taxonomy_names'=> ['locations', 'types'],
    		],
    		[
    			'post_type' 	=> 'ct_template',
    			'taxonomy_names'=> ['ct_template_custom_tt'],
    		],
    	],
    	'elements_filter_more' => [
    		// [
    		// 	'post_type' => 'real-estate',
    		// 	'q_type' 	=> 'meta_query',
    		// 	'title' 	=> 'Status',
    		// 	'key' 		=> 'status',
    		// 	'val_type' 	=> 'field_key',
    		// 	'field_key' => 'field_5f85ce8eca1dd',
    		// 	'def_data' 	=> [
    		// 		'waiting' 		=> 'Not yet',
    		// 		'waiting_seen' 	=> 'Not yet but Seen',
    		// 		'ok' => 'Ok',
    		// 		'no' => 'Refusal',
    		// 	],
    		// ],
    	],

    	'contact_f_country_list' => true,
    	'contact_f_valid_tel' => false,
    	'contact_f_honeypot' => true,

    	'ds1_change_jquery' => true,
    	'redirect_all_404s' => false,
    	'users_add_more_cols' => false,
    	'ds1_social_tags' => false,
    	'support_page'        => true,
    	// 'contact_f_country_blocker' => false,
    	
    	'rmbookmark'        => true,
    	
    	'allow_re_search' => true,
    
    	'custom_login_page'=> true,
    ];

}