__('Main Menu','campschool')
));
}
add_action('after_setup_theme','campschool_theme_support');
add_filter( 'image_size_names_choose', 'small_custom_sizes' );
function small_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'small' => __( 'Small','campschool' ),
) );
}
/**
* Add a sidebar.
*/
function campschool_main_sidebar() {
register_sidebar( array(
'name' => __( 'Main Sidebar', 'campschool' ),
'id' => 'main-sidebar',
'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'campschool' ),
'before_widget' => '
',
'after_widget' => '
',
) );
}
add_action( 'widgets_init', 'campschool_main_sidebar' );
// Contact Form Match to Template.
add_action( 'wpcf7_init', 'custom_views_post_title' );
function custom_views_post_title() {
wpcf7_add_form_tag( 'custom_views_post_title', 'custom_views_post_title_shortcode_handler' );
}
function custom_views_post_title_shortcode_handler( $tag ) {
global $post;
$args = array( 'post_type' => 'post' );
$myposts = get_posts( $args );
$output = '";
return $output;
}
function mod_contact7_form_content( $template, $prop ) {
if ( 'form' == $prop ) {
return implode( '', array(
) );
} else {
return $template;
}
}
add_filter( 'use_block_editor_for_post', '__return_false' );
add_filter(
'wpcf7_default_template',
'mod_contact7_form_content',
10,
2
);
function mod_contact7_form_title( $template ) {
$template->set_title( 'Contact us now' );
return $template;
}
add_filter(
'wpcf7_contact_form_default_pack',
'mod_contact7_form_title'
);
/** Custom Meta Box for Author url **/
require get_template_directory().'/inc/author-picture-metabox.php';
require get_template_directory().'/inc/customizer-config.php';
/** TGM Plugin Activation **/
require_once get_template_directory().'/inc/class-tgm-plugin-activation.php';
require get_template_directory().'/inc/install-plugins.php';
?>