__( '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_set_default_widgets' ); function groundwork_set_default_widgets() { if ( is_admin() && isset( $_GET['activated'] ) ) { update_option( 'sidebars_widgets', $preset_widgets ); } } add_action( 'init', 'groundwork_add_shortcodes' ); function groundwork_add_shortcodes() { add_filter('widget_text', 'do_shortcode'); add_shortcode('wp_caption', 'fixed_img_caption_shortcode'); add_shortcode('caption', 'fixed_img_caption_shortcode'); } function fixed_img_caption_shortcode($attr, $content = null) { $output = apply_filters('img_caption_shortcode', '', $attr, $content); if ( $output != '' ) return $output; extract(shortcode_atts(array( 'id'=> '', 'align' => 'alignnone', 'width' => '', 'caption' => ''), $attr)); if ( 1 > (int) $width || empty($caption) ) return $content; if ( $id ) $id = 'id="' . esc_attr($id) . '" '; return '