function get_the_series_rss($type = 'rss') { $series = get_the_series(); $home = get_bloginfo_rss('home'); $the_list = ''; $series_names = array(); $filter = 'rss'; if ('atom' == $type) { $filter = 'raw'; } if (!empty($series)) { foreach ((array) $series as $serial) { $series_names[] = sanitize_term_field('name', $serial->name, $serial->term_id, 'series', $filter); } } $series_names = array_unique($series_names); foreach ($series_names as $series_name) { if ('rdf' == $type) { $the_list .= "\n\t\t<series:name><![CDATA[{$series_name}]]></series:name>\n"; } elseif ('atom' == $type) { $the_list .= sprintf('<series:name scheme="%1$s" term="%2$s" />', esc_attr(apply_filters('get_bloginfo_rss', get_bloginfo('url'))), esc_attr($series_name)); } else { $the_list .= "\n\t\t<series:name><![CDATA[{$series_name}]]></series:name>\n"; } } return apply_filters('the_series_rss', $the_list, $type); }
/** * Return feed description. * * @return string */ function get_feed_description() { $info = strip_tags(Settings\get_site_option('description')); $description = apply_filters('get_bloginfo_rss', convert_chars($info)); if (!$description) { $description = get_bloginfo_rss('description'); } return apply_filters('inpsmf_feed_description', $description); }
/** * Return the URL of the site * * @since 2.5.0 * * @return string Site URL. */ function wcli_wxr_site_url() { // ms: the base url if (is_multisite()) { return network_home_url(); } else { return get_bloginfo_rss('url'); } }
/** * Return the URL of the site * * @since 2.5.0 * * @return string Site URL. */ function wxr_site_url() { // Multisite: the base URL. if (is_multisite()) { return network_home_url(); } else { return get_bloginfo_rss('url'); } }
function wxr_site_url() { global $current_site; // mu: the base url if (isset($current_site->domain)) { return 'http://' . $current_site->domain . $current_site->path; } else { return get_bloginfo_rss('url'); } }
/** * Filter to added content to the bottom of rss feeds * * @param string $content The content of the page/post in the rrs feed. * * @author Matt Rude <*****@*****.**> * @package Gus Theme * @subpackage Feed Footer * @since 0.2 */ function mdr_postrss($content) { if (is_feed()) { $site_name = get_bloginfo_rss('name'); $post_title = get_the_title_rss(); $home_url = home_url('/'); $post_url = post_permalink(); $content = $content . '<a href="' . $post_url . '">' . $post_title . '</a> is a post from; <a href="' . $home_url . '">' . $site_name . '</a> which is not allowed to be copied on other sites.'; } return $content; }
/** * Display RSS container for the bloginfo function. * * You can retrieve anything that you can using the get_bloginfo() function. * Everything will be stripped of tags and characters converted, when the values * are retrieved for use in the feeds. * * @since 0.71 * @see get_bloginfo() For the list of possible values to display. * * @param string $show See get_bloginfo() for possible values. */ function bloginfo_rss($show = '') { /** * Filter the bloginfo for display in RSS feeds. * * @since 2.1.0 * * @see get_bloginfo() * * @param string $rss_container RSS container for the blog information. * @param string $show The type of blog information to retrieve. */ echo apply_filters('bloginfo_rss', get_bloginfo_rss($show), $show); }
/** * Newsletter * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. * * Optional arguments: * title: e.g. Newsletter signup * text: e.g. Thank you for your subscribtion. * action: URL where to send the form data. * rss_feed: */ function tfuse_newsletter($atts, $content = null) { extract(shortcode_atts(array('title' => '', 'text' => '', 'rss_feed' => ''), $atts)); if (empty($title)) { $title = __('Newsletter', 'tfuse'); } if (empty($text)) { $text = __('', 'tfuse'); } $out = ' <div class="widget widget_newsletter newsletter_subscription_box"> <h1 class="widget-title">' . $title . '</h1> <div class="newsletter_subscription_messages before-text"> <div class="newsletter_subscription_message_initial"> ' . __('', 'tfuse') . ' </div> <div class="newsletter_subscription_message_success"> ' . __('Thank you for your subscription.', 'tfuse') . ' </div> <div class="newsletter_subscription_message_wrong_email"> ' . __('Your email format is wrong!', 'tfuse') . ' </div> <div class="newsletter_subscription_message_failed"> ' . __('Sad, but we couldn\'t add you to our mailing list ATM.', 'tfuse') . ' </div> </div> <form action="#" method="post" class="newsletter_subscription_form"> <div class="newsletter_text">' . $text . '</div> <input type="text" value="" name="newsletter" id="newsletter" class="newsletter_subscription_email inputtext" placeholder="' . __('Your email adress here...', 'tfuse') . '"/> <button type="submit" class="btn btn-newsletter newsletter_subscription_submit"><span>' . __('Subscribe', 'tfuse') . '</span></button> <div class="newsletter_subscription_ajax">' . __('Loading...', 'tfuse') . '</div> <div class="newsletter_text">'; if ($rss_feed != 'false') { $out .= '<a class="newssetter_subscribe" href="' . tfuse_options('feedburner_url', get_bloginfo_rss('rss2_url')) . '">' . __('I also want to subscribe to the RSS Feed', 'tfuse') . '</a>'; } $out .= ' </div> </form> </div>'; return $out; }
public function print_eventlist_feed() { header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); $events = $this->db->get_events($this->options->get('el_feed_upcoming_only') ? 'upcoming' : null); // Print feeds echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" > <channel> <title>' . get_bloginfo_rss('name') . '</title> <atom:link href="' . apply_filters('self_link', get_bloginfo()) . '" rel="self" type="application/rss+xml" /> <link>' . get_bloginfo_rss('url') . '</link> <description>' . __('Eventlist') . '</description> <lastBuildDate>' . mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false) . '</lastBuildDate> <language>' . get_option('rss_language') . '</language> <sy:updatePeriod>' . apply_filters('rss_update_period', 'hourly') . '</sy:updatePeriod> <sy:updateFrequency>' . apply_filters('rss_update_frequency', '1') . '</sy:updateFrequency> '; do_action('rss2_head'); if (!empty($events)) { foreach ($events as $event) { echo ' <item> <title>' . esc_attr($this->format_date($event->start_date, $event->end_date) . ' - ' . $event->title) . '</title> <pubDate>' . mysql2date('D, d M Y H:i:s +0000', $event->start_date, false) . '</pubDate> <description>' . esc_attr($this->format_date($event->start_date, $event->end_date) . ' ' . ('' != $event->time ? $event->time : '') . ('' != $event->location ? ' - ' . $event->location : '')) . '</description> ' . ('' != $event->details ? '<content:encoded><![CDATA[' . esc_attr($this->format_date($event->start_date, $event->end_date) . ' ' . ('' != $event->time ? $event->time : '') . ('' != $event->location ? ' - ' . $event->location : '')) . $event->details . ']]></content:encoded>' : '') . ' </item>'; } } echo ' </channel> </rss>'; }
function wp_json_check_url() { if (preg_match('/\\/feed\\/json\\//', $_SERVER['REQUEST_URI']) || $_REQUEST['feed'] == 'json') { header('Content-Type: application/json; charset=' . get_option('blog_charset'), true); $items = array(); query_posts(""); while (have_posts()) { the_post(); $item = array("title" => get_the_title_rss(), "link" => apply_filters('the_permalink_rss', get_permalink()), "description" => apply_filters('the_excerpt_rss', get_the_excerpt())); $items[] = $item; } $arr = array('title' => get_bloginfo_rss('name'), 'link' => get_bloginfo_rss('url'), 'description' => get_bloginfo_rss('description'), 'language' => get_option('rss_language'), 'items' => $items); if (function_exists('json_encode')) { die("" . $_REQUEST["callback"] . "(" . json_encode($arr) . ");"); } else { //TODO: Add backwards compatibility to before PHP 5.2 require_once "json.php"; $json = new Services_JSON(); die("" . $_REQUEST["callback"] . "(" . $json->encode($arr) . ");"); } } }
function site_generator_replacement_content($gen, $type) { $global_site_generator = ub_get_option("site_generator_replacement"); $global_site_link = ub_get_option("site_generator_replacement_link"); if (empty($global_site_generator)) { global $current_site; $global_site_generator = $current_site->site_name; } if (empty($global_site_link)) { global $current_site; $global_site_link = "http://" . $current_site->domain . $current_site->path; } switch ($type) { case 'html': $gen = '<meta name="generator" content="' . $global_site_generator . '">' . "\n"; break; case 'xhtml': $gen = '<meta name="generator" content="' . $global_site_generator . '" />' . "\n"; break; case 'atom': $gen = '<generator uri="' . $global_site_link . '" version="' . get_bloginfo_rss('version') . '">' . $global_site_generator . '</generator>'; break; case 'rss2': $gen = '<generator>' . $global_site_link . '?v=' . get_bloginfo_rss('version') . '</generator>'; break; case 'rdf': $gen = '<admin:generatorAgent rdf:resource="' . $global_site_link . '?v=' . get_bloginfo_rss('version') . '" />'; break; case 'comment': $gen = '<!-- generator="' . $global_site_generator . '/' . get_bloginfo('version') . '" -->'; break; case 'export': $gen = '<!-- generator="' . $global_site_generator . '/' . get_bloginfo_rss('version') . '" created="' . date('Y-m-d H:i') . '"-->'; break; } return $gen; }
/** * Newsletter * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. * * Optional arguments: * title: e.g. Newsletter signup * text: e.g. Thank you for your subscription. * action: URL where to send the form data. * rss_feed: */ function tfuse_newsletter($atts, $content = null) { extract(shortcode_atts(array('title' => '', 'text' => '', 'rss_feed' => ''), $atts)); if (empty($title)) { $title = __('Newsletter', 'tfuse'); } if (empty($text)) { $text = __('Sign up for our weekly newsletter to receive updates, news, and promos:', 'tfuse'); } $out = ' <div class="newsletter_subscription_box newsletterBox"> <div class="inner"> <div class="ribbon"></div> <h2>' . $title . '</h2> <div class="newsletter_subscription_messages before-text"> <div class="newsletter_subscription_message_initial">' . $text . '</div> <div class="newsletter_subscription_message_success">' . __('Thank you for your subscription.', 'tfuse') . '</div> <div class="newsletter_subscription_message_wrong_email">' . __('Your email format is wrong!', 'tfuse') . '</div> <div class="newsletter_subscription_message_failed">' . __('Sad, but we couldn\'t add you to our mailing list ATM.', 'tfuse') . '</div> </div> <form action="#" method="post" class="newsletter_subscription_form"> <input type="text" value="" name="newsletter" class="newsletter_subscription_email inputField" /> <input type="submit" value="" class="btn-submit newsletter_subscription_submit" /> <div class="clear"></div> </form> <div class="newsletter_subscription_ajax">' . __('Loading', 'tfuse') . '...</div>'; if ($rss_feed == 'true') { $out .= '<div class="newsletter_text"><a href="' . tfuse_options('feedburner_url', get_bloginfo_rss('rss2_url')) . '" class="link-news-rss">' . __('You can also', 'tfuse') . ' <span>' . __('Subscribe to our RSS', 'tfuse') . '</span> ' . __('feed', 'tfuse') . '</a></div>'; } $out .= '</div> </div>'; return $out; }
xml:lang="<?php echo get_option('rss_language'); ?> " xmlns:thr="http://purl.org/syndication/thread/1.0" <?php do_action('atom_ns'); ?> > <title type="text"><?php if (is_singular()) { printf(ent2ncr(__('Comments on: %s')), get_the_title_rss()); } elseif (is_search()) { printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss('name'), attribute_escape(get_search_query())); } else { printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss('name') . get_wp_title_rss()); } ?> </title> <subtitle type="text"><?php bloginfo_rss('description'); ?> </subtitle> <updated><?php echo mysql2date('Y-m-d\\TH:i:s\\Z', get_lastcommentmodified('GMT')); ?> </updated> <?php the_generator('atom'); ?>
/** * Retrieve categories list in XML format. * * @since 2.2.0 */ function get_categories_xml() { log_app('function', 'get_categories_xml()'); if (!current_user_can('edit_posts')) { $this->auth_required(__('Sorry, you do not have the right to access this site.')); } $home = esc_attr(get_bloginfo_rss('url')); $categories = ""; $cats = get_categories(array('hierarchical' => 0, 'hide_empty' => 0)); foreach ((array) $cats as $cat) { $categories .= " <category term=\"" . esc_attr($cat->name) . "\" />\n"; } $output = <<<EOD <app:categories xmlns:app="{$this->ATOMPUB_NS}" \txmlns="{$this->ATOM_NS}" \tfixed="yes" scheme="{$home}"> \t{$categories} </app:categories> EOD; $this->output($output, $this->CATEGORIES_CONTENT_TYPE); }
?> /css/reset.css" type="text/css" /> <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?> /css/960.css" type="text/css" /> <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?> " media="screen" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php if (get_option('woo_feedburner_url') != "") { echo get_option('woo_feedburner_url'); } else { echo get_bloginfo_rss('rss2_url'); } ?> " /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?> " /> <!--[if lt IE 7]> <script src="<?php bloginfo('template_directory'); ?> /includes/js/pngfix.js" type="text/javascript"></script> <link rel="stylesheet" href="<?php bloginfo('template_directory');
/** * Creates the generator XML or Comment for RSS, ATOM, etc. * * Returns the correct generator type for the requested output format. Allows * for a plugin to filter generators on an individual basis using the * 'get_the_generator_{$type}' filter. * * @since 2.5.0 * @uses apply_filters() Calls 'get_the_generator_$type' hook. * * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export). * @return string The HTML content for the generator. */ function get_the_generator($type = '') { if (empty($type)) { $current_filter = current_filter(); if (empty($current_filter)) { return; } switch ($current_filter) { case 'rss2_head': case 'commentsrss2_head': $type = 'rss2'; break; case 'rss_head': case 'opml_head': $type = 'comment'; break; case 'rdf_header': $type = 'rdf'; break; case 'atom_head': case 'comments_atom_head': case 'app_head': $type = 'atom'; break; } } switch ($type) { case 'html': $gen = '<meta name="generator" content="WordPress ' . get_bloginfo('version') . '">'; break; case 'xhtml': $gen = '<meta name="generator" content="WordPress ' . get_bloginfo('version') . '" />'; break; case 'atom': $gen = '<generator uri="http://wordpress.org/" version="' . get_bloginfo_rss('version') . '">WordPress</generator>'; break; case 'rss2': $gen = '<generator>http://wordpress.org/?v=' . get_bloginfo_rss('version') . '</generator>'; break; case 'rdf': $gen = '<admin:generatorAgent rdf:resource="http://wordpress.org/?v=' . get_bloginfo_rss('version') . '" />'; break; case 'comment': $gen = '<!-- generator="WordPress/' . get_bloginfo('version') . '" -->'; break; case 'export': $gen = '<!-- generator="WordPress/' . get_bloginfo_rss('version') . '" created="' . date('Y-m-d H:i') . '" -->'; break; } return apply_filters("get_the_generator_{$type}", $gen, $type); }
function ultimate_add_tags_to_rss($the_list, $type = "") { global $post, $utw; $home = get_bloginfo_rss('home'); if ($type == 'rdf') { $format = "<dc:subject>%tagdisplay%</dc:subject>"; } else { if ('atom' == $type) { $format = "<category scheme='{$home}' term='%tagdisplay%' />"; } else { $format = "<category>%tagdisplay%</category>"; } } $tags = $utw->FormatTags($utw->GetTagsForPost($post->ID), $format); $tags = str_replace('&', '&', $tags); $the_list .= $tags; return $the_list; }
function woo_subscribe_connect($widget = 'false', $title = '', $form = '', $social = '') { //Setup default variables, overriding them if the "Theme Options" have been saved. $settings = array('connect' => 'false', 'connect_title' => __('Subscribe', 'woothemes'), 'connect_related' => 'true', 'connect_content' => __('Subscribe to our e-mail newsletter to receive updates.', 'woothemes'), 'connect_newsletter_id' => '', 'connect_mailchimp_list_url' => '', 'feed_url' => '', 'connect_rss' => '', 'connect_twitter' => '', 'connect_facebook' => '', 'connect_youtube' => '', 'connect_flickr' => '', 'connect_linkedin' => '', 'connect_delicious' => '', 'connect_rss' => '', 'connect_googleplus' => '', 'connect_dribbble' => '', 'connect_instagram' => '', 'connect_vimeo' => '', 'connect_pinterest' => ''); $settings = woo_get_dynamic_values($settings); // Setup title if ($widget != 'true') { $title = $settings['connect_title']; } // Setup related post (not in widget) $related_posts = ''; if ($settings['connect_related'] == "true" and $widget != "true") { $related_posts = do_shortcode('[related_posts limit="5"]'); } ?> <?php if ($settings['connect'] == "true" or $widget == 'true') { ?> <aside id="connect"> <h3><?php if ($title) { echo stripslashes($title); } else { _e('Subscribe', 'woothemes'); } ?> </h3> <div <?php if ($related_posts != '') { echo 'class="col-left"'; } ?> > <p><?php if ($settings['connect_content'] != '') { echo stripslashes($settings['connect_content']); } else { _e('Subscribe to our e-mail newsletter to receive updates.', 'woothemes'); } ?> </p> <?php if ($settings['connect_newsletter_id'] != "" and $form != 'on') { ?> <form class="newsletter-form<?php if ($related_posts == '') { echo ' fl'; } ?> " action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=<?php echo $settings['connect_newsletter_id']; ?> ', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"> <input class="email" type="text" name="email" value="<?php _e('E-mail', 'woothemes'); ?> " onfocus="if (this.value == '<?php _e('E-mail', 'woothemes'); ?> ') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('E-mail', 'woothemes'); ?> ';}" /> <input type="hidden" value="<?php echo $settings['connect_newsletter_id']; ?> " name="uri"/> <input type="hidden" value="<?php echo esc_attr(get_bloginfo('name')); ?> " name="title"/> <input type="hidden" name="loc" value="en_US"/> <input class="submit button" type="submit" name="submit" value="<?php _e('Submit', 'woothemes'); ?> " /> </form> <?php } ?> <?php if ($settings['connect_mailchimp_list_url'] != "" and $form != 'on' and $settings['connect_newsletter_id'] == "") { ?> <!-- Begin MailChimp Signup Form --> <div id="mc_embed_signup"> <form class="newsletter-form<?php if ($related_posts == '') { echo ' fl'; } ?> " action="<?php echo $settings['connect_mailchimp_list_url']; ?> " method="post" target="popupwindow" onsubmit="window.open('<?php echo $settings['connect_mailchimp_list_url']; ?> ', 'popupwindow', 'scrollbars=yes,width=650,height=520');return true"> <input type="text" name="EMAIL" class="required email" value="<?php _e('E-mail', 'woothemes'); ?> " id="mce-EMAIL" onfocus="if (this.value == '<?php _e('E-mail', 'woothemes'); ?> ') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('E-mail', 'woothemes'); ?> ';}"> <input type="submit" value="<?php _e('Submit', 'woothemes'); ?> " name="subscribe" id="mc-embedded-subscribe" class="btn submit button"> </form> </div> <!--End mc_embed_signup--> <?php } ?> <?php if ($social != 'on') { ?> <div class="social<?php if ($related_posts == '' and $settings['connect_newsletter_id'] != "") { echo ' fr'; } ?> "> <?php if ($settings['connect_rss'] == "true") { ?> <a href="<?php if ($settings['feed_url']) { echo esc_url($settings['feed_url']); } else { echo get_bloginfo_rss('rss2_url'); } ?> " class="subscribe" title="RSS"></a> <?php } if ($settings['connect_twitter'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_twitter']); ?> " class="twitter" title="Twitter"></a> <?php } if ($settings['connect_facebook'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_facebook']); ?> " class="facebook" title="Facebook"></a> <?php } if ($settings['connect_youtube'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_youtube']); ?> " class="youtube" title="YouTube"></a> <?php } if ($settings['connect_flickr'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_flickr']); ?> " class="flickr" title="Flickr"></a> <?php } if ($settings['connect_linkedin'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_linkedin']); ?> " class="linkedin" title="LinkedIn"></a> <?php } if ($settings['connect_delicious'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_delicious']); ?> " class="delicious" title="Delicious"></a> <?php } if ($settings['connect_googleplus'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_googleplus']); ?> " class="googleplus" title="Google+"></a> <?php } if ($settings['connect_dribbble'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_dribbble']); ?> " class="dribbble" title="Google+"></a> <?php } if ($settings['connect_instagram'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_instagram']); ?> " class="instagram" title="Google+"></a> <?php } if ($settings['connect_vimeo'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_vimeo']); ?> " class="vimeo" title="Google+"></a> <?php } if ($settings['connect_pinterest'] != "") { ?> <a target="_blank" href="<?php echo esc_url($settings['connect_pinterest']); ?> " class="pinterest" title="Google+"></a> <?php } ?> </div> <?php } ?> </div><!-- col-left --> <?php if ($settings['connect_related'] == "true" and $related_posts != '') { ?> <div class="related-posts col-right"> <h4><?php _e('Related Posts:', 'woothemes'); ?> </h4> <?php echo $related_posts; ?> </div><!-- col-right --> <?php wp_reset_query(); } ?> <div class="fix"></div> </aside> <?php } }
/** * Creates the generator XML or Comment for RSS, ATOM, etc. * * Returns the correct generator type for the requested output format. Allows * for a plugin to filter generators on an individual basis using the * 'get_the_generator_{$type}' filter. * * @since 2.5.0 * @uses apply_filters() Calls 'get_the_generator_$type' hook. * * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export). * @return string The HTML content for the generator. */ function get_the_generator($type) { switch ($type) { case 'html': $gen = '<meta name="generator" content="WordPress ' . get_bloginfo('version') . '">'; break; case 'xhtml': $gen = '<meta name="generator" content="WordPress ' . get_bloginfo('version') . '" />'; break; case 'atom': $gen = '<generator uri="http://wordpress.org/" version="' . get_bloginfo_rss('version') . '">WordPress</generator>'; break; case 'rss2': $gen = '<generator>http://wordpress.org/?v=' . get_bloginfo_rss('version') . '</generator>'; break; case 'rdf': $gen = '<admin:generatorAgent rdf:resource="http://wordpress.org/?v=' . get_bloginfo_rss('version') . '" />'; break; case 'comment': $gen = '<!-- generator="WordPress/' . get_bloginfo('version') . '" -->'; break; case 'export': $gen = '<!-- generator="WordPress/' . get_bloginfo_rss('version') . '" created="' . date('Y-m-d H:i') . '"-->'; break; } return apply_filters("get_the_generator_{$type}", $gen, $type); }
/** * Display RSS container for the bloginfo function. * * You can retrieve anything that you can using the get_bloginfo() function. * Everything will be stripped of tags and characters converted, when the values * are retrieved for use in the feeds. * * @package WordPress * @subpackage Feed * @since 0.71 * @uses apply_filters() Calls 'bloginfo_rss' hook with two parameters. * @see get_bloginfo() For the list of possible values to display. * * @param string $show See get_bloginfo() for possible values. */ function bloginfo_rss($show = '') { echo apply_filters('bloginfo_rss', get_bloginfo_rss($show), $show); }
<?php $eshopref = apply_filters('eshop_add_ref_feed', ''); $data = "<?xml version='1.0' encoding='utf-8' ?>\n"; $data .= '<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0" xmlns:c="http://base.google.com/cns/1.0"> <channel> <copyright>' . get_bloginfo_rss('name') . '</copyright> <pubDate>' . date("r") . '</pubDate> <title>' . get_bloginfo_rss('name') . '</title> <link>' . get_bloginfo_rss('url') . $eshopref . '</link> <description>' . sprintf(__('Product feed for %1$s', 'eshop'), get_bloginfo_rss('name')) . '</description> <generator>' . __('eShop: Accessible e-commerce plugin for Wordpress', 'eshop') . '</generator>' . "\n"; global $wpdb, $eshopoptions; $metatable = $wpdb->prefix . 'postmeta'; $poststable = $wpdb->prefix . 'posts'; $myrowres = $wpdb->get_results("\n\t\tSELECT DISTINCT meta.post_id\n\t\tFROM {$metatable} as meta, {$poststable} as posts\n\t\tWHERE meta.meta_key = '_eshop_product'\n\t\tAND posts.ID = meta.post_id\n\t\tAND posts.post_status = 'publish'\n\t\tORDER BY meta.post_id"); $x = 0; foreach ($myrowres as $row) { $grabit[$x] = get_post_custom($row->post_id); $grabit[$x]['id'] = array($row->post_id); $x++; } /* * remove the bottom array to try and flatten * could be rather slow, but easier than trying to create * a different method, at least for now! */ foreach ($grabit as $foo => $k) { foreach ($k as $bar => $v) {
<?php /** * WicketPixie v2.0 * (c) 2006-2009 Eddie Ringle, * Chris J. Davis, * Dave Bates * Provided by Chris Pirillo * * Licensed under the New BSD License. */ // Blog feed URL if (get_option('wicketpixie_blog_feed_url') != false) { $blogfeed = get_option('wicketpixie_blog_feed_url'); } else { $blogfeed = get_bloginfo_rss('rss2_url'); } $status = new SourceUpdate(); global $optpre; global $adsense; $adsense = new AdsenseAdmin(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?> > <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php
/** * Universal Feed Loader * hooked function * supports custom settings * NOTE uses just-in-time initialization * @see functions.php, feed-links include module * @uses Universal Feed Writer class */ function tLoadFeed() { global $tFeeds, $tCurrentFeed, $wp_query, $post; $tCurrentFeed = get_query_var('feed'); // FB::trace($tCurrentFeed); if (empty($tCurrentFeed) || $tCurrentFeed == 'feed') { $tCurrentFeed = get_default_feed(); # rss2 } $args =& $tFeeds[$tCurrentFeed]; $defaults = array('num_entries' => get_option('posts_per_rss'), 'do_images' => true, 'size_image' => 'large', 'feed_type' => defined('TFEED') ? TFEED : 'atom', 'feed_title' => 'Recent Posts', 'feed_description' => 'An unfiltered list limited to ' . $num_entries . ' posts'); $args = apply_filters('t_load_feed_args', $args); $args = wp_parse_args($args, $defaults); # customizing default info if (is_category()) { $category = t_get_term_name(get_query_var('cat'), 'category'); $args['feed_title'] = 'Feed for ' . $category; $args['feed_description'] = 'A list limited to ' . $args['num_entries'] . ' posts categorized under ' . $category; } if ($wp_query->is_comment_feed) { # comment feed if (is_singular()) { $args['feed_title'] = 'Recent comments on ' . get_the_title_rss(); } elseif (is_search()) { $args['feed_title'] = 'Comments for search on ' . attribute_escape($wp_query->query_vars['s']); } else { $args['feed_title'] = 'Recent comments for ' . get_wp_title_rss(); } $args['feed_title'] = ent2ncr($args['feed_title']); $args['feed_description'] = 'A list limited to ' . $args['num_entries'] . ' comments'; } $args['query'] = tGetFeedQuery(); if (is_array($args['query'])) { $args['query']['showposts'] =& $args['num_entries']; } if ($tCurrentFeed == 'rss' || $tCurrentFeed == 'rss2' || $tCurrentFeed == 'atom') { $args['feed_type'] = $tCurrentFeed; } else { $args['feed_title'] = ucwords(str_replace('_', ' ', $tCurrentFeed)); } extract($args); # namespacing switch ($feed_type) { case 'rss2': $namespace = ' xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" '; $feedType = RSS2; break; case 'rss': $namespace = ' xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" '; $feedType = RSS1; break; case 'atom': default: $namespace = ' xmlns:thr="http://purl.org/syndication/thread/1.0" xml:lang="' . get_option('rss_language') . '" xml:base="' . get_bloginfo_rss('url') . '" '; $feedType = ATOM; break; } $GLOBALS['t_feed_ns'] = $namespace; # for use in FeedWriter add_filter('t_feed_ns', create_function('$default', 'return $default . $GLOBALS["t_feed_ns"];')); # start $feedWriter = new FeedWriter($feedType); require TDIR . TMODINC . 'feed-head.php'; require TDIR . TMODINC . 'feed-body.php'; # output $out = ob_get_contents(); $out = str_replace(array("\n", "\r", "\t", ' '), '', $input); ob_end_clean(); $feedWriter->generateFeed(); // lifestream_rss_feed(); // FB::info($args); }
/** * Adds subscribe icons to navigation * * v2.0 - NOTE: not added if "menu" is selected in Theme Options or if it is mobi * * @author Tim Bednar * @version v2.0 * @since v0.01 */ function ashford_theme_display_rss_subscribe() { global $ashfordtheme; $display_rss_subscribe = $ashfordtheme->option['display_rss_subscribe']; if ($display_rss_subscribe == 'rsson') { echo '<li id="follow" class="page-item">'; if ($ashfordtheme->option['facebook_url']) { $facebook_url = $ashfordtheme->option['facebook_url']; echo '<a id="facebook" title="Follow on Facebook" href="' . $facebook_url . '"><span><img src="' . ASHFORD_CHILD_URI . '/images/facebook.png" alt="facebook"/></span></a>'; } if ($ashfordtheme->option['twitter_url']) { $twitter_url = $ashfordtheme->option['twitter_url']; echo '<a id="twitter" title="Follow on Twitter" href="' . $twitter_url . '"><span><img src="' . ASHFORD_CHILD_URI . '/images/twitter.png" alt="twitter"/></span></a>'; } if ($ashfordtheme->option['feedburner_code']) { $feedburner_code = $ashfordtheme->option['feedburner_code']; echo '<a id="rss" title="' . get_bloginfo_rss('name') . ' RSS Feed" href="' . $feedburner_code . '"><span><img src="' . ASHFORD_CHILD_URI . '/images/feed.png" alt="rss"/></span></a>'; } else { echo '<a id="rss" title="' . get_bloginfo_rss('name') . ' RSS Feed" href="' . get_bloginfo_rss('rss2_url') . '"><span><img src="' . ASHFORD_CHILD_URI . '/images/feed.png" alt="rss"/></span></a>'; } echo '</li>'; } }
/** * Creates the generator XML or Comment for RSS, ATOM, etc. * * Returns the correct generator type for the requested output format. Allows * for a plugin to filter generators on an individual basis using the * 'get_the_generator_{$type}' filter. * * @since 2.5.0 * * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export). * @return string|void The HTML content for the generator. */ function get_the_generator($type = '') { if (empty($type)) { $current_filter = current_filter(); if (empty($current_filter)) { return; } switch ($current_filter) { case 'rss2_head': case 'commentsrss2_head': $type = 'rss2'; break; case 'rss_head': case 'opml_head': $type = 'comment'; break; case 'rdf_header': $type = 'rdf'; break; case 'atom_head': case 'comments_atom_head': case 'app_head': $type = 'atom'; break; } } switch ($type) { case 'html': $gen = '<meta name="generator" content="WordPress ' . get_bloginfo('version') . '">'; break; case 'xhtml': $gen = '<meta name="generator" content="WordPress ' . get_bloginfo('version') . '" />'; break; case 'atom': $gen = '<generator uri="http://wordpress.org/" version="' . get_bloginfo_rss('version') . '">WordPress</generator>'; break; case 'rss2': $gen = '<generator>http://wordpress.org/?v=' . get_bloginfo_rss('version') . '</generator>'; break; case 'rdf': $gen = '<admin:generatorAgent rdf:resource="http://wordpress.org/?v=' . get_bloginfo_rss('version') . '" />'; break; case 'comment': $gen = '<!-- generator="WordPress/' . get_bloginfo('version') . '" -->'; break; case 'export': $gen = '<!-- generator="WordPress/' . get_bloginfo_rss('version') . '" created="' . date('Y-m-d H:i') . '" -->'; break; } /** * Filter the HTML for the retrieved generator type. * * The dynamic portion of the hook name, `$type`, refers to the generator type. * * @since 2.5.0 * * @param string $gen The HTML markup output to {@see wp_head()}. * @param string $type The type of generator. Accepts 'html', 'xhtml', 'atom', * 'rss2', 'rdf', 'comment', 'export'. */ return apply_filters("get_the_generator_{$type}", $gen, $type); }
<?php /** This action is documented in wp-includes/feed-atom.php */ do_action('atom_ns'); /** * Fires inside the feed tag in the Atom comment feed. * * @since 2.8.0 */ do_action('atom_comments_ns'); ?> > <title type="text"><?php if (is_singular()) { printf(ent2ncr(__('Comments on %s')), get_the_title_rss()); } elseif (is_search()) { printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss('name'), get_search_query()); } else { printf(ent2ncr(__('Comments for %s')), get_wp_title_rss()); } ?> </title> <subtitle type="text"><?php bloginfo_rss('description'); ?> </subtitle> <updated><?php echo mysql2date('Y-m-d\\TH:i:s\\Z', get_lastcommentmodified('GMT'), false); ?> </updated>
public static function feed($atts = null, $content = null) { $atts = shortcode_atts(array('url' => get_bloginfo_rss('rss2_url'), 'limit' => 3, 'class' => ''), $atts, 'feed'); if (!function_exists('wp_rss')) { include_once ABSPATH . WPINC . '/rss.php'; } ob_start(); echo '<div class="su-feed' . su_ecssc($atts) . '">'; wp_rss($atts['url'], $atts['limit']); echo '</div>'; $return = ob_get_contents(); ob_end_clean(); return $return; }
/** * Displays Site Icon in RSS2. * * @since 4.3.0 */ function rss2_site_icon() { $rss_title = get_wp_title_rss(); if (empty($rss_title)) { $rss_title = get_bloginfo_rss('name'); } $url = get_site_icon_url(32); if ($url) { echo ' <image> <url>' . convert_chars($url) . '</url> <title>' . $rss_title . '</title> <link>' . get_bloginfo_rss('url') . '</link> <width>32</width> <height>32</height> </image> ' . "\n"; } }
function cyberchimps_add_core_fields($fields_list) { //theme check $theme_check = cyberchimps_theme_check(); // Set directory uri $directory_uri = get_template_directory_uri(); /*************************** LISTS AND DEFAULTS *********************************************/ // post byline $pbe_defaults = array('author' => 1, 'categories' => 1, 'date' => 1, 'comments' => 1, 'tags' => 1); $pbe_array = array('author' => __('Author', 'cyberchimps_core'), 'categories' => __('Categories', 'cyberchimps_core'), 'date' => __('Date', 'cyberchimps_core'), 'comments' => __('Comments', 'cyberchimps_core'), 'tags' => __('Tags', 'cyberchimps_core')); // Pull all the categories into an array $options_categories = array(); $options_categories_obj = get_categories(); foreach ($options_categories_obj as $category) { $options_categories['all'] = 'All'; $options_categories[$category->cat_ID] = $category->cat_name; } // Pull all carousel categories $options_carousel_cats = array(); $carousel_categories = get_terms('carousel_categories', array('hide_empty' => 0)); if (!is_wp_error($carousel_categories)) { foreach ($carousel_categories as $carousel_cat) { $options_carousel_cats[$carousel_cat->term_id] = $carousel_cat->name; } } // Get custom categories of boxes element $options_boxes_cats = array(); $boxes_terms = get_terms('boxes_categories', 'hide_empty=0'); if (!is_wp_error($boxes_terms)) { foreach ($boxes_terms as $term) { $options_boxes_cats[$term->slug] = $term->name; } } // Pull all portfolio categories $options_portfolio_cats = array(); $portfolio_categories = get_terms('portfolio_cats', array('hide_empty' => 0)); if (!is_wp_error($portfolio_categories)) { foreach ($portfolio_categories as $portfolio_cat) { $options_portfolio_cats[$portfolio_cat->term_id] = $portfolio_cat->name; } } // Pull all slider categories $options_slide_cats = array(); $slide_categories = get_terms('slide_categories', array('hide_empty' => 0)); if (!is_wp_error($portfolio_categories)) { foreach ($slide_categories as $slide_cat) { $options_slide_cats[$slide_cat->term_id] = $slide_cat->name; } } // Get all post categories $all_cats = array(); $all_categories = get_terms('category'); if (!is_wp_error($all_categories)) { foreach ($all_categories as $all_cat) { $all_cats[$all_cat->term_id] = $all_cat->name; } } // Pull all tags into an array $options_tags = array(); $options_tags_obj = get_tags(); foreach ($options_tags_obj as $tag) { $options_tags[$tag->term_id] = $tag->name; } // Pull all the pages into an array $options_pages = array(); $options_pages_obj = get_pages('sort_column=post_parent,menu_order'); $options_pages[''] = 'Select a page:'; foreach ($options_pages_obj as $page) { $options_pages[$page->ID] = $page->post_title; } // If using image radio buttons, define a directory path $imagepath = $directory_uri . '/cyberchimps/lib/images/'; $fields_list = array(); // Typography Defaults $typography_defaults = apply_filters('cyberchimps_typography_defaults', array('size' => '14px', 'face' => 'Arial, Helvetica, sans-serif', 'style' => 'normal', 'color' => '#333333')); // Heading Typography Defaults $typography_heading_defaults = apply_filters('cyberchimps_typography_heading_defaults', array('size' => '', 'face' => 'Arial, Helvetica, sans-serif', 'style' => '', 'color' => '')); /*************************** HELP *****************************************************/ $fields_list[] = array('name' => apply_filters('cyberchimps_help_sub_heading', __('CyberChimps Help', 'cyberchimps_core')), 'id' => 'help_info_display', 'type' => 'welcome', 'section' => 'cyberchimps_help_section', 'heading' => 'cyberchimps_help_heading'); /*************************** DESIGN ***************************************************/ /* LAYOUT OPTIONS */ $fields_list[] = array('name' => __('Responsive Design', 'cyberchimps_core'), 'id' => 'responsive_design', 'type' => 'toggle', 'std' => 'checked', 'section' => 'cyberchimps_custom_layout_section', 'heading' => 'cyberchimps_design_heading'); $fields_list[] = array('name' => __('Responsive Videos', 'cyberchimps_core'), 'id' => 'responsive_videos', 'type' => 'toggle', 'section' => 'cyberchimps_custom_layout_section', 'heading' => 'cyberchimps_design_heading'); $fields_list[] = array('name' => __('Gallery Lightbox', 'cyberchimps_core'), 'id' => 'gallery_lightbox', 'type' => 'toggle', 'std' => 'checked', 'section' => 'cyberchimps_custom_layout_section', 'heading' => 'cyberchimps_design_heading'); $fields_list[] = array('name' => __('Wide Sidebar', 'cyberchimps_core'), 'id' => 'wide_sidebar', 'type' => 'toggle', 'std' => 0, 'desc' => __('Only works on layouts with 1 sidebar', 'cyberchimps_core'), 'section' => 'cyberchimps_custom_layout_section', 'heading' => 'cyberchimps_design_heading'); $fields_list[] = array('name' => __('Max Width', 'cyberchimps_core'), 'id' => 'max_width', 'class' => '', 'std' => 1020, 'desc' => __('enter the width of your site in pixels', 'cyberchimps_core'), 'type' => 'text', 'section' => 'cyberchimps_custom_layout_section', 'heading' => 'cyberchimps_design_heading'); /** COMMENTED OUT - we are using WP background options instead. When deleting remove relevant functions from wp-head-hooks.php * /* BACKGROUND * * $fields_list[] = array( * 'name' => __('Select a background', 'cyberchimps_core' ), * 'id' => 'select_background', * 'std' => 'none', * 'type' => 'images', * 'options' => apply_filters( 'cyberchimps_background_image', array( * 'none' => $imagepath . 'backgrounds/thumbs/none.png', * 'noise' => $imagepath . 'backgrounds/thumbs/noise.png', * 'blue' => $imagepath . 'backgrounds/thumbs/blue.png', * 'dark' => $imagepath . 'backgrounds/thumbs/dark.png', * 'space' => $imagepath . 'backgrounds/thumbs/space.png' * ) ), * 'section' => 'cyberchimps_custom_background_section', * 'heading' => 'cyberchimps_design_heading' * ); * * $fields_list[] = array( * 'name' => __('Use a custom background', 'cyberchimps_core' ), * 'id' => 'custom_background', * 'type' => 'toggle', * 'section' => 'cyberchimps_custom_background_section', * 'heading' => 'cyberchimps_design_heading' * ); * * $fields_list[] = array( * 'name' => __('Background Image', 'cyberchimps_core' ), * 'desc' => __('Enter URL or upload file', 'cyberchimps_core' ), * 'id' => 'custom_background_image', * 'class' => 'custom_background_toggle', * 'type' => 'upload', * 'std' => '', * 'section' => 'cyberchimps_custom_background_section', * 'heading' => 'cyberchimps_design_heading' * ); * * $fields_list[] = array( * 'name' => __('Image position', 'cyberchimps_core' ), * 'id' => 'background_image_position', * 'class' => 'custom_background_toggle', * 'std' => 'top center', * 'type' => 'radio', * 'options' => array( * 'top left' => 'Left', * 'top center' => 'Center', * 'top right' => 'Right' * ), * 'section' => 'cyberchimps_custom_background_section', * 'heading' => 'cyberchimps_design_heading' * ); * * $fields_list[] = array( * 'name' => __('Image repeat', 'cyberchimps_core' ), * 'id' => 'background_image_repeat', * 'class' => 'custom_background_toggle', * 'std' => 'repeat', * 'type' => 'radio', * 'options' => array( * 'repeat' => 'Tile', * 'repeat-x' => 'Tile horizontally', * 'repeat-y' => 'Tile vertically', * 'no-repeat' => 'No tile' * ), * 'section' => 'cyberchimps_custom_background_section', * 'heading' => 'cyberchimps_design_heading' * ); * * $fields_list[] = array( * 'name' => __('Image attachment', 'cyberchimps_core' ), * 'id' => 'background_image_attachment', * 'class' => 'custom_background_toggle', * 'std' => 'scroll', * 'type' => 'radio', * 'options' => array( * 'scroll' => 'Scroll', * 'fixed' => 'Fixed' * ), * 'section' => 'cyberchimps_custom_background_section', * 'heading' => 'cyberchimps_design_heading' * ); * * /* CUSTOM COLORS */ $fields_list[] = array('name' => __('Select a Skin Color', 'cyberchimps_core'), 'id' => 'cyberchimps_skin_color', 'std' => 'default', 'type' => 'images', 'options' => apply_filters('cyberchimps_skin_color', array('default' => $directory_uri . '/inc/css/skins/images/default.png')), 'section' => 'cyberchimps_custom_colors_section', 'heading' => 'cyberchimps_design_heading'); /** COMMENTED OUT - Using WP background customization * $fields_list[] = array( * 'name' => __('Background Color', 'cyberchimps_core' ), * 'desc' => __('Select background color', 'cyberchimps_core' ), * 'id' => 'background_colorpicker', * 'std' => '', * 'type' => 'color', * 'section' => 'cyberchimps_custom_colors_section', * 'heading' => 'cyberchimps_design_heading' ); */ $fields_list[] = array('name' => __('Text Color', 'cyberchimps_core'), 'desc' => __('Select text color', 'cyberchimps_core'), 'id' => 'text_colorpicker', 'std' => '', 'type' => 'color', 'section' => 'cyberchimps_custom_colors_section', 'heading' => 'cyberchimps_design_heading'); $fields_list[] = array('name' => __('Link Color', 'cyberchimps_core'), 'desc' => __('Select link color', 'cyberchimps_core'), 'id' => 'link_colorpicker', 'std' => '', 'type' => 'color', 'section' => 'cyberchimps_custom_colors_section', 'heading' => 'cyberchimps_design_heading'); $fields_list[] = array('name' => __('Link Hover Color', 'cyberchimps_core'), 'desc' => __('Select link hover color', 'cyberchimps_core'), 'id' => 'link_hover_colorpicker', 'std' => '', 'type' => 'color', 'section' => 'cyberchimps_custom_colors_section', 'heading' => 'cyberchimps_design_heading'); /* Typography Options */ /* Default font faces */ $faces = array('Arial, Helvetica, sans-serif' => 'Arial', 'Arial Black, Gadget, sans-serif' => 'Arial Black', 'Comic Sans MS, cursive' => 'Comic Sans MS', 'Courier New, monospace' => 'Courier New', 'Georgia, serif' => 'Georgia', '"Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif' => 'Helvetica Neue', 'Impact, Charcoal, sans-serif' => 'Impact', 'Lucida Console, Monaco, monospace' => 'Lucida Console', 'Lucida Sans Unicode, Lucida Grande, sans-serif' => 'Lucida Sans Unicode', '"Open Sans", sans-serif' => 'Open Sans', 'Palatino Linotype, Book Antiqua, Palatino, serif' => 'Palatino Linotype', 'Tahoma, Geneva, sans-serif' => 'Tahoma', 'Times New Roman, Times, serif' => 'Times New Roman', 'Trebuchet MS, sans-serif' => 'Trebuchet MS', 'Verdana, Geneva, sans-serif' => 'Verdana', 'Symbol' => 'Symbol', 'Webdings' => 'Webdings', 'Wingdings, Zapf Dingbats' => 'Wingdings', 'MS Sans Serif, Geneva, sans-serif' => 'MS Sans Serif', 'MS Serif, New York, serif' => 'MS Serif', 'Google Fonts' => 'Google Fonts'); $typography_options = array('sizes' => apply_filters('cyberchimps_typography_sizes', array('8', '10', '12', '14', '16', '20')), 'faces' => apply_filters('cyberchimps_typography_faces', $faces), 'styles' => apply_filters('cyberchimps_typography_styles', array('normal' => 'Normal', 'bold' => 'Bold')), 'color' => false); $typography_heading_options = array('sizes' => false, 'faces' => apply_filters('cyberchimps_typography_faces', $faces), 'styles' => false, 'color' => false); /* Typography Section */ $fields_list[] = array('id' => 'typography_options', 'name' => __('Typography Options', 'cyberchimps_core'), 'type' => 'typography', 'std' => $typography_defaults, 'options' => $typography_options, 'section' => 'cyberchimps_typography_section', 'heading' => 'cyberchimps_design_heading'); // Entry field for google font $fields_list[] = array('name' => __('Enter Google font', 'cyberchimps_core'), 'id' => 'google_font_field', 'type' => 'text', 'desc' => __('Google font names are case sensitive', 'cyberchimps_core'), 'section' => 'cyberchimps_typography_section', 'heading' => 'cyberchimps_design_heading'); $fields_list[] = array('name' => __('Demo Text', 'cyberchimps_core'), 'id' => 'font_demo_text', 'type' => 'info', 'desc' => 'The quick CyberChimp jumps over the lazy dog', 'section' => 'cyberchimps_typography_section', 'heading' => 'cyberchimps_design_heading'); // Font Family for headings. $fields_list[] = array('name' => __('Font Family for headings', 'cyberchimps_core'), 'id' => 'font_family_headings', 'type' => 'typography', 'std' => $typography_heading_defaults, 'options' => $typography_heading_options, 'section' => 'cyberchimps_typography_section', 'heading' => 'cyberchimps_design_heading'); // Google Font for headings. $fields_list[] = array('name' => __('Google font for headings', 'cyberchimps_core'), 'id' => 'google_font_headings', 'type' => 'text', 'desc' => __('Google font names are case sensitive', 'cyberchimps_core'), 'section' => 'cyberchimps_typography_section', 'heading' => 'cyberchimps_design_heading'); /*************************** HEADER STARTS ***************************************************/ $fields_list[] = array('id' => 'header_section_order', 'name' => __('Header Drag/Drop', 'cyberchimps_core'), 'callback' => 'cyberchimps_drag_drop_field', 'std' => apply_filters('header_drag_and_drop_default', array('cyberchimps_header_content' => __('Logo + Icons', 'cyberchimps_core'))), 'type' => 'section_order', 'options' => apply_filters('header_drag_and_drop_options', array('cyberchimps_header_content' => __('Logo + Icons', 'cyberchimps_core'), 'cyberchimps_logo_search' => __('Logo + Search', 'cyberchimps_core'), 'cyberchimps_logo' => __('Logo', 'cyberchimps_core'))), 'section' => 'cyberchimps_header_drag_drop_section', 'heading' => 'cyberchimps_header_heading'); /********** HEADER OPTIONS STARTS ************/ $fields_list[] = array('name' => __('Custom Logo URL', 'cyberchimps_core'), 'id' => 'custom_logo_url', 'type' => 'toggle', 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('URL', 'cyberchimps_core'), 'desc' => __('Enter URL', 'cyberchimps_core'), 'id' => 'custom_logo_url_link', 'class' => 'custom_logo_url_toggle', 'type' => 'text', 'std' => home_url(), 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Custom Logo', 'cyberchimps_core'), 'id' => 'custom_logo', 'type' => 'toggle', 'std' => apply_filters('cyberchimps_logo_toggle', 0), 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Logo Image', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'custom_logo_uploader', 'class' => 'custom_logo_toggle', 'type' => 'upload', 'std' => apply_filters('cyberchimps_default_logo', $directory_uri . '/cyberchimps/lib/images/achimps.png'), 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Custom Favicon', 'cyberchimps_core'), 'id' => 'custom_favicon', 'type' => 'toggle', 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Favicon URL', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'favicon_uploader', 'class' => 'custom_favicon_toggle', 'type' => 'upload', 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Custom Apple touch icon', 'cyberchimps_core'), 'id' => 'custom_apple', 'type' => 'toggle', 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Apple Touch URL', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'apple_touch_uploader', 'class' => 'custom_apple_toggle', 'type' => 'upload', 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); // Add Google Analytics only to pro themes. In free themes it will be added by plugin as per WP standards. if ($theme_check == 'pro') { $fields_list[] = array('id' => 'google_analytics', 'name' => __('Google Analytics', 'cyberchimps_core'), 'type' => 'textarea', 'desc' => __('Copy and paste your Google Analytics code here', 'cyberchimps_core'), 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); } // Search bar toggle $fields_list[] = array('name' => __('Searchbar', 'cyberchimps_core'), 'id' => 'searchbar', 'type' => 'toggle', 'std' => apply_filters('searchbar_default', ''), 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); // Option to enter scripts into header. if ($theme_check == 'pro') { $fields_list[] = array('id' => 'header_scripts', 'name' => __('Header Scripts', 'cyberchimps_core'), 'type' => 'unfiltered_textarea', 'desc' => __('Please add script tags', 'cyberchimps_core'), 'section' => 'cyberchimps_header_options_section', 'heading' => 'cyberchimps_header_heading'); } /********** HEADER OPTIONS ENDS ************/ /********** SOCIAL STARTS ************/ $fields_list[] = array('name' => __('Choose your icon style', 'cyberchimps_core'), 'id' => 'theme_backgrounds', 'std' => apply_filters('cyberchimps_social_icon_default', 'default'), 'type' => 'images', 'options' => apply_filters('cyberchimps_social_icon_options', array('default' => $imagepath . 'social/thumbs/icons-default.png', 'legacy' => $imagepath . 'social/thumbs/icons-classic.png', 'round' => $imagepath . 'social/thumbs/icons-round.png')), 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // Facebook $fields_list[] = array('name' => __('Facebook', 'cyberchimps_core'), 'id' => 'social_facebook', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Facebook URL', 'cyberchimps_core'), 'id' => 'facebook_url', 'class' => 'social_facebook_toggle', 'std' => 'http://www.facebook.com/', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // Twitter $fields_list[] = array('name' => __('Twitter', 'cyberchimps_core'), 'id' => 'social_twitter', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Twitter URL', 'cyberchimps_core'), 'id' => 'twitter_url', 'class' => 'social_twitter_toggle', 'std' => 'http://www.twitter.com/', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // Google+ $fields_list[] = array('name' => __('Google+', 'cyberchimps_core'), 'id' => 'social_google', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Google+ URL', 'cyberchimps_core'), 'id' => 'google_url', 'class' => 'social_google_toggle', 'std' => 'http://www.google.com/', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // LinkedIn $fields_list[] = array('name' => __('LinkedIn', 'cyberchimps_core'), 'id' => 'social_linkedin', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('LinkedIn URL', 'cyberchimps_core'), 'id' => 'linkedin_url', 'class' => 'social_linkedin_toggle', 'std' => 'http://www.linkedin.com/', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // YouTube $fields_list[] = array('name' => __('YouTube', 'cyberchimps_core'), 'id' => 'social_youtube', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('YouTube URL', 'cyberchimps_core'), 'id' => 'youtube_url', 'class' => 'social_youtube_toggle', 'std' => 'http://www.youtube.com/', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // Flickr $fields_list[] = array('name' => __('Flickr', 'cyberchimps_core'), 'id' => 'social_flickr', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Flickr URL', 'cyberchimps_core'), 'id' => 'flickr_url', 'class' => 'social_flickr_toggle', 'std' => 'http://www.flickr.com/', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // Pinterest $fields_list[] = array('name' => __('Pinterest', 'cyberchimps_core'), 'id' => 'social_pinterest', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Pinterest URL', 'cyberchimps_core'), 'id' => 'pinterest_url', 'class' => 'social_pinterest_toggle', 'std' => 'http://www.pinterest.com/', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // Google Maps $fields_list[] = array('name' => __('Google Maps', 'cyberchimps_core'), 'id' => 'social_googlemaps', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Google Maps URL', 'cyberchimps_core'), 'id' => 'googlemaps_url', 'class' => 'social_googlemaps_toggle', 'std' => 'http://www.maps.google.com/', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // Email $fields_list[] = array('name' => __('Email', 'cyberchimps_core'), 'id' => 'social_email', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Email Address', 'cyberchimps_core'), 'id' => 'email_url', 'class' => 'social_email_toggle', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // RSS $fields_list[] = array('name' => __('RSS', 'cyberchimps_core'), 'id' => 'social_rss', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('RSS URL', 'cyberchimps_core'), 'id' => 'rss_url', 'class' => 'social_rss_toggle', 'std' => get_bloginfo_rss('rss_url'), 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); // Instagram $fields_list[] = array('name' => __('Instagram', 'cyberchimps_core'), 'id' => 'social_instagram', 'type' => 'toggle', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); $fields_list[] = array('name' => __('Instagram URL', 'cyberchimps_core'), 'id' => 'instagram_url', 'class' => 'social_instagram_toggle', 'std' => 'http://instagram.com/', 'type' => 'text', 'section' => 'cyberchimps_header_social_section', 'heading' => 'cyberchimps_header_heading'); /********** SOCIAL ENDS ************/ /*************************** HEADER ENDS ***************************************************/ /*************************** BLOG STARTS ***************************************************/ $fields_list[] = array('id' => 'blog_section_order', 'name' => __('Drag & Drop Blog Elements', 'cyberchimps_core'), 'callback' => 'cyberchimps_drag_drop_field', 'std' => apply_filters('cyberchimps_elements_draganddrop_defaults', array('slider_lite' => __('Slider Lite', 'cyberchimps_core'), 'boxes_lite' => __('Boxes', 'cyberchimps_core'), 'blog_post_page' => __('Post Page', 'cyberchimps_core'))), 'type' => 'section_order', 'options' => apply_filters('cyberchimps_elements_draganddrop_options', array('boxes_lite' => __('Boxes', 'cyberchimps_core'), 'portfolio_lite' => __('Portfolio Lite', 'cyberchimps_core'), 'blog_post_page' => __('Post Page', 'cyberchimps_core'), 'slider_lite' => __('Slider Lite', 'cyberchimps_core'))), 'section' => 'cyberchimps_drag_and_drop_section', 'heading' => 'cyberchimps_blog_heading'); /********* BLOG OPTIONS STARTS ***********/ $fields_list[] = array('name' => __('Select Page Layout', 'cyberchimps_core'), 'id' => 'sidebar_images', 'std' => apply_filters('cyberchimps_blog_layout_options_default', 'right_sidebar'), 'type' => 'images', 'options' => apply_filters('sidebar_layout_options', array('full_width' => $imagepath . '1col.png', 'right_sidebar' => $imagepath . '2cr.png')), 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Blog Title', 'cyberchimps_core'), 'id' => 'blog_title', 'type' => 'toggle', 'std' => 0, 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Blog Title Text', 'cyberchimps_core'), 'id' => 'blog_title_text', 'class' => 'blog_title_toggle', 'type' => 'text', 'std' => 'Our Blog', 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Post Formats Icons', 'cyberchimps_core'), 'id' => 'post_format_icons', 'type' => 'toggle', 'std' => apply_filters('cyberchimps_post_format_icons_default', 0), 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Post Excerpts', 'cyberchimps_core'), 'id' => 'post_excerpts', 'type' => 'toggle', 'std' => 0, 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Read More Text', 'cyberchimps_core'), 'id' => 'blog_read_more_text', 'class' => 'post_excerpts_toggle', 'type' => 'text', 'std' => 'Read More...', 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Excerpt Length', 'cyberchimps_core'), 'id' => 'blog_excerpt_length', 'class' => 'post_excerpts_toggle', 'type' => 'text', 'std' => 55, 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Featured Images', 'cyberchimps_core'), 'id' => 'post_featured_images', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); /********* Post Byline Starts***********/ // Author $fields_list[] = array('name' => __('Post Byline Author', 'cyberchimps_core'), 'id' => 'post_byline_author', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); // Categories $fields_list[] = array('name' => __('Post Byline Categories', 'cyberchimps_core'), 'id' => 'post_byline_categories', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); // Date $fields_list[] = array('name' => __('Post Byline Date', 'cyberchimps_core'), 'id' => 'post_byline_date', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); // Comments $fields_list[] = array('name' => __('Post Byline Comments', 'cyberchimps_core'), 'id' => 'post_byline_comments', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); // Tags $fields_list[] = array('name' => __('Post Byline Tags', 'cyberchimps_core'), 'id' => 'post_byline_tags', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_blog_options_section', 'heading' => 'cyberchimps_blog_heading'); /********* Post Byline Ends ***********/ /********* BLOG OPTIONS ENDS ***********/ if ($theme_check == 'free') { /********* BOXES LITE STARTS ****************/ $fields_list[] = array('name' => __('Boxes Upgrade', 'cyberchimps_core'), 'id' => 'boxes_upgrade', 'class' => 'cyberchimps_pro_upgrade', 'desc' => sprintf(__('Boxes Lite limits you to a total of 3 boxes throughout your whole site. Upgrade to %1$s to be able to create as many boxes as you like. Categorize them and display each category on a different page.', 'cyberchimps_core'), '<a href="' . apply_filters('cyberchimps_upgrade_link', 'http://cyberchimps.com') . '" title="' . apply_filters('cyberchimps_upgrade_pro_title', __('Pro', 'cyberchimps_core')) . '">' . apply_filters('cyberchimps_upgrade_pro_title', __('Pro', 'cyberchimps_core')) . '</a>'), 'type' => 'info', 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); /* Options for box 1 starts */ // Image uploader $fields_list[] = array('name' => __('First Box Image', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_boxes_lite_image_one', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_boxes_lite_img1', '/elements/lib/images/boxes/slidericon.png'), 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); // URL of Box link $fields_list[] = array('name' => __('Link URL', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_boxes_link_url_one', 'std' => apply_filters('cyberchimps_boxes_lite_url1', 'http://wordpress.org'), 'type' => 'text', 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Box text $fields_list[] = array('name' => __('First Box Text', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_boxes_lite_image_one_text', 'type' => 'textarea', 'std' => 'Alto ventos est coeptis utque fecit. Phoebe sine circumfuso arce. Tanto aliis. Matutinis cornua origo formaeque animal mundo. Chaos: fabricator. Natura mundo caesa addidit. Cuncta habendum meis omni ille formaeque emicuit septemque et. Lege fecit aethere porrexerat gentes horrifer formas.', 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); /* Options for box 1 ends */ /* Options for box 2 starts */ // Image uploader $fields_list[] = array('name' => __('Second Box Image', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_boxes_lite_image_two', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_boxes_lite_img2', '/elements/lib/images/boxes/blueprint.png'), 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); // URL of Box link $fields_list[] = array('name' => __('Link URL', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_boxes_link_url_two', 'std' => apply_filters('cyberchimps_boxes_lite_url2', 'http://wordpress.org'), 'type' => 'text', 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Box text $fields_list[] = array('name' => __('Second Box Text', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_boxes_lite_image_two_text', 'type' => 'textarea', 'std' => 'Alto ventos est coeptis utque fecit. Phoebe sine circumfuso arce. Tanto aliis. Matutinis cornua origo formaeque animal mundo. Chaos: fabricator. Natura mundo caesa addidit. Cuncta habendum meis omni ille formaeque emicuit septemque et. Lege fecit aethere porrexerat gentes horrifer formas.', 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); /* Options for box 2 ends */ /* Options for box 3 starts */ // Image uploader $fields_list[] = array('name' => __('Third Box Image', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_boxes_lite_image_three', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_boxes_lite_img3', '/elements/lib/images/boxes/docs.png'), 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); // URL of Box link $fields_list[] = array('name' => __('Link URL', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_boxes_link_url_three', 'std' => apply_filters('cyberchimps_boxes_lite_url3', 'http://wordpress.org'), 'type' => 'text', 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Box text $fields_list[] = array('name' => __('Third Box Text', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_boxes_lite_image_three_text', 'type' => 'textarea', 'std' => 'Alto ventos est coeptis utque fecit. Phoebe sine circumfuso arce. Tanto aliis. Matutinis cornua origo formaeque animal mundo. Chaos: fabricator. Natura mundo caesa addidit. Cuncta habendum meis omni ille formaeque emicuit septemque et. Lege fecit aethere porrexerat gentes horrifer formas.', 'section' => 'cyberchimps_blog_boxes_lite_section', 'heading' => 'cyberchimps_blog_heading'); /* Options for box 3 ends */ /********* BOXES LITE ENDS ******************/ /********* PORTFOLIO LITE STARTS ****************/ $fields_list[] = array('name' => __('Portfolio Upgrade', 'cyberchimps_core'), 'id' => 'portfolio_upgrade', 'class' => 'cyberchimps_pro_upgrade', 'desc' => sprintf(__('Portfolio Lite limits you to a total of 4 items throughout your whole site. Upgrade to %1$s to be able to create as many portfolio items as you like. Categorize them and display each category on a different page.', 'cyberchimps_core'), '<a href="' . apply_filters('cyberchimps_upgrade_link', 'http://cyberchimps.com') . '" title="' . apply_filters('cyberchimps_upgrade_pro_title', __('Pro', 'cyberchimps_core')) . '">' . apply_filters('cyberchimps_upgrade_pro_title', __('Pro', 'cyberchimps_core')) . '</a>'), 'type' => 'info', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); /* Options for portfolio 1 starts */ // Image uploader $fields_list[] = array('name' => __('First Portfolio Image', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_lite_image_one', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_portfolio_lite_img1', '/cyberchimps/lib/images/portfolio.jpg'), 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Image caption $fields_list[] = array('name' => __('First Portfolio Image Caption', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_lite_image_one_caption', 'std' => apply_filters('cyberchimps_portfolio_lite_caption1', 'CyberChimps'), 'type' => 'text', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Portfolio link toggle $fields_list[] = array('name' => __('First Porfolio Link', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_link_toggle_one', 'type' => 'toggle', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // URL of portfolio link $fields_list[] = array('name' => __('Link URL', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_link_url_one', 'class' => 'cyberchimps_blog_portfolio_link_toggle_one_toggle', 'std' => apply_filters('cyberchimps_portfolio_lite_url1', 'http://cyberchimps.com'), 'type' => 'text', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); /* Options for portfolio 1 ends */ /* Options for portfolio 2 starts */ // Image uploader $fields_list[] = array('name' => __('Second Portfolio Image', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_lite_image_two', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_portfolio_lite_img2', '/cyberchimps/lib/images/portfolio.jpg'), 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Image caption $fields_list[] = array('name' => __('Second Portfolio Image Caption', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_lite_image_two_caption', 'std' => apply_filters('cyberchimps_portfolio_lite_caption2', 'CyberChimps'), 'type' => 'text', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Portfolio link toggle $fields_list[] = array('name' => __('Second Porfolio Link', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_link_toggle_two', 'type' => 'toggle', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // URL of portfolio link $fields_list[] = array('name' => __('Link URL', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_link_url_two', 'class' => 'cyberchimps_blog_portfolio_link_toggle_two_toggle', 'std' => apply_filters('cyberchimps_portfolio_lite_url2', 'http://cyberchimps.com'), 'type' => 'text', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); /* Options for portfolio 2 ends */ /* Options for portfolio 3 starts */ // Image uploader $fields_list[] = array('name' => __('Third Portfolio Image', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_lite_image_three', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_portfolio_lite_img3', '/cyberchimps/lib/images/portfolio.jpg'), 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Image caption $fields_list[] = array('name' => __('Third Portfolio Image Caption', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_lite_image_three_caption', 'std' => apply_filters('cyberchimps_portfolio_lite_caption3', 'CyberChimps'), 'type' => 'text', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Portfolio link toggle $fields_list[] = array('name' => __('Third Porfolio Link', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_link_toggle_three', 'type' => 'toggle', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // URL of portfolio link $fields_list[] = array('name' => __('Link URL', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_link_url_three', 'class' => 'cyberchimps_blog_portfolio_link_toggle_three_toggle', 'std' => apply_filters('cyberchimps_portfolio_lite_url3', 'http://cyberchimps.com'), 'type' => 'text', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); /* Options for portfolio 3 ends */ /* Options for portfolio 4 starts */ // Image uploader $fields_list[] = array('name' => __('Fourth Portfolio Image', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_lite_image_four', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_portfolio_lite_img4', '/cyberchimps/lib/images/portfolio.jpg'), 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Image caption $fields_list[] = array('name' => __('Fourth Portfolio Image Caption', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_lite_image_four_caption', 'std' => apply_filters('cyberchimps_portfolio_lite_caption4', 'CyberChimps'), 'type' => 'text', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Portfolio link toggle $fields_list[] = array('name' => __('Fourth Porfolio Link', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_link_toggle_four', 'type' => 'toggle', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // URL of portfolio link $fields_list[] = array('name' => __('Link URL', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_link_url_four', 'class' => 'cyberchimps_blog_portfolio_link_toggle_four_toggle', 'std' => apply_filters('cyberchimps_portfolio_lite_url4', 'http://cyberchimps.com'), 'type' => 'text', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); /* Options for portfolio 4 ends */ // Portfolio title toggle $fields_list[] = array('name' => __('Portfolio Title', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_title_toggle', 'type' => 'toggle', 'std' => 'checked', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); // Portfolio title $fields_list[] = array('name' => __('Title', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_title', 'std' => 'Portfolio', 'type' => 'text', 'section' => 'cyberchimps_blog_portfolio_lite_section', 'heading' => 'cyberchimps_blog_heading'); /********* PORTFOLIO LITE ENDS ****************/ /********* SLIDER LITE STARTS *********/ $fields_list[] = array('name' => __('Slider Upgrade', 'cyberchimps_core'), 'id' => 'slider_upgrade', 'class' => 'cyberchimps_pro_upgrade', 'desc' => sprintf(__('Slider Lite limits you to a total of 3 images throughout your whole site. Upgrade to %1$s to be able to create more images. Categorize them and display each category on a different page.', 'cyberchimps_core'), '<a href="' . apply_filters('cyberchimps_upgrade_link', 'http://cyberchimps.com') . '" title="' . apply_filters('cyberchimps_upgrade_pro_title', __('Pro', 'cyberchimps_core')) . '">' . apply_filters('cyberchimps_upgrade_pro_title', __('Pro', 'cyberchimps_core')) . '</a>'), 'type' => 'info', 'section' => 'cyberchimps_blog_slider_lite_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Slider Image 1', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'image_one_slide', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_slider_lite_img1', '/images/branding/slide1.jpg'), 'section' => 'cyberchimps_blog_slider_lite_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Slide 1 URL', 'cyberchimps_core'), 'id' => 'image_one_slide_url', 'std' => apply_filters('cyberchimps_slider_lite_url1', 'http://cyberchimps.com'), 'type' => 'text', 'section' => 'cyberchimps_blog_slider_lite_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Slider Image 2', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'image_two_slide', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_slider_lite_img2', '/elements/lib/images/slider/slide1.jpg'), 'section' => 'cyberchimps_blog_slider_lite_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Slide 2 URL', 'cyberchimps_core'), 'id' => 'image_two_slide_url', 'std' => apply_filters('cyberchimps_slider_lite_url2', 'http://cyberchimps.com'), 'type' => 'text', 'section' => 'cyberchimps_blog_slider_lite_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Slider Image 3', 'cyberchimps_core'), 'desc' => __('Enter URL or upload file', 'cyberchimps_core'), 'id' => 'image_three_slide', 'type' => 'upload', 'std' => $directory_uri . apply_filters('cyberchimps_slider_lite_img3', '/elements/lib/images/slider/slide1.jpg'), 'section' => 'cyberchimps_blog_slider_lite_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Slide 3 URL', 'cyberchimps_core'), 'id' => 'image_three_slide_url', 'std' => apply_filters('cyberchimps_slider_lite_url3', 'http://cyberchimps.com'), 'type' => 'text', 'section' => 'cyberchimps_blog_slider_lite_section', 'heading' => 'cyberchimps_blog_heading'); /********* SLIDER LITE ENDS ***********/ } // end free theme check //pro theme check if ($theme_check == 'pro') { /********* PORTFOLIO PRO STARTS ***************/ $fields_list[] = array('name' => __('Images per Row', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_pro_per_row', 'std' => 3, 'type' => 'select', 'options' => array(3 => 'Three (default)', 2 => 'Two', 4 => 'Four'), 'section' => 'cyberchimps_portfolio_pro_section', 'heading' => 'cyberchimps_blog_heading'); if ($options_portfolio_cats) { $fields_list[] = array('name' => __('Portfolio Category', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_pro_category', 'type' => 'select', 'options' => $options_portfolio_cats, 'section' => 'cyberchimps_portfolio_pro_section', 'heading' => 'cyberchimps_blog_heading'); } else { $fields_list[] = array('name' => __('Portfolio Category', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_pro_category_help', 'type' => 'help', 'desc' => __('You need to create a Category', 'cyberchimps_core'), 'section' => 'cyberchimps_portfolio_pro_section', 'heading' => 'cyberchimps_blog_heading'); } $fields_list[] = array('name' => __('Portfolio Title', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_pro_title', 'type' => 'toggle', 'section' => 'cyberchimps_portfolio_pro_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Title', 'cyberchimps_core'), 'id' => 'cyberchimps_blog_portfolio_pro_title_text', 'class' => 'cyberchimps_blog_portfolio_pro_title_toggle', 'type' => 'text', 'section' => 'cyberchimps_portfolio_pro_section', 'heading' => 'cyberchimps_blog_heading'); /********* PORTFOLIO PRO ENDS *****************/ /********* BLOG SLIDER STARTS ***********/ $fields_list[] = array('name' => __('Slider Size', 'cyberchimps_core'), 'id' => 'blog_slider_size', 'type' => 'select', 'std' => 'full', 'options' => array('full' => __('Full', 'cyberchimps_core'), 'half' => __('Half', 'cyberchimps_core')), 'section' => 'cyberchimps_slider_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Slider Type', 'cyberchimps_core'), 'id' => 'blog_slider_type', 'class' => 'select-hide', 'type' => 'select', 'std' => 'custom_slides', 'options' => array('post' => __('Posts', 'cyberchimps_core'), 'custom_slides' => __('Custom', 'cyberchimps_core')), 'section' => 'cyberchimps_slider_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Post Categories', 'cyberchimps_core'), 'id' => 'blog_slider_post_cats', 'class' => 'post-select', 'type' => 'select', 'std' => 'all', 'options' => $options_categories, 'section' => 'cyberchimps_slider_section', 'heading' => 'cyberchimps_blog_heading'); if ($options_slide_cats) { $fields_list[] = array('name' => __('Custom Categories', 'cyberchimps_core'), 'id' => 'custom_slider_post_cats', 'class' => 'custom_slides-select', 'type' => 'select', 'std' => 'cyberchimps_all', 'options' => $options_slide_cats, 'section' => 'cyberchimps_slider_section', 'heading' => 'cyberchimps_blog_heading'); } else { $fields_list[] = array('name' => __('Custom Categories', 'cyberchimps_core'), 'id' => 'custom_slider_post_cats_help', 'class' => 'custom_slides-select', 'type' => 'help', 'desc' => __('You need to create a Category', 'cyberchimps_core'), 'section' => 'cyberchimps_slider_section', 'heading' => 'cyberchimps_blog_heading'); } $fields_list[] = array('name' => __('Number of Featured Blog Posts', 'cyberchimps_core'), 'id' => 'blog_no_featured_posts', 'std' => '', 'type' => 'text', 'section' => 'cyberchimps_slider_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Slider Height', 'cyberchimps_core'), 'id' => 'slider_height', 'std' => '', 'type' => 'text', 'section' => 'cyberchimps_slider_section', 'heading' => 'cyberchimps_blog_heading'); // Slider Speed $fields_list[] = array('name' => __('Slider Speed ', 'cyberchimps_core'), 'id' => 'slider_speed', 'std' => '3000', 'type' => 'text', 'section' => 'cyberchimps_slider_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Slider Arrows', 'cyberchimps_core'), 'id' => 'slider_arrows', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_slider_section', 'heading' => 'cyberchimps_blog_heading'); /********* BLOG SLIDER ENDS ***********/ /********* CALLOUT OPTIONS STARTS ***********/ $fields_list[] = array('name' => __('Callout Title', 'cyberchimps_core'), 'id' => 'callout_title', 'std' => sprintf(__('%1$s\'s Call Out Element', 'cyberchimps_core'), apply_filters('cyberchimps_current_theme_name', 'CyberChimps')), 'type' => 'text', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Callout Text', 'cyberchimps_core'), 'id' => 'callout_text', 'std' => sprintf(__('Use %1$s\'s Call Out section on any page where you want to deliver an important message to your customer or client.', 'cyberchimps_core'), apply_filters('cyberchimps_current_theme_name', 'CyberChimps')), 'type' => 'editor', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Callout Button', 'cyberchimps_core'), 'id' => 'callout_button', 'std' => '', 'type' => 'toggle', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Callout Button Text', 'cyberchimps_core'), 'id' => 'callout_button_text', 'class' => 'callout_button_toggle', 'std' => __('Click Here', 'cyberchimps_core'), 'type' => 'text', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Callout Button URL', 'cyberchimps_core'), 'id' => 'callout_button_url', 'class' => 'callout_button_toggle', 'std' => '', 'type' => 'text', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Custom Callout Options', 'cyberchimps_core'), 'id' => 'custom_callout_options', 'std' => '', 'type' => 'toggle', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Button', 'cyberchimps_core'), 'id' => 'custom_callout_button', 'class' => 'custom_callout_options_toggle', 'std' => '', 'type' => 'upload', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Background Color', 'cyberchimps_core'), 'id' => 'custom_callout_background_color', 'class' => 'custom_callout_options_toggle', 'std' => '', 'type' => 'color', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Title Color', 'cyberchimps_core'), 'id' => 'custom_callout_title_color', 'class' => 'custom_callout_options_toggle', 'std' => '', 'type' => 'color', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Text Color', 'cyberchimps_core'), 'id' => 'custom_callout_text_color', 'class' => 'custom_callout_options_toggle', 'std' => '', 'type' => 'color', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Button Color', 'cyberchimps_core'), 'id' => 'custom_callout_button_color', 'class' => 'custom_callout_options_toggle', 'std' => '', 'type' => 'color', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Button Text Color', 'cyberchimps_core'), 'id' => 'custom_callout_button_text_color', 'class' => 'custom_callout_options_toggle', 'std' => '', 'type' => 'color', 'section' => 'cyberchimps_callout_section', 'heading' => 'cyberchimps_blog_heading'); /*********** CALLOUT OPTIONS ENDS **************/ /********* HTML BOX OPTIONS STARTS ***********/ $fields_list[] = array('name' => __('HTML Box', 'cyberchimps_core'), 'id' => 'html_box', 'std' => '', 'desc' => __('Enter your custom HTML code here', 'cyberchimps_core'), 'type' => 'editor', 'settings' => array('media_buttons' => true), 'section' => 'cyberchimps_html_box_section', 'heading' => 'cyberchimps_blog_heading'); /********* HTML BOX OPTIONS ENDS *************/ /************ RECENT POSTS STARTS **************/ $fields_list[] = array('name' => __('Title', 'cyberchimps_core'), 'id' => 'recent_posts_title', 'std' => '', 'type' => 'toggle', 'section' => 'cyberchimps_recent_posts_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Custom Title', 'cyberchimps_core'), 'id' => 'recent_posts_custom_title', 'class' => 'recent_posts_title_toggle', 'std' => '', 'type' => 'text', 'section' => 'cyberchimps_recent_posts_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Post Categories', 'cyberchimps_core'), 'id' => 'recent_posts_post_cats', 'type' => 'select', 'std' => 'all', 'options' => $options_categories, 'section' => 'cyberchimps_recent_posts_section', 'heading' => 'cyberchimps_blog_heading'); $fields_list[] = array('name' => __('Images', 'cyberchimps_core'), 'id' => 'recent_posts_images', 'std' => '', 'type' => 'toggle', 'section' => 'cyberchimps_recent_posts_section', 'heading' => 'cyberchimps_blog_heading'); /************ RECENT POSTS ENDS ****************/ /********* CAROUSEL OPTIONS STARTS ***********/ if ($options_carousel_cats) { $fields_list[] = array('name' => __('Select a Category', 'cyberchimps_core'), 'id' => 'carousel_categories', 'type' => 'select', 'options' => $options_carousel_cats, 'section' => 'cyberchimps_carousel_section', 'heading' => 'cyberchimps_blog_heading'); } else { $fields_list[] = array('name' => __('Select a Category', 'cyberchimps_core'), 'id' => 'carousel_categories_help', 'type' => 'help', 'desc' => __('You need to create a Category', 'cyberchimps_core'), 'section' => 'cyberchimps_carousel_section', 'heading' => 'cyberchimps_blog_heading'); } /********* CAROUSEL OPTIONS ENDS ***********/ /********* BOXES OPTIONS STARTS ***********/ if ($options_boxes_cats) { $fields_list[] = array('name' => __('Select a Category', 'cyberchimps_core'), 'id' => 'boxes_category', 'type' => 'select', 'options' => $options_boxes_cats, 'section' => 'cyberchimps_boxes_section', 'heading' => 'cyberchimps_blog_heading'); } else { $fields_list[] = array('name' => __('Select a Category', 'cyberchimps_core'), 'id' => 'boxes_category_help', 'type' => 'help', 'desc' => __('You need to create a Category', 'cyberchimps_core'), 'section' => 'cyberchimps_boxes_section', 'heading' => 'cyberchimps_blog_heading'); } $fields_list[] = array('name' => __('Number of boxes per row', 'cyberchimps_core'), 'id' => 'boxes_per_row', 'type' => 'select', 'options' => array(2 => '2', 3 => '3', 4 => '4'), 'std' => apply_filters('cyberchimps_boxes_default_number', 3), 'section' => 'cyberchimps_boxes_section', 'heading' => 'cyberchimps_blog_heading'); /********* BOXES OPTIONS ENDS ***********/ } // end pro option fields /********* FEATURED POSTS START ************/ /*$fields_list[] = array( 'name' => __('Post Categories', 'cyberchimps_core' ), 'id' => 'featured_posts_categories', 'type' => 'select', 'std' => 'all', 'options' => $options_categories, 'section' => 'cyberchimps_featured_posts_section', 'heading' => 'cyberchimps_blog_heading' ); /********* FEATURED POSTS ENDS ************/ /********* PROFILE OPTIONS STARTS ********** * * // add gravatar image as default * $email = get_option( 'admin_email' ); * if( $email ) { * $hash = md5( strtolower( trim ( $email ) ) ); * $default_image = 'http://gravatar.com/avatar/' . $hash . '.jpg?s=250&r=g'; * } * else { * $default_image = get_template_directory_uri() . '/elements/lib/images/profile/profile.jpg'; * } * * $fields_list[] = array( * 'name' => __('Profile Name', 'cyberchimps_core' ), * 'id' => 'profile_name', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Profile Picture', 'cyberchimps_core' ), * 'desc' => __('Enter URL or upload picture', 'cyberchimps_core' ), * 'id' => 'profile_picture', * 'type' => 'upload', * 'std' => $default_image, * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Profession', 'cyberchimps_core' ), * 'id' => 'profile_profession', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('About', 'cyberchimps_core' ), * 'id' => 'profile_about', * 'std' => '', * 'type' => 'textarea', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Location', 'cyberchimps_core' ), * 'id' => 'profile_location', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Phone Number', 'cyberchimps_core' ), * 'id' => 'profile_phone', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Email Address', 'cyberchimps_core' ), * 'id' => 'profile_email', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Website Address', 'cyberchimps_core' ), * 'id' => 'profile_website', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * /* Social options for profile starts * * $fields_list[] = array( * 'name' => __('Twitter', 'cyberchimps_core' ), * 'id' => 'profile_twitter', * 'std' => 'checked', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('Twitter URL', 'cyberchimps_core' ), * 'id' => 'profile_twitter_url', * 'class' => 'profile_twitter_toggle', * 'std' => 'http://www.twitter.com/', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Facebook', 'cyberchimps_core' ), * 'id' => 'profile_facebook', * 'std' => 'checked', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('Facebook URL', 'cyberchimps_core' ), * 'id' => 'profile_facebook_url', * 'class' => 'profile_facebook_toggle', * 'std' => 'http://www.facebook.com/', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Google+', 'cyberchimps_core' ), * 'id' => 'profile_google', * 'std' => 'checked', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('Google+ URL', 'cyberchimps_core' ), * 'id' => 'profile_google_url', * 'class' => 'profile_google_toggle', * 'std' => 'http://www.google.com/', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Flickr', 'cyberchimps_core' ), * 'id' => 'profile_flickr', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('Flickr URL', 'cyberchimps_core' ), * 'id' => 'profile_flickr_url', * 'class' => 'profile_flickr_toggle', * 'std' => 'http://www.flickr.com/', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Pinterest', 'cyberchimps_core' ), * 'id' => 'profile_pinterest', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('Pinterest URL', 'cyberchimps_core' ), * 'id' => 'profile_pinterest_url', * 'class' => 'profile_pinterest_toggle', * 'std' => 'http://www.pinterest.com/', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('LinkedIn', 'cyberchimps_core' ), * 'id' => 'profile_linkedin', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('LinkedIn URL', 'cyberchimps_core' ), * 'id' => 'profile_linkedin_url', * 'class' => 'profile_linkedin_toggle', * 'std' => 'http://www.linkedin.com/', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('YouTube', 'cyberchimps_core' ), * 'id' => 'profile_youtube', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('YouTube URL', 'cyberchimps_core' ), * 'id' => 'profile_youtube_url', * 'class' => 'profile_youtube_toggle', * 'std' => 'http://www.youtube.com/', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('RSS', 'cyberchimps_core' ), * 'id' => 'profile_rss', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('RSS URL', 'cyberchimps_core' ), * 'id' => 'profile_rss_url', * 'class' => 'profile_rss_toggle', * 'std' => get_bloginfo_rss( 'rss_url' ), * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Email', 'cyberchimps_core' ), * 'id' => 'profile_email_id', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('Email Address', 'cyberchimps_core' ), * 'id' => 'profile_email_id_url', * 'class' => 'profile_email_id_toggle', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * * $fields_list[] = array( * 'name' => __('Google Maps', 'cyberchimps_core' ), * 'id' => 'profile_googlemaps', * 'type' => 'toggle', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading'); * * $fields_list[] = array( * 'name' => __('Google Maps URL', 'cyberchimps_core' ), * 'id' => 'profile_googlemaps_url', * 'class' => 'profile_googlemaps_toggle', * 'std' => 'http://www.maps.google.com/', * 'type' => 'text', * 'section' => 'cyberchimps_profile_section', * 'heading' => 'cyberchimps_blog_heading' * ); * /* Social options for profile ends */ /********* PROFILE OPTIONS ENDS ************/ /*************************** TEMPLATES ***************************************************/ /* SINGLE POSTS */ $fields_list[] = array('name' => __('Sidebar Options', 'cyberchimps_core'), 'desc' => __('Images for layout.', 'cyberchimps_core'), 'id' => 'single_post_sidebar_options', 'std' => 'right_sidebar', 'type' => 'images', 'options' => apply_filters('sidebar_layout_options', array('full_width' => $imagepath . '1col.png', 'right_sidebar' => $imagepath . '2cr.png')), 'section' => 'cyberchimps_single_post_section', 'heading' => 'cyberchimps_templates_heading'); // Toggle for post title $fields_list[] = array('name' => __('Post title', 'cyberchimps_core'), 'id' => 'single_post_title', 'type' => 'toggle', 'std' => 'checked', 'section' => 'cyberchimps_single_post_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Featured Images', 'cyberchimps_core'), 'id' => 'single_post_featured_images', 'type' => 'toggle', 'section' => 'cyberchimps_single_post_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Post Format Icons', 'cyberchimps_core'), 'id' => 'single_post_format_icons', 'type' => 'toggle', 'section' => 'cyberchimps_single_post_section', 'heading' => 'cyberchimps_templates_heading'); /********* Post Byline Starts***********/ // Author $fields_list[] = array('name' => __('Post Byline Author', 'cyberchimps_core'), 'id' => 'single_post_byline_author', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_single_post_section', 'heading' => 'cyberchimps_templates_heading'); // Categories $fields_list[] = array('name' => __('Post Byline Categories', 'cyberchimps_core'), 'id' => 'single_post_byline_categories', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_single_post_section', 'heading' => 'cyberchimps_templates_heading'); // Date $fields_list[] = array('name' => __('Post Byline Date', 'cyberchimps_core'), 'id' => 'single_post_byline_date', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_single_post_section', 'heading' => 'cyberchimps_templates_heading'); // Comments $fields_list[] = array('name' => __('Post Byline Comments', 'cyberchimps_core'), 'id' => 'single_post_byline_comments', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_single_post_section', 'heading' => 'cyberchimps_templates_heading'); // Tags $fields_list[] = array('name' => __('Post Byline Tags', 'cyberchimps_core'), 'id' => 'single_post_byline_tags', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_single_post_section', 'heading' => 'cyberchimps_templates_heading'); /********* Post Byline Ends ***********/ /* ARCHIVE */ $fields_list[] = array('name' => __('Sidebar Options', 'cyberchimps_core'), 'desc' => __('Images for layout.', 'cyberchimps_core'), 'id' => 'archive_sidebar_options', 'std' => 'right_sidebar', 'type' => 'images', 'options' => apply_filters('sidebar_layout_options', array('full_width' => $imagepath . '1col.png', 'right_sidebar' => $imagepath . '2cr.png')), 'section' => 'cyberchimps_archive_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Post Format Icons', 'cyberchimps_core'), 'id' => 'archive_format_icons', 'type' => 'toggle', 'section' => 'cyberchimps_archive_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Post Excerpts', 'cyberchimps_core'), 'id' => 'archive_post_excerpts', 'type' => 'toggle', 'std' => 0, 'section' => 'cyberchimps_archive_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Featured Images', 'cyberchimps_core'), 'id' => 'archive_featured_images', 'type' => 'toggle', 'section' => 'cyberchimps_archive_section', 'heading' => 'cyberchimps_templates_heading'); /********* Post Byline Starts***********/ // Author $fields_list[] = array('name' => __('Post Byline Author', 'cyberchimps_core'), 'id' => 'archive_post_byline_author', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_archive_section', 'heading' => 'cyberchimps_templates_heading'); // Categories $fields_list[] = array('name' => __('Post Byline Categories', 'cyberchimps_core'), 'id' => 'archive_post_byline_categories', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_archive_section', 'heading' => 'cyberchimps_templates_heading'); // Date $fields_list[] = array('name' => __('Post Byline Date', 'cyberchimps_core'), 'id' => 'archive_post_byline_date', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_archive_section', 'heading' => 'cyberchimps_templates_heading'); // Comments $fields_list[] = array('name' => __('Post Byline Comments', 'cyberchimps_core'), 'id' => 'archive_post_byline_comments', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_archive_section', 'heading' => 'cyberchimps_templates_heading'); // Tags $fields_list[] = array('name' => __('Post Byline Tags', 'cyberchimps_core'), 'id' => 'archive_post_byline_tags', 'std' => 'checked', 'type' => 'toggle', 'section' => 'cyberchimps_archive_section', 'heading' => 'cyberchimps_templates_heading'); /********* Post Byline Ends ***********/ /* SEARCH */ $fields_list[] = array('name' => __('Sidebar Options', 'cyberchimps_core'), 'desc' => __('Images for layout.', 'cyberchimps_core'), 'id' => 'search_sidebar_options', 'std' => 'right_sidebar', 'type' => 'images', 'options' => apply_filters('sidebar_layout_options', array('full_width' => $imagepath . '1col.png', 'right_sidebar' => $imagepath . '2cr.png')), 'section' => 'cyberchimps_search_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Post Excerpts', 'cyberchimps_core'), 'id' => 'search_post_excerpts', 'type' => 'toggle', 'section' => 'cyberchimps_search_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Read More Text', 'cyberchimps_core'), 'id' => 'search_post_read_more', 'class' => 'search_post_excerpts_toggle', 'type' => 'text', 'std' => 'Read More...', 'section' => 'cyberchimps_search_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Excerpt Length', 'cyberchimps_core'), 'id' => 'search_post_excerpt_length', 'class' => 'search_post_excerpts_toggle', 'type' => 'text', 'std' => 55, 'section' => 'cyberchimps_search_section', 'heading' => 'cyberchimps_templates_heading'); /* 404 */ $fields_list[] = array('name' => __('Sidebar Options', 'cyberchimps_core'), 'desc' => __('Images for layout.', 'cyberchimps_core'), 'id' => 'error_sidebar_options', 'std' => 'full_width', 'type' => 'images', 'options' => apply_filters('sidebar_layout_options', array('full_width' => $imagepath . '1col.png', 'right_sidebar' => $imagepath . '2cr.png')), 'section' => 'cyberchimps_error_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Custom 404 Title', 'cyberchimps_core'), 'id' => 'error_custom_title', 'type' => 'text', 'section' => 'cyberchimps_error_section', 'heading' => 'cyberchimps_templates_heading'); $fields_list[] = array('name' => __('Custom 404 Content', 'cyberchimps_core'), 'id' => 'error_custom_content', 'std' => '', 'type' => 'editor', 'settings' => array('media_buttons' => true), 'section' => 'cyberchimps_error_section', 'heading' => 'cyberchimps_templates_heading'); /*************************** FOOTER ***************************************************/ $fields_list[] = array('name' => __('Footer Widgets', 'cyberchimps_core'), 'id' => 'footer_show_toggle', 'std' => 1, 'type' => 'toggle', 'section' => 'cyberchimps_footer_section', 'heading' => 'cyberchimps_footer_heading'); $fields_list[] = array('id' => 'footer_copyright_text', 'name' => __('Footer Copyright Text', 'cyberchimps_core'), 'std' => '© ' . get_bloginfo('name'), 'type' => 'text_html', 'section' => 'cyberchimps_footer_section', 'heading' => 'cyberchimps_footer_heading'); return apply_filters('cyberchimps_field_filter', $fields_list); }
/** * Prints the news XML sitemap conforming to the Sitemaps.org protocol. * Outputs an XML list of up to 1000 posts published in the last 2 days. * * @module sitemaps * * @link http://sitemaps.org/protocol.php Sitemaps.org protocol. */ function jetpack_print_news_sitemap() { $xml = get_transient('jetpack_news_sitemap'); if ($xml) { header('Content-Type: application/xml'); echo $xml; die; } global $wpdb, $post; /** * Filter post types to be included in news sitemap. * * @module sitemaps * * @since 3.9.0 * * @param array $post_types Array with post types to include in news sitemap. */ $post_types = apply_filters('jetpack_sitemap_news_sitemap_post_types', array('post')); if (empty($post_types)) { return; } $post_types_in = array(); foreach ($post_types as $post_type) { $post_types_in[] = $wpdb->prepare('%s', $post_type); } $post_types_in_string = implode(', ', $post_types_in); /** * Filter limit of entries to include in news sitemap. * * @module sitemaps * * @since 3.9.0 * * @param int $count Number of entries to include in news sitemap. */ $limit = apply_filters('jetpack_sitemap_news_sitemap_count', 1000); $cur_datetime = current_time('mysql', true); $query = $wpdb->prepare("\n\t\tSELECT p.ID, p.post_title, p.post_type, p.post_date, p.post_name, p.post_date_gmt, GROUP_CONCAT(t.name SEPARATOR ', ') AS keywords\n\t\tFROM\n\t\t\t{$wpdb->posts} AS p LEFT JOIN {$wpdb->term_relationships} AS r ON p.ID = r.object_id\n\t\t\tLEFT JOIN {$wpdb->term_taxonomy} AS tt ON r.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy = 'post_tag'\n\t\t\tLEFT JOIN {$wpdb->terms} AS t ON tt.term_id = t.term_id\n\t\tWHERE\n\t\t\tpost_status='publish' AND post_type IN ( {$post_types_in_string} ) AND post_date_gmt > (%s - INTERVAL 2 DAY)\n\t\tGROUP BY p.ID\n\t\tORDER BY p.post_date_gmt DESC LIMIT %d", $cur_datetime, $limit); // URL to XSLT $xsl = get_option('permalink_structure') ? home_url('news-sitemap.xsl') : home_url('/?jetpack-news-sitemap-xsl=true'); // Unless it's zh-cn for Simplified Chinese or zh-tw for Traditional Chinese, // trim national variety so an ISO 639 language code as required by Google. $language_code = strtolower(get_locale()); if (in_array($language_code, array('zh_tw', 'zh_cn'))) { $language_code = str_replace('_', '-', $language_code); } else { $language_code = preg_replace('/(_.*)$/i', '', $language_code); } header('Content-Type: application/xml'); ob_start(); echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; echo '<?xml-stylesheet type="text/xsl" href="' . esc_url($xsl) . '"?>' . "\n"; echo '<!-- generator="jetpack-' . JETPACK__VERSION . '" -->' . "\n"; ?> <!-- generator="jetpack" --> <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" > <?php $posts = $wpdb->get_results($query); foreach ($posts as $post) { setup_postdata($post); /** * Filter condition to allow skipping specific posts in news sitemap. * * @module sitemaps * * @since 3.9.0 * * @param bool $skip Current boolean. False by default, so no post is skipped. * @param WP_POST $post Current post object. */ if (apply_filters('jetpack_sitemap_news_skip_post', false, $post)) { continue; } $GLOBALS['post'] = $post; $url = array(); $url['loc'] = get_permalink($post->ID); $news = array(); $news['news:publication']['news:name'] = get_bloginfo_rss('name'); $news['news:publication']['news:language'] = $language_code; $news['news:publication_date'] = jetpack_w3cdate_from_mysql($post->post_date_gmt); $news['news:title'] = get_the_title_rss(); if ($post->keywords) { $news['news:keywords'] = html_entity_decode(ent2ncr($post->keywords), ENT_HTML5); } $url['news:news'] = $news; // Add image to sitemap $post_thumbnail = Jetpack_PostImages::get_image($post->ID); if (isset($post_thumbnail['src'])) { $url['image:image'] = array('image:loc' => esc_url($post_thumbnail['src'])); } /** * Filter associative array with data to build <url> node and its descendants for current post in news sitemap. * * @module sitemaps * * @since 3.9.0 * * @param array $url Data to build parent and children nodes for current post. * @param int $post_id Current post ID. */ $url = apply_filters('jetpack_sitemap_news_sitemap_item', $url, $post); if (empty($url)) { continue; } jetpack_print_sitemap_item($url); } wp_reset_postdata(); ?> </urlset> <?php $xml = ob_get_contents(); ob_end_clean(); if (!empty($xml)) { set_transient('jetpack_news_sitemap', $xml, DAY_IN_SECONDS); echo $xml; } die; }