Пример #1
0
function adinj_tab_debug()
{
    $ops = adinj_options();
    adinj_postbox_start(__("Debugging", 'adinj'), 'debugging');
    adinj_add_checkbox('debug_mode');
    ?>
Enable debug mode
	
	<p>If you are not sure why ads aren't appearing, or why they are appearing, enable debug mode and look at the debug information (search for 'ADINJ DEBUG') in the HTML of your content pages.</p>
	
	<?php 
    if (adinj_problem_with_wpminify_check()) {
        echo adinj_get_problem_with_wpminify_message();
    }
    adinj_debug_information();
    ?>
	
	<p></p>
	
	<p>If you want to restore all settings (excluding the ad contents) to their default values use this button.</p>
	
	<input type="submit" name="adinj_action" value="<?php 
    _e('Reset to Default', 'adinj');
    ?>
" />
	
	<p>You can delete the database settings if you are going to uninstall Ad Injection (they will be automatically deleted if you uninstall via WordPress as well).</p>
	
	<input type="submit" name="adinj_action" value="<?php 
    _e('Delete settings from DB', 'adinj');
    ?>
" />
	
	<p>This button will delete all your Ad Injection widgets.</p>
	
	<input type="submit" name="adinj_action" value="<?php 
    _e('Delete widget settings from DB', 'adinj');
    ?>
" />
	
	<?php 
    adinj_postbox_end();
}
function adinj_compatibility_checks()
{
    if (stripos($_SERVER["PHP_SELF"], 'ad-injection') !== false) {
        $wpm_options = get_option('wp_minify');
        if ($wpm_options['enable_html'] == true) {
            echo '<div id="ad-injection-error" class="error"><p><strong>';
            echo adinj_get_problem_with_wpminify_message();
            echo '</strong></p></div>';
        }
    }
}