コード例 #1
0
<?php

/**
 * @package    artless Shortcodes
 * @author     Christian Glingener <*****@*****.**>
 * @version    1.0.0
 * @copyright  2014 artlessthemes.com
 * @link       http://artlessthemes.com/
 */
function al_portfolio_options()
{
    $options = array('title' => __('Portfolio', 'redux-framework-demo'), 'icon' => 'el-icon-th', 'fields' => array(array('id' => 'al_portfolio_posts', 'type' => 'text', 'title' => __('Number of Projects on One-Page', 'artless'), 'subtitle' => __('-1 for all projects', 'artless'), "default" => -1, 'validate' => 'numeric'), array('id' => 'al_portfolio_filter', 'type' => 'switch', 'title' => __('Filter-By-Category-Bar', 'artless'), 'subtitle' => __('Filter projects by category.', 'artless'), "default" => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'al_portfolio_load_more', 'type' => 'switch', 'title' => __('Load-More Button', 'artless'), "default" => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'al_portfolio_highlight_active_item', 'type' => 'switch', 'title' => __('Highlight Active Item', 'artless'), "default" => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'al_portfolio_min_height', 'type' => 'slider', 'title' => __('Item Min-Height', 'artless'), 'default' => '350', 'min' => '0', 'step' => '10', 'max' => '500'), array('id' => 'al_portfolio_term_client', 'type' => 'text', 'title' => __('Change Term "Client / [client-name]"', 'artless'), 'subtitle' => __('Default: CLIENT / &lt;i>[client-name]&lt;/i>', 'artless'), 'desc' => __('Available Placeholder: <b>[client-name]</b>', 'artless'), "placeholder" => 'CLIENT / <i>[client-name]</i>'), array('id' => 'al_portfolio_term_filter_all', 'type' => 'text', 'title' => __('Change Term "All"', 'artless'), 'subtitle' => __('Term for "all categories" in the filter-bar', 'artless'), "placeholder" => 'All'), array('id' => 'al_portfolio_term_load_more', 'type' => 'text', 'title' => __('Change Term "Load More"', 'artless'), 'subtitle' => __('Term for the Load-More-Button', 'artless'), "placeholder" => 'Load More'), array('id' => 'al_portfolio_term_view_project', 'type' => 'text', 'title' => __('Change Term "View Project"', 'artless'), 'subtitle' => __('Term for the View-Project-Button', 'artless'), "placeholder" => 'View Project')));
    return $options;
}
if (class_exists('Artless_Theme_Options')) {
    if (method_exists('Artless_Theme_Options', 'addOption')) {
        Artless_Theme_Options::addOption(al_portfolio_options(), 20);
    }
}
コード例 #2
0
ファイル: team.php プロジェクト: azeemgolive/thefunkidsgame
<?php

/**
 * @package    artless Shortcodes
 * @author     Christian Glingener <*****@*****.**>
 * @version    1.0.0
 * @copyright  2014 artlessthemes.com
 * @link       http://artlessthemes.com/
 */
$options = array('title' => __('Team', 'artless'), 'icon' => 'el-icon-group', 'fields' => array(array('id' => 'al_team_filter', 'type' => 'switch', 'title' => __('Filter-By-Profession-Bar', 'artless'), 'subtitle' => __('With this visitors can filter Members by Profession.', 'artless'), "default" => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'al_team_filter_show_all', 'type' => 'switch', 'required' => array('al_team_filter', '=', '1'), 'title' => __('Option "All" in Filter', 'artless'), "default" => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'al_team_members_per_row', 'type' => 'select', 'title' => __('Members per Row', 'artless'), 'options' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 6 => 6), 'default' => 3), array('id' => 'al_team_members_description_min_height', 'type' => 'text', 'title' => __('Textfield Min-Height', 'artless'), 'desc' => __('i.e. 200px', 'artless')), array('id' => 'al_team_socials_blank', 'type' => 'switch', 'title' => __('Open Social Links in a New Window', 'artless'), "default" => 0, 'on' => 'Enabled', 'off' => 'Disabled')));
if (class_exists('Artless_Theme_Options')) {
    if (method_exists('Artless_Theme_Options', 'addOption')) {
        Artless_Theme_Options::addOption($options, 30);
    }
}
コード例 #3
0
/**
 * @package    artless Maps
 * @author     Christian Glingener <*****@*****.**>
 * @version    1.0.0
 * @copyright  2014 artlessthemes.com
 * @link       http://artlessthemes.com/
 */
/**
 * Ajax Functions
 * Required Files
 */
$required_files = array(AL_MAPS_DIR . '/application/ajax/google-maps-presets.php', AL_MAPS_DIR . '/application/ajax/google-maps-presets-single.php', AL_MAPS_DIR . '/application/options/google-maps-api-handler.php');
foreach ($required_files as $file) {
    if (is_file($file)) {
        require $file;
    }
}
/**
 * Options
 */
