# sharemypost/1.0.5/main/install.php

ShareMyPost, version 1.0.5. 35 lines.

- Page: https://pluginprobe.com/plugins/sharemypost/1.0.5/code/main/install.php
- Raw: https://pluginprobe.com/plugins/sharemypost/1.0.5/raw/main/install.php
- Modified: 2026-07-13T09:56:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sharemypost/1.0.5/code/main/install.php#L10-L20`.

```php
<?php

namespace ShareMyPost;

if(!defined('ABSPATH')){
	exit;
}

class Install{

	static function activate(){
		self::default_settings();
		update_option('sharemypost_version', SHAREMYPOST_VERSION);
	}

	static function deactivate(){

	}

	static function uninstall(){
		delete_option('sharemypost_version');
		delete_option('sharemypost_settings');
	}

	static function default_settings(){

		$current_version = get_option('sharemypost_version');

		if(empty($current_version)){
			$settings = get_option('sharemypost_settings', []);
			$settings = wp_parse_args($settings, \ShareMyPost\Util::get_default_settings());
			update_option('sharemypost_settings', $settings);
		}
	}
}
```
