<commit_before><?php

	class Akvo{
		
		public $header_options;
		public $search_flag = true;
		
		
		function __construct(){
		
			// get header options
			$this->header_options = get_option('sage_header_options');
			
			if( ! is_array( $this->header_options ) ){
				
				$this->header_options = array();
				
			}
			
			// get search is enabled/disabled
			if($this->header_options && isset($this->header_options['hide_search']) && $this->header_options['hide_search']){
				$this->search_flag = false;
			}
			
			if($this->header_options && !isset($this->header_options['search_text'])){
				
				$this->header_options['search_text'] = "Search " . get_bloginfo("name");
				
			}
			
			/* CUSTOM IMAGE SIZES */
			add_action( 'after_setup_theme', function(){
		
				add_image_size( 'thumb-small', 224, 126, true ); // Hard crop to exact dimensions (crops sides or top and bottom)
    			add_image_size( 'thumb-medium', 320, 180, true ); 
    			add_image_size( 'thumb-large', 640, 360, true );
    			add_image_size( 'thumb-xlarge', 960, 540, true );
		
			} );
			
			/* SUPPORT LINK */
			add_action( 'admin_notices', function(){
				include "templates/support.php";
			} );
	
			/* REMOVE SUPPORT LINK */
			add_filter( 'contextual_help', function($old_help, $screen_id, $screen){
				$screen->remove_help_tabs();
    			return $old_help;
			}, 999, 3 );
	
	
			// REMOVE LINKS FROM TOP ADMIN BAR
			add_action( 'admin_bar_menu', function( $wp_admin_bar ) {
				// REMOVE LOGO
				$wp_admin_bar->remove_node( 'wp-logo' );
				$wp_admin_bar->remove_node( 'new-post' );
		
				$wp_admin_bar->add_node(  array(
					'id'    => 'akvo-sites-support',
					'title' => 'Support',
					'href'  => 'http://sitessupport.akvo.org',
					'meta'  => array( 'class' => 'my-toolbar-page' )
				) );
			}, 999 );
			
		}
		
		function selected_fonts(){
			
			// GET FONTS SELECTED THROUGH CUSTOMIZE
			$custom_akvo_fonts = array(
				'body'	=>  get_theme_mod('akvo_font'),
				'nav'	=> 	get_theme_mod('akvo_font_nav'),
				'head'	=> 	get_theme_mod('akvo_font_head')
			);
		
			$font_face = array();
		
			foreach( $custom_akvo_fonts as $font ){
				// CHECK IF FONT IS EMPTY
				if( count($font) ){
					$font_face[] = $font;
				}
			<commit_msg>[#318] - remove dashboard items<commit_after><?php

	class Akvo{
		
		public $header_options;
		public $search_flag = true;
		
		
		function __construct(){
		
			
			$this->init_header_options();
			
			
			
			add_action( 'after_setup_theme', array( $this, 'custom_image_sizes' ) );
			
			
			
			/* SUPPORT LINK */
			add_action( 'admin_notices', function(){
				include "templates/support.php";
			} );
	
			/* REMOVE SUPPORT LINK */
			add_filter( 'contextual_help', function($old_help, $screen_id, $screen){
				$screen->remove_help_tabs();
    			return $old_help;
			}, 999, 3 );
	
	
			// REMOVE LINKS FROM TOP ADMIN BAR
			add_action( 'admin_bar_menu', function( $wp_admin_bar ) {
				// REMOVE LOGO
				$wp_admin_bar->remove_node( 'wp-logo' );
				$wp_admin_bar->remove_node( 'new-post' );
		
				$wp_admin_bar->add_node(  array(
					'id'    => 'akvo-sites-support',
					'title' => 'Support',
					'href'  => 'http://sitessupport.akvo.org',
					'meta'  => array( 'class' => 'my-toolbar-page' )
				) );
			}, 999 );
			
			
			add_action( 'wp_dashboard_setup', array( $this, 'remove_dashboard_items' ) );
			
			

			
		}
		
		function init_header_options(){
			
			// get header options
			$this->header_options = get_option('sage_header_options');
			
			if( ! is_array( $this->header_options ) ){
				
				$this->header_options = array();
				
			}
			
			// get search is enabled/disabled
			if($this->header_options && isset($this->header_options['hide_search']) && $this->header_options['hide_search']){
				$this->search_flag = false;
			}
			
			if($this->header_options && !isset($this->header_options['search_text'])){
				
				$this->header_options['search_text'] = "Search " . get_bloginfo("name");
				
			}
			
		}
		
		/* CUSTOM IMAGE SIZES */
		function custom_image_sizes(){
			add_image_size( 'thumb-small', 224, 126, true ); // Hard crop to exact dimensions (crops sides or top and bottom)
    		add_image_size( 'thumb-medium', 320, 180, true ); 
    		add_image_size( 'thumb-large', 640, 360, true );
    		add_image_size( 'thumb-xlarge', 960, 540, true );
		}
		
		function remove_dashboard_items(){
			global $wp_meta_boxes;
 
	    	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
    		unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
    		//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    		unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
    		//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);
    		//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
    		unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    		unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
    		unset($wp_meta_boxes['dashboard']['normal']['core']['tribe_dashboard_widget']);
		}
		
		function selected_fonts(){
			
			// GET FONTS SELECTED THROUGH CUSTOMIZE
			$custom_akvo_fonts = array(
				'body'	=>  get_theme_mod('akvo_font'),
				'nav'	=> 	get_theme_mod('akvo_font_nav'),
				'head'	=> 	get_theme_mod('akvo_font_head')
			);
		
			$font_face = array();
		
			foreach( $custom_akvo_fonts as $font ){
				// CHECK IF FONT IS EMPTY
				if( count($font) ){
					$font_face[] = $font;
				}
			
{'fraction_non_alphanumeric': 0.16887298747763865, 'fraction_numerical': 0.011627906976744186, 'mean_word_length': 3.2744648318042815, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 48, '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': '4228690', 'n_tokens_mistral': 2453, 'n_tokens_neox': 1940, 'n_words': 328}