PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 2.44
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v2.44
3.36 3.35 3.34 3.33 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.40 2.41 2.42 2.43 2.44 All 141 releases
photonic / Admin / Gutenberg.php

Gutenberg.php in Photonic Gallery & Lightbox for Flickr, SmugMug & Others 2.44, at Admin/Gutenberg.php

65 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Photonic_Plugin\Admin;
3
4 if (!defined('ABSPATH')) {
5 echo '<h1>WordPress not loaded!</h1>';
6 exit;
7 }
8
9 require_once('Admin_Page.php');
10
11 class Gutenberg extends Admin_Page {
12 private static $instance;
13
14 static function get_instance() {
15 if (self::$instance == null) {
16 self::$instance = new Gutenberg();
17 }
18 return self::$instance;
19 }
20
21 function render_content() {
22 ?>
23 <form method="post" id="photonic-helper-form" name="photonic-helper-form">
24 <div class="photonic-form-body fix">
25 <h2 class="photonic-section">What is Gutenberg?</h2>
26 <p>
27 WordPress 5.0 introduced a new editor codenamed Gutenberg. Gutenberg features a different style of
28 creating content, which introduces a concept called a <code>block</code>.
29 </p>
30
31 <h2 class="photonic-section">How does it impact Photonic on your site?</h2>
32 <p>
33 If you have configured Photonic not to use the standard <code>gallery</code> shortcode, and instead have
34 a custom shortcode via <em>Photonic &rarr; Settings &rarr; Generic Options &rarr; Generic Settings &rarr; Custom Shortcode</em>,
35 you are fine!
36 </p>
37 <p>
38 <strong>But if you are using the <code>gallery</code> shortcode for Photonic and you click on
39 "Convert to Blocks" using Gutenberg, your post will be in trouble!</strong> <span class="warning">All your instances of the
40 <code>gallery</code> shortcode will be replaced by the native WordPress Gallery Block.</span>
41 </p>
42 <p>
43 To avoid this you can find and replace all instances of the <code>gallery</code> shortcode
44 used for Photonic and replace them with a custom shortcode of your choosing.
45 </p>
46 <div style="text-align: center">
47 <img src="<?php echo PHOTONIC_URL.'include/images/Gutenberg.jpg'; ?>" alt="Gutenberg Flow" title="Gutenberg Flow"/>
48 </div>
49
50 <h2 class="photonic-section">Am I using the Gallery Shortcode with Photonic?</h2>
51 <div id="photonic-shortcode-results">
52 <?php
53 require_once("Shortcode_Usage.php");
54 $usage = new Shortcode_Usage();
55 echo sprintf(esc_html__('%2$sThe following instances were found on your site for Photonic with the %4$s%1$s%5$s shortcode. %6$sPlease verify the instances below before replacing the shortcodes. It is strongly recommended to back up the posts listed below before the shortcode replacement.%7$s%3$s', 'photonic'),
56 $usage->tag, '<p>', '</p>', '<code>', '</code>', '<strong>', '</strong>');
57 $usage->prepare_items();
58 $usage->display();
59 ?>
60 </div>
61 </div>
62 </form>
63 <?php
64 }
65 }