Example #1
0
/**
 * Returns the given Tarski option.
 *
 * @since 1.4
 *
 * @uses get_raw_tarski_option
 *
 * @param string $name
 * @return mixed
 */
function get_tarski_option($name)
{
    global $tarski_options;
    $opt = get_raw_tarski_option($name);
    return is_numeric($tarski_options->deleted) ? $tarski_options->defaults[$name] : $opt;
}
Example #2
0
            <?php 
tarski_options_fn_block('tarski_miscellaneous_options', __('Miscellaneous Options', 'tarski'));
?>
            <p><input type="submit" class="button-primary" name="submit" value="<?php 
_e('Save Options', 'tarski');
?>
" /></p>
        </div>
        
        <div class="secondary">
            <?php 
tarski_options_block('sidebar_options', __('Sidebar Options', 'tarski'));
?>
        </div>
    </form>
    
    <?php 
if (get_option('tarski_options') && !is_numeric(get_raw_tarski_option('deleted'))) {
    ?>
        <div class="secondary">
            <?php 
    tarski_options_block('reset_options', __('Reset Options', 'tarski'));
    ?>
        </div>
    <?php 
}
?>
    
    <div class="clearer"></div>
</div>
Example #3
0
<?php

if (is_numeric(get_raw_tarski_option('deleted'))) {
    ?>
    <div class="updated fade below-h2">
        <form action="<?php 
    echo admin_url('admin-post.php?action=restore_tarski_options');
    ?>
" method="post">
            <?php 
    wp_nonce_field('admin_post_restore_tarski_options', '_wpnonce_restore_tarski_options');
    ?>
            <input type="hidden" name="restore_options" value="1" />
            <p><?php 
    _e('You have deleted your Tarski options.', 'tarski');
    ?>
 <input class="button" type="submit" name="submit" value="<?php 
    _e('Restore Tarski Options &raquo;', 'tarski');
    ?>
" /></p>
        </form>
    </div>
<?php 
}