Browse Source

Update plugin to version 1.8

git-svn-id: https://plugins.svn.wordpress.org/prismatic/trunk@1974529 b8457f37-d9ea-0310-8a92-e5e31aec5664
master
Jeff Starr 5 years ago
parent
commit
0e69c8f412
3 changed files with 50 additions and 14 deletions
  1. +7
    -3
      inc/resources-enqueue.php
  2. +12
    -5
      prismatic.php
  3. +31
    -6
      readme.txt

+ 7
- 3
inc/resources-enqueue.php View File

@@ -264,11 +264,15 @@ function prismatic_active_languages($library) {
}
foreach($langs_array as $key => $value) {
if (!empty($langs_array) && is_array($langs_array)) {
foreach ($value as $k => $v) {
foreach($langs_array as $key => $value) {
$languages[] = $v;
foreach ($value as $k => $v) {
$languages[] = $v;
}
}


+ 12
- 5
prismatic.php View File

@@ -9,9 +9,9 @@
Author URI: https://plugin-planet.com/
Donate link: https://monzillamedia.com/donate.html
Requires at least: 4.1
Tested up to: 4.9
Stable tag: 1.7
Version: 1.7
Tested up to: 5.0
Stable tag: 1.8
Version: 1.8
Requires PHP: 5.2
Text Domain: prismatic
Domain Path: /languages
@@ -137,7 +137,7 @@ if (!class_exists('Prismatic')) {
private function constants() {
if (!defined('PRISMATIC_VERSION')) define('PRISMATIC_VERSION', '1.7');
if (!defined('PRISMATIC_VERSION')) define('PRISMATIC_VERSION', '1.8');
if (!defined('PRISMATIC_REQUIRE')) define('PRISMATIC_REQUIRE', '4.1');
if (!defined('PRISMATIC_NAME')) define('PRISMATIC_NAME', 'Prismatic');
if (!defined('PRISMATIC_AUTHOR')) define('PRISMATIC_AUTHOR', 'Jeff Starr');
@@ -178,16 +178,23 @@ if (!class_exists('Prismatic')) {
if ($file == plugin_basename(__FILE__)) {
$home_href = 'https://perishablepress.com/prismatic/';
$home_title = esc_attr__('Plugin Homepage', 'prismatic');
$home_text = esc_html__('Homepage', 'prismatic');
$links[] = '<a target="_blank" rel="noopener noreferrer" href="'. $home_href .'" title="'. $home_title .'">'. $home_text .'</a>';
$rate_href = 'https://wordpress.org/support/plugin/'. PRISMATIC_SLUG .'/reviews/?rate=5#new-post';
$rate_title = esc_attr__('Click here to rate and review this plugin on WordPress.org', 'prismatic');
$rate_text = esc_html__('Rate this plugin', 'prismatic') .'&nbsp;&raquo;';
$links[] = '<a target="_blank" rel="noopener noreferrer" href="'. $rate_href .'" title="'. $rate_title .'">'. $rate_text .'</a>';
$pro_href = 'https://plugin-planet.com/prismatic-pro/?plugin';
$pro_title = esc_attr__('Get Prismatic Pro!', 'prismatic');
$pro_text = esc_html__('Go&nbsp;Pro', 'prismatic');
$pro_style = 'padding:1px 5px;color:#eee;background:#333;border-radius:1px;';
$links[] = '<a target="_blank" rel="noopener noreferrer" href="'. $rate_href .'" title="'. $rate_title .'">'. $rate_text .'</a>';
// $links[] = '<a target="_blank" rel="noopener noreferrer" href="'. $pro_href .'" title="'. $pro_title .'" style="'. $pro_style .'">'. $pro_text .'</a>';
}


+ 31
- 6
readme.txt View File

@@ -9,9 +9,9 @@ Contributors: specialk
Author URI: https://plugin-planet.com/
Donate link: https://monzillamedia.com/donate.html
Requires at least: 4.1
Tested up to: 4.9
Stable tag: 1.7
Version: 1.7
Tested up to: 5.0
Stable tag: 1.8
Version: 1.8
Requires PHP: 5.2
Text Domain: prismatic
Domain Path: /languages
@@ -29,7 +29,7 @@ Display beautiful code snippets with Prism.js, Highlight.js, or plain code escap

* __Prism.js__ - Code escape + syntax highlight using [Prism.js](http://prismjs.com/)
* __Highlight.js__ - Code escape + syntax highlight using [Highlight.js](https://highlightjs.org/)
* __Plain Flavor__ - Code escape without syntax highlight (for custom styles)
* __Plain Flavor__ - Code escape without syntax highlight

**Prism.js Features**

@@ -63,6 +63,7 @@ Display beautiful code snippets with Prism.js, Highlight.js, or plain code escap
* Enable code escaping for post content, excerpts, and/or comments
* Enable code escaping on the frontend, Admin Area, or both
* Escapes single-line and multi-line code snippets
* Escapes `<code>` tags based on configuration

**General Features**

@@ -113,6 +114,12 @@ _[More info on installing WP plugins](http://codex.wordpress.org/Managing_Plugin



**Like the plugin?**

If you like Prismatic, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/prismatic/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you!



**Uninstalling**

Prismatic cleans up after itself. All plugin settings will be removed from your database when the plugin is uninstalled via the Plugins screen.
@@ -311,7 +318,9 @@ So for example, to specify a code block as C++, you would write:
Multi-line: <pre><code class="language-cpp">...</code></pre>
Alternate: <pre class="language-cpp"><code>...</code></pre>
Alternate: <pre class="language-cpp">
<code>...</code>
</pre>

To disable Prism.js syntax highlighting for any snippet, simply omit the language class.

@@ -380,7 +389,9 @@ So for example, to specify a code block as C++, you would write:
Multi-line: <pre><code class="language-cpp">...</code></pre>
Alternate: <pre class="language-cpp"><code>...</code></pre>
Alternate: <pre class="language-cpp">
<code>...</code>
</pre>

To disable Highlight.js syntax highlighting for any code block, add a class of `nohighlight`, like so:

@@ -405,6 +416,13 @@ __Note:__ uninstalling the plugin from the WP Plugins screen results in the remo
Yes, feel free to [suggest a language](https://perishablepress.com/contact/)


**Does this work with Gutenberg Block Editor?**

As of now, WP 5.0 beta, Gutenberg does not support `<pre>` and `<code>` tags. Currently with the Gutenberg Block Editor, if you try to add for example `<pre><code class="language-javascript">` to your post content, Gutenberg will transform it into `<pre class="wp-block-preformatted">`. Even switching to "Edit as HTML" and transforming the block into "Preformatted", the result is the same: mangled `<pre>` and `<code>` tags. So until this is fixed in WP, it is impossible to add syntax-highlighted code. Thus, highlighting plugins like Prismatic simply cannot do their jobs.

NOTE: If you need to work with pre/code snippets, you can disable Gutenberg Block Editor using my free plugin, [Disable Gutenberg](https://wordpress.org/plugins/disable-gutenberg/). It restores the Classic Editor so you can work easily with code snippets and other elements in your post content. This is how I roll for all the code I share over at [Perishable Press](https://perishablepress.com/), [Digging Into WordPress](https://digwp.com/), and elsewhere.


**Got a question?**

Send any questions or feedback via my [contact form](https://perishablepress.com/contact/)
@@ -433,6 +451,13 @@ Links, tweets and likes also appreciated. Thank you! :)

== Changelog ==

**1.8 (2018/11/14)**

* Fixes bug: Invalid argument foreach() resources-enqueue.php line 267
* Adds homepage link to Plugins screen
* Updates default translation template
* Tests on WordPress 5.0 (beta)

**1.7 (2018/08/17)**

* Adds `rel="noopener noreferrer"` to all [blank-target links](https://perishablepress.com/wordpress-blank-target-vulnerability/)


Loading…
Cancel
Save