Skip to content

Commit

Permalink
pagina de cursos
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgimenez committed Sep 12, 2019
1 parent 7c38ecd commit 299e123
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 71 deletions.
24 changes: 24 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,30 @@ function csem_coletivo_customize_after_register( $wp_customize ) {
'section' => 'coletivo_ultimos_sociais_content',
)
);
$wp_customize->add_setting( coletivo_add_settings('coletivo_ultimos_sociais_fb_appid'),
array(
'sanitize_callback' => 'sanitize_text_field',
'default' => '',
)
);
$wp_customize->add_control( coletivo_add_settings('coletivo_ultimos_sociais_fb_appid'),
array(
'label' => esc_html__('AppID do Aplicativo no Facebook', 'coletivo'),
'section' => 'coletivo_ultimos_sociais_content',
)
);
$wp_customize->add_setting( coletivo_add_settings('coletivo_ultimos_sociais_fb_secret'),
array(
'sanitize_callback' => 'sanitize_text_field',
'default' => '',
)
);
$wp_customize->add_control( coletivo_add_settings('coletivo_ultimos_sociais_fb_secret'),
array(
'label' => esc_html__('Secret do Aplicativo no Facebook', 'coletivo'),
'section' => 'coletivo_ultimos_sociais_content',
)
);


/*------------------------------------------------------------------------*/
Expand Down
13 changes: 12 additions & 1 deletion inc/class-load-last-post-social-networks.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,18 @@ private function get_facebook_feed() {
1. Sign in as a developer at https://developers.facebook.com/
2. Click "Create New App" at https://developers.facebook.com/apps
3. Under Apps Settings, find the App ID and App Secret*/

$appID = '851152828309465';
$appSecret = 'aaaa0da4805e1940527bab6ed9ca77ed';
$app_id = coletivo_get_theme_mod( 'coletivo_ultimos_sociais_fb_appid' );
if ( ! $app_id ) {
ẁp_die( 'Preencha o AppID da página nas configurações' );
}
$secret = coletivo_get_theme_mod( 'coletivo_ultimos_sociais_fb_secret' );
if ( ! $secret ) {
ẁp_die( 'Preencha o AppID da página nas configurações' );
}

/* Configuring a JSON Facebook Feed
==========================================================================
1. Find the desired feed ID at http://findmyfacebookid.com/
Expand All @@ -131,7 +141,8 @@ private function get_facebook_feed() {
}
$maximum = 1;

$authentication = file_get_contents("https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id={$appID}&client_secret={$appSecret}");
$authentication = file_get_contents("https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id={$app_id}&client_secret={$secret}");

//var_dump( $authentication );
$authentication = json_decode( $authentication );
$authentication = http_build_query( $authentication );
Expand Down
19 changes: 15 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -821,16 +821,21 @@ section.section-type-curso .content .content-itself{
display: block;
width:100%;
font-size: 1.1em;
word-break: break-all;
}
.section-type-curso .btn {
float: left;
border-radius: 30px;
padding: .75rem 1.25rem;
word-wrap: break-word;
word-break: break-word;
max-width: 100%;
}
@media screen and ( max-width: 900px ) {

.section-type-curso .btn {
white-space: normal !important;
word-break: break-word;
}

}

.col-md-6.nopadding {
padding: 0;
Expand Down Expand Up @@ -914,9 +919,15 @@ section.section-type-curso .content-itself.content-child p{
#jornada {
background:#950407;
}
#jornada * {
#jornada div {
color:white !important;
}
#jornada h2.section-title {
color:white !important;
}
#jornada h4 a {
color: #950407 !important;
}
#jornada .icon-image img {
width:128px;
height: 128px;
Expand Down
66 changes: 0 additions & 66 deletions template-cursos.php

This file was deleted.

0 comments on commit 299e123

Please sign in to comment.