Skip to content

Commit 39c836d

Browse files
committed
Theme options fix to credits
1 parent aed8075 commit 39c836d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

theme-options.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$sa_options = array(
55
'social_buttons' => false,
66
'sidebar_feed' => true,
7-
'credits' => true,
7+
'credits_footer' => true,
88
'compact_homepage' => false,
99
'nav_view' => 'pills',
1010
'iubenda_id' => '',
@@ -135,8 +135,8 @@ function sa_theme_options_page() {
135135
<tr valign="top"><th scope="row">Credits</th>
136136
<td>
137137
<p>
138-
<input type="checkbox" id="credits" name="sa_options[credits]" value="1" <?php checked( true, $settings['credits'] ); ?> />
139-
<label for="credits">Enable the credits on the footer</label>
138+
<input type="checkbox" id="credits_footer" name="sa_options[credits_footer]" value="1" <?php checked( true, $settings['credits_footer'] ); ?> />
139+
<label for="credits_footer">Enable the credits on the footer</label>
140140
</p>
141141
</td>
142142
</tr>
@@ -164,10 +164,10 @@ function sa_validate_options( $input ) {
164164
$input['social_buttons'] = ( $input['social_buttons'] == 1 ? 1 : 0 );
165165

166166
// If the checkbox has not been checked, we void it
167-
if ( ! isset( $input['credits'] ) )
168-
$input['credits'] = null;
167+
if ( ! isset( $input['credits_footer'] ) )
168+
$input['credits_footer'] = null;
169169
// We verify if the input is a boolean value
170-
$input['credits'] = ( $input['credits'] == 1 ? 1 : 0 );
170+
$input['credits_footer'] = ( $input['credits_footer'] == 1 ? 1 : 0 );
171171

172172
// If the checkbox has not been checked, we void it
173173
if ( ! isset( $input['sidebar_feed'] ) )

0 commit comments

Comments
 (0)