add_action('init', 'myStartSession', 1);
function myStartSession() {
if(!session_id()) {
session_start();
}
}
add_action('wp_logout', 'myEndSession');
add_action('wp_login', 'myEndSession');
function myEndSession() {
session_destroy ();
}
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
gulp.task('dev', function() {
return browserify({ entries: ['src/app/main.js']})
//.transform(babelify, { presets: ['es2015'] })
.transform(vueify)
.plugin('vueify/plugins/extract-css', { out: './bundle.css' })
.bundle()
.pipe(source('main.js'))
.pipe(gulp.dest('./dist'))
//.pipe(connect.reload());
});
add_filter( 'wpcf7_form_elements', 'do_shortcode' );
function hello_world_cf7_func() {
return "Привет! Я шоркод для Contact Form 7!";
}
add_shortcode('hello_world', 'hello_world_cf7_func');
//----------------------------------------------------------------
add_filter('wpcf7_mail_components', 'do_shortcode_mail', 10, 3);
function do_shortcode_mail( $components, $contactForm, $mailComponent ){
if( isset($components['body']) ){
$components['body'] = do_shortcode($components['body']);
}
return $components;
}