'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',
'show_list_order' =>'ASC',
'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(
'show_list_order',
'Show List Order',
'artistpress_show_list_display_order',
'artistpress_show_list_settings',
'artistpress_show_list_settings_section',
array(
'Choose the order of your ArtistPress show list. Ascending (Z-A or 100-1 ) or Descending (A-Z or 1-100 ). Ascending is the default.',
)
);
// 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".'
)
);
// 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".'
)
);
// 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 individual show 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 date of the show be displayed on the individual show 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 time be displayed on the individual show 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 type be displayed on the individual show 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 price be displayed on the individual show 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 a phone number to get tickets be displayed on the individual show 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 displayed on the individual show 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 the additional information section be displayed on the individual show 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 section be displayed on the individual show 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 venue address be displayed on the individual show 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 venue phone number be displayed on the individual show 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 venue website button displayed on the individual show 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 documentation 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 show 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.
';
}
/**
* 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.