'', 'default_buttons' => 1, 'selected_networks' => addshoppers_networks('default') ); } $all_networks = addshoppers_networks('all'); if (!$options['selected_networks']) $options['selected_networks'] = addshoppers_networks('default'); ?>

AddShoppers

Plugin settings

Shop ID

(Optional) Enter your shop ID if you want to track the analytics of your sharing buttons.
You can get your shop ID or sign up for one here. Go to → Settings → Shops and copy the Shop ID for your shop into the field above.

Show Floating Buttons? />

Check this box to show the default floating buttons. If you want different buttons, grab the code for the buttons you want in your AddShoppers Dashboard under Apps → Sharing Buttons. Copy and paste the code for your buttons into the desired location in your active theme.

Choose Your Social Networks $display) { ?> />

Select the networks that you want in your sharing button set.

'Facebook', 'twitter' => 'Twitter', 'google' => 'Google Plus', 'email' => 'Email', 'pinterest' => 'Pinterest', 'stumbleupon' => 'StumbleUpon', 'tumblr' => 'Tumblr', 'wanelo' => 'Wanelo', 'polyvore' => 'Polyvore', 'kaboodle' => 'Kaboodle' ); $networks['default'] = array( 'facebook', 'twitter', 'email', 'google' ); return $networks[$which]; } if ( ! function_exists( 'shop_pe_plugin_admin_validate' ) ): /** * Validates data from the form. * * @since WPShopPe 1.0 */ function shop_pe_plugin_admin_validate( $input ) { $options = get_option( 'shop_pe_options' ); if ( empty( $options ) ) { $options = array( 'shop_id' => '', 'default_buttons' => 1, 'selected_networks' => addshoppers_networks('default') ); } $message = 'Options saved.'; $type = 'updated'; if ( empty( $input ) ) { $message = 'You must provide options.'; $type = 'error'; } else { // validating shop ID $shop_id = strtolower( $input['shop_id'] ); if ( preg_match( '/^[0-9a-f]{24}$/', $shop_id ) == 0 && !empty($shop_id) ) { $message = 'Invalid Shop ID: ' . $input['shop_id']; $type = 'error'; } else { $options['shop_id'] = $shop_id; } } // default buttons $options['default_buttons'] = $input['default_buttons']; // networks to show if (empty($input['selected_networks'])) { $message = 'You must select at least 1 network for your sharing buttons. To disable the default sharing buttons, uncheck the "Show Floating Buttons?" checkbox.'; $type = 'error'; } else { $all_networks = addshoppers_networks('all'); $options['selected_networks'] = array(); foreach ($input['selected_networks'] as $network) { if (array_key_exists($network,$all_networks)) { $options['selected_networks'][] = $network; } } } add_settings_error( 'shop_pe_options', 'settings_updated', $message, $type ); return $options; } endif;