Skip to Content
Menu

default_options()

Prepare default option values

PHP June 4, 2017

Usage

This function runs automatically, so it is not called manually. Is this incorrect?

Additional Notes

The Nebula Options page is a convenient way to enable/disable Nebula functions as well as apply project-specific information like geolocation. It is entirely optional, so standard coding takes priority over the options (additionally, it can be turned off several ways too). The settings page itself can be found in the Wordpress admin under Appearance > Nebula Options. Developers can detect these settings for their functions using the Nebula Options function.

Was this page helpful? Yes No


    A feedback message is required to submit this form.


    Please check that you have entered a valid email address.

    Enter your email address if you would like a response.

    Thank you for your feedback!

    Source File

    Located in /libs/Options/Options.php on line 168.

    1 Hook

    Find these filters and actions in the source code below to hook into them. Use do_action() and add_filter() in your functions file or plugin.

    Filters
    "nebula_default_options"
    Need a new filter hook? Request one here.

    Actions
    This function has no action hooks available. Request one?

    PHP
            public function default_options(){
                $nebula_options_defaults = array(
                    'edited_yet' => 'false',
    
                    //Metadata Tab
                    'business_type' => '',
                    'site_owner' => '',
                    'contact_email' => '',
                    'notification_email' => '',
                    'force_wp_timezone' => 1,
                    'phone_number' => '',
                    'fax_number' => '',
                    'latitude' => '',
                    'longitude' => '',
                    'street_address' => '',
                    'locality' => '',
                    'region' => '',
                    'postal_code' => '',
                    'country_name' => '',
                    'business_hours_sunday_enabled' => '',
                    'business_hours_sunday_open' => '',
                    'business_hours_sunday_close' => '',
                    'business_hours_monday_enabled' => '',
                    'business_hours_monday_open' => '',
                    'business_hours_monday_close' => '',
                    'business_hours_tuesday_enabled' => '',
                    'business_hours_tuesday_open' => '',
                    'business_hours_tuesday_close' => '',
                    'business_hours_wednesday_enabled' => '',
                    'business_hours_wednesday_open' => '',
                    'business_hours_wednesday_close' => '',
                    'business_hours_thursday_enabled' => '',
                    'business_hours_thursday_open' => '',
                    'business_hours_thursday_close' => '',
                    'business_hours_friday_enabled' => '',
                    'business_hours_friday_open' => '',
                    'business_hours_friday_close' => '',
                    'business_hours_saturday_enabled' => '',
                    'business_hours_saturday_open' => '',
                    'business_hours_saturday_close' => '',
                    'business_hours_closed' => '',
                    'google_place_id' => '',
                    'facebook_url' => '',
                    'facebook_page_id' => '',
                    'facebook_admin_ids' => '',
                    'facebook_app_secret' => '',
                    'facebook_access_token' => '',
                    'twitter_username' => '',
                    'linkedin_url' => '',
                    'youtube_url' => '',
                    'instagram_url' => '',
                    'pinterest_url' => '',
                    'tiktok_url' => '',
                    'wikipedia_url' => '',
    
                    //Functions Tab
                    'jquery_location' => 'wordpress',
                    'limit_image_dimensions' => 0,
                    'jpeg_quality' => 82, //WordPress default is 90
                    'admin_bar' => 1,
                    'warnings' => 'verbose',
                    'dev_info_metabox' => 1,
                    'todo_manager_metabox' => 1,
                    'performance_metabox' => 1,
                    'design_reference_metabox' => 0,
                    'design_reference_link' => '',
                    'additional_design_references' => '',
                    'author_bios' => 0,
                    'comments' => 0,
                    'store_form_submissions' => 1,
                    'service_worker' => 0,
                    'adblock_detect' => 0,
                    'spam_domain_prevention' => 0,
                    'cf7_spam_detection_agent' => 0,
                    'cf7_spam_submission_capture' => 0,
                    'theme_update_notification' => 1,
                    'bundled_plugins_notification' => 1,
                    'wp_core_updates_notify' => 1,
                    'unnecessary_metaboxes' => 1,
                    'scss' => 0,
                    'critical_css' => 0,
                    'console_css' => 1,
                    'cookie_notification' => '',
    
                    //Analytics Tab
                    'ga_measurement_id' => '',
                    'ga_property_id' => '',
                    'gtm_id' => '',
                    'ga_api_secret' => '',
                    'ga_require_consent' => 0,
                    'ga_wpuserid' => 0,
                    'google_ads_id' => '',
                    'microsoft_advertising_id' => '',
                    'hostnames' => '',
                    'google_search_console_verification' => '',
                    'facebook_custom_audience_pixel_id' => '',
                    'observe_dnt' => 0,
                    'attribution_tracking' => 0,
    
                    //APIs Tab
                    'remote_font_url' => '',
                    'gcm_sender_id' => '',
                    'google_server_api_key' => '',
                    'google_browser_api_key' => '',
                    'index_now' => 0,
                    'index_now_key' => '',
                    'hubspot_api' => '',
                    'hubspot_portal' => '',
                    'disqus_shortname' => '',
                    'facebook_app_id' => '',
                    'twitter_consumer_key' => '',
                    'twitter_consumer_secret' => '',
                    'twitter_bearer_token' => '',
                    'instagram_user_id' => '',
                    'instagram_access_token' => '',
                    'instagram_client_id' => '',
                    'instagram_client_secret' => '',
                    'arbitrary_code_head' => '',
                    'arbitrary_code_body' => '',
                    'arbitrary_code_footer' => '',
    
                    //Administration Tab
                    'dev_ip' => '',
                    'dev_email_domain' => '',
                    'client_ip' => '',
                    'client_email_domain' => '',
                    'cpanel_url' => '',
                    'hosting_url' => '',
                    'dns_url' => '',
                    'registrar_url' => '',
                    'github_url' => '',
                    'github_pat' => '',
                    'google_adsense_url' => '',
                    'amazon_associates_url' => '',
                    'mention_url' => '',
                    'administrative_log' => 0,
                    'js_error_log' => 0,
                    'notes' => '',
    
                    //Advanced Tab
                    'dequeue_styles' => array(),
                    'dequeue_scripts' => array(),
                );
    
                return apply_filters('nebula_default_options', $nebula_options_defaults);
            }
    

    Override

    This function can not be short-circuited with an override filter. Request one?