function al_google_maps_api_options()
{
    $options = array('title' => __('Google Maps API', 'artless'), 'icon' => 'el-icon-map-marker', 'fields' => array(array('id' => 'al_gmaps_api', 'type' => 'text', 'title' => __('Your Google API Key', 'artless'), 'subtitle' => __('Needed if you have more than 2,500 visitors a day.', 'artless'), 'desc' => __('<a href="https://developers.google.com/maps/documentation/javascript/tutorial#api_key">How to get an API key?</a>', 'artless')), array('id' => 'al_gmaps_title', 'type' => 'text', 'title' => __('Map Title', 'artless'), 'subtitle' => __('Appears at the top right of the map.', 'artless'), 'placeholder' => 'Customized'), array('id' => 'al_gmaps_latitude_longitude', 'type' => 'text', 'title' => __('Location Latitude, Longitude Coordinates', 'artless'), 'subtitle' => __('<a target="_blank" href="https://support.google.com/maps/answer/18539?hl=en">Need Help?</a>', 'artless'), 'desc' => __('Example for New York: 40.712555, -74.003850', 'artless'), 'placeholder' => '40.712555, -74.003850'), array('id' => 'al_gmaps_marker', 'type' => 'switch', 'title' => __('Location Marker', 'artless'), "default" => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'al_gmaps_marker_icon', 'type' => 'media', 'required' => array('al_gmaps_marker', '=', '1'), 'title' => __('Marker Icon', 'artless'), 'desc' => '<a id="al-gmaps-icon-apply" href="javascript:void(0);">' . __('Apply icon change to preview map.', 'artless') . '</a>'), array('id' => 'al_gmaps_location_name', 'type' => 'text', 'required' => array('al_gmaps_marker', '=', '1'), 'title' => __('Location Name', 'artless')), array('id' => 'al_gmaps_location_desc', 'type' => 'textarea', 'required' => array('al_gmaps_marker', '=', '1'), 'title' => __('Location Description', 'artless')), array('id' => 'al_gmaps_color', 'type' => 'color', 'title' => __('Map Color', 'artless'), 'desc' => '<a id="al-gmaps-color-apply" href="javascript:void(0);">' . __('Apply color to preview map.', 'artless') . '</a>', 'validate' => 'color', 'transparent' => false), array('id' => 'al_gmaps_zoom', 'type' => 'slider', 'title' => __('Map Zoom', 'artless'), "default" => 2, "min" => 0, "step" => 1, "max" => 19, 'display_value' => 'text'), array('id' => 'al_gmaps_style', 'type' => 'textarea', 'title' => __('Advanced Styling', 'artless'), 'subtitle' => __('Overwrites <b>Map Color</b>', 'artless') . '<br /><br />' . __('<b>Some Presets</b>', 'artless') . '<br /><div id="al-gmaps-style-presets"></div>', 'desc' => __('Use <a target="_blank" href="http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html">Google Styled Maps Wizard</a> and copy JSON code to 	this field. To get the JSON code click on "Show JSON" (on the right in the wizard).<br />', 'artless')), array('id' => 'al_gmaps_center_map', 'type' => 'select', 'title' => __('Center of Map', 'artless'), 'options' => array(1 => 'Center of all Map Markers', 2 => 'First Coordinates'), 'default' => 1), array('id' => 'al_gmaps_marker_show_info', 'type' => 'switch', 'title' => __('Show Marker Info on Load', 'artless'), "default" => 1, 'on' => 'Enabled', 'off' => 'Disabled', 'hint' => array('title' => __('Multiple Markers', 'artless'), 'content' => __('If you do not want to see all markers on page load you have to disable this option.', 'artless'))), array('id' => 'al_gmaps_additional_markers', 'type' => 'slides', 'title' => __('Additional Markers', 'artless'), 'subtitle' => __('Unlimited Markers', 'artless'), 'placeholder' => array('title' => __('Title', 'artless'), 'description' => __('Description ( HTML allowed )', 'artless'), 'url' => __('Latitude, Longitude Coordinates', 'artless'))), array('id' => 'al_gmaps_preview', 'type' => 'info', 'title' => __('Google Map Preview', 'artless'))));
    return $options;
}
if (class_exists('Artless_Theme_Options')) {
    if (method_exists('Artless_Theme_Options', 'addOption')) {
        Artless_Theme_Options::addOption(al_google_maps_api_options(), 110);
    }
}
コード例 #4
0
<?php

