__( 'Main Menu', 'groundwork' ) ) ); } add_action('comment_form_before', 'groundwork_enqueue_comment_reply_script'); function groundwork_enqueue_comment_reply_script() { if(get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } } add_filter('the_title', 'groundwork_title'); function groundwork_title($title) { if ($title == '') { return 'Untitled'; } else { return $title; } } add_filter('wp_title', 'groundwork_filter_wp_title'); function groundwork_filter_wp_title($title) { return $title . esc_attr(get_bloginfo('name')); } add_filter('comment_form_defaults', 'groundwork_comment_form_defaults'); function groundwork_comment_form_defaults( $args ) { $req = get_option( 'require_name_email' ); $required_text = sprintf( ' ' . __('Required fields are marked %s', 'groundwork'), '*' ); $args['comment_notes_before'] = '
' . __('Your email is kept private.', 'groundwork') . ( $req ? $required_text : '' ) . '
'; $args['title_reply'] = __('Post a Comment', 'groundwork'); $args['title_reply_to'] = __('Post a Reply to %s', 'groundwork'); return $args; } add_action( 'init', 'groundwork_add_shortcodes' ); function groundwork_add_shortcodes() { add_shortcode('wp_caption', 'fixed_img_caption_shortcode'); add_shortcode('caption', 'fixed_img_caption_shortcode'); add_filter('img_caption_shortcode', 'my_img_caption_shortcode_filter',10,3); add_filter('widget_text', 'do_shortcode'); } function my_img_caption_shortcode_filter($val, $attr, $content = null) { extract(shortcode_atts(array( 'id' => '', 'align' => '', 'width' => '', 'caption' => '' ), $attr)); if ( 1 > (int) $width || empty($caption) ) return $val; $capid = ''; if ( $id ) { $id = esc_attr($id); $capid = 'id="figcaption_'. $id . '" '; $id = 'id="' . $id . '" aria-labelledby="figcaption_' . $id . '" '; } return ''; } add_action( 'widgets_init', 'groundwork_widgets_init' ); function groundwork_widgets_init() { register_sidebar( array ( 'name' => __('Sidebar Widget Area', 'groundwork'), 'id' => 'primary-widget-area', 'before_widget' => '