array( 'value' => '0', 'label' => __( 'Zero', 'socialite' ) ), '1' => array( 'value' => '1', 'label' => __( 'One', 'socialite' ) ), '2' => array( 'value' => '2', 'label' => __( 'Two', 'socialite' ) ), '3' => array( 'value' => '3', 'label' => __( 'Three', 'socialite' ) ), '4' => array( 'value' => '4', 'label' => __( 'Four', 'socialite' ) ), '5' => array( 'value' => '5', 'label' => __( 'Five', 'socialite' ) ) ); return apply_filters( 'socialite_sample_select_options', $sample_select_options ); } /** * Returns an array of sample radio options registered for Socialite. * * @since Socialite 1.0 */ function socialite_sample_radio_buttons() { $sample_radio_buttons = array( 'yes' => array( 'value' => 'yes', 'label' => __( 'Yes', 'socialite' ) ), 'no' => array( 'value' => 'no', 'label' => __( 'No', 'socialite' ) ), 'maybe' => array( 'value' => 'maybe', 'label' => __( 'Maybe', 'socialite' ) ) ); return apply_filters( 'socialite_sample_radio_buttons', $sample_radio_buttons ); } /** * Returns the options array for Socialite. * * @since Socialite 1.0 */ function socialite_get_theme_options() { $saved = (array) get_option( 'socialite_theme_options' ); $defaults = array( 'sample_checkbox' => 'off', 'sample_text_input' => '', 'sample_select_options' => '', 'sample_radio_buttons' => '', 'sample_textarea' => '', ); $defaults = apply_filters( 'socialite_default_theme_options', $defaults ); $options = wp_parse_args( $saved, $defaults ); $options = array_intersect_key( $options, $defaults ); return $options; } /** * Renders the sample checkbox setting field. */ function socialite_settings_field_sample_checkbox() { $options = socialite_get_theme_options(); ?>