function install_AAPL()
{
    //This is called when the plugin is activated.
    if (strcmp(get_option('AAPL_content_id'), '') == 0) {
        update_option('AAPL_content_id', 'content');
    }
    if (strcmp(get_option('AAPL_search_class'), '') == 0) {
        update_option('AAPL_search_class', 'searchform');
    }
    if (strcmp(get_option('AAPL_version'), '') == 0) {
        update_option('AAPL_version', AAPL_get_version());
    }
    if (strcmp(get_option('AAPL_loading_img'), '') == 0) {
        update_option('AAPL_loading_img', 'WordPress Ball Spin.gif');
    }
    if (strcmp(get_option('AAPL_js_debug'), '') == 0) {
        update_option('AAPL_js_debug', 'false');
    }
    if (strcmp(get_option('AAPL_sponsor'), '') == 0) {
        update_option('AAPL_sponsor', 'false');
    }
    if (strcmp(get_option('AAPL_commercial'), '') == 0) {
        update_option('AAPL_commercial', 'false');
    }
    if (strcmp(get_option('AAPL_jquery_check'), '') == 0) {
        update_option('AAPL_jquery_check', 'false');
    }
    if (strcmp(get_option('AAPL_track_analytics'), '') == 0) {
        update_option('AAPL_track_analytics', 'false');
    }
    if (strcmp(get_option('AAPL_scroll_top'), '') == 0) {
        update_option('AAPL_scroll_top', 'true');
    }
    if (strcmp(get_option('AAPL_reload_code'), '') == 0) {
        update_option('AAPL_reload_code', '');
    }
    if (strcmp(get_option('AAPL_data_code'), '') == 0) {
        /* eag */
        update_option('AAPL_data_code', '');
        /* eag */
    }
    /* eag */
    if (strcmp(get_option('AAPL_click_code'), '') == 0) {
        $data = '// highlight the current menu item' . "\n" . 'jQuery(\'ul.menu li\').each(function() {' . "\n\t" . 'jQuery(this).removeClass(\'current-menu-item\');' . "\n" . '});' . "\n" . 'jQuery(thiss).parents(\'li\').addClass(\'current-menu-item\');';
        update_option('AAPL_click_code', $data);
    }
    if (strcmp(get_option('AAPL_loading_code'), '') == 0) {
        $data = '<center>' . "\n\t" . '<p style="text-align: center !important;">Loading... Please Wait...</p>' . "\n\t" . '<p style="text-align: center !important;">' . "\n\t\t" . '<img src="{loader}" border="0" alt="Loading Image" title="Please Wait..." />' . "\n\t" . '</p>' . "\n" . '</center>';
        update_option('AAPL_loading_code', $data);
    }
    if (strcmp(get_option('AAPL_loading_error_code'), '') == 0) {
        $data = '<center>' . "\n\t" . '<p style="text-align: center !important;">Error!</p>' . "\n\t" . '<p style="text-align: center !important;">' . "\n\t\t" . '<font color="red">There was a problem and the page didnt load.</font>' . "\n\t" . '</p>' . "\n" . '</center>';
        update_option('AAPL_loading_error_code', $data);
    }
    if (strcmp(get_option('AAPL_ignore_list'), '') == 0) {
        update_option('AAPL_ignore_list', "#, /wp-, .pdf, .zip, .rar");
    }
    //copy ajax loading images across.
    if (!file_exists($GLOBALS['AAPLimages'])) {
        mkdir($GLOBALS['AAPLimages'], 0777);
    }
    AAPL_rcopy(plugin_dir_path(__FILE__) . 'loaders', $GLOBALS['AAPLimages'] . '/loaders');
}
Esempio n. 2
0
		padding:10px;
	}
	.aaplblue {
		border:1px solid #4b80d1;
		background-color: #dbe9ff;
		border-radius:8px;
		padding:10px;
	}
	h3 {
		padding:0px;
		margin:0px 0px 10px 0px;
	}
</style>
<div class="wrap">
	<h2>Advanced Ajax Page Loader <?php 
echo AAPL_get_version();
?>
 - FREE VERSION</h2>
	<br><br>
	<div class="aaplwelcome">
		<h3>Thanks for downloading AAPL!</h3>
		If this is your first time using the plug-in then please enable <b>DEBUG</b> mode below, it will help you setup this plug-in to work with your theme, we have a forum and dedicated support ticketing for any issues on our <a href="http://ajaxpageloader.com" target="_blank">Ajax Page Loader Website</a>.
		
	</div>
	<br>
	<table style="width:100%">
		<tr>
			<td>
				<div class="aaplblue">
					<?php 
/*<img style="float:right;margin:0px 10px 10px 10px" src="http://www.eelanmedia.com/wp-content/uploads/2014/01/Paypal-Buy-Now-button.png" />