| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- /**
- * Theme functions. Initializes the Vamtam Framework.
- *
- * @package vamtam/consulting
- */
- require_once get_template_directory() . '/vamtam/classes/framework.php';
- new VamtamFramework( array(
- 'name' => 'consulting',
- 'slug' => 'consulting',
- ) );
- // only for one page home demos
- function vamtam_onepage_menu_hrefs( $atts, $item, $args ) {
- if ( 'custom' === $item->type && 0 === strpos( $atts['href'], '/#' ) ) {
- $atts['href'] = $GLOBALS['vamtam_inner_path'] . $atts['href'];
- }
- return $atts;
- }
- if ( ( $path = parse_url( get_home_url(), PHP_URL_PATH ) ) !== null ) {
- $GLOBALS['vamtam_inner_path'] = untrailingslashit( $path );
- add_filter( 'nav_menu_link_attributes', 'vamtam_onepage_menu_hrefs', 10, 3 );
- }
- remove_action( 'admin_head', 'jordy_meow_flattr', 1 );
- require_once VAMTAM_DIR . 'customizer/setup.php';
- require_once VAMTAM_DIR . 'customizer/preview.php';
- function vamtam_ninja_starter_form( $contents ) {
- return vamtam_silent_get_contents( VAMTAM_SAMPLES_DIR . 'ninja-forms/1.nff' );
- }
- add_filter( 'ninja_forms_starter_form_contents', 'vamtam_ninja_starter_form' );
- // this filter fixes some invalid HTML generated by the third-party plugins
- add_filter( 'vamtam_escaped_shortcodes', 'vamtam_shortcode_compat_fix' );
- function vamtam_shortcode_compat_fix( $codes ) {
- $codes[] = 'gallery';
- $codes[] = 'fl_builder_insert_layout';
- return $codes;
- }
- // Envato Hosted compatibility
- add_filter( 'option_vamtam-envato-license-key', 'vamtam_envato_hosted_license_key' );
- function vamtam_envato_hosted_license_key( $value ) {
- if ( defined( 'SUBSCRIPTION_CODE' ) ) {
- return SUBSCRIPTION_CODE;
- }
- return $value;
- }
- if ( class_exists( 'Vamtam_Importers' ) ) {
- Vamtam_Importers::set_menu_locations();
- }
- @ini_set( 'upload_max_size' , '112M' );
- @ini_set( 'post_max_size', '112M');
- @ini_set( 'max_execution_time', '300' );
|