Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions inc/theme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ public function theme_options_page_init() {
// 'theme-options-admin' // page
// );

add_settings_section(
'theme_options_setting_section_ga', // id
esc_html__( 'Google Analytics', 'okfnwp' ), // title
array( $this, 'theme_options_section_ga' ), // callback
'theme-options-admin' // page
);

add_settings_section(
'theme_options_setting_section_social', // id
esc_html__( 'Social Media', 'okfnwp' ), // title
Expand Down Expand Up @@ -97,14 +90,6 @@ public function theme_options_page_init() {
// 'theme_options_setting_section_mailing' // section
// );

add_settings_field(
'okfnwp_ga_id', // id
esc_html__( 'Google Analytics Tracking ID', 'okfnwp' ), // title
array( $this, 'okfnwp_ga_id_callback' ), // callback
'theme-options-admin', // page
'theme_options_setting_section_ga' // section
);

add_settings_field(
'okfnwp_twitter_id', // id
esc_html__( 'Twitter Handle', 'okfnwp' ), // title
Expand Down Expand Up @@ -199,10 +184,6 @@ public function theme_options_sanitize( $input ) {
// $sanitary_values['okfnwp_mailinglist_id'] = sanitize_text_field($input['okfnwp_mailinglist_id']);
// }

if ( isset( $input['okfnwp_ga_id'] ) ) {
$sanitary_values['okfnwp_ga_id'] = sanitize_text_field( $input['okfnwp_ga_id'] );
}

if ( isset( $input['okfnwp_twitter_id'] ) ) {
$sanitary_values['okfnwp_twitter_id'] = sanitize_text_field( $input['okfnwp_twitter_id'] );
}
Expand Down Expand Up @@ -246,10 +227,6 @@ public function theme_options_sanitize( $input ) {
//
// }

public function theme_options_section_ga() {

}

public function theme_options_section_social() {

}
Expand Down Expand Up @@ -294,19 +271,6 @@ public function theme_options_section_cta() {}
// _e('<p>For the list at http://lists.okfn.org/mailman/subscribe/XYZ, this should be XYZ</p>');
// }

public function okfnwp_ga_id_callback() {
if (isset($this->theme_options['okfnwp_ga_id'])):
$current_val = $this->theme_options['okfnwp_ga_id'];
else:
$current_val = '';
endif;

printf( '<input class="regular-text" type="text" name="theme_options_option_name[okfnwp_ga_id]" id="okfnwp_ga_id" value="%s">', isset( $current_val ) ? esc_attr( $current_val ) : '' );
?>
<p><?php esc_html_e( 'Google Analytics tracking ID for current website' ); ?></p>
<?php
}

public function okfnwp_twitter_id_callback() {
if (isset($this->theme_options['okfnwp_twitter_id'])):
$current_val = $this->theme_options['okfnwp_twitter_id'];
Expand Down