-
Notifications
You must be signed in to change notification settings - Fork 3
/
traductor.php
30 lines (25 loc) · 1.27 KB
/
traductor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
* Template Name: Traductor Softcatala
*
* @package wp-softcatala
*/
wp_enqueue_script( 'sc-js-contacte', get_template_directory_uri() . '/static/js/contact_form.js', array('sc-js-main'), WP_SOFTCATALA_VERSION, true );
wp_enqueue_script( 'sc-js-traductor', get_template_directory_uri() . '/static/js/traductor.js', array('sc-js-main', 'sc-js-metacookie'), WP_SOFTCATALA_VERSION, true );
wp_localize_script( 'sc-js-traductor', 'scajax', array(
'ajax_url' => admin_url( 'admin-ajax.php' )
));
wp_enqueue_style( 'sc-js-traductor', get_template_directory_uri() . '/static/css/traductor.css', array('sc-css-main'),WP_SOFTCATALA_VERSION );
$context = Timber::get_context();
//Ads
$context['ads_container'] = true;
$timberPost = new TimberPost();
$context['post'] = $timberPost;
$context['content_title'] = 'Traductor';
$context['credits'] = $timberPost->get_field( 'credits' );
$context['sidebar_top'] = Timber::get_widgets('sidebar_top_recursos');
$context['sidebar_elements'] = array( 'static/ajudeu.twig', 'static/dubte_forum.twig', 'baixades.twig', 'links.twig' );
$context['sidebar_bottom'] = Timber::get_widgets('sidebar_bottom_recursos');
//Contact Form
$context['contact']['to_email'] = get_option('email_traductor');
Timber::render( array( 'traductor.twig' ), $context );