-
Notifications
You must be signed in to change notification settings - Fork 3
/
dubbing-results.php
31 lines (26 loc) · 1.35 KB
/
dubbing-results.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
30
<?php
/**
* Template Name: Dubbing-results
*
* @package wp-softcatala
*/
header('Cross-Origin-Embedder-Policy: require-corp');
header('Cross-Origin-Opener-Policy: same-origin');
wp_enqueue_script( 'sc-js-dubbing-results', get_template_directory_uri() . '/static/js/dubbing-results.js', array('sc-js-main'), WP_SOFTCATALA_VERSION, true );
wp_enqueue_script( 'sc-js-subdub-editor', get_template_directory_uri() . '/static/js/subdub-editor.js', array('sc-js-main'), WP_SOFTCATALA_VERSION, true );
wp_enqueue_style( 'sc-css-dubbing-results', get_template_directory_uri() . '/static/css/dubbing.css', array('sc-css-main'),WP_SOFTCATALA_VERSION );
add_filter("script_loader_tag", "add_module_to_subdub_editor", 10, 3);
function add_module_to_subdub_editor($tag, $handle, $src)
{
if (strpos( $handle, "sc-js-subdub-editor" ) !== false) {
$tag = '<script type="module" src="' . esc_url($src) . '"></script>';
}
return $tag;
}
$context = Timber::get_context();
$context['ads_container'] = true;
$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');
$context['post'] = new TimberPost();
Timber::render( array( 'dubbing-results.twig' ), $context );