PageRenderTime 40ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/responsive/includes/functions.php

https://bitbucket.org/fkth/fkth
PHP | 628 lines | 310 code | 105 blank | 213 comment | 52 complexity | 94d1ade69e4564862139743f89e48bfc MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. // Exit if accessed directly
  3. if ( !defined('ABSPATH')) exit;
  4. /**
  5. * Theme's Functions and Definitions
  6. *
  7. *
  8. * @file functions.php
  9. * @package Responsive
  10. * @author Emil Uzelac
  11. * @copyright 2003 - 2012 ThemeID
  12. * @license license.txt
  13. * @version Release: 1.1.2
  14. * @filesource wp-content/themes/responsive/includes/functions.php
  15. * @link http://codex.wordpress.org/Theme_Development#Functions_File
  16. * @since available since Release 1.0
  17. */
  18. ?>
  19. <?php
  20. if (class_exists('MultiPostThumbnails')) {
  21. new MultiPostThumbnails(
  22. array(
  23. 'label' => 'Secondary Image',
  24. 'id' => 'secondary-image',
  25. 'post_type' => 'post'
  26. )
  27. );
  28. }
  29. if ( ! is_admin() )
  30. {
  31. $url = get_stylesheet_directory_uri() . '/js/';
  32. wp_enqueue_script( 'hash-change', "{$url}jquery.ba-hashchange.min.js", array('jquery'), '', true);
  33. wp_enqueue_script( 'ajax-theme', "{$url}ajax.js", array( 'hash-change' ), '', true);
  34. }
  35. /**
  36. * Fire up the engines boys and girls let's start theme setup.
  37. */
  38. add_action('after_setup_theme', 'responsive_setup');
  39. if (!function_exists('responsive_setup')):
  40. function responsive_setup() {
  41. global $content_width;
  42. /**
  43. * Global content width.
  44. */
  45. if (!isset($content_width))
  46. $content_width = 550;
  47. /**
  48. * Responsive is now available for translations.
  49. * Add your files into /languages/ directory.
  50. * @see http://codex.wordpress.org/Function_Reference/load_theme_textdomain
  51. */
  52. load_theme_textdomain('responsive', get_template_directory().'/languages');
  53. $locale = get_locale();
  54. $locale_file = get_template_directory().'/languages/$locale.php';
  55. if (is_readable( $locale_file))
  56. require_once( $locale_file);
  57. /**
  58. * Add callback for custom TinyMCE editor stylesheets. (editor-style.css)
  59. * @see http://codex.wordpress.org/Function_Reference/add_editor_style
  60. */
  61. add_editor_style();
  62. /**
  63. * This feature enables post and comment RSS feed links to head.
  64. * @see http://codex.wordpress.org/Function_Reference/add_theme_support#Feed_Links
  65. */
  66. add_theme_support('automatic-feed-links');
  67. /**
  68. * This feature enables post-thumbnail support for a theme.
  69. * @see http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
  70. */
  71. add_theme_support('post-thumbnails');
  72. /**
  73. * This feature enables custom-menus support for a theme.
  74. * @see http://codex.wordpress.org/Function_Reference/register_nav_menus
  75. */
  76. register_nav_menus(array(
  77. 'top-menu' => __('Top Menu', 'responsive'),
  78. 'header-menu' => __('Header Menu', 'responsive'),
  79. 'sub-header-menu' => __('Sub-Header Menu', 'responsive'),
  80. 'footer-menu' => __('Footer Menu', 'responsive')
  81. )
  82. );
  83. if ( function_exists('get_custom_header')) {
  84. add_theme_support('custom-background');
  85. } else {
  86. // < 3.4 Backward Compatibility
  87. /**
  88. * This feature allows users to use custom background for a theme.
  89. * @see http://codex.wordpress.org/Function_Reference/add_custom_background
  90. */
  91. add_custom_background();
  92. }
  93. // WordPress 3.4 >
  94. if (function_exists('get_custom_header')) {
  95. add_theme_support('custom-header', array (
  96. // Header image default
  97. 'default-image' => get_template_directory_uri() . '/images/default-logo.png',
  98. // Header text display default
  99. 'header-text' => false,
  100. // Header image flex width
  101. 'flex-width' => true,
  102. // Header image width (in pixels)
  103. 'width' => 300,
  104. // Header image flex height
  105. 'flex-height' => true,
  106. // Header image height (in pixels)
  107. 'height' => 100,
  108. // Admin header style callback
  109. 'admin-head-callback' => 'responsive_admin_header_style'));
  110. // gets included in the admin header
  111. function responsive_admin_header_style() {
  112. ?><style type="text/css">
  113. .appearance_page_custom-header #headimg {
  114. background-repeat:no-repeat;
  115. border:none;
  116. }
  117. </style><?php
  118. }
  119. } else {
  120. // Backward Compatibility
  121. /**
  122. * This feature adds a callbacks for image header display.
  123. * In our case we are using this to display logo.
  124. * @see http://codex.wordpress.org/Function_Reference/add_custom_image_header
  125. */
  126. define('HEADER_TEXTCOLOR', '');
  127. define('HEADER_IMAGE', '%s/images/default-logo.png'); // %s is the template dir uri
  128. define('HEADER_IMAGE_WIDTH', 300); // use width and height appropriate for your theme
  129. define('HEADER_IMAGE_HEIGHT', 100);
  130. define('NO_HEADER_TEXT', true);
  131. // gets included in the admin header
  132. function responsive_admin_header_style() {
  133. ?><style type="text/css">
  134. #headimg {
  135. background-repeat:no-repeat;
  136. border:none !important;
  137. width:<?php echo HEADER_IMAGE_WIDTH; ?>px;
  138. height:<?php echo HEADER_IMAGE_HEIGHT; ?>px;
  139. }
  140. </style><?php
  141. }
  142. add_custom_image_header('', 'responsive_admin_header_style');
  143. }
  144. }
  145. endif;
  146. /**
  147. * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
  148. */
  149. function responsive_page_menu_args( $args ) {
  150. $args['show_home'] = true;
  151. return $args;
  152. }
  153. add_filter( 'wp_page_menu_args', 'responsive_page_menu_args' );
  154. /**
  155. * Remove div from wp_page_menu() and replace with ul.
  156. */
  157. function responsive_wp_page_menu ($page_markup) {
  158. preg_match('/^<div class=\"([a-z0-9-_]+)\">/i', $page_markup, $matches);
  159. $divclass = $matches[1];
  160. $replace = array('<div class="'.$divclass.'">', '</div>');
  161. $new_markup = str_replace($replace, '', $page_markup);
  162. $new_markup = preg_replace('/^<ul>/i', '<ul class="'.$divclass.'">', $new_markup);
  163. return $new_markup; }
  164. add_filter('wp_page_menu', 'responsive_wp_page_menu');
  165. /**
  166. * Filter 'get_comments_number'
  167. *
  168. * Filter 'get_comments_number' to display correct
  169. * number of comments (count only comments, not
  170. * trackbacks/pingbacks)
  171. *
  172. * Adopted from Chip Bennett
  173. */
  174. function responsive_comment_count( $count ) {
  175. if ( ! is_admin() ) {
  176. global $id;
  177. $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
  178. return count($comments_by_type['comment']);
  179. } else {
  180. return $count;
  181. }
  182. }
  183. add_filter('get_comments_number', 'responsive_comment_count', 0);
  184. /**
  185. * wp_list_comments() Pings Callback
  186. *
  187. * wp_list_comments() Callback function for
  188. * Pings (Trackbacks/Pingbacks)
  189. */
  190. function responsive_comment_list_pings( $comment ) {
  191. $GLOBALS['comment'] = $comment;
  192. ?>
  193. <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"><?php echo comment_author_link(); ?></li>
  194. <?php }
  195. /**
  196. * Sets the post excerpt length to 40 words.
  197. * Adopted from Coraline
  198. */
  199. function responsive_excerpt_length($length) {
  200. return 40;
  201. }
  202. add_filter('excerpt_length', 'responsive_excerpt_length');
  203. /**
  204. * Returns a "Read more" link for excerpts
  205. */
  206. function responsive_read_more() {
  207. return '<div class="read-more"><a href="' . get_permalink() . '">' . __('Read more &#8250;', 'responsive') . '</a></div><!-- end of .read-more -->';
  208. }
  209. /**
  210. * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and responsive_read_more_link().
  211. */
  212. function responsive_auto_excerpt_more($more) {
  213. return '<span class="ellipsis">&hellip;</span>' . responsive_read_more();
  214. }
  215. add_filter('excerpt_more', 'responsive_auto_excerpt_more');
  216. /**
  217. * Adds a pretty "Read more" link to custom post excerpts.
  218. */
  219. function responsive_custom_excerpt_more($output) {
  220. if (has_excerpt() && !is_attachment()) {
  221. $output .= responsive_read_more();
  222. }
  223. return $output;
  224. }
  225. add_filter('get_the_excerpt', 'responsive_custom_excerpt_more');
  226. /**
  227. * This function removes inline styles set by WordPress gallery.
  228. */
  229. function responsive_remove_gallery_css($css) {
  230. return preg_replace("#<style type='text/css'>(.*?)</style>#s", '', $css);
  231. }
  232. add_filter('gallery_style', 'responsive_remove_gallery_css');
  233. /**
  234. * This function removes default styles set by WordPress recent comments widget.
  235. */
  236. function responsive_remove_recent_comments_style() {
  237. global $wp_widget_factory;
  238. remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
  239. }
  240. add_action( 'widgets_init', 'responsive_remove_recent_comments_style' );
  241. if ( ! function_exists( 'responsive_post_meta_data' ) ) :
  242. /**
  243. * This function prints post meta data.
  244. */
  245. function responsive_post_meta_data() {
  246. printf( __( '<span class="%1$s">Posted on </span>%2$s<span class="%3$s"> by </span>%4$s', 'responsive' ),
  247. 'meta-prep meta-prep-author posted',
  248. sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="timestamp">%3$s</span></a>',
  249. get_permalink(),
  250. esc_attr( get_the_time() ),
  251. get_the_date()
  252. ),
  253. 'byline',
  254. sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
  255. get_author_posts_url( get_the_author_meta( 'ID' ) ),
  256. sprintf( esc_attr__( 'View all posts by %s', 'responsive' ), get_the_author() ),
  257. get_the_author()
  258. )
  259. );
  260. }
  261. endif;
  262. /**
  263. * This function removes WordPress generated category and tag atributes.
  264. * For W3C validation purposes only.
  265. *
  266. */
  267. function responsive_category_rel_removal ($output) {
  268. $output = str_replace(' rel="category tag"', '', $output);
  269. return $output;
  270. }
  271. add_filter('wp_list_categories', 'responsive_category_rel_removal');
  272. add_filter('the_category', 'responsive_category_rel_removal');
  273. /**
  274. * Breadcrumb Lists
  275. * Allows visitors to quickly navigate back to a previous section or the root page.
  276. *
  277. * Adopted from Dimox
  278. *
  279. */
  280. function responsive_breadcrumb_lists () {
  281. $chevron = '<span class="chevron">&#8250;</span>';
  282. $home = __('Home','responsive'); // text for the 'Home' link
  283. $before = '<span class="breadcrumb-current">'; // tag before the current crumb
  284. $after = '</span>'; // tag after the current crumb
  285. if ( !is_home() && !is_front_page() || is_paged() ) {
  286. echo '<div class="breadcrumb-list">';
  287. global $post;
  288. $homeLink = home_url();
  289. echo '<a href="' . $homeLink . '">' . $home . '</a> ' . $chevron . ' ';
  290. if ( is_category() ) {
  291. global $wp_query;
  292. $cat_obj = $wp_query->get_queried_object();
  293. $thisCat = $cat_obj->term_id;
  294. $thisCat = get_category($thisCat);
  295. $parentCat = get_category($thisCat->parent);
  296. if ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $chevron . ' '));
  297. echo $before; printf( __( 'Archive for %s', 'responsive' ), single_cat_title('', false) ); $after;
  298. } elseif ( is_day() ) {
  299. echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $chevron . ' ';
  300. echo '<a href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $chevron . ' ';
  301. echo $before . get_the_time('d') . $after;
  302. } elseif ( is_month() ) {
  303. echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $chevron . ' ';
  304. echo $before . get_the_time('F') . $after;
  305. } elseif ( is_year() ) {
  306. echo $before . get_the_time('Y') . $after;
  307. } elseif ( is_single() && !is_attachment() ) {
  308. if ( get_post_type() != 'post' ) {
  309. $post_type = get_post_type_object(get_post_type());
  310. $slug = $post_type->rewrite;
  311. echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a> ' . $chevron . ' ';
  312. echo $before . get_the_title() . $after;
  313. } else {
  314. $cat = get_the_category(); $cat = $cat[0];
  315. echo get_category_parents($cat, TRUE, ' ' . $chevron . ' ');
  316. echo $before . get_the_title() . $after;
  317. }
  318. } elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) {
  319. $post_type = get_post_type_object(get_post_type());
  320. echo $before . $post_type->labels->singular_name . $after;
  321. } elseif ( is_attachment() ) {
  322. $parent = get_post($post->post_parent);
  323. $cat = get_the_category($parent->ID); $cat = $cat[0];
  324. echo get_category_parents($cat, TRUE, ' ' . $chevron . ' ');
  325. echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a> ' . $chevron . ' ';
  326. echo $before . get_the_title() . $after;
  327. } elseif ( is_page() && !$post->post_parent ) {
  328. echo $before . get_the_title() . $after;
  329. } elseif ( is_page() && $post->post_parent ) {
  330. $parent_id = $post->post_parent;
  331. $breadcrumbs = array();
  332. while ($parent_id) {
  333. $page = get_page($parent_id);
  334. $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
  335. $parent_id = $page->post_parent;
  336. }
  337. $breadcrumbs = array_reverse($breadcrumbs);
  338. foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $chevron . ' ';
  339. echo $before . get_the_title() . $after;
  340. } elseif ( is_search() ) {
  341. echo $before; printf( __( 'Search results for: %s', 'responsive' ), get_search_query() ); $after;
  342. } elseif ( is_tag() ) {
  343. echo $before; printf( __( 'Posts tagged %s', 'responsive' ), single_tag_title('', false) ); $after;
  344. } elseif ( is_author() ) {
  345. global $author;
  346. $userdata = get_userdata($author);
  347. echo $before; printf( __( 'View all posts by %s', 'responsive' ), $userdata->display_name ); $after;
  348. } elseif ( is_404() ) {
  349. echo $before . __('Error 404 ','responsive') . $after;
  350. }
  351. if ( get_query_var('paged') ) {
  352. if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
  353. echo __('Page','responsive') . ' ' . get_query_var('paged');
  354. if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
  355. }
  356. echo '</div>';
  357. }
  358. }
  359. /**
  360. * A safe way of adding JavaScripts to a WordPress generated page.
  361. */
  362. if (!is_admin())
  363. add_action('wp_enqueue_scripts', 'responsive_js');
  364. if (!function_exists('responsive_js')) {
  365. function responsive_js() {
  366. // JS at the bottom for fast page loading.
  367. // except for Modernizr which enables HTML5 elements & feature detects.
  368. wp_enqueue_script('modernizr', get_template_directory_uri() . '/js/responsive-modernizr.js', array('jquery'), '2.6.1', false);
  369. wp_enqueue_script('responsive-scripts', get_template_directory_uri() . '/js/responsive-scripts.js', array('jquery'), '1.2.1', true);
  370. wp_enqueue_script('responsive-plugins', get_template_directory_uri() . '/js/responsive-plugins.js', array('jquery'), '1.1.1', true);
  371. }
  372. }
  373. /**
  374. * A comment reply.
  375. */
  376. function responsive_enqueue_comment_reply() {
  377. if ( is_singular() && comments_open() && get_option('thread_comments')) {
  378. wp_enqueue_script('comment-reply');
  379. }
  380. }
  381. add_action( 'wp_enqueue_scripts', 'responsive_enqueue_comment_reply' );
  382. /**
  383. * Theme Options Support and Information
  384. */
  385. function responsive_theme_support () {
  386. ?>
  387. <div id="info-box-wrapper" class="grid col-940">
  388. <div class="info-box notice">
  389. <a class="blue button" href="<?php echo esc_url(__('http://themeid.com/support/','responsive')); ?>" title="<?php esc_attr_e('Theme Support', 'responsive'); ?>" target="_blank">
  390. <?php printf(__('Theme Support','responsive')); ?></a>
  391. <a class="gray button" href="<?php echo esc_url(__('http://themeid.com/themes/','responsive')); ?>" title="<?php esc_attr_e('More Themes', 'responsive'); ?>" target="_blank">
  392. <?php printf(__('More Themes','responsive')); ?></a>
  393. <a class="gray button" href="<?php echo esc_url(__('http://themeid.com/showcase/','responsive')); ?>" title="<?php esc_attr_e('Showcase', 'responsive'); ?>" target="_blank">
  394. <?php printf(__('Showcase','responsive')); ?></a>
  395. <a class="gold button" href="<?php echo esc_url(__('http://themeid.com/donate/','responsive')); ?>" title="<?php esc_attr_e('Donate Now', 'responsive'); ?>" target="_blank">
  396. <?php printf(__('Donate Now','responsive')); ?></a>
  397. </div>
  398. </div>
  399. <?php }
  400. add_action('responsive_theme_options','responsive_theme_support');
  401. /**
  402. * WordPress Widgets start right here.
  403. */
  404. function responsive_widgets_init() {
  405. /* register_sidebar(array(
  406. 'name' => __('Main Sidebar', 'responsive'),
  407. 'description' => __('Area One - sidebar.php', 'responsive'),
  408. 'id' => 'main-sidebar',
  409. 'before_title' => '<div class="widget-title">',
  410. 'after_title' => '</div>',
  411. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  412. 'after_widget' => '</div>'
  413. ));
  414. register_sidebar(array(
  415. 'name' => __('Right Sidebar', 'responsive'),
  416. 'description' => __('Area Two - sidebar-right.php', 'responsive'),
  417. 'id' => 'right-sidebar',
  418. 'before_title' => '<div class="widget-title">',
  419. 'after_title' => '</div>',
  420. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  421. 'after_widget' => '</div>'
  422. ));
  423. register_sidebar(array(
  424. 'name' => __('Left Sidebar', 'responsive'),
  425. 'description' => __('Area Three - sidebar-left.php', 'responsive'),
  426. 'id' => 'left-sidebar',
  427. 'before_title' => '<div class="widget-title">',
  428. 'after_title' => '</div>',
  429. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  430. 'after_widget' => '</div>'
  431. ));
  432. register_sidebar(array(
  433. 'name' => __('Left Sidebar Half Page', 'responsive'),
  434. 'description' => __('Area Four - sidebar-left-half.php', 'responsive'),
  435. 'id' => 'left-sidebar-half',
  436. 'before_title' => '<div class="widget-title">',
  437. 'after_title' => '</div>',
  438. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  439. 'after_widget' => '</div>'
  440. ));
  441. register_sidebar(array(
  442. 'name' => __('Right Sidebar Half Page', 'responsive'),
  443. 'description' => __('Area Five - sidebar-right-half.php', 'responsive'),
  444. 'id' => 'right-sidebar-half',
  445. 'before_title' => '<div class="widget-title">',
  446. 'after_title' => '</div>',
  447. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  448. 'after_widget' => '</div>'
  449. ));
  450. */
  451. register_sidebar(array(
  452. 'name' => __('Home Widget 1', 'responsive'),
  453. 'description' => __('Area Six - sidebar-home.php', 'responsive'),
  454. 'id' => 'home-widget-1',
  455. 'before_title' => '<div id="widget-title-one" class="widget-title-home"><h3>',
  456. 'after_title' => '</h3></div>',
  457. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  458. 'after_widget' => '</div>'
  459. ));
  460. register_sidebar(array(
  461. 'name' => __('Home Widget 2', 'responsive'),
  462. 'description' => __('Area Seven - sidebar-home.php', 'responsive'),
  463. 'id' => 'home-widget-2',
  464. 'before_title' => '<div id="widget-title-two" class="widget-title-home"><h3>',
  465. 'after_title' => '</h3></div>',
  466. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  467. 'after_widget' => '</div>'
  468. ));
  469. register_sidebar(array(
  470. 'name' => __('Home Widget 3', 'responsive'),
  471. 'description' => __('Area Eight - sidebar-home.php', 'responsive'),
  472. 'id' => 'home-widget-3',
  473. 'before_title' => '<div id="widget-title-three" class="widget-title-home"><h3>',
  474. 'after_title' => '</h3></div>',
  475. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  476. 'after_widget' => '</div>'
  477. ));
  478. register_sidebar(array(
  479. 'name' => __('Home Widget 4', 'responsive'),
  480. 'description' => __('Area Nine - sidebar-home.php', 'responsive'),
  481. 'id' => 'home-widget-4',
  482. 'before_title' => '<div id="widget-title-three" class="widget-title-home"><h3>',
  483. 'after_title' => '</h3></div>',
  484. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  485. 'after_widget' => '</div>'
  486. ));
  487. /*
  488. register_sidebar(array(
  489. 'name' => __('Gallery Sidebar', 'responsive'),
  490. 'description' => __('Area Nine - sidebar-gallery.php', 'responsive'),
  491. 'id' => 'gallery-widget',
  492. 'before_title' => '<div class="widget-title">',
  493. 'after_title' => '</div>',
  494. 'before_widget' => '<div id="%1$s" class="widget-wrapper %2$s">',
  495. 'after_widget' => '</div>'
  496. ));
  497. register_sidebar(array(
  498. 'name' => __('Colophon Widget', 'responsive'),
  499. 'description' => __('Area Ten - sidebar-colophon.php', 'responsive'),
  500. 'id' => 'colophon-widget',
  501. 'before_title' => '<div class="widget-title">',
  502. 'after_title' => '</div>',
  503. 'before_widget' => '<div id="%1$s" class="colophon-widget widget-wrapper %2$s">',
  504. 'after_widget' => '</div>'
  505. ));
  506. register_sidebar(array(
  507. 'name' => __('Top Widget', 'responsive'),
  508. 'description' => __('Area Twelve - sidebar-top.php', 'responsive'),
  509. 'id' => 'top-widget',
  510. 'before_title' => '<div class="widget-title">',
  511. 'after_title' => '</div>',
  512. 'before_widget' => '<div id="%1$s" class="%2$s">',
  513. 'after_widget' => '</div>'
  514. ));
  515. */ }
  516. add_action('widgets_init', 'responsive_widgets_init');
  517. ?>