-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-secao.php
145 lines (129 loc) · 6.67 KB
/
content-secao.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
/**
* The template used for displaying sections.
*
* @package Odin
* @since 2.2.0
*/
global $odin_general_opts;
$parallax_options= get_option( 'parallax_tab' );
$sobre_options= get_option( 'sobre_tab' );
$logo = wp_get_attachment_url($sobre_options['logo'], 'full');
$depois ='';
$antes = '';
$entre = '';
$depois_conteudo= "";
$post_antigo = $post;
$classe_conteudo = "";
// print_r($post);
$parallax_1 = wp_get_attachment_url($parallax_options['parallax_1'], 'full');
switch ($post->post_name) {
case 'sobre':
$classe_conteudo = 'sobre-conteudo';
$background = $parallax_1;
$antes = '<div style="background-image:url('.$background.');" class="secao-background"></div>
<svg id="svg_sobre">
<defs>
<pattern id="image2" patternUnits="userSpaceOnUse" height="400" width="400">
<image x="0" y="0" height="400" width="400" xlink:href="'.get_template_directory_uri().'/assets/images/black-paper-svg.jpg"></image>
</pattern>
</defs>
<polygon id="triangulo_laranja" points=""/>
<polygon fill="url(#image2)" id="triangulo_sobre" points="" />
<polygon id="poligono_branco" points="" />
</svg>
<header class="entry-header">
<h1 class="entry-title">'
.get_the_title($post->ID)
.'</h1>
</header><!-- .entry-header -->';
$entre .="
<div id='cabecalho_sobre'>
<img id='sobre-escrito' src='".get_template_directory_uri()."/assets/images/escrito.png'/>
</div>";
break;
case 'projetos':
$antes = '<header class="entry-header"><h1 class="entry-title">'.get_the_title($post->ID).'</h1></header><!-- .entry-header -->';
$entre .= '<div class="col-sm-4 pull-right" ><div id="youtube-feed"></div><div id="triangulo_projetos"></div><div id="retangulo_projetos"></div></div>';
break;
case 'midia':
$parallax_2 = wp_get_attachment_url($parallax_options['parallax_2'], 'full');
$entre = '';
$depois =
'<svg id="svg_midia" height="400" width="500">
<polygon id="triangulo_amarelo" points=""/>
</svg>
<div id="parallax_midia" style="background-image:url('.$parallax_2.');" class="secao-background"></div>
<svg id="svg_disco">
<polygon id="poligono_disco" points=""/>
</svg>';
break;
case 'discografia':
$entre = '';
$antes = '<header class="entry-header"><h1 class="entry-title">'.get_the_title($post->ID).'</h1></header><!-- .entry-header -->';
$depois = '<svg>
<polygon id="poligono_social" points=""/>
<polygon id="triangulo_social" points=""/>
</svg>';
break;
case 'social':
$antes = '<header class="entry-header"><h1 class="entry-title">'.get_the_title($post->ID).'</h1></header><!-- .entry-header -->';
$depois = '';
$entre .= '<div class="col-md-12"><h4>' . __('Nos acompanhe nas redes sociais','odin') . '</h4></div><!-- .col-md-12 -->';
$entre .= '<div class="col-md-4 social-feed">';
$entre .= '<div class="social-icon-wrapper"><a target="_blank" href="https://www.instagram.com/5e_oficial/"><div class="instagram-icone icone"></div><h5>/5e_oficial</h5></a>'. do_shortcode('[instagram-feed feed=1]') .'</div>';
$entre .= '<div class="social-icon-wrapper"><a target="_blank" href="https://api.whatsapp.com/send?phone=5511996660497"><div class="whatsapp-icone icone"></div><h5>55-11-996660497</h5></a></div>';
$entre .= '<div class="social-icon-wrapper"><a target="_blank" href="https://www.youtube.com/essentiaquarteto"><div class="youtube-icone icone"></div><h5>/essentiaquarteto</h5></a></div>';
$entre .= '<div class="social-icon-wrapper"><a target="_blank" href="https://music.apple.com/artist/quinta-essentia-quarteto/699384309"><div class="apple-music-icone icone"></div><h5>Quinta Essentia</h5></a></div>';
$entre .= '<div class="social-icon-wrapper"><a target="_blank" href="https://open.spotify.com/artist/0NSJKW3FTsrp5B9gXRcIRn"><div class="spotify-icone icone"></div><h5>Quinta Essentia</h5></a></div>';
$entre .= '<div class="social-icon-wrapper"><a target="_blank" href="https://twitter.com/quinta_essentia"><div class="twitter-icone icone"></div><h5>@quinta_essentia</h5></a></div>';
$entre .= '<div class="social-icon-wrapper"><a target="_blank" href="https://soundcloud.com/quintaessentiaquarteto"><div class="sound_cloud-icone icone"></div><h5>/quintaessentiaquarteto</h5></a></div>';
$entre .= '<div class="social-icon-wrapper"><a target="_blank" href="http://www.reverbnation.com/quintaessentiaquarteto"><div class="reverbnation-icone icone"></div><h5>/quintaessentiaquarteto</h5></a></div>';
$entre .= '</div><!-- .social-feed -->';
$entre .= '<div class="col-md-4 social-feed">';
$entre .= '<div class="social-icon-wrapper"><a target="_blank" href="http://www.facebook.com/5EOficial"><div class="facebook-icone icone"></div><h5>/5EOficial</h5></a>' . do_shortcode('[custom-facebook-feed feed=1]') . '</div>';
$entre .= '</div>';
$depois_conteudo .= '<div class="col-md-4 blog-feed ">';
$depois_conteudo .= '<div id="blog-feed"><h4>'.__('Nosso Blog','odin').'</h4>'.do_shortcode( '[query post_type=post]' ).'</div>';
$lang = qtrans_getLanguage();
$depois_conteudo .= '</div><!--blog-->';
$depois_conteudo .= '';
$classe_conteudo = "hidden";
break;
case 'agenda':
$antes = '<h1 id="titulo_agenda">'.get_the_title($post->ID).'</h1><svg id="svg_agenda" ><defs>
<pattern id="image" patternUnits="userSpaceOnUse" height="349" width="466">
<image x="0" y="0" height="349" width="466" xlink:href="'.get_template_directory_uri().'/assets/images/asfalt.jpg"></image>
</pattern>
</defs>
<polygon id="triangulo_agenda" points=""/>
<polygon fill="url(#image)" id="poligono_agenda" points=""/>
</svg>';
$depois_conteudo = '<a class="btn btn-carregarmais" href="eventos/">'.__('+ Agenda','odin').'</a><div class="clearfix"></div>';
break;
case 'contato':
$antes = '<header class="entry-header"><h1 class="entry-title">' . get_the_title($post->ID) . '</h1></header>';
break;
}
$post=$post_antigo;
?>
<article name="<?php echo $post->post_name; ?>" id="<?php echo $post->post_name; ?>" <?php post_class('row'); ?>>
<?php echo $antes;?>
<div style='background-image:url(<?php echo wp_get_attachment_url(get_post_thumbnail_id($post->ID));?>);' class="background-image secao-interno col-md-12" >
<div class="conteudo-secao" >
<?php echo $entre;?>
<?php
$content = apply_filters( 'the_content', $post->post_content );
$content = str_replace( ']]>', ']]>', $content );
?>
<div class="<?php echo $classe_conteudo;?>" >
<?php echo $content;?>
<div class="clearfix "></div>
</div>
<?php echo $depois_conteudo;?>
</div>
</div>
</article><!-- #post-## -->
<div class="depois"><?php echo $depois;?>
</div>
<div class="clearfix sem-altura"></div>