ArtistPress Settings:

'yes', 'artist_phone' => 'yes', 'artist_phone_link' => 'no', 'artist_email' => 'yes', 'artist_web' => 'yes', 'artist_bio' => 'yes', 'artist_use_artist_stylesheet' => 'yes', 'artist_use_artist_shortcode' => 'yes' ); add_option( 'artistpress_artist_settings', $defaults); } // Adds the Artist settings section. add_settings_section( 'artistpress_artist_settings_section', 'Artist Settings', 'artistpress_artist_settings_callback', 'artistpress_artist_settings' ); // Adds setting field to the Artist settings section. add_settings_field( 'artist_name', 'Artist Name', 'artistpress_artist_name_callback', 'artistpress_artist_settings', 'artistpress_artist_settings_section', array( 'Should the artist\'s name be displayed on the artist pages?' ) ); // Adds setting field to the Artist settings section. add_settings_field( 'artist_phone', 'Phone Number', 'artistpress_artist_phone_callback', 'artistpress_artist_settings', 'artistpress_artist_settings_section', array( 'Should the artist\'s phone number be displayed on the artist pages?' ) ); // Adds setting field to the Artist settings section. add_settings_field( 'artist_phone_link', 'Link Phone Number', 'artistpress_artist_phoneLink_callback', 'artistpress_artist_settings', 'artistpress_artist_settings_section', array( 'Should the artist\'s phone number be click-to-dial functionality?' ) ); // Adds setting field to the Artist settings section. add_settings_field( 'artist_email', 'Show Email', 'artistpress_artist_email_callback', 'artistpress_artist_settings', 'artistpress_artist_settings_section', array( 'Should the artist\'s email be displayed on the artist pages?' ) ); // Adds setting field to the Artist settings section. add_settings_field( 'artist_web', 'Show Website', 'artistpress_artist_web_callback', 'artistpress_artist_settings', 'artistpress_artist_settings_section', array( 'Should the artist\'s website be displayed on the artist pages?' ) ); // Adds setting field to the Artist settings section. add_settings_field( 'artist_bio', 'Show Bio', 'artistpress_artist_bio_callback', 'artistpress_artist_settings', 'artistpress_artist_settings_section', array( 'Should the artist\'s bio be displayed on the artist pages?' ) ); // Adds setting field to the Artist settings section. add_settings_field( 'artist_use_stylesheet', 'Artist Default Stylesheet', 'artistpress_artist_stylesheet_callback', 'artistpress_artist_settings', 'artistpress_artist_settings_section', array( 'Should the default artist stylesheet be used to display the galleries?' ) ); // Adds setting field to the Artist settings section. add_settings_field( 'artist_use_shortcode', 'Use Templates for Artists', 'artistpress_artist_shortcode_callback', 'artistpress_artist_settings', 'artistpress_artist_settings_section', array( 'Use WordPress templates instead of shortcodes (recommended for developer use only).' ) ); // Registers the Artist settings section. register_setting( 'artistpress_artist_settings', 'artistpress_artist_settings', 'artistpress_validate_input_examples' ); } add_action('admin_init', 'artistpress_register_artist_settings'); /** * Registers the ArtistPress Show settings * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_register_show_list_settings(){ // If the Artistpress Show options do not exist, create them using these defaults. if( false == get_option( 'artistpress_show_list_settings' ) ) { $defaults = array( 'show_list_display' => 'show_date', 'display_show_artist' => 'yes', 'display_show_venue' => 'yes', 'display_ticket_button' => 'yes', 'show_ticket_button_label' => NULL, 'display_info_button' => 'yes', 'show_info_button_label' => NULL, 'show_list_use_stylesheet' => 'yes', 'show_list_use_shortcode' => 'yes', ); add_option( 'artistpress_show_list_settings', $defaults); } // Adds the Show List settings section. add_settings_section( 'artistpress_show_list_settings_section', 'Show List Settings', 'artistpress_show_list_settings_callback', 'artistpress_show_list_settings' ); // Adds a settings field to Show List settings section. add_settings_field( 'show_list_display', 'Show List Display', 'artistpress_show_list_display_callback', 'artistpress_show_list_settings', 'artistpress_show_list_settings_section', array( 'Choose how your ArtistPress show listing is displayed.' ) ); // Adds a settings field to Show List settings section. add_settings_field( 'display_show_artist', 'Artist Name', 'artistpress_show_list_artist_callback', 'artistpress_show_list_settings', 'artistpress_show_list_settings_section', array( 'Should the artist\'s name be displayed on the show list. (If displayed by by Artist this setting has no effect on the list.)' ) ); // Adds a setting field to Show List settings section. add_settings_field( 'display_show_venue', 'Venue Name', 'artistpress_show_list_venue_callback', 'artistpress_show_list_settings', 'artistpress_show_list_settings_section', array( 'Should the venue name be displayed on the show list. (If displayed by Venue this setting has no effect on the list.)' ) ); // Adds a setting field to Show List settings section. add_settings_field( 'display_ticket_button', 'Ticket Button', 'artistpress_show_list_ticket_link_callback', 'artistpress_show_list_settings', 'artistpress_show_list_settings_section', array( 'Should there be a button to get tickets on the show list.' ) ); // Adds a setting field to Show List settings section. add_settings_field( 'show_ticket_button_label', 'Ticket Button Label', 'artistpress_show_list_ticket_link_label_callback', 'artistpress_show_list_settings', 'artistpress_show_list_settings_section', array( 'Enter the words you want to appear on the ticket button. Defaults to "Get Tickets". This will affect the buttons on the list and the individauls events.' ) ); // Adds a setting field to Show List settings section. add_settings_field( 'display_info_button', 'More Info Button', 'artistpress_show_list_info_link_callback', 'artistpress_show_list_settings', 'artistpress_show_list_settings_section', array( 'Should there be a button to get more info about the shows on the show list.' ) ); // Adds a setting field to Show List settings section. add_settings_field( 'show_info_button_label', 'More Info Button Label', 'artistpress_show_list_info_link_label_callback', 'artistpress_show_list_settings', 'artistpress_show_list_settings_section', array( 'Enter the words you want to appear on the more info button. Defaults to "Additional Info". This will affect the buttons on the list and the individauls events.' ) ); // Adds a setting field to Show List settings section. add_settings_field( 'show_list_use_stylesheet', 'Calendar Default Stylesheet', 'artistpress_show_list_stylesheet_callback', 'artistpress_show_list_settings', 'artistpress_show_list_settings_section', array( 'Should the default calendar stylesheet be used to display the shows?' ) ); // Adds a setting field to Show List settings section. add_settings_field( 'show_list_use_shortcode', 'Use Templates for Shows', 'artistpress_show_list_shortcode_callback', 'artistpress_show_list_settings', 'artistpress_show_list_settings_section', array( 'Use WordPress templates instead of shortcodes (recommended for developer use only). You will need to flush the permalinks here after changing this setting.' ) ); // Registers the Show List settings section. register_setting( 'artistpress_show_list_settings', 'artistpress_show_list_settings', 'artistpress_validate_input_examples' ); } add_action('admin_init', 'artistpress_register_show_list_settings'); /** * Registers the ArtistPress Individual Show settings * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_register_show_settings(){ // If the Artistpress Individual Show options do not exist, create them using these defaults. if( false == get_option( 'artistpress_show_settings' ) ) { $defaults = array( 'display_show_artwork' => 'yes', 'display_show_date' => 'yes', 'display_show_time' => 'yes', 'display_show_type' => 'yes', 'display_show_price' => 'yes', 'display_ticket_phone' => 'yes', 'display_ticket_button' => 'yes', 'display_additional_info' => 'yes', 'display_venue' => 'yes', 'display_venue_address' => 'yes', 'display_venue_phone' => 'yes', 'display_venue_website_button' => 'yes', 'map_display' => 'no', 'map_directions' => 'no', 'artistpress_maps_api' => null, 'show_use_stylesheet' => 'yes', 'show_use_shortcode' => 'no' ); add_option( 'artistpress_show_settings', $defaults ); } // Adds the Individual Shows settings section. add_settings_section( 'artistpress_show_settings_section', 'Individual Shows Settings', 'artistpress_show_settings_callback', 'artistpress_show_settings' ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_show_artwork', 'Display Show Artwork', 'artistpress_display_show_artwork_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the show artwork be shown on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_show_date', 'Display Show Date', 'artistpress_display_show_date_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the show artwork be shown on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_show_time', 'Display Show Time', 'artistpress_display_show_time_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the show artwork be shown on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_show_type', 'Display Show Type', 'artistpress_display_show_type_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the show artwork be shown on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_show_price', 'Display Show Price', 'artistpress_display_show_price_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the show artwork be shown on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_ticket_phone', 'Ticket Phone Number', 'artistpress_display_ticket_phone_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the show artwork be shown on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'calendar_ticket_button', 'Ticket Button', 'artistpress_show_ticket_link_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should there be a button to get tickets on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_additional_info', 'Additional Info', 'artistpress_show_additional_info_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should there be a button to get tickets on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_venue', 'Display Venue', 'artistpress_display_venue_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the venue details be display on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_venue_address', 'Display Venue Address', 'artistpress_display_venue_address_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the show artwork be shown on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_venue_phone', 'Display Venue Phone', 'artistpress_display_venue_phone_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the show artwork be shown on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'display_venue_website_button', 'Venue Website Button', 'artistpress_show_venue_web_button_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should there be a button to get tickets on the show detail page.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'map_display', 'Display Map', 'artistpress_show_map_display_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should there be a map included on the show detail pages?' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'map_directions', 'Provide Directions', 'artistpress_show_map_directions_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should there be a way for site visitors to get directions to the venues?' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'artistpress_maps_api', 'Google Maps API', 'artistpress_show_map_api_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'A Google Maps API key is required. Visit our FAQ page to learn how to get a API key.' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'show_use_stylesheet', 'Show Default Stylesheet', 'artistpress_show_stylesheet_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should the default calendar stylesheet be used to display the shows?' ) ); // Adds a setting field to Individual Shows settings section. add_settings_field( 'show_use_shortcode', 'Use Shortcodes for Shows', 'artistpress_show_shortcode_callback', 'artistpress_show_settings', 'artistpress_show_settings_section', array( 'Should shortcodes be used to display show details.' ) ); // Registers the Individual Shows settings section. register_setting( 'artistpress_show_settings', 'artistpress_show_settings', 'artistpress_validate_input_examples' ); } add_action('admin_init', 'artistpress_register_show_settings'); /** * Registers the ArtistPress Gallery settings * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_register_gallery_settings(){ // If the Artistpress Gallery options do not exist, create them using these defaults. if( false == get_option( 'artistpress_gallery_settings' ) ) { $defaults = array( 'gallery_behavior' => 'cardlightbox', 'gallery_show_title' => 'yes', 'gallery_show_image_title' => 'yes', 'gallery_show_image_caption' => 'yes', 'gallery_use_gallery_stylesheet' => 'yes' ); add_option( 'artistpress_gallery_settings', $defaults); } // Adds the Gallery settings section. add_settings_section( 'artistpress_gallery_settings_section', 'Gallery Settings', 'artistpress_gallery_settings_callback', 'artistpress_gallery_settings' ); // Adds a setting field to Gallery settings section. add_settings_field( 'gallery_behavior', 'Gallery Behavior', 'artistpress_gallery_behavior_callback', 'artistpress_gallery_settings', 'artistpress_gallery_settings_section', array( 'Choose the display style of your ArtistPress galleries.' ) ); // Adds a setting field to Gallery settings section. add_settings_field( 'gallery_show_title', 'Gallery Title', 'artistpress_gallery_title_callback', 'artistpress_gallery_settings', 'artistpress_gallery_settings_section', array( 'Should the gallery name be displayed on the gallery page?' ) ); // Adds a setting field to Gallery settings section. add_settings_field( 'gallery_show_image_title', 'Gallery Image Title', 'artistpress_gallery_image_title_callback', 'artistpress_gallery_settings', 'artistpress_gallery_settings_section', array( 'Should the image titles be displayed in the gallery?' ) ); // Adds a setting field to Gallery settings section. add_settings_field( 'gallery_show_image_caption', 'Gallery Image Caption', 'artistpress_gallery_image_caption_callback', 'artistpress_gallery_settings', 'artistpress_gallery_settings_section', array( 'Should the image captions be displayed in the lightbox model window?' ) ); // Adds a setting field to Gallery settings section. add_settings_field( 'gallery_use_stylesheet', 'Gallery Default Stylesheet', 'artistpress_gallery_stylesheet_callback', 'artistpress_gallery_settings', 'artistpress_gallery_settings_section', array( 'Should the default gallery stylesheet be used to display the galleries?' ) ); // Registers the Gallery settings section. register_setting( 'artistpress_gallery_settings', 'artistpress_gallery_settings', 'artistpress_validate_input_examples' ); } add_action('admin_init', 'artistpress_register_gallery_settings'); /** * Registers the ArtistPress Upgrade settings * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_register_upgrade_settings(){ // If the Artistpress Upgrade tab options do not exist, create them using these defaults. if( false == get_option( 'artistpress_upgrade_settings' ) ) { add_option( 'artistpress_upgrade_settings' ); } // Adds the Upgrade settings section. add_settings_section( 'artistpress_upgrade_settings_section', 'Upgrade Settings', 'artistpress_upgrade_settings_callback', 'artistpress_upgrade_settings' ); // Registers the Upgrade settings section. register_setting( 'artistpress_upgrade_settings', 'artistpress_upgrade_settings', 'artistpress_validate_input_examples' ); } add_action('admin_init', 'artistpress_register_upgrade_settings'); /** * Returns the intro text for the Artist Settings tab * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_artist_settings_callback() { echo '