function al_shortcodes_contact_form()
{
    $options = array('title' => __('Contact Form', 'redux-framework-demo'), 'icon' => 'el-icon-envelope', 'fields' => array(array('id' => 'al_sc_contact_hide_after_success', 'type' => 'switch', 'title' => __('Hide Contact Form After Sending', 'artless'), 'on' => 'Yes', 'off' => 'No'), array('id' => 'al_sc_contact_input_color', 'type' => 'color', 'title' => __('Adjust Input Color', 'artless'), 'default' => ''), array('id' => 'al_sc_contact_input_background_color', 'type' => 'color', 'title' => __('Adjust Input Background Color', 'artless'), 'default' => ''), array('id' => 'al_sc_contact_to', 'type' => 'text', 'title' => __('To Address', 'artless'), 'desc' => __('Leave blank and the default admin e-mail will be used.', 'artless')), array('id' => 'al_sc_contact_from_name', 'type' => 'text', 'title' => __('From Name', 'artless'), 'desc' => __('Leave blank and the visitors name will be used.', 'artless')), array('id' => 'al_sc_contact_from_address', 'type' => 'text', 'title' => __('From Address', 'artless'), 'desc' => __('Leave blank and the visitors e-mail will be used.', 'artless'), 'validate' => 'email'), array('id' => 'al_sc_contact_subject', 'type' => 'text', 'title' => __('Subject', 'artless'), 'desc' => __('[name] is a placeholder for the visitors name.', 'artless'), 'placeholder' => 'Contact from [name]'), array('id' => 'al_sc_contact_submit_label', 'type' => 'text', 'title' => __('Label Submit Button', 'artless'), 'placeholder' => 'Submit'), array('id' => 'al_sc_contact_placeholder_name', 'type' => 'text', 'title' => __('Input Placeholder Name', 'artless'), 'placeholder' => 'Your Name'), array('id' => 'al_sc_contact_placeholder_email', 'type' => 'text', 'title' => __('Input Placeholder E-Mail', 'artless'), 'placeholder' => 'Your E-Mail Address'), array('id' => 'al_sc_contact_placeholder_message', 'type' => 'text', 'title' => __('Input Placeholder Message', 'artless'), 'placeholder' => 'Your Message'), array('id' => 'al_sc_contact_msg_success', 'type' => 'text', 'title' => __('Message Success', 'artless'), 'placeholder' => 'Thanks for your request.'), array('id' => 'al_sc_contact_msg_error_name', 'type' => 'text', 'title' => __('Message Error No Name', 'artless'), 'placeholder' => 'Your Name is required.'), array('id' => 'al_sc_contact_msg_error_email', 'type' => 'text', 'title' => __('Message Error No E-Mail', 'artless'), 'placeholder' => 'Your E-Mail is required.'), array('id' => 'al_sc_contact_msg_error_message', 'type' => 'text', 'title' => __('Message Error No Message', 'artless'), 'placeholder' => 'Message is required'), array('id' => 'al_sc_contact_smtp', 'type' => 'switch', 'title' => __('Use SMTP for sending Mails', 'artless'), 'on' => 'Yes', 'off' => 'No'), array('id' => 'al_sc_contact_smtp_host', 'type' => 'text', 'required' => array('al_sc_contact_smtp', '=', '1'), 'title' => __('SMTP Host', 'artless')), array('id' => 'al_sc_contact_smtp_user', 'type' => 'text', 'required' => array('al_sc_contact_smtp', '=', '1'), 'title' => __('SMTP User', 'artless')), array('id' => 'al_sc_contact_smtp_password', 'type' => 'text', 'required' => array('al_sc_contact_smtp', '=', '1'), 'title' => __('SMTP Password', 'artless')), array('id' => 'al_sc_contact_smtp_port', 'type' => 'text', 'required' => array('al_sc_contact_smtp', '=', '1'), 'title' => __('SMTP Port', 'artless'), 'default' => '25'), array('id' => 'al_sc_contact_smtp_secure_protocol', 'type' => 'select', 'required' => array('al_sc_contact_smtp', '=', '1'), 'title' => __('SMTP Secure Protocol', 'artless'), 'subtitle' => __('Check if your server supports it.'), 'options' => array('none' => 'None', 'tls' => 'TLS', 'ssl' => 'SSL'), 'default' => 'none'), array('id' => 'al_sc_contact_smtp_debug', 'type' => 'switch', 'required' => array('al_sc_contact_smtp', '=', '1'), 'title' => __('SMTP Debug', 'artless'), 'subtitle' => __('Activates SMTP Debug output to console'), 'on' => 'Yes', 'off' => 'No')));
    return $options;
}
if (class_exists('Artless_Theme_Options')) {
    if (method_exists('Artless_Theme_Options', 'addOption')) {
        Artless_Theme_Options::addOption(al_shortcodes_contact_form(), 50);
    }
}