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
197f5503
Commit
197f5503
authored
Jun 08, 2020
by
Isaque Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix media type video
parent
1c488803
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
library/api.php
library/api.php
+1
-1
pagebuilder-components/widgets/instagram-feed/tpl/template.php
...uilder-components/widgets/instagram-feed/tpl/template.php
+3
-0
No files found.
library/api.php
View file @
197f5503
...
...
@@ -51,7 +51,7 @@ add_action( 'rest_api_init', function () {
function
instagram_auth
(
$data
)
{
//
$redirect_url = 'https://localhost/wp-json/guaraci/auth/instagram/';
//$redirect_url = 'https://localhost/wp-json/guaraci/auth/instagram/';
$redirect_url
=
site_url
()
.
'/wp-json/guaraci/auth/instagram/'
;
$authorization_code
=
$data
[
'code'
];
...
...
pagebuilder-components/widgets/instagram-feed/tpl/template.php
View file @
197f5503
...
...
@@ -40,6 +40,7 @@ if($result === false){
array_push
(
$medias_data
,
[
'link'
=>
$media_object
->
permalink
,
'source_url'
=>
$media_object
->
media_url
,
'type'
=>
$media_object
->
media_type
]);
//var_dump($media_object);
...
...
@@ -73,9 +74,11 @@ if($result === false){
<div
class=
"medias"
style=
"grid-template-columns: repeat(
<?=
$instance
[
'colunm_qnty'
]
?>
, 1fr);"
>
<?php
foreach
(
array_slice
(
$medias_data
,
0
,
$limit
)
as
$media
)
:
?>
<?php
if
(
$media
[
'type'
]
!=
'VIDEO'
)
:
?>
<a
href=
"
<?=
$media
[
'link'
]
?>
"
<?=
$instance
[
'new_tab'
]
?
'target="__blank"'
:
true
?>
>
<img
src=
"
<?=
$media
[
'source_url'
]
?>
"
alt=
""
>
</a>
<?php
endif
;
?>
<?php
endforeach
;
?>
</div>
...
...
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