Skip to Content

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.

Source File

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

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' => '',
                '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' => '',

                //Functions Tab
                'jquery_version' => 'wordpress',
                'bootstrap_version' => 'latest',
                'allow_bootstrap_js' => 1,
                '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,
                'device_detection' => 0,
                'service_worker' => 0,
                'adblock_detect' => 0,
                'spam_domain_prevention' => 0,
                'theme_update_notification' => 1,
                'wp_core_updates_notify' => 1,
                'plugin_update_warning' => 0,
                'unnecessary_metaboxes' => 1,
                'scss' => 0,
                'scss_processing_only_when_logged_in' => 0,
                'critical_css' => 0,
                'console_css' => 1,
                'cookie_notification' => '',

                //Analytics Tab
                'ga_tracking_id' => '',
                'gtm_id' => '',
                'ga_wpuserid' => 0,
                'ga_displayfeatures' => 0,
                'ga_linkid' => 0,
                'adwords_remarketing_conversion_id' => '',
                'google_optimize_id' => '',
                'microsoft_clarity_id' => '',
                'hostnames' => '',
                'google_search_console_verification' => '',
                'facebook_custom_audience_pixel_id' => '',
                'observe_dnt' => 0,
                'cd_gacid' => '',
                'cd_hitid' => '',
                'cd_hittime' => '',
                'cd_hittype' => '',
                'cd_hitinteractivity' => '',
                'cd_hitmethod' => '',
                'cd_savedata' => '',
                'cd_reducedmotion' => '',
                'cd_colorscheme' => '',
                'cd_offline' => '',
                'cd_devicememory' => '',
                'cd_network' => '',
                'cd_navigationtype' => '',
                'cd_redirectcount' => '',
                'cd_author' => '',
                'cd_businesshours' => '',
                'cd_categories' => '',
                'cd_tags' => '',
                'cd_contactmethod' => '',
                'cd_formtiming' => '',
                'cd_formflow' => '',
                'cd_geolocation' => '',
                'cd_geoname' => '',
                'cd_wpmllang' => '',
                'cd_geoaccuracy' => '',
                'cd_securitynote' => '',
                'cd_relativetime' => '',
                'cd_sessionid' => '',
                'cd_timestamp' => '',
                'cd_windowtype' => '',
                'cd_userid' => '',
                'cd_fbid' => '',
                'cd_role' => '',
                'cd_videowatcher' => '',
                'cd_eventintent' => '',
                'cd_woocart' => '',
                'cd_woocustomer' => '',
                'cd_weather' => '',
                'cd_temperature' => '',
                'cd_publishdate' => '',
                'cd_wordcount' => '',
                'cd_blocker' => '',
                'cd_querystring' => '',
                'cd_textfragment' => '',
                'cd_mqbreakpoint' => '',
                'cd_mqresolution' => '',
                'cd_mqorientation' => '',
                'cd_visibilitystate' => '',

                'cm_serverresponsetime' => '',
                'cm_domreadytime' => '',
                'cm_windowloadedtime' => '',
                'cm_formimpressions' => '',
                'cm_formstarts' => '',
                'cm_formsubmissions' => '',
                'cm_notabledownloads' => '',
                'cm_videoplaytime' => '',
                'cm_videostarts' => '',
                'cm_videocompletions' => '',
                'cm_autocompletesearches' => '',
                'cm_autocompletesearchclicks' => '',
                'cm_pagevisible' => '',
                'cm_pagehidden' => '',
                'cm_wordcount' => '',
                'cm_maxscroll' => '',

                //APIs Tab
                'remote_font_url' => '',
                'gcm_sender_id' => '',
                'google_server_api_key' => '',
                'google_browser_api_key' => '',
                'cse_id' => '',
                'webpagetest_api' => '',
                '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' => '',
                'google_adsense_url' => '',
                'amazon_associates_url' => '',
                'mention_url' => '',
                'logs' => 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?