esc_html__( 'Performance Module', '0-day-analytics' ),
'id' => 'performance-settings-tab',
'type' => 'tab-title',
)
);
// Performance options.
Settings::build_option(
array(
'title' => \esc_html__( 'Performance options', '0-day-analytics' ),
'id' => 'performance-settings-options',
'type' => 'header',
)
);
Settings::build_option(
array(
'name' => \esc_html__( 'Enable Performance module', '0-day-analytics' ),
'id' => 'performance_module_enabled',
'type' => 'checkbox',
'hint' => \esc_html__( 'If you disable this, the Performance module will be disabled.', '0-day-analytics' ),
'default' => Settings::get_option( 'performance_module_enabled' ),
'toggle' => '#advana_performance_settings-item',
)
);
?>
\esc_html__( 'PageSpeed Insights', '0-day-analytics' ),
'id' => 'pagespeed-settings-options',
'type' => 'header',
)
);
Settings::build_option(
array(
'name' => \esc_html__( 'Google PageSpeed API Key', '0-day-analytics' ),
'id' => 'pagespeed_api_key',
'type' => 'text',
'hint' => \esc_html__( 'Enter your Google PageSpeed API key. You can obtain one from the Google Developers site. Visit ', '0-day-analytics' ) . '
' . \esc_html__( 'Google Developers site', '0-day-analytics' ) . '' . \esc_html__( ' to create and manage your API keys.', '0-day-analytics' ),
'default' => Settings::get_option( 'pagespeed_api_key' ),
)
);
// URLs settings.
Settings::build_option(
array(
'title' => \esc_html__( 'URLs', '0-day-analytics' ),
'id' => 'urls-settings-options',
'type' => 'header',
)
);
Settings::build_option(
array(
'name' => \esc_html__( 'Enable URLs module', '0-day-analytics' ),
'id' => 'urls_module_enabled',
'type' => 'checkbox',
'hint' => \esc_html__( 'Enable the URLs analysis feature. That collects all pages accessed (front-end), and you can run some analysis on them.', '0-day-analytics' ),
'default' => Settings::get_option( 'urls_module_enabled' ),
'toggle' => '#advana_urls_settings-item',
)
);
?>
\esc_html__( 'Advanced URLs Enable', '0-day-analytics' ),
'id' => 'advana_urls_enable',
'type' => 'checkbox',
'hint' => \esc_html__( 'Enable advanced URLs features. If you disable this, no new data will be collected (pages from front-end), but you can view and check existing data.', '0-day-analytics' ),
'default' => Settings::get_option( 'advana_urls_enable' ),
)
);
$schedules = \wp_get_schedules();
$options = array(
'-1' => esc_html__( 'Never', '0-day-analytics' ),
);
foreach ( $schedules as $schedule => $text ) {
$options[ $schedule ] = $text['display'];
}
Settings::build_option(
array(
'name' => \esc_html__( 'Clear URLs table every', '0-day-analytics' ),
'id' => 'advana_urls_clear',
'type' => 'select',
'options' => $options,
'default' => Settings::get_option( 'advana_urls_clear' ),
)
);
?>