예제 #1
0
function mt_get_plugin_options($is_current = false)
{
    $saved = (array) get_option('maintenance_options');
    if (!$is_current) {
        $options = wp_parse_args(get_option('maintenance_options', array()), mt_get_default_array());
    } else {
        $options = $saved;
    }
    return $options;
}
예제 #2
0
function mt_get_plugin_options($is_current = false)
{
    $saved = (array) get_option('maintenance_options');
    if (!$is_current) {
        $defaults = mt_get_default_array();
        $defaults = apply_filters('mt_plugin_default_options', $defaults);
        $options = wp_parse_args($saved, $defaults);
        $options = array_intersect_key($options, $defaults);
    } else {
        $options = $saved;
    }
    return $options;
}