// This is the main options array. Can be accessed as a global in order to reduce function calls.
$ci = get_option(THEME_OPTIONS);
$ci_defaults = array();
// The $content_width needs to be before the inclusion of the rest of the files, as it is used inside of some of them.
if (!isset($content_width)) {
    $content_width = 717;
}
//
// Let's bootstrap the theme.
//
get_template_part('panel/bootstrap');
//
// Let WordPress manage the title.
//
add_theme_support('title-tag');
//
// HTML5 Support
//
add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
//
// Define our various image sizes.
//
add_theme_support('post-thumbnails');
set_post_thumbnail_size(720, 420, true);
add_image_size('homepage_slider', 1090, 613, true);
// Define our post formats
add_theme_support('post-formats', array('video'));
add_post_type_support('post', 'post-formats');
// Let the user choose a color scheme on each post individually.
add_ci_theme_support('post-color-scheme', array('page', 'post'));
<?php

global $ci, $ci_defaults, $load_defaults;
if ($load_defaults === TRUE) {
    $ci_defaults['twitter_consumer_key'] = '';
    $ci_defaults['twitter_consumer_secret'] = '';
    $ci_defaults['twitter_access_token'] = '';
    $ci_defaults['twitter_access_token_secret'] = '';
    $ci_defaults['twitter_caching_seconds'] = 60;
    // Add Twitter widget support to the theme.
    add_ci_theme_support('twitter_widget');
} else {
    ?>

	<fieldset id="ci-panel-twitter" class="set">
		<legend><?php 
    _e('Twitter', 'ci_theme');
    ?>
</legend>

		<p class="guide"><?php 
    echo sprintf(__('You need to follow a series of steps in order to allow Twitter capabilities to your website. First, <a href="%s">log into the Twitter Developers website</a>.', 'ci_theme'), 'https://dev.twitter.com/apps');
    ?>
</p>
		<p class="guide"><?php 
    _e("<strong>Step 1:</strong> Make sure you are on the <strong>My Applications</strong> page. If you don't already have an application set up, create a new one by pressing the <em>Create New App</em> button. Fill in the required details (you don't need a Callback URL) and press the <em>Create your Twitter application</em> button.", 'ci_theme');
    ?>
</p>
		<p class="guide"><?php 
    _e('<strong>Step 2:</strong> On the following page (the application\'s page), in <em>API Keys</em> tab, under the <em>Your access token</em> label, press the <strong>Create my access token</strong> button (if no access token information is displayed). It might take a couple of minutes for it to generate, so refresh the page once in a while, until you see the generated codes.', 'ci_theme');
    ?>
Example #3
0
add_theme_support('woocommerce');
// Set image sizes also for woocommerce.
// Run only when the theme or WooCommerce is activated.
add_action('ci_theme_activated', 'ci_woocommerce_image_dimensions');
register_activation_hook(WP_PLUGIN_DIR . '/woocommerce/woocommerce.php', 'ci_woocommerce_image_dimensions');
if (!function_exists('ci_woocommerce_image_dimensions')) {
    function ci_woocommerce_image_dimensions()
    {
        // Image sizes
        update_option('shop_thumbnail_image_size', array('width' => '110', 'height' => '110', 'crop' => 1));
        update_option('shop_catalog_image_size', array('width' => '750', 'height' => '9999', 'crop' => 0));
        update_option('shop_single_image_size', array('width' => '560', 'height' => '9999', 'crop' => 0));
    }
}
// Let the user choose a color scheme on each post individually.
add_ci_theme_support('post-color-scheme', array('page', 'post', 'product', 'cpt_artist', 'cpt_discography', 'cpt_event', 'cpt_gallery', 'cpt_video'));
// Enable the automatic video thumbnails.
add_filter('ci_automatic_video_thumbnail_field', 'ci_theme_add_auto_thumb_video_field');
if (!function_exists('ci_theme_add_auto_thumb_video_field')) {
    function ci_theme_add_auto_thumb_video_field($field)
    {
        return 'ci_cpt_video_url';
    }
}
add_filter('the_content', 'ci_prettyPhoto_rel', 12);
add_filter('get_comment_text', 'ci_prettyPhoto_rel');
add_filter('wp_get_attachment_link', 'ci_prettyPhoto_rel');
if (!function_exists('ci_prettyPhoto_rel')) {
    function ci_prettyPhoto_rel($content)
    {
        global $post;