From 299e123e20b3255dfbd71571c7167ed60f87fec2 Mon Sep 17 00:00:00 2001 From: matheusgimenez Date: Thu, 12 Sep 2019 17:37:50 -0300 Subject: [PATCH] pagina de cursos --- functions.php | 24 +++++++ inc/class-load-last-post-social-networks.php | 13 +++- style.css | 19 ++++-- template-cursos.php | 66 -------------------- 4 files changed, 51 insertions(+), 71 deletions(-) delete mode 100644 template-cursos.php diff --git a/functions.php b/functions.php index 461ffb3..dc43d88 100644 --- a/functions.php +++ b/functions.php @@ -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', + ) + ); /*------------------------------------------------------------------------*/ diff --git a/inc/class-load-last-post-social-networks.php b/inc/class-load-last-post-social-networks.php index 84555f6..caa6510 100644 --- a/inc/class-load-last-post-social-networks.php +++ b/inc/class-load-last-post-social-networks.php @@ -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/ @@ -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 ); diff --git a/style.css b/style.css index 225fb9f..f51423e 100644 --- a/style.css +++ b/style.css @@ -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; @@ -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; diff --git a/template-cursos.php b/template-cursos.php deleted file mode 100644 index 527dce3..0000000 --- a/template-cursos.php +++ /dev/null @@ -1,66 +0,0 @@ - 'page', - 'posts_per_page' => -1, - 'post_parent' => get_the_ID(), - 'order' => 'ASC', - 'orderby' => 'menu_order' -); -$query = new WP_Query( $args ); -?> -
- - - - - - -
-
-

- -

-
-
- -
-
-
-
- -
-have_posts() ) : ?> - have_posts() ) : $query->the_post(); ?> -
-
- -
-
-
-

- -

-
- -
- -
-
-
- - -
-
-