<?php

namespace GebtBF8;
\add_action( 'init', '\GebtBF8\set_serialized_settings' );

function set_serialized_settings(){
	
	// Code Snippets Pro: code-snippets-pro/code-snippets.php
	if (\GebtBF8\is_installed('code-snippets-pro/code-snippets.php')) {
		$cspOptions = \get_option('code_snippets_settings');
		$cspOptions['general']['activate_by_default'] = 0;
		$cspOptions['general']['list_order'] = 'name-asc';
		$cspOptions['editor']['theme'] = 'base16-dark';
		$cspOptions['editor']['indent_with_tabs'] = 0;
		\update_option('code_snippets_settings',$cspOptions);
	}
	
	// Admin Columns Pro: admin-columns-pro/admin-columns-pro.php

	// MetaBox.io: meta-box/meta-box.php && meta-box-aio/meta-box-aio.php
	// meta_box_updater && meta_box_aio

	// WP Migrate DB Pro: wp-migrate-db-pro/wp-migrate-db-pro.php
	// wpmdb_settings
	
}


function is_installed($file=null){
	$installed = false;
	if (!empty($file)) {
		$all_plugins = \get_plugins();
		$installed = ( array_key_exists( $file, $all_plugins ) );
	}
	return $installed;
}

Leave a Reply

Your email address will not be published. Required fields are marked *