These settings control the display of the ArtistPress Artists. These settings affect all artist shortcodes and artist page templates.

'; } /** * Returns the intro text for the Show settings tab * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_show_list_settings_callback() { echo '

These settings control the display of the ArtistPress Shows List.

The map settings for the shows are available on the Individual Show Settings tab.

'; } /** * Returns the intro text for the Individual Show settings tab * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_show_settings_callback(){ echo '

These settings control the display of the ArtistPress Show Detail Pages.

'; } /** * Returns the intro text for the Gallery settings tab * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_gallery_settings_callback() { echo '

These settings control the display of the ArtistPress Galleries. These settings affect all album and gallery pages. This also includes shortcodes.

'; } /** * Returns the intro text for the Upgrade settings tab * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_upgrade_settings_callback() { echo '

Currently ArtistPress Pro and ArtistPress Community are being developed.

You can stay informed about progress and release dates on the ArtistPress Facebook Page or on the Let Tim Design It Facebook Page.

'; } /** * Renders the fields for the Artist settings section * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_artist_name_callback($args) { $options = get_option( 'artistpress_artist_settings' ); if( ! isset($options['artist_name']) ) { $options['artist_name'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_artist_phone_callback($args) { $options = get_option( 'artistpress_artist_settings' ); if( ! isset($options['artist_phone']) ) { $options['artist_phone'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_artist_phoneLink_callback($args) { $options = get_option( 'artistpress_artist_settings' ); if( ! isset($options['artist_phone_link']) ) { $options['artist_phone_link'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_artist_email_callback($args) { $options = get_option( 'artistpress_artist_settings' ); if( ! isset($options['artist_email']) ) { $options['artist_email'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_artist_web_callback($args) { $options = get_option( 'artistpress_artist_settings' ); if( ! isset($options['artist_web']) ) { $options['artist_web'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_artist_bio_callback($args) { $options = get_option( 'artistpress_artist_settings' ); if( ! isset($options['artist_bio']) ) { $options['artist_bio'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_artist_stylesheet_callback($args) { $options = get_option( 'artistpress_artist_settings' ); if( ! isset($options['artist_use_artist_stylesheet']) ) { $options['artist_use_artist_stylesheet'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_artist_shortcode_callback($args) { $options = get_option( 'artistpress_artist_settings' ); if( ! isset($options['artist_use_artist_shortcode']) ) { $options['artist_use_artist_shortcode'] = false; } $html = ''; $html .= ''; echo $html; } /** * Renders the fields for the Show List settings section * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_show_list_display_callback($args) { $options = get_option( 'artistpress_show_list_settings' ); if( ! isset($options['show_list_display']) ) { $options['show_list_display'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_list_artist_callback($args) { $options = get_option( 'artistpress_show_list_settings' ); if( ! isset($options['display_show_artist']) ) { $options['display_show_artist'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_list_venue_callback($args) { $options = get_option( 'artistpress_show_list_settings' ); if( ! isset($options['display_show_venue']) ) { $options['display_show_venue'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_list_ticket_link_callback($args) { $options = get_option( 'artistpress_show_list_settings' ); if( ! isset($options['display_ticket_button']) ) { $options['display_ticket_button'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_list_ticket_link_label_callback($args) { $options = get_option( 'artistpress_show_list_settings' ); if( ! isset($options['show_ticket_button_label']) ) { $options['show_ticket_button_label'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_list_info_link_callback($args) { $options = get_option( 'artistpress_show_list_settings' ); if( ! isset($options['display_info_button']) ) { $options['display_info_button'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_list_info_link_label_callback($args) { $options = get_option( 'artistpress_show_list_settings' ); if( ! isset($options['show_info_button_label']) ) { $options['show_info_button_label'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_list_stylesheet_callback($args) { $options = get_option( 'artistpress_show_list_settings' ); if( ! isset($options['show_list_use_stylesheet']) ) { $options['show_list_use_stylesheet'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_list_shortcode_callback($args) { $options = get_option( 'artistpress_show_list_settings' ); if( ! isset($options['show_list_use_shortcode']) ) { $options['show_list_use_shortcode'] = false; } $html = ''; $html .= ''; echo $html; } /** * Renders the fields for the Individaul Shows settings section * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_display_show_artwork_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_show_artwork']) ) { $options['display_show_artwork'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_display_show_date_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_show_date']) ) { $options['display_show_date'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_display_show_time_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_show_time']) ) { $options['display_show_time'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_display_show_type_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_show_type']) ) { $options['display_show_type'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_display_show_price_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_show_price']) ) { $options['display_show_price'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_display_ticket_phone_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_ticket_phone']) ) { $options['display_ticket_phone'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_ticket_link_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_ticket_button']) ) { $options['display_ticket_button'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_additional_info_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_additional_info']) ) { $options['display_additional_info'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_display_venue_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_venue']) ) { $options['display_venue'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_display_venue_address_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_venue_address']) ) { $options['display_venue_address'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_display_venue_phone_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_venue_phone']) ) { $options['display_venue_phone'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_venue_web_button_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['display_venue_website_button']) ) { $options['display_venue_website_button'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_map_display_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['map_display']) ) { $options['map_display'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_map_directions_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['map_directions']) ) { $options['map_directions'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_map_api_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['artistpress_maps_api']) ) { $options['artistpress_maps_api'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_stylesheet_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['show_use_stylesheet']) ) { $options['show_use_stylesheet'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_show_shortcode_callback($args) { $options = get_option( 'artistpress_show_settings' ); if( ! isset($options['show_use_shortcode']) ) { $options['show_use_shortcode'] = false; } $html = ''; $html .= ''; echo $html; } /** * Renders the fields for the Gallery settings section * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_gallery_behavior_callback($args) { $options = get_option( 'artistpress_gallery_settings' ); if( ! isset($options['gallery_behavior']) ) { $options['gallery_behavior'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_gallery_title_callback($args) { $options = get_option( 'artistpress_gallery_settings' ); if( ! isset($options['gallery_show_title']) ) { $options['gallery_show_title'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_gallery_image_title_callback($args) { $options = get_option( 'artistpress_gallery_settings' ); if( ! isset($options['gallery_show_image_title']) ) { $options['gallery_show_image_title'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_gallery_image_caption_callback($args) { $options = get_option( 'artistpress_gallery_settings' ); if( ! isset($options['gallery_show_image_caption']) ) { $options['gallery_show_image_caption'] = false; } $html = ''; $html .= ''; echo $html; } function artistpress_gallery_stylesheet_callback($args) { $options = get_option( 'artistpress_gallery_settings' ); if( ! isset($options['gallery_use_gallery_stylesheet']) ) { $options['gallery_use_gallery_stylesheet'] = false; } $html = ''; $html .= ''; echo $html; } /** * Renders the fields for the Upgrade settings section * * @author LTDI Studios * @since 1.0.0 * */ // There are no feilds for this section. It is advert to let users // know about the benefits of upgrading /** * Sanitization and Validation of all feild entries * * @author LTDI Studios * @since 1.0.0 * */ function artistpress_validate_input_examples( $input ) { // Create our array for storing the validated options $output = array(); // Loop through each of the incoming options foreach( $input as $key => $value ) { // Check to see if the current option has a value. If so, process it. if( isset( $input[$key] ) ) { // Strip all HTML and PHP tags and properly handle quoted strings $output[$key] = strip_tags( stripslashes( $input[ $key ] ) ); } // end if } // end foreach // Return the array processing any additional functions filtered by this action return apply_filters( 'artistpress_validate_input_examples', $output, $input ); } // end artistpress_validate_input_examples