-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from zngly/bug/2/gallery
Bug/2/gallery
- Loading branch information
Showing
11 changed files
with
184 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Listen for Xdebug", | ||
"type": "php", | ||
"request": "launch", | ||
"port": 9003 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
// load acf configuration here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace Zngly\ACF\Dev; | ||
|
||
require_once __DIR__ . '/acf/acf.php'; | ||
|
||
class Init | ||
{ | ||
|
||
public static function run() | ||
{ | ||
add_action('init', function () { | ||
Init::welcome_message(); | ||
Init::plugins(); | ||
}); | ||
} | ||
|
||
public static function welcome_message() | ||
{ | ||
echo '<script>'; | ||
echo 'console.log("Welcome to Zngly WP-Graphq-ACF-Mutations");'; | ||
echo '</script>'; | ||
} | ||
|
||
public static function plugins() | ||
{ | ||
// get all the activated plugins | ||
$active_plugins = get_option('active_plugins'); | ||
|
||
// get all the plugins | ||
$plugins = get_plugins(); | ||
|
||
// if a plugin is not activated, activate it | ||
foreach ($plugins as $plugin_path => $plugin) | ||
if (!in_array($plugin_path, $active_plugins)) | ||
activate_plugin($plugin_path); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
mutation Content_Update_Mutation { | ||
updateZnglyVideo( | ||
input: { | ||
id: "cG9zdDo5OTA2Mjg=" | ||
status: PENDING | ||
tags: { nodes: [{ name: "tag" }, { name: "two" }, { name: "three" }, { name: "test" }], append: false } | ||
} | ||
) { | ||
znglyVideo { | ||
title | ||
status | ||
tags { | ||
nodes { | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
query MyQuery5 { | ||
znglyVideos(where: { status: PENDING }) { | ||
nodes { | ||
title | ||
id | ||
tags { | ||
nodes { | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
query MyQuery2 { | ||
users(first: 100) { | ||
nodes { | ||
id | ||
databaseId | ||
username | ||
role | ||
} | ||
} | ||
} | ||
|
||
query AuthorIn { | ||
znglyVideos(where: { author: 2 }) { | ||
nodes { | ||
title | ||
author { | ||
node { | ||
username | ||
databaseId | ||
id | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
query setttings { | ||
znglyInfo(id: "site-info", idType: SLUG) { | ||
databaseId | ||
znglyInfo { | ||
address1 | ||
address2 | ||
address3 | ||
} | ||
} | ||
} | ||
|
||
mutation MyMutation2 { | ||
updateMediaItem(input: { id: "cG9zdDoxNzcw", coords: "testing" }) { | ||
mediaItem { | ||
id | ||
title | ||
fields { | ||
coords | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Dev | ||
|
||
This folder is only used when developing the project. | ||
|
||
index.php - The Init class is loaded by an mu-plugin called zngly_autloader.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters