| 1 |
<?php |
| 2 |
|
| 3 |
namespace Photonic_Plugin\Options; |
| 4 |
|
| 5 |
class DeviantArt extends Option_Tab { |
| 6 |
protected function __construct() { |
| 7 |
$this->options = [ |
| 8 |
[ |
| 9 |
'name' => "How To", |
| 10 |
'desc' => "Control generic settings for the plugin", |
| 11 |
'category' => 'deviantart-how-to', |
| 12 |
'buttons' => 'no-buttons', |
| 13 |
'type' => 'section', |
| 14 |
], |
| 15 |
|
| 16 |
[ |
| 17 |
'name' => "Creating a gallery", |
| 18 |
'desc' => "<strong>Please complete the setup steps in the \"DeviantArt Settings\" tab before attempting to create a gallery!</strong> <br/><br/> |
| 19 |
To create a gallery with DeviantArt content you can use either a <strong><em>Gutenberg Block</em></strong> |
| 20 |
or the <em>Add / Edit Photonic Gallery</em> button in the <strong><em>Classic Editor</em></strong>:<br/><br/> |
| 21 |
<img src='" . PHOTONIC_URL . "Options/screenshots/Flickr-1.png' style='max-width: 600px;' alt='Wizard' />", |
| 22 |
'grouping' => 'deviantart-how-to', |
| 23 |
'type' => 'blurb', |
| 24 |
], |
| 25 |
|
| 26 |
[ |
| 27 |
'name' => "DeviantArt settings", |
| 28 |
'desc' => "Control settings for DeviantArt", |
| 29 |
'category' => 'deviantart-settings', |
| 30 |
'type' => 'section', |
| 31 |
], |
| 32 |
|
| 33 |
[ |
| 34 |
'name' => "DeviantArt Client ID", |
| 35 |
'desc' => "To make use of the DeviantArt functionality you have to use your DeviantArt Client ID. |
| 36 |
You can <a href='https://www.deviantart.com/developers/register'>request an id online</a> if you don't have one. |
| 37 |
Note that you are responsible for following DeviantArt API's <a href='https://www.deviantart.com/about/policy/api/'>License Agreement</a>. |
| 38 |
As a part of the Client ID setup process: |
| 39 |
<ol> |
| 40 |
<li>For the option 'OAuth2 Grant Type', select 'Authorization Code'.</li> |
| 41 |
<li>Make sure that you add these as your Redirect URIs: |
| 42 |
<ol> |
| 43 |
<li><code>" . esc_url(admin_url('admin.php?page=photonic-auth&source=deviantart')) . "</code></li> |
| 44 |
</ol> |
| 45 |
<strong>Without the above your authentication will not work.</strong> |
| 46 |
</li> |
| 47 |
</ol>", |
| 48 |
'id' => 'deviantart_client_id', |
| 49 |
'grouping' => 'deviantart-settings', |
| 50 |
'type' => 'text' |
| 51 |
], |
| 52 |
|
| 53 |
[ |
| 54 |
'name' => "DeviantArt Client Secret", |
| 55 |
'desc' => "Please enter your DeviantArt API secret.", |
| 56 |
'id' => 'deviantart_client_secret', |
| 57 |
'grouping' => 'deviantart-settings', |
| 58 |
'type' => 'text' |
| 59 |
], |
| 60 |
|
| 61 |
[ |
| 62 |
'name' => "DeviantArt Refresh Token", |
| 63 |
'desc' => "Please enter your DeviantArt API secret.", |
| 64 |
'id' => 'deviantart_refresh_token', |
| 65 |
'grouping' => 'deviantart-settings', |
| 66 |
'type' => 'text' |
| 67 |
], |
| 68 |
]; |
| 69 |
} |
| 70 |
} |
| 71 |
|