Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Guaraci WordPress Plugin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
Guaraci WordPress Plugin
Commits
fb395f72
Commit
fb395f72
authored
Aug 19, 2020
by
Isaque Melo
Browse files
Options
Browse Files
Download
Plain Diff
Fix conflit
parents
94ad56c6
c02299ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
pagebuilder-components/widgets/featured-videos/featured-videos.php
...er-components/widgets/featured-videos/featured-videos.php
+1
-1
pagebuilder-components/widgets/featured-videos/tpl/template.php
...ilder-components/widgets/featured-videos/tpl/template.php
+7
-1
pagebuilder-components/widgets/posts-list/tpl/template.php
pagebuilder-components/widgets/posts-list/tpl/template.php
+1
-1
No files found.
pagebuilder-components/widgets/featured-videos/featured-videos.php
View file @
fb395f72
...
...
@@ -12,7 +12,7 @@ namespace widgets;
class
FeaturedVideos
extends
\SiteOrigin_Widget
{
function
__construct
()
{
wp_enqueue_script
(
'featured-videos'
,
plugins_url
(
'/
pagebuilder-components/pagebuilder-components/widgets/featured-videos/featured-videos.js'
),
[
'jquery'
]);
wp_enqueue_script
(
'featured-videos'
,
plugins_url
(
'/
featured-videos.js'
,
__FILE__
),
[
'jquery'
]);
$fields
=
[
'header'
=>
[
...
...
pagebuilder-components/widgets/featured-videos/tpl/template.php
View file @
fb395f72
...
...
@@ -3,6 +3,10 @@
$api_key
=
$instance
[
'youtube_api_key'
];
$list_id
=
$instance
[
'youtube_list_id'
];
if
(
!
$api_key
||
!
$list_id
){
return
;
}
$num
=
4
;
if
(
$instance
[
'youtube_list'
]
==
'playlist'
){
$url
=
"https://www.googleapis.com/youtube/v3/playlistItems?key=
{
$api_key
}
&playlistId=
{
$list_id
}
&maxResults=
{
$num
}
&part=snippet,id&order=date"
;
...
...
@@ -57,7 +61,9 @@ $extract_vid = function($video){
</div>
<div
class=
"column medium-7 small-12 mt-sm-20 p-0"
>
<div
class=
"row"
>
<iframe
class=
"column small-12 medium-12 js-featured-videos--iframe p-0"
src=
"https://www.youtube.com/embed/
<?=
$extract_vid
(
$result
->
items
[
0
])
?>
"
frameborder=
"0"
allow=
"autoplay; encrypted-media"
allowfullscreen
></iframe>
<div
class=
"featured-videos--iframe-wrapper"
>
<iframe
class=
"column small-12 medium-12 js-featured-videos--iframe featured-videos--iframe"
src=
"https://www.youtube.com/embed/
<?=
$extract_vid
(
$result
->
items
[
0
])
?>
"
frameborder=
"0"
allow=
"autoplay; encrypted-media"
allowfullscreen
></iframe>
</div>
</div>
<div
class=
"row"
>
<?php
foreach
(
$result
->
items
as
$index
=>
$video
)
:
?>
...
...
pagebuilder-components/widgets/posts-list/tpl/template.php
View file @
fb395f72
...
...
@@ -25,7 +25,7 @@ use guaraci\images;
$post_categories
=
wp_get_post_categories
(
get_the_ID
()
);
foreach
(
$post_categories
as
$category_id
){
$category
=
get_
category
(
$category_id
);
$category
=
get_
term
(
$category_id
);
?>
<div
class=
"categories-list--category category-
<?=
$category
->
slug
?>
"
>
<a
href=
"
<?=
esc_url
(
get_term_link
(
$category
,
'category'
))
?>
"
>
<?=
$category
->
name
?>
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment