# insert-html-snippet/1.0/admin/install.php

Insert Html Snippet, version 1.0. 27 lines.

- Page: https://pluginprobe.com/plugins/insert-html-snippet/1.0/code/admin/install.php
- Raw: https://pluginprobe.com/plugins/insert-html-snippet/1.0/raw/admin/install.php
- Modified: 2012-08-16T05:32:28+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/insert-html-snippet/1.0/code/admin/install.php#L10-L20`.

```php
<?php

function xyz_ihs_install(){
	
	global $wpdb;
	//global $current_user; get_currentuserinfo();
	
	
	if(get_option('xyz_credit_link') == "")
	{
			add_option("xyz_credit_link",0);
	}

	add_option('xyz_ihs_limit',20);
	
			$queryInsertHtml = "CREATE TABLE IF NOT EXISTS  ".$wpdb->prefix."xyz_ihs_short_code (
			  `id` int NOT NULL AUTO_INCREMENT,
				  `title` varchar(1000) COLLATE utf8_unicode_ci NOT NULL,
				  `content` longtext COLLATE utf8_unicode_ci NOT NULL,
				  `short_code` varchar(2000) COLLATE utf8_unicode_ci NOT NULL,
				  `status` int NOT NULL,
				  PRIMARY KEY (`id`)
				) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
			$wpdb->query($queryInsertHtml);
}

register_activation_hook(XYZ_INSERT_HTML_PLUGIN_FILE,'xyz_ihs_install');
```
