Exemplo n.º 1
0
 function wp_flag_check_options()
 {
     global $flag;
     require_once dirname(__FILE__) . '/flag_install.php';
     $default_options = flag_list_options();
     $flag_db_options = get_option('flag_options');
     if (function_exists('array_diff_key')) {
         $flag_new_options = array_diff_key($default_options, $flag_db_options);
     } else {
         $flag_new_options = $this->PHP4_array_diff_key($default_options, $flag_db_options);
     }
     $flag_options = array_merge($flag_db_options, $flag_new_options);
     update_option('flag_options', $flag_options);
 }
Exemplo n.º 2
0
/**
 * Setup the default option array for the gallery
 * 
 * @access internal
 * @return void
 */
function flag_default_options()
{
    global $blog_id, $flag;
    $flag_options = flag_list_options();
    // special overrides for WPMU
    if (IS_WPMU) {
        // get the site options
        $flag_wpmu_options = get_site_option('flag_options');
        // get the default value during installation
        //if (!is_array($flag_wpmu_options)) {
        //$flag_wpmu_options['galleryPath'] = 'wp-content/blogs.dir/%BLOG_ID%/files/';
        update_site_option('flag_options', $flag_wpmu_options);
        //}
        //$flag_options['galleryPath']  		= str_replace("%BLOG_ID%", $blog_id , $flag_wpmu_options['galleryPath']);
    }
    update_option('flag_options', $flag_options);
}