Version Description
- 14/11/2019 =
- Tested on WP 5.3 with success!
- Change default option to "Re-add underline & justify buttons" on plugin activation
Download this release
Release Info
Developer | briKou |
Plugin | Re-add text underline and justify |
Version | 0.3 |
Comparing to | |
See all releases |
Code changes from version 0.2 to 0.3
- assets/banner-1544x500.jpg +0 -0
- assets/banner-772x250.jpg +0 -0
- assets/icon.svg +0 -45
- assets/screenshot-1.jpg +0 -0
- assets/screenshot-2.jpg +0 -0
- assets/screenshot-3.jpg +0 -0
- assets/screenshot-4.jpg +0 -0
- assets/screenshot-5.jpg +0 -0
- tags/0.1.1/index.php → index.php +0 -0
- {tags/0.1.3/langs → langs}/re-add-underline-justify-fr_FR.mo +0 -0
- {tags/0.1.3/langs → langs}/re-add-underline-justify-fr_FR.po +0 -0
- trunk/re-add-underline-justify.php → re-add-underline-justify.php +7 -7
- trunk/readme.txt → readme.txt +12 -14
- tags/0.1.1/langs/re-add-underline-justify-fr_FR.mo +0 -0
- tags/0.1.1/langs/re-add-underline-justify-fr_FR.po +0 -83
- tags/0.1.1/re-add-underline-justify.php +0 -241
- tags/0.1.1/readme.txt +0 -68
- tags/0.1.2/index.php +0 -2
- tags/0.1.2/langs/re-add-underline-justify-fr_FR.mo +0 -0
- tags/0.1.2/langs/re-add-underline-justify-fr_FR.po +0 -83
- tags/0.1.2/re-add-underline-justify.php +0 -241
- tags/0.1.2/readme.txt +0 -73
- tags/0.1.3/index.php +0 -2
- tags/0.1.3/re-add-underline-justify.php +0 -324
- tags/0.1.3/readme.txt +0 -84
- tags/0.1.4/index.php +0 -2
- tags/0.1.4/langs/re-add-underline-justify-fr_FR.mo +0 -0
- tags/0.1.4/langs/re-add-underline-justify-fr_FR.po +0 -93
- tags/0.1.4/re-add-underline-justify.php +0 -324
- tags/0.1.4/readme.txt +0 -88
- tags/0.1/index.php +0 -2
- tags/0.1/langs/re-add-underline-justify-fr_FR.mo +0 -0
- tags/0.1/langs/re-add-underline-justify-fr_FR.po +0 -83
- tags/0.1/re-add-underline-justify.php +0 -241
- tags/0.1/readme.txt +0 -65
- trunk/index.php +0 -2
- trunk/langs/re-add-underline-justify-fr_FR.mo +0 -0
- trunk/langs/re-add-underline-justify-fr_FR.po +0 -93
assets/banner-1544x500.jpg
DELETED
Binary file
|
assets/banner-772x250.jpg
DELETED
Binary file
|
assets/icon.svg
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
-
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
-
viewBox="0 0 850.4 850.4" style="enable-background:new 0 0 850.4 850.4;" xml:space="preserve">
|
5 |
-
<style type="text/css">
|
6 |
-
.st0{fill:#DB3939;}
|
7 |
-
.st1{fill:#EFEEEE;}
|
8 |
-
</style>
|
9 |
-
<ellipse class="st0" cx="425.2" cy="424.2" rx="425.2" ry="424.2"/>
|
10 |
-
<g>
|
11 |
-
<g>
|
12 |
-
<rect x="145" y="566.3" class="st1" width="336.2" height="56"/>
|
13 |
-
</g>
|
14 |
-
</g>
|
15 |
-
<g>
|
16 |
-
<g>
|
17 |
-
<rect x="145" y="342.1" class="st1" width="364.3" height="56"/>
|
18 |
-
</g>
|
19 |
-
</g>
|
20 |
-
<g>
|
21 |
-
<g>
|
22 |
-
<rect x="145" y="230.1" class="st1" width="560.4" height="56"/>
|
23 |
-
</g>
|
24 |
-
</g>
|
25 |
-
<g>
|
26 |
-
<g>
|
27 |
-
<rect x="145" y="454.2" class="st1" width="560.4" height="56"/>
|
28 |
-
</g>
|
29 |
-
</g>
|
30 |
-
<g>
|
31 |
-
<g>
|
32 |
-
<rect x="565.3" y="342.1" class="st1" width="140.1" height="56"/>
|
33 |
-
</g>
|
34 |
-
</g>
|
35 |
-
<g>
|
36 |
-
<g>
|
37 |
-
<rect x="649.4" y="566.3" class="st1" width="56" height="56"/>
|
38 |
-
</g>
|
39 |
-
</g>
|
40 |
-
<g>
|
41 |
-
<g>
|
42 |
-
<rect x="537.3" y="566.3" class="st1" width="56" height="56"/>
|
43 |
-
</g>
|
44 |
-
</g>
|
45 |
-
</svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/screenshot-1.jpg
DELETED
Binary file
|
assets/screenshot-2.jpg
DELETED
Binary file
|
assets/screenshot-3.jpg
DELETED
Binary file
|
assets/screenshot-4.jpg
DELETED
Binary file
|
assets/screenshot-5.jpg
DELETED
Binary file
|
tags/0.1.1/index.php → index.php
RENAMED
File without changes
|
{tags/0.1.3/langs → langs}/re-add-underline-justify-fr_FR.mo
RENAMED
File without changes
|
{tags/0.1.3/langs → langs}/re-add-underline-justify-fr_FR.po
RENAMED
File without changes
|
trunk/re-add-underline-justify.php → re-add-underline-justify.php
RENAMED
@@ -2,15 +2,15 @@
|
|
2 |
/*
|
3 |
* Plugin Name: Re-add text underline and justify
|
4 |
* Plugin URI: https://www.b-website.com/re-add-text-underline-and-justify
|
5 |
-
* Description:
|
6 |
* Author: Brice Capobianco
|
7 |
-
* Version: 0.
|
8 |
* Author URI: https://www.b-website.com/
|
9 |
* Domain Path: /langs
|
10 |
* Text Domain: re-add-underline-justify
|
11 |
*/
|
12 |
|
13 |
-
/* Copyright
|
14 |
|
15 |
This program is free software; you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -118,7 +118,7 @@ function ratb_setting_input() {
|
|
118 |
|
119 |
//Default value
|
120 |
if( empty( $options ) ){
|
121 |
-
$options[ 'ratb_mce_style' ] =
|
122 |
}
|
123 |
|
124 |
// The option "Re-add underline & justify + rearrange" has been deprecated in 0.2
|
@@ -131,8 +131,8 @@ function ratb_setting_input() {
|
|
131 |
// Output the field
|
132 |
echo '
|
133 |
<select id="ratb_mce_style" name="ratb_options[ratb_mce_style]">
|
134 |
-
<option value="1"' . selected( $options[ 'ratb_mce_style' ], 1, false ) . '>' . __( '
|
135 |
-
<option value="2"' . selected( $options[ 'ratb_mce_style' ], 2, false ) . '>' . __( 'Re-add underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
136 |
<option value="4"' . selected( $options[ 'ratb_mce_style' ], 4, false ) . '>' . __( 'Re-add justify only', 're-add-underline-justify' ) . '</option>
|
137 |
</select>';
|
138 |
|
@@ -148,7 +148,7 @@ function ratb_buttons_lines_tiny_mce(){
|
|
148 |
$options = get_option( 'ratb_options' );
|
149 |
|
150 |
// Conditionnal MCE display
|
151 |
-
if ( isset( $options[ 'ratb_mce_style' ] ) && ( $options[ 'ratb_mce_style' ] == 2 || $options[ 'ratb_mce_style' ] == 3 ) ) {
|
152 |
|
153 |
// The option "Re-add underline & justify + rearrange" has been deprecated in 0.2
|
154 |
// So we replace option 3 with 2 if the former was selected.
|
2 |
/*
|
3 |
* Plugin Name: Re-add text underline and justify
|
4 |
* Plugin URI: https://www.b-website.com/re-add-text-underline-and-justify
|
5 |
+
* Description: Re-adds the Editor text underline & justify buttons in the WYSIWYG removed in WordPress 4.7. Works with Classic Editor, ACF and Gutenberg.
|
6 |
* Author: Brice Capobianco
|
7 |
+
* Version: 0.3
|
8 |
* Author URI: https://www.b-website.com/
|
9 |
* Domain Path: /langs
|
10 |
* Text Domain: re-add-underline-justify
|
11 |
*/
|
12 |
|
13 |
+
/* Copyright 2019 Brice CAPOBIANCO (contact : http:// b-website.com/contact)
|
14 |
|
15 |
This program is free software; you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License, version 2, as
|
118 |
|
119 |
//Default value
|
120 |
if( empty( $options ) ){
|
121 |
+
$options[ 'ratb_mce_style' ] = 2;
|
122 |
}
|
123 |
|
124 |
// The option "Re-add underline & justify + rearrange" has been deprecated in 0.2
|
131 |
// Output the field
|
132 |
echo '
|
133 |
<select id="ratb_mce_style" name="ratb_options[ratb_mce_style]">
|
134 |
+
<option value="1"' . selected( $options[ 'ratb_mce_style' ], 1, false ) . '>' . __( 'Without underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
135 |
+
<option value="2"' . selected( $options[ 'ratb_mce_style' ], 2, false ) . '>' . __( 'Default - Re-add underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
136 |
<option value="4"' . selected( $options[ 'ratb_mce_style' ], 4, false ) . '>' . __( 'Re-add justify only', 're-add-underline-justify' ) . '</option>
|
137 |
</select>';
|
138 |
|
148 |
$options = get_option( 'ratb_options' );
|
149 |
|
150 |
// Conditionnal MCE display
|
151 |
+
if ( !isset( $options[ 'ratb_mce_style' ] ) || isset( $options[ 'ratb_mce_style' ] ) && ( $options[ 'ratb_mce_style' ] == 2 || $options[ 'ratb_mce_style' ] == 3 ) ) {
|
152 |
|
153 |
// The option "Re-add underline & justify + rearrange" has been deprecated in 0.2
|
154 |
// So we replace option 3 with 2 if the former was selected.
|
trunk/readme.txt → readme.txt
RENAMED
@@ -1,20 +1,17 @@
|
|
1 |
=== Re-add text underline and justify ===
|
2 |
Contributors: briKou
|
3 |
Donate link: https://www.paypal.me/BriceCapobianco
|
4 |
-
Tags:
|
5 |
Requires at least: 4.7
|
6 |
-
Tested up to:
|
7 |
Requires PHP: 5.5.12
|
8 |
-
Stable tag: 0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
12 |
-
This tiny plugin re-adds the Editor text underline & text justify buttons in the WYSIWYG removed in WordPress 4.7. Works with Gutenberg.
|
13 |
-
|
14 |
-
|
15 |
== Description ==
|
16 |
|
17 |
-
**
|
18 |
|
19 |
In WordPress 4.7, the core developper team decided to make various changes in the editor (TinyMce WYSIWYG), including removing the **underline and justify buttons** and rearranging some of the toolbar buttons.
|
20 |
If you don't want to change the way you edit your content and/or don't want to confuse your customers with a new contribution interface, this very lightweight plugin will set the editor style back to its previous state (like in WordPress 4.6 and above versions).
|
@@ -23,15 +20,12 @@ If you don't want to change the way you edit your content and/or don't want to c
|
|
23 |
|
24 |
3 options are available for the Editor style:
|
25 |
|
26 |
-
*
|
27 |
-
* Re-add underline & justify buttons
|
28 |
* Re-add justify only
|
29 |
|
30 |
Please note, the previous option "Re-add underline & justify + rearrange" has been deprecated in 0.2 (sept. 2018) as it causes conflicts with the new Gutenberg editor. This option automatically switches to "Re-add underline & justify buttons" from now on.
|
31 |
|
32 |
-
**IMPORTANT:** Try various options before posting a bug report. Some plugins such as ACF (free version) are using their own list of buttons and can create conflicts with this plugin.
|
33 |
-
|
34 |
-
|
35 |
[DOCUMENTATION](https://www.b-website.com/re-add-text-underline-and-justify "Plugin documentation")
|
36 |
|
37 |
[CHECK OUT MY OTHER PLUGINS](https://www.b-website.com/category/plugins-en "More plugins by b*web")
|
@@ -43,8 +37,8 @@ Please note, the previous option "Re-add underline & justify + rearrange" has be
|
|
43 |
== Installation ==
|
44 |
|
45 |
1. Upload and activate the plugin (or install it through the WP admin console)
|
46 |
-
2.
|
47 |
-
3.
|
48 |
|
49 |
== Frequently Asked Questions ==
|
50 |
|
@@ -63,6 +57,10 @@ Just go to Settings -> Writing and select the option you want under "Editor styl
|
|
63 |
|
64 |
== Changelog ==
|
65 |
|
|
|
|
|
|
|
|
|
66 |
= 0.2 - 09/04/2018 =
|
67 |
* Tested on WP 4.9.8 with success!
|
68 |
* Added support for Gutenberg for its "Classic" bloc only.
|
1 |
=== Re-add text underline and justify ===
|
2 |
Contributors: briKou
|
3 |
Donate link: https://www.paypal.me/BriceCapobianco
|
4 |
+
Tags: editor, underline, justify, wysiwyg, gutenberg, ACF
|
5 |
Requires at least: 4.7
|
6 |
+
Tested up to: 5.3
|
7 |
Requires PHP: 5.5.12
|
8 |
+
Stable tag: 0.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
|
|
|
|
|
|
12 |
== Description ==
|
13 |
|
14 |
+
**This tiny plugin re-adds the Editor text underline & text justify buttons in the WYSIWYG removed in WordPress 4.7. It works well with the [Classic Editor](https://fr.wordpress.org/plugins/classic-editor/) plugin, [Advanced Custom Fields](https://fr.wordpress.org/plugins/advanced-custom-fields/) (Free & Pro) and is also compatible with the Gutenberg's "Classic" bloc.**
|
15 |
|
16 |
In WordPress 4.7, the core developper team decided to make various changes in the editor (TinyMce WYSIWYG), including removing the **underline and justify buttons** and rearranging some of the toolbar buttons.
|
17 |
If you don't want to change the way you edit your content and/or don't want to confuse your customers with a new contribution interface, this very lightweight plugin will set the editor style back to its previous state (like in WordPress 4.6 and above versions).
|
20 |
|
21 |
3 options are available for the Editor style:
|
22 |
|
23 |
+
* Without underline & justify buttons
|
24 |
+
* Default - Re-add underline & justify buttons
|
25 |
* Re-add justify only
|
26 |
|
27 |
Please note, the previous option "Re-add underline & justify + rearrange" has been deprecated in 0.2 (sept. 2018) as it causes conflicts with the new Gutenberg editor. This option automatically switches to "Re-add underline & justify buttons" from now on.
|
28 |
|
|
|
|
|
|
|
29 |
[DOCUMENTATION](https://www.b-website.com/re-add-text-underline-and-justify "Plugin documentation")
|
30 |
|
31 |
[CHECK OUT MY OTHER PLUGINS](https://www.b-website.com/category/plugins-en "More plugins by b*web")
|
37 |
== Installation ==
|
38 |
|
39 |
1. Upload and activate the plugin (or install it through the WP admin console)
|
40 |
+
2. That's it, it is ready to use!
|
41 |
+
3. If you wan't to change the default parameter, go to Settings -> Writing and select the option you want under "Editor style".
|
42 |
|
43 |
== Frequently Asked Questions ==
|
44 |
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
+
= 0.3 - 14/11/2019 =
|
61 |
+
* Tested on WP 5.3 with success!
|
62 |
+
* Change default option to "Re-add underline & justify buttons" on plugin activation
|
63 |
+
|
64 |
= 0.2 - 09/04/2018 =
|
65 |
* Tested on WP 4.9.8 with success!
|
66 |
* Added support for Gutenberg for its "Classic" bloc only.
|
tags/0.1.1/langs/re-add-underline-justify-fr_FR.mo
DELETED
Binary file
|
tags/0.1.1/langs/re-add-underline-justify-fr_FR.po
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Re-add text underline and justify v0.1\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2016-11-06 12:22:32+0000\n"
|
7 |
-
"Last-Translator: Brice Capobianco\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n>1;\n"
|
13 |
-
"X-Generator: CSL v1.x\n"
|
14 |
-
"X-Poedit-Language: French\n"
|
15 |
-
"X-Poedit-Country: FRANCE\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
-
"X-Poedit-Basepath: ../\n"
|
19 |
-
"X-Poedit-Bookmarks: \n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Textdomain-Support: yes"
|
22 |
-
|
23 |
-
#. translators: plugin header field 'Name'
|
24 |
-
#: re-add-underline-justify.php:0
|
25 |
-
#@ re-add-underline-justify
|
26 |
-
msgid "Re-add text underline and justify"
|
27 |
-
msgstr "Re-add text underline and justify"
|
28 |
-
|
29 |
-
#. translators: plugin header field 'PluginURI'
|
30 |
-
#. translators: plugin header field 'AuthorURI'
|
31 |
-
#: re-add-underline-justify.php:0
|
32 |
-
#@ re-add-underline-justify
|
33 |
-
msgid "http:// b-website.com/"
|
34 |
-
msgstr "http:// b-website.com/"
|
35 |
-
|
36 |
-
#. translators: plugin header field 'Description'
|
37 |
-
#: re-add-underline-justify.php:0
|
38 |
-
#@ re-add-underline-justify
|
39 |
-
msgid "This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7."
|
40 |
-
msgstr "Ce plugin permet de remettre en place les boutons pour souligner et justifier le texte et de réorganiser les boutons comme ils l'étaient avant WordPress 4.7."
|
41 |
-
|
42 |
-
#. translators: plugin header field 'Author'
|
43 |
-
#: re-add-underline-justify.php:0
|
44 |
-
#@ re-add-underline-justify
|
45 |
-
msgid "Brice Capobianco"
|
46 |
-
msgstr "Brice Capobianco"
|
47 |
-
|
48 |
-
#. translators: plugin header field 'Version'
|
49 |
-
#: re-add-underline-justify.php:0
|
50 |
-
#@ re-add-underline-justify
|
51 |
-
msgid "0.1"
|
52 |
-
msgstr "0.1"
|
53 |
-
|
54 |
-
#: re-add-underline-justify.php:43
|
55 |
-
#@ simple-revisions-delete
|
56 |
-
msgid "More b*web Plugins"
|
57 |
-
msgstr ""
|
58 |
-
|
59 |
-
#: re-add-underline-justify.php:44
|
60 |
-
#@ default
|
61 |
-
msgid "Donate to this plugin »"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: re-add-underline-justify.php:89
|
65 |
-
#@ re-add-underline-justify
|
66 |
-
msgid "Editor style"
|
67 |
-
msgstr "Style de l'éditeur"
|
68 |
-
|
69 |
-
#: re-add-underline-justify.php:114
|
70 |
-
#@ re-add-underline-justify
|
71 |
-
msgid "Default - without underline & justify buttons"
|
72 |
-
msgstr "Défaut - sans les boutons souligner & justifier"
|
73 |
-
|
74 |
-
#: re-add-underline-justify.php:115
|
75 |
-
#@ re-add-underline-justify
|
76 |
-
msgid "Re-add underline & justify buttons"
|
77 |
-
msgstr "Ajouter les boutons souligner & justifier"
|
78 |
-
|
79 |
-
#: re-add-underline-justify.php:116
|
80 |
-
#@ re-add-underline-justify
|
81 |
-
msgid "Re-add underline & justify + rearrange"
|
82 |
-
msgstr "Ajouter les boutons souligner & justifier + les réordonner"
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.1/re-add-underline-justify.php
DELETED
@@ -1,241 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Plugin Name: Re-add text underline and justify
|
4 |
-
* Plugin URI: http://b-website.com/re-add-text-underline-and-justify
|
5 |
-
* Description: This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7.
|
6 |
-
* Author: Brice Capobianco
|
7 |
-
* Version: 0.1.1
|
8 |
-
* Author URI: http:// b-website.com/
|
9 |
-
* Domain Path: /langs
|
10 |
-
* Text Domain: re-add-underline-justify
|
11 |
-
*/
|
12 |
-
|
13 |
-
/* Copyright 2016 Brice CAPOBIANCO (contact : http:// b-website.com/contact)
|
14 |
-
|
15 |
-
This program is free software; you can redistribute it and/or modify
|
16 |
-
it under the terms of the GNU General Public License, version 2, as
|
17 |
-
published by the Free Software Foundation.
|
18 |
-
|
19 |
-
This program is distributed in the hope that it will be useful,
|
20 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
-
GNU General Public License for more details.
|
23 |
-
|
24 |
-
You should have received a copy of the GNU General Public License
|
25 |
-
along with this program; if not, write to the Free Software
|
26 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
-
*/
|
28 |
-
|
29 |
-
|
30 |
-
/***************************************************************
|
31 |
-
* SECURITY : Exit if accessed directly
|
32 |
-
***************************************************************/
|
33 |
-
if ( !defined( 'ABSPATH' ) ) {
|
34 |
-
die( 'Direct access not allowed!' );
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
/***************************************************************
|
39 |
-
* Add custom meta link on plugin list page
|
40 |
-
***************************************************************/
|
41 |
-
function ratb_meta_links( $links, $file ) {
|
42 |
-
if ( $file === 're-add-underline-justify/re-add-underline-justify.php' ) {
|
43 |
-
$links[] = '<a href="http:// b-website.com/category/plugins" target="_blank" title="' . __( 'More b*web Plugins', 'simple-revisions-delete' ) . '">'. __( 'More b*web Plugins', 'simple-revisions-delete' ) .'</a>';
|
44 |
-
$links[] = '<a href="https:// www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8" target="_blank" title="' . __( 'Donate to this plugin »' ) . '"><strong>' . __( 'Donate to this plugin »' ) . '</strong></a>';
|
45 |
-
}
|
46 |
-
return $links;
|
47 |
-
}
|
48 |
-
add_filter( 'plugin_row_meta', 'ratb_meta_links', 10, 2 );
|
49 |
-
|
50 |
-
|
51 |
-
/***************************************************************
|
52 |
-
* Load plugin textdomain
|
53 |
-
***************************************************************/
|
54 |
-
function ratb_load_textdomain() {
|
55 |
-
$path = dirname( plugin_basename( __FILE__ ) ) . '/langs/';
|
56 |
-
load_plugin_textdomain( 're-add-underline-justify', FALSE, $path );
|
57 |
-
}
|
58 |
-
add_action( 'init', 'ratb_load_textdomain' );
|
59 |
-
|
60 |
-
|
61 |
-
/***************************************************************
|
62 |
-
* Remove plugin settings from DB on plugin deletion
|
63 |
-
***************************************************************/
|
64 |
-
function ratb_uninstall() {
|
65 |
-
// Remove option from DB
|
66 |
-
delete_option( 'ratb_options' );
|
67 |
-
}
|
68 |
-
|
69 |
-
|
70 |
-
/***************************************************************
|
71 |
-
* Hooks for install & uninstall
|
72 |
-
***************************************************************/
|
73 |
-
function ratb_activation() {
|
74 |
-
register_uninstall_hook( __FILE__, 'ratb_uninstall' );
|
75 |
-
}
|
76 |
-
register_activation_hook( __FILE__, 'ratb_activation' );
|
77 |
-
|
78 |
-
|
79 |
-
/***************************************************************
|
80 |
-
* Register the new setting on the Wrinting screen
|
81 |
-
***************************************************************/
|
82 |
-
function ratb_admin_init(){
|
83 |
-
register_setting(
|
84 |
-
'writing', // settings page
|
85 |
-
'ratb_options' // option name
|
86 |
-
);
|
87 |
-
add_settings_field(
|
88 |
-
'ratb_mce_style', // id
|
89 |
-
__( 'Editor style', 're-add-underline-justify' ), // setting title
|
90 |
-
'ratb_setting_input', // display callback
|
91 |
-
'writing', // settings page
|
92 |
-
'default' // settings section
|
93 |
-
);
|
94 |
-
}
|
95 |
-
add_action('admin_init', 'ratb_admin_init');
|
96 |
-
|
97 |
-
|
98 |
-
/***************************************************************
|
99 |
-
* Display the select on the Wrinting screen
|
100 |
-
***************************************************************/
|
101 |
-
function ratb_setting_input() {
|
102 |
-
|
103 |
-
//Retrieve the option value
|
104 |
-
$options = get_option( 'ratb_options' );
|
105 |
-
|
106 |
-
//Default value
|
107 |
-
if( empty( $options ) ){
|
108 |
-
$options['ratb_mce_style'] = 1;
|
109 |
-
}
|
110 |
-
|
111 |
-
// Output the field
|
112 |
-
echo '
|
113 |
-
<select id="ratb_mce_style" name="ratb_options[ratb_mce_style]">
|
114 |
-
<option value="1"' . selected( $options['ratb_mce_style'], 1, false ) . '>' . __( 'Default - without underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
115 |
-
<option value="2"' . selected( $options['ratb_mce_style'], 2, false ) . '>' . __( 'Re-add underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
116 |
-
<option value="3"' . selected( $options['ratb_mce_style'], 3, false ) . '>' . __( 'Re-add underline & justify + rearrange', 're-add-underline-justify' ) . '</option>
|
117 |
-
</select>';
|
118 |
-
|
119 |
-
}
|
120 |
-
|
121 |
-
|
122 |
-
/***************************************************************
|
123 |
-
* Update tinyMCE buttons lines
|
124 |
-
***************************************************************/
|
125 |
-
function ratb_buttons_lines_tiny_mce(){
|
126 |
-
|
127 |
-
//Retrieve the option value
|
128 |
-
$options = get_option( 'ratb_options' );
|
129 |
-
|
130 |
-
// Conditionnal MCE display
|
131 |
-
if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 2 ) {
|
132 |
-
|
133 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons' );
|
134 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2' );
|
135 |
-
|
136 |
-
} else if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 3 ) {
|
137 |
-
|
138 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons_rearrange' );
|
139 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2_rearrange' );
|
140 |
-
|
141 |
-
}
|
142 |
-
//Else, do nothing... use the default editor style
|
143 |
-
|
144 |
-
}
|
145 |
-
add_action( 'admin_head', 'ratb_buttons_lines_tiny_mce' );
|
146 |
-
|
147 |
-
|
148 |
-
/***************************************************************
|
149 |
-
* First editor row buttons - 4.6
|
150 |
-
***************************************************************/
|
151 |
-
function ratb_tiny_mce_buttons( $buttons_array ){
|
152 |
-
$mce_buttons = array(
|
153 |
-
'bold', // Applies the bold format to the current selection.
|
154 |
-
'italic', // Applies the italic format to the current selection.
|
155 |
-
'strikethrough', // Applies strike though format to the current selection.
|
156 |
-
'bullist', // Formats the current selection as a bullet list.
|
157 |
-
'numlist', // Formats the current selection as a numbered list.
|
158 |
-
'blockquote', // Applies block quote format to the current block level element.
|
159 |
-
'hr', // Inserts a horizontal rule into the editor.
|
160 |
-
'alignleft', // Left aligns the current block or image.
|
161 |
-
'aligncenter', // Left aligns the current block or image.
|
162 |
-
'alignright', // Right aligns the current block or image.
|
163 |
-
'link', // Creates/Edits links within the editor.
|
164 |
-
'unlink', // Removes links from the current selection.
|
165 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
166 |
-
'spellchecker', // ???
|
167 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
168 |
-
'dfw' // Distraction-free mode on/off.
|
169 |
-
);
|
170 |
-
return $mce_buttons;
|
171 |
-
}
|
172 |
-
|
173 |
-
|
174 |
-
/***************************************************************
|
175 |
-
* Second editor row buttons - 4.6
|
176 |
-
***************************************************************/
|
177 |
-
function ratb_tiny_mce_buttons_2( $buttons_array ){
|
178 |
-
$mce_buttons_2 = array(
|
179 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
180 |
-
'underline', // Applies the underline format to the current selection.
|
181 |
-
'alignjustify', // Full aligns the current block or image.
|
182 |
-
'forecolor', // Applies foreground/text color to selection.
|
183 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
184 |
-
'removeformat', // Removes the formatting from the current selection.
|
185 |
-
'charmap', // Inserts custom characters into the editor.
|
186 |
-
'outdent', // Outdents the current list item or block element.
|
187 |
-
'indent', // Indents the current list item or block element.
|
188 |
-
'undo', // Undoes the last operation.
|
189 |
-
'redo', // Redoes the last undoed operation.
|
190 |
-
'wp_help' // Opens the help.
|
191 |
-
);
|
192 |
-
return $mce_buttons_2;
|
193 |
-
}
|
194 |
-
|
195 |
-
|
196 |
-
/***************************************************************
|
197 |
-
* First editor row buttons - 4.7 + rearrange
|
198 |
-
***************************************************************/
|
199 |
-
function ratb_tiny_mce_buttons_rearrange( $buttons_array ){
|
200 |
-
$mce_buttons = array(
|
201 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
202 |
-
'bold', // Applies the bold format to the current selection.
|
203 |
-
'italic', // Applies the italic format to the current selection.
|
204 |
-
'underline', // Applies the underline format to the current selection.
|
205 |
-
'bullist', // Formats the current selection as a bullet list.
|
206 |
-
'numlist', // Formats the current selection as a numbered list.
|
207 |
-
'blockquote', // Applies block quote format to the current block level element.
|
208 |
-
'hr', // Inserts a horizontal rule into the editor.
|
209 |
-
'alignleft', // Left aligns the current block or image.
|
210 |
-
'aligncenter', // Left aligns the current block or image.
|
211 |
-
'alignright', // Right aligns the current block or image.
|
212 |
-
'alignjustify', // Full aligns the current block or image.
|
213 |
-
'link', // Creates/Edits links within the editor.
|
214 |
-
'unlink', // Removes links from the current selection.
|
215 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
216 |
-
'spellchecker', // ???
|
217 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
218 |
-
'dfw' // Distraction-free mode on/off.
|
219 |
-
);
|
220 |
-
return $mce_buttons;
|
221 |
-
}
|
222 |
-
|
223 |
-
|
224 |
-
/***************************************************************
|
225 |
-
* Second editor row buttons - 4.7 + rearrange
|
226 |
-
***************************************************************/
|
227 |
-
function ratb_tiny_mce_buttons_2_rearrange( $buttons_array ){
|
228 |
-
$mce_buttons_2 = array(
|
229 |
-
'strikethrough', // Applies strike though format to the current selection.
|
230 |
-
'forecolor', // Applies foreground/text color to selection.
|
231 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
232 |
-
'removeformat', // Removes the formatting from the current selection.
|
233 |
-
'charmap', // Inserts custom characters into the editor.
|
234 |
-
'outdent', // Outdents the current list item or block element.
|
235 |
-
'indent', // Indents the current list item or block element.
|
236 |
-
'undo', // Undoes the last operation.
|
237 |
-
'redo', // Redoes the last undoed operation.
|
238 |
-
'wp_help' // Opens the help.
|
239 |
-
);
|
240 |
-
return $mce_buttons_2;
|
241 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.1/readme.txt
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
=== Re-add text underline and justify ===
|
2 |
-
Contributors: briKou
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8
|
4 |
-
Tags: mce, editor, underline, justify, tinyMCE, 4.7, wysiwyg, visual editor
|
5 |
-
Requires at least: 4.7
|
6 |
-
Tested up to: 4.7
|
7 |
-
Stable tag: 0.1.1
|
8 |
-
License: GPLv2 or later
|
9 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
-
|
11 |
-
This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7.
|
12 |
-
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
In WordPress 4.7, the core developper team decided to make various changes in the editor, including removing the **underline and justify buttons** and rearranging some of the toolbar buttons.
|
17 |
-
If you don't want to change the way you edit your content and/or don't want to confuse your customers with a new contribution interface, this simple and lightweight plugin will set the editor style back to its previous state.
|
18 |
-
|
19 |
-
**You may change the Editor style from the Writing option page.**
|
20 |
-
|
21 |
-
3 options are available for the Editor style :
|
22 |
-
|
23 |
-
* Default - without underline & justify buttons
|
24 |
-
* Re-add underline & justify buttons
|
25 |
-
* Re-add underline & justify + rearrange
|
26 |
-
|
27 |
-
Please note, the third option is, in my opinion, a good compromise between the 4.6 and 4.7 editor versions.
|
28 |
-
|
29 |
-
[DOCUMENTATION](http://b-website.com/re-add-text-underline-and-justify "Plugin documentation")
|
30 |
-
|
31 |
-
[CHECK OUT MY OTHER PLUGINS](http://b-website.com/category/plugins-en "More plugins by b*web")
|
32 |
-
|
33 |
-
|
34 |
-
**Please ask for help or report bugs if anything goes wrong. It is the best way to make the community benefit!**
|
35 |
-
|
36 |
-
|
37 |
-
== Installation ==
|
38 |
-
|
39 |
-
1. Upload and activate the plugin (or install it through the WP admin console)
|
40 |
-
2. Go to Settings -> Writing and select the option you want under "Editor style".
|
41 |
-
3. That's it, it is ready to use!
|
42 |
-
|
43 |
-
== Frequently Asked Questions ==
|
44 |
-
|
45 |
-
= Where can I change the Editor style? =
|
46 |
-
Just go to Settings -> Writing and select the option you want under "Editor style".
|
47 |
-
|
48 |
-
|
49 |
-
== Screenshots ==
|
50 |
-
|
51 |
-
1. Change the Editor style from the Writing option page
|
52 |
-
2. Default - without underline & justify buttons
|
53 |
-
3. Re-add underline & justify buttons
|
54 |
-
4. Re-add underline & justify + rearrange
|
55 |
-
|
56 |
-
|
57 |
-
== Changelog ==
|
58 |
-
|
59 |
-
= 0.1.1 - 11/10/2016 =
|
60 |
-
* Fix an issue hidding Editor content.
|
61 |
-
|
62 |
-
= 0.1 - 11/06/2016 =
|
63 |
-
* First release.
|
64 |
-
|
65 |
-
== Upgrade Notice ==
|
66 |
-
|
67 |
-
= 0.1 =
|
68 |
-
* First release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.2/index.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Kisses from France...
|
|
|
|
tags/0.1.2/langs/re-add-underline-justify-fr_FR.mo
DELETED
Binary file
|
tags/0.1.2/langs/re-add-underline-justify-fr_FR.po
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Re-add text underline and justify v0.1\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2016-11-06 12:22:32+0000\n"
|
7 |
-
"Last-Translator: Brice Capobianco\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n>1;\n"
|
13 |
-
"X-Generator: CSL v1.x\n"
|
14 |
-
"X-Poedit-Language: French\n"
|
15 |
-
"X-Poedit-Country: FRANCE\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
-
"X-Poedit-Basepath: ../\n"
|
19 |
-
"X-Poedit-Bookmarks: \n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Textdomain-Support: yes"
|
22 |
-
|
23 |
-
#. translators: plugin header field 'Name'
|
24 |
-
#: re-add-underline-justify.php:0
|
25 |
-
#@ re-add-underline-justify
|
26 |
-
msgid "Re-add text underline and justify"
|
27 |
-
msgstr "Re-add text underline and justify"
|
28 |
-
|
29 |
-
#. translators: plugin header field 'PluginURI'
|
30 |
-
#. translators: plugin header field 'AuthorURI'
|
31 |
-
#: re-add-underline-justify.php:0
|
32 |
-
#@ re-add-underline-justify
|
33 |
-
msgid "http:// b-website.com/"
|
34 |
-
msgstr "http:// b-website.com/"
|
35 |
-
|
36 |
-
#. translators: plugin header field 'Description'
|
37 |
-
#: re-add-underline-justify.php:0
|
38 |
-
#@ re-add-underline-justify
|
39 |
-
msgid "This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7."
|
40 |
-
msgstr "Ce plugin permet de remettre en place les boutons pour souligner et justifier le texte et de réorganiser les boutons comme ils l'étaient avant WordPress 4.7."
|
41 |
-
|
42 |
-
#. translators: plugin header field 'Author'
|
43 |
-
#: re-add-underline-justify.php:0
|
44 |
-
#@ re-add-underline-justify
|
45 |
-
msgid "Brice Capobianco"
|
46 |
-
msgstr "Brice Capobianco"
|
47 |
-
|
48 |
-
#. translators: plugin header field 'Version'
|
49 |
-
#: re-add-underline-justify.php:0
|
50 |
-
#@ re-add-underline-justify
|
51 |
-
msgid "0.1"
|
52 |
-
msgstr "0.1"
|
53 |
-
|
54 |
-
#: re-add-underline-justify.php:43
|
55 |
-
#@ simple-revisions-delete
|
56 |
-
msgid "More b*web Plugins"
|
57 |
-
msgstr ""
|
58 |
-
|
59 |
-
#: re-add-underline-justify.php:44
|
60 |
-
#@ default
|
61 |
-
msgid "Donate to this plugin »"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: re-add-underline-justify.php:89
|
65 |
-
#@ re-add-underline-justify
|
66 |
-
msgid "Editor style"
|
67 |
-
msgstr "Style de l'éditeur"
|
68 |
-
|
69 |
-
#: re-add-underline-justify.php:114
|
70 |
-
#@ re-add-underline-justify
|
71 |
-
msgid "Default - without underline & justify buttons"
|
72 |
-
msgstr "Défaut - sans les boutons souligner & justifier"
|
73 |
-
|
74 |
-
#: re-add-underline-justify.php:115
|
75 |
-
#@ re-add-underline-justify
|
76 |
-
msgid "Re-add underline & justify buttons"
|
77 |
-
msgstr "Ajouter les boutons souligner & justifier"
|
78 |
-
|
79 |
-
#: re-add-underline-justify.php:116
|
80 |
-
#@ re-add-underline-justify
|
81 |
-
msgid "Re-add underline & justify + rearrange"
|
82 |
-
msgstr "Ajouter les boutons souligner & justifier + les réordonner"
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.2/re-add-underline-justify.php
DELETED
@@ -1,241 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Plugin Name: Re-add text underline and justify
|
4 |
-
* Plugin URI: http://b-website.com/re-add-text-underline-and-justify
|
5 |
-
* Description: This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7.
|
6 |
-
* Author: Brice Capobianco
|
7 |
-
* Version: 0.1.2
|
8 |
-
* Author URI: http:// b-website.com/
|
9 |
-
* Domain Path: /langs
|
10 |
-
* Text Domain: re-add-underline-justify
|
11 |
-
*/
|
12 |
-
|
13 |
-
/* Copyright 2016 Brice CAPOBIANCO (contact : http:// b-website.com/contact)
|
14 |
-
|
15 |
-
This program is free software; you can redistribute it and/or modify
|
16 |
-
it under the terms of the GNU General Public License, version 2, as
|
17 |
-
published by the Free Software Foundation.
|
18 |
-
|
19 |
-
This program is distributed in the hope that it will be useful,
|
20 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
-
GNU General Public License for more details.
|
23 |
-
|
24 |
-
You should have received a copy of the GNU General Public License
|
25 |
-
along with this program; if not, write to the Free Software
|
26 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
-
*/
|
28 |
-
|
29 |
-
|
30 |
-
/***************************************************************
|
31 |
-
* SECURITY : Exit if accessed directly
|
32 |
-
***************************************************************/
|
33 |
-
if ( !defined( 'ABSPATH' ) ) {
|
34 |
-
die( 'Direct access not allowed!' );
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
/***************************************************************
|
39 |
-
* Add custom meta link on plugin list page
|
40 |
-
***************************************************************/
|
41 |
-
function ratb_meta_links( $links, $file ) {
|
42 |
-
if ( $file === 're-add-underline-justify/re-add-underline-justify.php' ) {
|
43 |
-
$links[] = '<a href="http:// b-website.com/category/plugins" target="_blank" title="' . __( 'More b*web Plugins', 'simple-revisions-delete' ) . '">'. __( 'More b*web Plugins', 'simple-revisions-delete' ) .'</a>';
|
44 |
-
$links[] = '<a href="https:// www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8" target="_blank" title="' . __( 'Donate to this plugin »' ) . '"><strong>' . __( 'Donate to this plugin »' ) . '</strong></a>';
|
45 |
-
}
|
46 |
-
return $links;
|
47 |
-
}
|
48 |
-
add_filter( 'plugin_row_meta', 'ratb_meta_links', 10, 2 );
|
49 |
-
|
50 |
-
|
51 |
-
/***************************************************************
|
52 |
-
* Load plugin textdomain
|
53 |
-
***************************************************************/
|
54 |
-
function ratb_load_textdomain() {
|
55 |
-
$path = dirname( plugin_basename( __FILE__ ) ) . '/langs/';
|
56 |
-
load_plugin_textdomain( 're-add-underline-justify', FALSE, $path );
|
57 |
-
}
|
58 |
-
add_action( 'init', 'ratb_load_textdomain' );
|
59 |
-
|
60 |
-
|
61 |
-
/***************************************************************
|
62 |
-
* Remove plugin settings from DB on plugin deletion
|
63 |
-
***************************************************************/
|
64 |
-
function ratb_uninstall() {
|
65 |
-
// Remove option from DB
|
66 |
-
delete_option( 'ratb_options' );
|
67 |
-
}
|
68 |
-
|
69 |
-
|
70 |
-
/***************************************************************
|
71 |
-
* Hooks for install & uninstall
|
72 |
-
***************************************************************/
|
73 |
-
function ratb_activation() {
|
74 |
-
register_uninstall_hook( __FILE__, 'ratb_uninstall' );
|
75 |
-
}
|
76 |
-
register_activation_hook( __FILE__, 'ratb_activation' );
|
77 |
-
|
78 |
-
|
79 |
-
/***************************************************************
|
80 |
-
* Register the new setting on the Wrinting screen
|
81 |
-
***************************************************************/
|
82 |
-
function ratb_admin_init(){
|
83 |
-
register_setting(
|
84 |
-
'writing', // settings page
|
85 |
-
'ratb_options' // option name
|
86 |
-
);
|
87 |
-
add_settings_field(
|
88 |
-
'ratb_mce_style', // id
|
89 |
-
__( 'Editor style', 're-add-underline-justify' ), // setting title
|
90 |
-
'ratb_setting_input', // display callback
|
91 |
-
'writing', // settings page
|
92 |
-
'default' // settings section
|
93 |
-
);
|
94 |
-
}
|
95 |
-
add_action('admin_init', 'ratb_admin_init');
|
96 |
-
|
97 |
-
|
98 |
-
/***************************************************************
|
99 |
-
* Display the select on the Wrinting screen
|
100 |
-
***************************************************************/
|
101 |
-
function ratb_setting_input() {
|
102 |
-
|
103 |
-
//Retrieve the option value
|
104 |
-
$options = get_option( 'ratb_options' );
|
105 |
-
|
106 |
-
//Default value
|
107 |
-
if( empty( $options ) ){
|
108 |
-
$options['ratb_mce_style'] = 1;
|
109 |
-
}
|
110 |
-
|
111 |
-
// Output the field
|
112 |
-
echo '
|
113 |
-
<select id="ratb_mce_style" name="ratb_options[ratb_mce_style]">
|
114 |
-
<option value="1"' . selected( $options['ratb_mce_style'], 1, false ) . '>' . __( 'Default - without underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
115 |
-
<option value="2"' . selected( $options['ratb_mce_style'], 2, false ) . '>' . __( 'Re-add underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
116 |
-
<option value="3"' . selected( $options['ratb_mce_style'], 3, false ) . '>' . __( 'Re-add underline & justify + rearrange', 're-add-underline-justify' ) . '</option>
|
117 |
-
</select>';
|
118 |
-
|
119 |
-
}
|
120 |
-
|
121 |
-
|
122 |
-
/***************************************************************
|
123 |
-
* Update tinyMCE buttons lines
|
124 |
-
***************************************************************/
|
125 |
-
function ratb_buttons_lines_tiny_mce(){
|
126 |
-
|
127 |
-
//Retrieve the option value
|
128 |
-
$options = get_option( 'ratb_options' );
|
129 |
-
|
130 |
-
// Conditionnal MCE display
|
131 |
-
if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 2 ) {
|
132 |
-
|
133 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons', 5 );
|
134 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2', 5 );
|
135 |
-
|
136 |
-
} else if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 3 ) {
|
137 |
-
|
138 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons_rearrange', 5 );
|
139 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2_rearrange', 5 );
|
140 |
-
|
141 |
-
}
|
142 |
-
//Else, do nothing... use the default editor style
|
143 |
-
|
144 |
-
}
|
145 |
-
add_action( 'admin_head', 'ratb_buttons_lines_tiny_mce', 5 );
|
146 |
-
|
147 |
-
|
148 |
-
/***************************************************************
|
149 |
-
* First editor row buttons - 4.6
|
150 |
-
***************************************************************/
|
151 |
-
function ratb_tiny_mce_buttons( $buttons_array ){
|
152 |
-
$mce_buttons = array(
|
153 |
-
'bold', // Applies the bold format to the current selection.
|
154 |
-
'italic', // Applies the italic format to the current selection.
|
155 |
-
'strikethrough', // Applies strike though format to the current selection.
|
156 |
-
'bullist', // Formats the current selection as a bullet list.
|
157 |
-
'numlist', // Formats the current selection as a numbered list.
|
158 |
-
'blockquote', // Applies block quote format to the current block level element.
|
159 |
-
'hr', // Inserts a horizontal rule into the editor.
|
160 |
-
'alignleft', // Left aligns the current block or image.
|
161 |
-
'aligncenter', // Left aligns the current block or image.
|
162 |
-
'alignright', // Right aligns the current block or image.
|
163 |
-
'link', // Creates/Edits links within the editor.
|
164 |
-
'unlink', // Removes links from the current selection.
|
165 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
166 |
-
'spellchecker', // ???
|
167 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
168 |
-
'dfw' // Distraction-free mode on/off.
|
169 |
-
);
|
170 |
-
return $mce_buttons;
|
171 |
-
}
|
172 |
-
|
173 |
-
|
174 |
-
/***************************************************************
|
175 |
-
* Second editor row buttons - 4.6
|
176 |
-
***************************************************************/
|
177 |
-
function ratb_tiny_mce_buttons_2( $buttons_array ){
|
178 |
-
$mce_buttons_2 = array(
|
179 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
180 |
-
'underline', // Applies the underline format to the current selection.
|
181 |
-
'alignjustify', // Full aligns the current block or image.
|
182 |
-
'forecolor', // Applies foreground/text color to selection.
|
183 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
184 |
-
'removeformat', // Removes the formatting from the current selection.
|
185 |
-
'charmap', // Inserts custom characters into the editor.
|
186 |
-
'outdent', // Outdents the current list item or block element.
|
187 |
-
'indent', // Indents the current list item or block element.
|
188 |
-
'undo', // Undoes the last operation.
|
189 |
-
'redo', // Redoes the last undoed operation.
|
190 |
-
'wp_help' // Opens the help.
|
191 |
-
);
|
192 |
-
return $mce_buttons_2;
|
193 |
-
}
|
194 |
-
|
195 |
-
|
196 |
-
/***************************************************************
|
197 |
-
* First editor row buttons - 4.7 + rearrange
|
198 |
-
***************************************************************/
|
199 |
-
function ratb_tiny_mce_buttons_rearrange( $buttons_array ){
|
200 |
-
$mce_buttons = array(
|
201 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
202 |
-
'bold', // Applies the bold format to the current selection.
|
203 |
-
'italic', // Applies the italic format to the current selection.
|
204 |
-
'underline', // Applies the underline format to the current selection.
|
205 |
-
'bullist', // Formats the current selection as a bullet list.
|
206 |
-
'numlist', // Formats the current selection as a numbered list.
|
207 |
-
'blockquote', // Applies block quote format to the current block level element.
|
208 |
-
'hr', // Inserts a horizontal rule into the editor.
|
209 |
-
'alignleft', // Left aligns the current block or image.
|
210 |
-
'aligncenter', // Left aligns the current block or image.
|
211 |
-
'alignright', // Right aligns the current block or image.
|
212 |
-
'alignjustify', // Full aligns the current block or image.
|
213 |
-
'link', // Creates/Edits links within the editor.
|
214 |
-
'unlink', // Removes links from the current selection.
|
215 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
216 |
-
'spellchecker', // ???
|
217 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
218 |
-
'dfw' // Distraction-free mode on/off.
|
219 |
-
);
|
220 |
-
return $mce_buttons;
|
221 |
-
}
|
222 |
-
|
223 |
-
|
224 |
-
/***************************************************************
|
225 |
-
* Second editor row buttons - 4.7 + rearrange
|
226 |
-
***************************************************************/
|
227 |
-
function ratb_tiny_mce_buttons_2_rearrange( $buttons_array ){
|
228 |
-
$mce_buttons_2 = array(
|
229 |
-
'strikethrough', // Applies strike though format to the current selection.
|
230 |
-
'forecolor', // Applies foreground/text color to selection.
|
231 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
232 |
-
'removeformat', // Removes the formatting from the current selection.
|
233 |
-
'charmap', // Inserts custom characters into the editor.
|
234 |
-
'outdent', // Outdents the current list item or block element.
|
235 |
-
'indent', // Indents the current list item or block element.
|
236 |
-
'undo', // Undoes the last operation.
|
237 |
-
'redo', // Redoes the last undoed operation.
|
238 |
-
'wp_help' // Opens the help.
|
239 |
-
);
|
240 |
-
return $mce_buttons_2;
|
241 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.2/readme.txt
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
=== Re-add text underline and justify ===
|
2 |
-
Contributors: briKou
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8
|
4 |
-
Tags: mce, editor, underline, justify, tinyMCE, 4.7, wysiwyg, visual editor
|
5 |
-
Requires at least: 4.7
|
6 |
-
Tested up to: 4.7
|
7 |
-
Stable tag: 0.1.2
|
8 |
-
License: GPLv2 or later
|
9 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
-
|
11 |
-
This tiny plugin re-adds the Editor text underline, text justify and rearrange buttons in the WYSIWYG as they were before WordPress 4.7.
|
12 |
-
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
In WordPress 4.7, the core developper team decided to make various changes in the editor (TinyMce WYSIWYG), including removing the **underline and justify buttons** and rearranging some of the toolbar buttons.
|
17 |
-
If you don't want to change the way you edit your content and/or don't want to confuse your customers with a new contribution interface, this very lightweight plugin will set the editor style back to its previous state (like in WordPress 4.6 and above versions).
|
18 |
-
|
19 |
-
**You may change the Editor style from the Writing option page.**
|
20 |
-
|
21 |
-
3 options are available for the Editor style :
|
22 |
-
|
23 |
-
* Default - without underline & justify buttons
|
24 |
-
* Re-add underline & justify buttons
|
25 |
-
* Re-add underline & justify + rearrange
|
26 |
-
|
27 |
-
In my opinion, the third option is a fair compromise between versions 4.6 and 4.7 of the editor. It moves up the style select to the first line, and moves the underline button after the other text position buttons.
|
28 |
-
|
29 |
-
|
30 |
-
[DOCUMENTATION](http://b-website.com/re-add-text-underline-and-justify "Plugin documentation")
|
31 |
-
|
32 |
-
[CHECK OUT MY OTHER PLUGINS](http://b-website.com/category/plugins-en "More plugins by b*web")
|
33 |
-
|
34 |
-
|
35 |
-
**Please ask for help or report bugs if anything goes wrong. It is the best way to make the community benefit!**
|
36 |
-
|
37 |
-
|
38 |
-
== Installation ==
|
39 |
-
|
40 |
-
1. Upload and activate the plugin (or install it through the WP admin console)
|
41 |
-
2. Go to Settings -> Writing and select the option you want under "Editor style".
|
42 |
-
3. That's it, it is ready to use!
|
43 |
-
|
44 |
-
== Frequently Asked Questions ==
|
45 |
-
|
46 |
-
= Where can I change the Editor style? =
|
47 |
-
Just go to Settings -> Writing and select the option you want under "Editor style".
|
48 |
-
|
49 |
-
|
50 |
-
== Screenshots ==
|
51 |
-
|
52 |
-
1. Change the Editor style from the Writing option page
|
53 |
-
2. Default - without underline & justify buttons
|
54 |
-
3. Re-add underline & justify buttons
|
55 |
-
4. Re-add underline & justify + rearrange
|
56 |
-
|
57 |
-
|
58 |
-
== Changelog ==
|
59 |
-
|
60 |
-
= 0.1.2 - 11/14/2016 =
|
61 |
-
* Change mce button hook priority to prevent errors with other plugins adding extra buttons
|
62 |
-
* readme.txt update
|
63 |
-
|
64 |
-
= 0.1.1 - 11/10/2016 =
|
65 |
-
* Fix an issue hidding Editor content.
|
66 |
-
|
67 |
-
= 0.1 - 11/06/2016 =
|
68 |
-
* First release.
|
69 |
-
|
70 |
-
== Upgrade Notice ==
|
71 |
-
|
72 |
-
= 0.1 =
|
73 |
-
* First release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.3/index.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Kisses from France...
|
|
|
|
tags/0.1.3/re-add-underline-justify.php
DELETED
@@ -1,324 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Plugin Name: Re-add text underline and justify
|
4 |
-
* Plugin URI: https://www.b-website.com/re-add-text-underline-and-justify
|
5 |
-
* Description: This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7.
|
6 |
-
* Author: Brice Capobianco
|
7 |
-
* Version: 0.1.3
|
8 |
-
* Author URI: https://www.b-website.com/
|
9 |
-
* Domain Path: /langs
|
10 |
-
* Text Domain: re-add-underline-justify
|
11 |
-
*/
|
12 |
-
|
13 |
-
/* Copyright 2016 Brice CAPOBIANCO (contact : http:// b-website.com/contact)
|
14 |
-
|
15 |
-
This program is free software; you can redistribute it and/or modify
|
16 |
-
it under the terms of the GNU General Public License, version 2, as
|
17 |
-
published by the Free Software Foundation.
|
18 |
-
|
19 |
-
This program is distributed in the hope that it will be useful,
|
20 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
-
GNU General Public License for more details.
|
23 |
-
|
24 |
-
You should have received a copy of the GNU General Public License
|
25 |
-
along with this program; if not, write to the Free Software
|
26 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
-
*/
|
28 |
-
|
29 |
-
|
30 |
-
/***************************************************************
|
31 |
-
* SECURITY : Exit if accessed directly
|
32 |
-
***************************************************************/
|
33 |
-
if ( !defined( 'ABSPATH' ) ) {
|
34 |
-
|
35 |
-
die( 'Direct access not allowed!' );
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
|
40 |
-
/***************************************************************
|
41 |
-
* Add custom meta link on plugin list page
|
42 |
-
***************************************************************/
|
43 |
-
function ratb_meta_links( $links, $file ) {
|
44 |
-
|
45 |
-
if ( $file === 're-add-underline-justify/re-add-underline-justify.php' ) {
|
46 |
-
$paypalDonate = 'https:// www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8';
|
47 |
-
$links[] = '<a href="http:// b-website.com/category/plugins" target="_blank" title="' . __( 'More b*web Plugins', 'simple-revisions-delete' ) . '">'. __( 'More b*web Plugins', 'simple-revisions-delete' ) .'</a>';
|
48 |
-
$links[] = '<a href="' . $paypalDonate . '" target="_blank" title="' . __( 'Donate to this plugin »' ) . '"><strong>' . __( 'Donate to this plugin »' ) . '</strong></a>';
|
49 |
-
}
|
50 |
-
return $links;
|
51 |
-
|
52 |
-
}
|
53 |
-
add_filter( 'plugin_row_meta', 'ratb_meta_links', 10, 2 );
|
54 |
-
|
55 |
-
|
56 |
-
/***************************************************************
|
57 |
-
* Load plugin textdomain
|
58 |
-
***************************************************************/
|
59 |
-
function ratb_load_textdomain() {
|
60 |
-
|
61 |
-
$path = dirname( plugin_basename( __FILE__ ) ) . '/langs/';
|
62 |
-
load_plugin_textdomain( 're-add-underline-justify', FALSE, $path );
|
63 |
-
|
64 |
-
}
|
65 |
-
add_action( 'init', 'ratb_load_textdomain' );
|
66 |
-
|
67 |
-
|
68 |
-
/***************************************************************
|
69 |
-
* Remove plugin settings from DB on plugin deletion
|
70 |
-
***************************************************************/
|
71 |
-
function ratb_uninstall() {
|
72 |
-
|
73 |
-
// Remove option from DB
|
74 |
-
delete_option( 'ratb_options' );
|
75 |
-
|
76 |
-
}
|
77 |
-
|
78 |
-
|
79 |
-
/***************************************************************
|
80 |
-
* Hooks for install & uninstall
|
81 |
-
***************************************************************/
|
82 |
-
function ratb_activation() {
|
83 |
-
|
84 |
-
register_uninstall_hook( __FILE__, 'ratb_uninstall' );
|
85 |
-
|
86 |
-
}
|
87 |
-
register_activation_hook( __FILE__, 'ratb_activation' );
|
88 |
-
|
89 |
-
|
90 |
-
/***************************************************************
|
91 |
-
* Register the new setting on the Wrinting screen
|
92 |
-
***************************************************************/
|
93 |
-
function ratb_admin_init(){
|
94 |
-
|
95 |
-
register_setting(
|
96 |
-
'writing', // settings page
|
97 |
-
'ratb_options' // option name
|
98 |
-
);
|
99 |
-
add_settings_field(
|
100 |
-
'ratb_mce_style', // id
|
101 |
-
__( 'Editor style', 're-add-underline-justify' ), // setting title
|
102 |
-
'ratb_setting_input', // display callback
|
103 |
-
'writing', // settings page
|
104 |
-
'default' // settings section
|
105 |
-
);
|
106 |
-
|
107 |
-
}
|
108 |
-
add_action('admin_init', 'ratb_admin_init');
|
109 |
-
|
110 |
-
|
111 |
-
/***************************************************************
|
112 |
-
* Display the select on the Wrinting screen
|
113 |
-
***************************************************************/
|
114 |
-
function ratb_setting_input() {
|
115 |
-
|
116 |
-
//Retrieve the option value
|
117 |
-
$options = get_option( 'ratb_options' );
|
118 |
-
|
119 |
-
//Default value
|
120 |
-
if( empty( $options ) ){
|
121 |
-
$options['ratb_mce_style'] = 1;
|
122 |
-
}
|
123 |
-
|
124 |
-
// Output the field
|
125 |
-
echo '
|
126 |
-
<select id="ratb_mce_style" name="ratb_options[ratb_mce_style]">
|
127 |
-
<option value="1"' . selected( $options['ratb_mce_style'], 1, false ) . '>' . __( 'Default - without underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
128 |
-
<option value="2"' . selected( $options['ratb_mce_style'], 2, false ) . '>' . __( 'Re-add underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
129 |
-
<option value="3"' . selected( $options['ratb_mce_style'], 3, false ) . '>' . __( 'Re-add underline & justify + rearrange', 're-add-underline-justify' ) . '</option>
|
130 |
-
<option value="4"' . selected( $options['ratb_mce_style'], 4, false ) . '>' . __( 'Re-add justify only', 're-add-underline-justify' ) . '</option>
|
131 |
-
</select>';
|
132 |
-
|
133 |
-
}
|
134 |
-
|
135 |
-
|
136 |
-
/***************************************************************
|
137 |
-
* Update tinyMCE buttons lines
|
138 |
-
***************************************************************/
|
139 |
-
function ratb_buttons_lines_tiny_mce(){
|
140 |
-
|
141 |
-
//Retrieve the option value
|
142 |
-
$options = get_option( 'ratb_options' );
|
143 |
-
|
144 |
-
// Conditionnal MCE display
|
145 |
-
if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 2 ) {
|
146 |
-
|
147 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons', 5 );
|
148 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2', 5 );
|
149 |
-
|
150 |
-
} else if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 3 ) {
|
151 |
-
|
152 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons_rearrange', 5 );
|
153 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2_rearrange', 5 );
|
154 |
-
|
155 |
-
} else if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 4 ) {
|
156 |
-
|
157 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons_justify', 5 );
|
158 |
-
|
159 |
-
}
|
160 |
-
//Else, do nothing... use the default editor style
|
161 |
-
|
162 |
-
}
|
163 |
-
add_action( 'admin_head', 'ratb_buttons_lines_tiny_mce', 5 );
|
164 |
-
|
165 |
-
|
166 |
-
/***************************************************************
|
167 |
-
* First editor row buttons - 4.6
|
168 |
-
***************************************************************/
|
169 |
-
function ratb_tiny_mce_buttons( $buttons_array ){
|
170 |
-
|
171 |
-
$mce_buttons = array(
|
172 |
-
'bold', // Applies the bold format to the current selection.
|
173 |
-
'italic', // Applies the italic format to the current selection.
|
174 |
-
'strikethrough', // Applies strike though format to the current selection.
|
175 |
-
'bullist', // Formats the current selection as a bullet list.
|
176 |
-
'numlist', // Formats the current selection as a numbered list.
|
177 |
-
'blockquote', // Applies block quote format to the current block level element.
|
178 |
-
'hr', // Inserts a horizontal rule into the editor.
|
179 |
-
'alignleft', // Left aligns the current block or image.
|
180 |
-
'aligncenter', // Left aligns the current block or image.
|
181 |
-
'alignright', // Right aligns the current block or image.
|
182 |
-
'link', // Creates/Edits links within the editor.
|
183 |
-
'unlink', // Removes links from the current selection.
|
184 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
185 |
-
'spellchecker', // ???
|
186 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
187 |
-
'dfw' // Distraction-free mode on/off.
|
188 |
-
);
|
189 |
-
return $mce_buttons;
|
190 |
-
|
191 |
-
}
|
192 |
-
|
193 |
-
|
194 |
-
/***************************************************************
|
195 |
-
* Second editor row buttons - 4.6
|
196 |
-
***************************************************************/
|
197 |
-
function ratb_tiny_mce_buttons_2( $buttons_array ){
|
198 |
-
|
199 |
-
$mce_buttons_2 = array(
|
200 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
201 |
-
'underline', // Applies the underline format to the current selection.
|
202 |
-
'alignjustify', // Full aligns the current block or image.
|
203 |
-
'forecolor', // Applies foreground/text color to selection.
|
204 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
205 |
-
'removeformat', // Removes the formatting from the current selection.
|
206 |
-
'charmap', // Inserts custom characters into the editor.
|
207 |
-
'outdent', // Outdents the current list item or block element.
|
208 |
-
'indent', // Indents the current list item or block element.
|
209 |
-
'undo', // Undoes the last operation.
|
210 |
-
'redo', // Redoes the last undoed operation.
|
211 |
-
'wp_help' // Opens the help.
|
212 |
-
);
|
213 |
-
|
214 |
-
//Fix for ACF code button
|
215 |
-
if ( in_array( 'code', $buttons_array ) ){
|
216 |
-
$mce_buttons_2[] = 'code';
|
217 |
-
}
|
218 |
-
|
219 |
-
return $mce_buttons_2;
|
220 |
-
|
221 |
-
}
|
222 |
-
|
223 |
-
|
224 |
-
/***************************************************************
|
225 |
-
* Buttons lists - 4.7 + rearrange
|
226 |
-
***************************************************************/
|
227 |
-
function ratb_tiny_mce_buttons_rearrange_list(){
|
228 |
-
|
229 |
-
return $mce_buttons = array(
|
230 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
231 |
-
'bold', // Applies the bold format to the current selection.
|
232 |
-
'italic', // Applies the italic format to the current selection.
|
233 |
-
'underline', // Applies the underline format to the current selection.
|
234 |
-
'bullist', // Formats the current selection as a bullet list.
|
235 |
-
'numlist', // Formats the current selection as a numbered list.
|
236 |
-
'blockquote', // Applies block quote format to the current block level element.
|
237 |
-
'hr', // Inserts a horizontal rule into the editor.
|
238 |
-
'alignleft', // Left aligns the current block or image.
|
239 |
-
'aligncenter', // Left aligns the current block or image.
|
240 |
-
'alignright', // Right aligns the current block or image.
|
241 |
-
'alignjustify', // Full aligns the current block or image.
|
242 |
-
'link', // Creates/Edits links within the editor.
|
243 |
-
'unlink', // Removes links from the current selection.
|
244 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
245 |
-
'spellchecker', // ???
|
246 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
247 |
-
'dfw' // Distraction-free mode on/off.
|
248 |
-
);
|
249 |
-
|
250 |
-
}
|
251 |
-
|
252 |
-
|
253 |
-
function ratb_tiny_mce_buttons_2_rearrange_list(){
|
254 |
-
|
255 |
-
return $mce_buttons_2 = array(
|
256 |
-
'strikethrough', // Applies strike though format to the current selection.
|
257 |
-
'forecolor', // Applies foreground/text color to selection.
|
258 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
259 |
-
'removeformat', // Removes the formatting from the current selection.
|
260 |
-
'charmap', // Inserts custom characters into the editor.
|
261 |
-
'outdent', // Outdents the current list item or block element.
|
262 |
-
'indent', // Indents the current list item or block element.
|
263 |
-
'undo', // Undoes the last operation.
|
264 |
-
'redo', // Redoes the last undoed operation.
|
265 |
-
'wp_help' // Opens the help.
|
266 |
-
);
|
267 |
-
|
268 |
-
}
|
269 |
-
|
270 |
-
|
271 |
-
/***************************************************************
|
272 |
-
* First editor row buttons - 4.7 + rearrange
|
273 |
-
***************************************************************/
|
274 |
-
function ratb_tiny_mce_buttons_rearrange( $buttons_array ){
|
275 |
-
|
276 |
-
$mce_buttons = ratb_tiny_mce_buttons_rearrange_list();
|
277 |
-
|
278 |
-
//Keep extra buttons by comparing two buttons lines
|
279 |
-
$mce_buttons_2 = ratb_tiny_mce_buttons_2_rearrange_list();
|
280 |
-
foreach( $buttons_array as $button ){
|
281 |
-
if( !in_array( $button, $mce_buttons ) && !in_array( $button, $mce_buttons_2 ) ){
|
282 |
-
array_push( $mce_buttons, $button );
|
283 |
-
}
|
284 |
-
}
|
285 |
-
|
286 |
-
return $mce_buttons;
|
287 |
-
|
288 |
-
}
|
289 |
-
|
290 |
-
|
291 |
-
/***************************************************************
|
292 |
-
* Second editor row buttons - 4.7 + rearrange
|
293 |
-
***************************************************************/
|
294 |
-
function ratb_tiny_mce_buttons_2_rearrange( $buttons_array ){
|
295 |
-
|
296 |
-
$mce_buttons_2 = ratb_tiny_mce_buttons_2_rearrange_list();
|
297 |
-
|
298 |
-
//Keep extra buttons by comparing two buttons lines
|
299 |
-
$mce_buttons = ratb_tiny_mce_buttons_rearrange_list();
|
300 |
-
foreach( $buttons_array as $button ){
|
301 |
-
if( !in_array( $button, $mce_buttons_2 ) && !in_array( $button, $mce_buttons ) ){
|
302 |
-
array_push( $mce_buttons_2, $button );
|
303 |
-
}
|
304 |
-
}
|
305 |
-
|
306 |
-
return $mce_buttons_2;
|
307 |
-
|
308 |
-
}
|
309 |
-
|
310 |
-
|
311 |
-
/***************************************************************
|
312 |
-
* First editor row buttons - Re-add justify only
|
313 |
-
***************************************************************/
|
314 |
-
function ratb_tiny_mce_buttons_justify( $buttons_array ){
|
315 |
-
|
316 |
-
if ( !in_array( 'alignjustify', $buttons_array ) && in_array( 'alignright', $buttons_array ) ){
|
317 |
-
$key = array_search( 'alignright', $buttons_array );
|
318 |
-
$inserted = array( 'alignjustify' );
|
319 |
-
array_splice( $buttons_array, $key + 1, 0, $inserted );
|
320 |
-
}
|
321 |
-
|
322 |
-
return $buttons_array;
|
323 |
-
|
324 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.3/readme.txt
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
=== Re-add text underline and justify ===
|
2 |
-
Contributors: briKou
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8
|
4 |
-
Tags: mce, editor, underline, justify, tinyMCE, 4.7, wysiwyg, visual editor
|
5 |
-
Requires at least: 4.7
|
6 |
-
Tested up to: 4.7
|
7 |
-
Stable tag: 0.1.3
|
8 |
-
License: GPLv2 or later
|
9 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
-
|
11 |
-
This tiny plugin re-adds the Editor text underline, text justify and rearrange buttons in the WYSIWYG as they were before WordPress 4.7.
|
12 |
-
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
In WordPress 4.7, the core developper team decided to make various changes in the editor (TinyMce WYSIWYG), including removing the **underline and justify buttons** and rearranging some of the toolbar buttons.
|
17 |
-
If you don't want to change the way you edit your content and/or don't want to confuse your customers with a new contribution interface, this very lightweight plugin will set the editor style back to its previous state (like in WordPress 4.6 and above versions).
|
18 |
-
|
19 |
-
**You may change the Editor style from the Writing option page.**
|
20 |
-
|
21 |
-
4 options are available for the Editor style :
|
22 |
-
|
23 |
-
* Default - without underline & justify buttons
|
24 |
-
* Re-add underline & justify buttons
|
25 |
-
* Re-add underline & justify + rearrange
|
26 |
-
* Re-add justify only (added in 0.1.3)
|
27 |
-
|
28 |
-
Please note, the third option is, in my opinion, a good compromise between the 4.6 and 4.7 editor versions. It moves up the style select to the first line and moves the underline button after the other text position buttons.
|
29 |
-
|
30 |
-
**IMPORTANT:** Try different options before posting a bug repport. Some plugins like ACF (free version) are using there own list of buttons and can create conflict with this plugin. Option 3 and 4 are best to prevent this plugin from removing your existing buttons.
|
31 |
-
|
32 |
-
|
33 |
-
[DOCUMENTATION](https://www.b-website.com/re-add-text-underline-and-justify "Plugin documentation")
|
34 |
-
|
35 |
-
[CHECK OUT MY OTHER PLUGINS](https://www.b-website.com/category/plugins-en "More plugins by b*web")
|
36 |
-
|
37 |
-
|
38 |
-
**Please ask for help or report bugs if anything goes wrong. It is the best way to make the community benefit!**
|
39 |
-
|
40 |
-
|
41 |
-
== Installation ==
|
42 |
-
|
43 |
-
1. Upload and activate the plugin (or install it through the WP admin console)
|
44 |
-
2. Go to Settings -> Writing and select the option you want under "Editor style".
|
45 |
-
3. That's it, it is ready to use!
|
46 |
-
|
47 |
-
== Frequently Asked Questions ==
|
48 |
-
|
49 |
-
= Where can I change the Editor style? =
|
50 |
-
Just go to Settings -> Writing and select the option you want under "Editor style".
|
51 |
-
|
52 |
-
|
53 |
-
== Screenshots ==
|
54 |
-
|
55 |
-
1. Change the Editor style from the Writing option page
|
56 |
-
2. Default - without underline & justify buttons
|
57 |
-
3. Re-add underline & justify buttons
|
58 |
-
4. Re-add underline & justify + rearrange
|
59 |
-
5. Re-add justify only
|
60 |
-
|
61 |
-
|
62 |
-
== Changelog ==
|
63 |
-
|
64 |
-
= 0.1.3 - 01/14/2016 =
|
65 |
-
* Added the fourth option to only re-add justify button (push methode)
|
66 |
-
* Push non standard button to the end of the buttons lines for the third option. This prevent from removing extra buttons added by other plugins.
|
67 |
-
* Fix for ACF (free) on the second option
|
68 |
-
|
69 |
-
= 0.1.2 - 11/14/2016 =
|
70 |
-
* Change mce button hook priority to prevent errors with other plugins adding extra buttons
|
71 |
-
|
72 |
-
= 0.1.1 - 11/10/2016 =
|
73 |
-
* Fix an issue hidding Editor content.
|
74 |
-
|
75 |
-
= 0.1 - 11/06/2016 =
|
76 |
-
* First release.
|
77 |
-
|
78 |
-
== Upgrade Notice ==
|
79 |
-
|
80 |
-
= 0.1 =
|
81 |
-
* First release.
|
82 |
-
|
83 |
-
= 0.1.3 =
|
84 |
-
* You now have a fourth option available to only re-add the justify button.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.4/index.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Kisses from France...
|
|
|
|
tags/0.1.4/langs/re-add-underline-justify-fr_FR.mo
DELETED
Binary file
|
tags/0.1.4/langs/re-add-underline-justify-fr_FR.po
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Re-add text underline and justify v0.1.3\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2017-01-14 11:35:24+0000\n"
|
7 |
-
"Last-Translator: Brice Capobianco\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n>1;\n"
|
13 |
-
"X-Generator: CSL v1.x\n"
|
14 |
-
"X-Poedit-Language: French\n"
|
15 |
-
"X-Poedit-Country: FRANCE\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
-
"X-Poedit-Basepath: ../\n"
|
19 |
-
"X-Poedit-Bookmarks: \n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Textdomain-Support: yes"
|
22 |
-
|
23 |
-
#. translators: plugin header field 'Name'
|
24 |
-
#: re-add-underline-justify.php:0
|
25 |
-
#@ re-add-underline-justify
|
26 |
-
msgid "Re-add text underline and justify"
|
27 |
-
msgstr "Re-add text underline and justify"
|
28 |
-
|
29 |
-
#. translators: plugin header field 'AuthorURI'
|
30 |
-
#: re-add-underline-justify.php:0
|
31 |
-
#@ re-add-underline-justify
|
32 |
-
msgid "http:// b-website.com/"
|
33 |
-
msgstr "http:// b-website.com/"
|
34 |
-
|
35 |
-
#. translators: plugin header field 'Description'
|
36 |
-
#: re-add-underline-justify.php:0
|
37 |
-
#@ re-add-underline-justify
|
38 |
-
msgid "This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7."
|
39 |
-
msgstr "Ce plugin permet de remettre en place les boutons pour souligner et justifier le texte et de réorganiser les boutons comme ils l'étaient avant WordPress 4.7."
|
40 |
-
|
41 |
-
#. translators: plugin header field 'Author'
|
42 |
-
#: re-add-underline-justify.php:0
|
43 |
-
#@ re-add-underline-justify
|
44 |
-
msgid "Brice Capobianco"
|
45 |
-
msgstr "Brice Capobianco"
|
46 |
-
|
47 |
-
#: re-add-underline-justify.php:44
|
48 |
-
#@ simple-revisions-delete
|
49 |
-
msgid "More b*web Plugins"
|
50 |
-
msgstr ""
|
51 |
-
|
52 |
-
#: re-add-underline-justify.php:45
|
53 |
-
#@ default
|
54 |
-
msgid "Donate to this plugin »"
|
55 |
-
msgstr ""
|
56 |
-
|
57 |
-
#: re-add-underline-justify.php:90
|
58 |
-
#@ re-add-underline-justify
|
59 |
-
msgid "Editor style"
|
60 |
-
msgstr "Style de l'éditeur"
|
61 |
-
|
62 |
-
#: re-add-underline-justify.php:115
|
63 |
-
#@ re-add-underline-justify
|
64 |
-
msgid "Default - without underline & justify buttons"
|
65 |
-
msgstr "Défaut - sans les boutons souligner & justifier"
|
66 |
-
|
67 |
-
#: re-add-underline-justify.php:116
|
68 |
-
#@ re-add-underline-justify
|
69 |
-
msgid "Re-add underline & justify buttons"
|
70 |
-
msgstr "Ajouter les boutons souligner & justifier"
|
71 |
-
|
72 |
-
#: re-add-underline-justify.php:117
|
73 |
-
#@ re-add-underline-justify
|
74 |
-
msgid "Re-add underline & justify + rearrange"
|
75 |
-
msgstr "Ajouter les boutons souligner & justifier + les réordonner"
|
76 |
-
|
77 |
-
#. translators: plugin header field 'PluginURI'
|
78 |
-
#: re-add-underline-justify.php:0
|
79 |
-
#@ re-add-underline-justify
|
80 |
-
msgid "http://b-website.com/re-add-text-underline-and-justify"
|
81 |
-
msgstr "https://www.b-website.com/remettre-place-boutons-souligner-justifier-de-lediteur-wordpress-4-7"
|
82 |
-
|
83 |
-
#. translators: plugin header field 'Version'
|
84 |
-
#: re-add-underline-justify.php:0
|
85 |
-
#@ re-add-underline-justify
|
86 |
-
msgid "0.1.3"
|
87 |
-
msgstr ""
|
88 |
-
|
89 |
-
#: re-add-underline-justify.php:118
|
90 |
-
#@ re-add-underline-justify
|
91 |
-
msgid "Re-add justify only"
|
92 |
-
msgstr "Ajouter uniquement le bouton justifier"
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.4/re-add-underline-justify.php
DELETED
@@ -1,324 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Plugin Name: Re-add text underline and justify
|
4 |
-
* Plugin URI: https://www.b-website.com/re-add-text-underline-and-justify
|
5 |
-
* Description: This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7.
|
6 |
-
* Author: Brice Capobianco
|
7 |
-
* Version: 0.1.4
|
8 |
-
* Author URI: https://www.b-website.com/
|
9 |
-
* Domain Path: /langs
|
10 |
-
* Text Domain: re-add-underline-justify
|
11 |
-
*/
|
12 |
-
|
13 |
-
/* Copyright 2016 Brice CAPOBIANCO (contact : http:// b-website.com/contact)
|
14 |
-
|
15 |
-
This program is free software; you can redistribute it and/or modify
|
16 |
-
it under the terms of the GNU General Public License, version 2, as
|
17 |
-
published by the Free Software Foundation.
|
18 |
-
|
19 |
-
This program is distributed in the hope that it will be useful,
|
20 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
-
GNU General Public License for more details.
|
23 |
-
|
24 |
-
You should have received a copy of the GNU General Public License
|
25 |
-
along with this program; if not, write to the Free Software
|
26 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
-
*/
|
28 |
-
|
29 |
-
|
30 |
-
/***************************************************************
|
31 |
-
* SECURITY : Exit if accessed directly
|
32 |
-
***************************************************************/
|
33 |
-
if ( !defined( 'ABSPATH' ) ) {
|
34 |
-
|
35 |
-
die( 'Direct access not allowed!' );
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
|
40 |
-
/***************************************************************
|
41 |
-
* Add custom meta link on plugin list page
|
42 |
-
***************************************************************/
|
43 |
-
function ratb_meta_links( $links, $file ) {
|
44 |
-
|
45 |
-
if ( $file === 're-add-underline-justify/re-add-underline-justify.php' ) {
|
46 |
-
$paypalDonate = 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8';
|
47 |
-
$links[] = '<a href="https://www.b-website.com/category/plugins" target="_blank" title="' . __( 'More b*web Plugins', 'simple-revisions-delete' ) . '">'. __( 'More b*web Plugins', 'simple-revisions-delete' ) .'</a>';
|
48 |
-
$links[] = '<a href="' . $paypalDonate . '" target="_blank" title="' . __( 'Donate to this plugin »' ) . '"><strong>' . __( 'Donate to this plugin »' ) . '</strong></a>';
|
49 |
-
}
|
50 |
-
return $links;
|
51 |
-
|
52 |
-
}
|
53 |
-
add_filter( 'plugin_row_meta', 'ratb_meta_links', 10, 2 );
|
54 |
-
|
55 |
-
|
56 |
-
/***************************************************************
|
57 |
-
* Load plugin textdomain
|
58 |
-
***************************************************************/
|
59 |
-
function ratb_load_textdomain() {
|
60 |
-
|
61 |
-
$path = dirname( plugin_basename( __FILE__ ) ) . '/langs/';
|
62 |
-
load_plugin_textdomain( 're-add-underline-justify', FALSE, $path );
|
63 |
-
|
64 |
-
}
|
65 |
-
add_action( 'init', 'ratb_load_textdomain' );
|
66 |
-
|
67 |
-
|
68 |
-
/***************************************************************
|
69 |
-
* Remove plugin settings from DB on plugin deletion
|
70 |
-
***************************************************************/
|
71 |
-
function ratb_uninstall() {
|
72 |
-
|
73 |
-
// Remove option from DB
|
74 |
-
delete_option( 'ratb_options' );
|
75 |
-
|
76 |
-
}
|
77 |
-
|
78 |
-
|
79 |
-
/***************************************************************
|
80 |
-
* Hooks for install & uninstall
|
81 |
-
***************************************************************/
|
82 |
-
function ratb_activation() {
|
83 |
-
|
84 |
-
register_uninstall_hook( __FILE__, 'ratb_uninstall' );
|
85 |
-
|
86 |
-
}
|
87 |
-
register_activation_hook( __FILE__, 'ratb_activation' );
|
88 |
-
|
89 |
-
|
90 |
-
/***************************************************************
|
91 |
-
* Register the new setting on the Wrinting screen
|
92 |
-
***************************************************************/
|
93 |
-
function ratb_admin_init(){
|
94 |
-
|
95 |
-
register_setting(
|
96 |
-
'writing', // settings page
|
97 |
-
'ratb_options' // option name
|
98 |
-
);
|
99 |
-
add_settings_field(
|
100 |
-
'ratb_mce_style', // id
|
101 |
-
__( 'Editor style', 're-add-underline-justify' ), // setting title
|
102 |
-
'ratb_setting_input', // display callback
|
103 |
-
'writing', // settings page
|
104 |
-
'default' // settings section
|
105 |
-
);
|
106 |
-
|
107 |
-
}
|
108 |
-
add_action('admin_init', 'ratb_admin_init');
|
109 |
-
|
110 |
-
|
111 |
-
/***************************************************************
|
112 |
-
* Display the select on the Wrinting screen
|
113 |
-
***************************************************************/
|
114 |
-
function ratb_setting_input() {
|
115 |
-
|
116 |
-
//Retrieve the option value
|
117 |
-
$options = get_option( 'ratb_options' );
|
118 |
-
|
119 |
-
//Default value
|
120 |
-
if( empty( $options ) ){
|
121 |
-
$options['ratb_mce_style'] = 1;
|
122 |
-
}
|
123 |
-
|
124 |
-
// Output the field
|
125 |
-
echo '
|
126 |
-
<select id="ratb_mce_style" name="ratb_options[ratb_mce_style]">
|
127 |
-
<option value="1"' . selected( $options['ratb_mce_style'], 1, false ) . '>' . __( 'Default - without underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
128 |
-
<option value="2"' . selected( $options['ratb_mce_style'], 2, false ) . '>' . __( 'Re-add underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
129 |
-
<option value="3"' . selected( $options['ratb_mce_style'], 3, false ) . '>' . __( 'Re-add underline & justify + rearrange', 're-add-underline-justify' ) . '</option>
|
130 |
-
<option value="4"' . selected( $options['ratb_mce_style'], 4, false ) . '>' . __( 'Re-add justify only', 're-add-underline-justify' ) . '</option>
|
131 |
-
</select>';
|
132 |
-
|
133 |
-
}
|
134 |
-
|
135 |
-
|
136 |
-
/***************************************************************
|
137 |
-
* Update tinyMCE buttons lines
|
138 |
-
***************************************************************/
|
139 |
-
function ratb_buttons_lines_tiny_mce(){
|
140 |
-
|
141 |
-
//Retrieve the option value
|
142 |
-
$options = get_option( 'ratb_options' );
|
143 |
-
|
144 |
-
// Conditionnal MCE display
|
145 |
-
if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 2 ) {
|
146 |
-
|
147 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons', 5 );
|
148 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2', 5 );
|
149 |
-
|
150 |
-
} else if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 3 ) {
|
151 |
-
|
152 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons_rearrange', 5 );
|
153 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2_rearrange', 5 );
|
154 |
-
|
155 |
-
} else if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 4 ) {
|
156 |
-
|
157 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons_justify', 5 );
|
158 |
-
|
159 |
-
}
|
160 |
-
//Else, do nothing... use the default editor style
|
161 |
-
|
162 |
-
}
|
163 |
-
add_action( 'admin_head', 'ratb_buttons_lines_tiny_mce', 5 );
|
164 |
-
|
165 |
-
|
166 |
-
/***************************************************************
|
167 |
-
* First editor row buttons - 4.6
|
168 |
-
***************************************************************/
|
169 |
-
function ratb_tiny_mce_buttons( $buttons_array ){
|
170 |
-
|
171 |
-
$mce_buttons = array(
|
172 |
-
'bold', // Applies the bold format to the current selection.
|
173 |
-
'italic', // Applies the italic format to the current selection.
|
174 |
-
'strikethrough', // Applies strike though format to the current selection.
|
175 |
-
'bullist', // Formats the current selection as a bullet list.
|
176 |
-
'numlist', // Formats the current selection as a numbered list.
|
177 |
-
'blockquote', // Applies block quote format to the current block level element.
|
178 |
-
'hr', // Inserts a horizontal rule into the editor.
|
179 |
-
'alignleft', // Left aligns the current block or image.
|
180 |
-
'aligncenter', // Left aligns the current block or image.
|
181 |
-
'alignright', // Right aligns the current block or image.
|
182 |
-
'link', // Creates/Edits links within the editor.
|
183 |
-
'unlink', // Removes links from the current selection.
|
184 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
185 |
-
'spellchecker', // ???
|
186 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
187 |
-
'dfw' // Distraction-free mode on/off.
|
188 |
-
);
|
189 |
-
return $mce_buttons;
|
190 |
-
|
191 |
-
}
|
192 |
-
|
193 |
-
|
194 |
-
/***************************************************************
|
195 |
-
* Second editor row buttons - 4.6
|
196 |
-
***************************************************************/
|
197 |
-
function ratb_tiny_mce_buttons_2( $buttons_array ){
|
198 |
-
|
199 |
-
$mce_buttons_2 = array(
|
200 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
201 |
-
'underline', // Applies the underline format to the current selection.
|
202 |
-
'alignjustify', // Full aligns the current block or image.
|
203 |
-
'forecolor', // Applies foreground/text color to selection.
|
204 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
205 |
-
'removeformat', // Removes the formatting from the current selection.
|
206 |
-
'charmap', // Inserts custom characters into the editor.
|
207 |
-
'outdent', // Outdents the current list item or block element.
|
208 |
-
'indent', // Indents the current list item or block element.
|
209 |
-
'undo', // Undoes the last operation.
|
210 |
-
'redo', // Redoes the last undoed operation.
|
211 |
-
'wp_help' // Opens the help.
|
212 |
-
);
|
213 |
-
|
214 |
-
//Fix for ACF code button
|
215 |
-
if ( in_array( 'code', $buttons_array ) ){
|
216 |
-
$mce_buttons_2[] = 'code';
|
217 |
-
}
|
218 |
-
|
219 |
-
return $mce_buttons_2;
|
220 |
-
|
221 |
-
}
|
222 |
-
|
223 |
-
|
224 |
-
/***************************************************************
|
225 |
-
* Buttons lists - 4.7 + rearrange
|
226 |
-
***************************************************************/
|
227 |
-
function ratb_tiny_mce_buttons_rearrange_list(){
|
228 |
-
|
229 |
-
return $mce_buttons = array(
|
230 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
231 |
-
'bold', // Applies the bold format to the current selection.
|
232 |
-
'italic', // Applies the italic format to the current selection.
|
233 |
-
'underline', // Applies the underline format to the current selection.
|
234 |
-
'bullist', // Formats the current selection as a bullet list.
|
235 |
-
'numlist', // Formats the current selection as a numbered list.
|
236 |
-
'blockquote', // Applies block quote format to the current block level element.
|
237 |
-
'hr', // Inserts a horizontal rule into the editor.
|
238 |
-
'alignleft', // Left aligns the current block or image.
|
239 |
-
'aligncenter', // Left aligns the current block or image.
|
240 |
-
'alignright', // Right aligns the current block or image.
|
241 |
-
'alignjustify', // Full aligns the current block or image.
|
242 |
-
'link', // Creates/Edits links within the editor.
|
243 |
-
'unlink', // Removes links from the current selection.
|
244 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
245 |
-
'spellchecker', // ???
|
246 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
247 |
-
'dfw' // Distraction-free mode on/off.
|
248 |
-
);
|
249 |
-
|
250 |
-
}
|
251 |
-
|
252 |
-
|
253 |
-
function ratb_tiny_mce_buttons_2_rearrange_list(){
|
254 |
-
|
255 |
-
return $mce_buttons_2 = array(
|
256 |
-
'strikethrough', // Applies strike though format to the current selection.
|
257 |
-
'forecolor', // Applies foreground/text color to selection.
|
258 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
259 |
-
'removeformat', // Removes the formatting from the current selection.
|
260 |
-
'charmap', // Inserts custom characters into the editor.
|
261 |
-
'outdent', // Outdents the current list item or block element.
|
262 |
-
'indent', // Indents the current list item or block element.
|
263 |
-
'undo', // Undoes the last operation.
|
264 |
-
'redo', // Redoes the last undoed operation.
|
265 |
-
'wp_help' // Opens the help.
|
266 |
-
);
|
267 |
-
|
268 |
-
}
|
269 |
-
|
270 |
-
|
271 |
-
/***************************************************************
|
272 |
-
* First editor row buttons - 4.7 + rearrange
|
273 |
-
***************************************************************/
|
274 |
-
function ratb_tiny_mce_buttons_rearrange( $buttons_array ){
|
275 |
-
|
276 |
-
$mce_buttons = ratb_tiny_mce_buttons_rearrange_list();
|
277 |
-
|
278 |
-
//Keep extra buttons by comparing two buttons lines
|
279 |
-
$mce_buttons_2 = ratb_tiny_mce_buttons_2_rearrange_list();
|
280 |
-
foreach( $buttons_array as $button ){
|
281 |
-
if( !in_array( $button, $mce_buttons ) && !in_array( $button, $mce_buttons_2 ) ){
|
282 |
-
array_push( $mce_buttons, $button );
|
283 |
-
}
|
284 |
-
}
|
285 |
-
|
286 |
-
return $mce_buttons;
|
287 |
-
|
288 |
-
}
|
289 |
-
|
290 |
-
|
291 |
-
/***************************************************************
|
292 |
-
* Second editor row buttons - 4.7 + rearrange
|
293 |
-
***************************************************************/
|
294 |
-
function ratb_tiny_mce_buttons_2_rearrange( $buttons_array ){
|
295 |
-
|
296 |
-
$mce_buttons_2 = ratb_tiny_mce_buttons_2_rearrange_list();
|
297 |
-
|
298 |
-
//Keep extra buttons by comparing two buttons lines
|
299 |
-
$mce_buttons = ratb_tiny_mce_buttons_rearrange_list();
|
300 |
-
foreach( $buttons_array as $button ){
|
301 |
-
if( !in_array( $button, $mce_buttons_2 ) && !in_array( $button, $mce_buttons ) ){
|
302 |
-
array_push( $mce_buttons_2, $button );
|
303 |
-
}
|
304 |
-
}
|
305 |
-
|
306 |
-
return $mce_buttons_2;
|
307 |
-
|
308 |
-
}
|
309 |
-
|
310 |
-
|
311 |
-
/***************************************************************
|
312 |
-
* First editor row buttons - Re-add justify only
|
313 |
-
***************************************************************/
|
314 |
-
function ratb_tiny_mce_buttons_justify( $buttons_array ){
|
315 |
-
|
316 |
-
if ( !in_array( 'alignjustify', $buttons_array ) && in_array( 'alignright', $buttons_array ) ){
|
317 |
-
$key = array_search( 'alignright', $buttons_array );
|
318 |
-
$inserted = array( 'alignjustify' );
|
319 |
-
array_splice( $buttons_array, $key + 1, 0, $inserted );
|
320 |
-
}
|
321 |
-
|
322 |
-
return $buttons_array;
|
323 |
-
|
324 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1.4/readme.txt
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
=== Re-add text underline and justify ===
|
2 |
-
Contributors: briKou
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8
|
4 |
-
Tags: mce, editor, underline, justify, tinyMCE, 4.7, wysiwyg, visual editor
|
5 |
-
Requires at least: 4.7
|
6 |
-
Tested up to: 4.7.3
|
7 |
-
Stable tag: 0.1.4
|
8 |
-
License: GPLv2 or later
|
9 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
-
|
11 |
-
This tiny plugin re-adds the Editor text underline, text justify and rearrange buttons in the WYSIWYG as they were before WordPress 4.7.
|
12 |
-
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
In WordPress 4.7, the core developper team decided to make various changes in the editor (TinyMce WYSIWYG), including removing the **underline and justify buttons** and rearranging some of the toolbar buttons.
|
17 |
-
If you don't want to change the way you edit your content and/or don't want to confuse your customers with a new contribution interface, this very lightweight plugin will set the editor style back to its previous state (like in WordPress 4.6 and above versions).
|
18 |
-
|
19 |
-
**You may change the Editor style from the Writing option page.**
|
20 |
-
|
21 |
-
4 options are available for the Editor style :
|
22 |
-
|
23 |
-
* Default - without underline & justify buttons
|
24 |
-
* Re-add underline & justify buttons
|
25 |
-
* Re-add underline & justify + rearrange
|
26 |
-
* Re-add justify only (added in 0.1.3)
|
27 |
-
|
28 |
-
Please note, the third option is, in my opinion, a good compromise between the 4.6 and 4.7 editor versions. It moves up the style select to the first line and moves the underline button after the other text position buttons.
|
29 |
-
|
30 |
-
**IMPORTANT:** Try different options before posting a bug repport. Some plugins like ACF (free version) are using there own list of buttons and can create conflict with this plugin. Option 3 and 4 are best to prevent this plugin from removing your existing buttons.
|
31 |
-
|
32 |
-
|
33 |
-
[DOCUMENTATION](https://www.b-website.com/re-add-text-underline-and-justify "Plugin documentation")
|
34 |
-
|
35 |
-
[CHECK OUT MY OTHER PLUGINS](https://www.b-website.com/category/plugins-en "More plugins by b*web")
|
36 |
-
|
37 |
-
|
38 |
-
**Please ask for help or report bugs if anything goes wrong. It is the best way to make the community benefit!**
|
39 |
-
|
40 |
-
|
41 |
-
== Installation ==
|
42 |
-
|
43 |
-
1. Upload and activate the plugin (or install it through the WP admin console)
|
44 |
-
2. Go to Settings -> Writing and select the option you want under "Editor style".
|
45 |
-
3. That's it, it is ready to use!
|
46 |
-
|
47 |
-
== Frequently Asked Questions ==
|
48 |
-
|
49 |
-
= Where can I change the Editor style? =
|
50 |
-
Just go to Settings -> Writing and select the option you want under "Editor style".
|
51 |
-
|
52 |
-
|
53 |
-
== Screenshots ==
|
54 |
-
|
55 |
-
1. Change the Editor style from the Writing option page
|
56 |
-
2. Default - without underline & justify buttons
|
57 |
-
3. Re-add underline & justify buttons
|
58 |
-
4. Re-add underline & justify + rearrange
|
59 |
-
5. Re-add justify only
|
60 |
-
|
61 |
-
|
62 |
-
== Changelog ==
|
63 |
-
|
64 |
-
= 0.1.4 - 03/31/2017 =
|
65 |
-
* Tested on WP 4.7.3 with success!
|
66 |
-
* Fix broken links in plugins meta
|
67 |
-
|
68 |
-
= 0.1.3 - 01/14/2016 =
|
69 |
-
* Added the fourth option to only re-add justify button (push methode)
|
70 |
-
* Push non standard button to the end of the buttons lines for the third option. This prevent from removing extra buttons added by other plugins.
|
71 |
-
* Fix for ACF (free) on the second option
|
72 |
-
|
73 |
-
= 0.1.2 - 11/14/2016 =
|
74 |
-
* Change mce button hook priority to prevent errors with other plugins adding extra buttons
|
75 |
-
|
76 |
-
= 0.1.1 - 11/10/2016 =
|
77 |
-
* Fix an issue hidding Editor content.
|
78 |
-
|
79 |
-
= 0.1 - 11/06/2016 =
|
80 |
-
* First release.
|
81 |
-
|
82 |
-
== Upgrade Notice ==
|
83 |
-
|
84 |
-
= 0.1 =
|
85 |
-
* First release.
|
86 |
-
|
87 |
-
= 0.1.3 =
|
88 |
-
* You now have a fourth option available to only re-add the justify button.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1/index.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Kisses from France...
|
|
|
|
tags/0.1/langs/re-add-underline-justify-fr_FR.mo
DELETED
Binary file
|
tags/0.1/langs/re-add-underline-justify-fr_FR.po
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Re-add text underline and justify v0.1\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2016-11-06 12:22:32+0000\n"
|
7 |
-
"Last-Translator: Brice Capobianco\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n>1;\n"
|
13 |
-
"X-Generator: CSL v1.x\n"
|
14 |
-
"X-Poedit-Language: French\n"
|
15 |
-
"X-Poedit-Country: FRANCE\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
-
"X-Poedit-Basepath: ../\n"
|
19 |
-
"X-Poedit-Bookmarks: \n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Textdomain-Support: yes"
|
22 |
-
|
23 |
-
#. translators: plugin header field 'Name'
|
24 |
-
#: re-add-underline-justify.php:0
|
25 |
-
#@ re-add-underline-justify
|
26 |
-
msgid "Re-add text underline and justify"
|
27 |
-
msgstr "Re-add text underline and justify"
|
28 |
-
|
29 |
-
#. translators: plugin header field 'PluginURI'
|
30 |
-
#. translators: plugin header field 'AuthorURI'
|
31 |
-
#: re-add-underline-justify.php:0
|
32 |
-
#@ re-add-underline-justify
|
33 |
-
msgid "http:// b-website.com/"
|
34 |
-
msgstr "http:// b-website.com/"
|
35 |
-
|
36 |
-
#. translators: plugin header field 'Description'
|
37 |
-
#: re-add-underline-justify.php:0
|
38 |
-
#@ re-add-underline-justify
|
39 |
-
msgid "This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7."
|
40 |
-
msgstr "Ce plugin permet de remettre en place les boutons pour souligner et justifier le texte et de réorganiser les boutons comme ils l'étaient avant WordPress 4.7."
|
41 |
-
|
42 |
-
#. translators: plugin header field 'Author'
|
43 |
-
#: re-add-underline-justify.php:0
|
44 |
-
#@ re-add-underline-justify
|
45 |
-
msgid "Brice Capobianco"
|
46 |
-
msgstr "Brice Capobianco"
|
47 |
-
|
48 |
-
#. translators: plugin header field 'Version'
|
49 |
-
#: re-add-underline-justify.php:0
|
50 |
-
#@ re-add-underline-justify
|
51 |
-
msgid "0.1"
|
52 |
-
msgstr "0.1"
|
53 |
-
|
54 |
-
#: re-add-underline-justify.php:43
|
55 |
-
#@ simple-revisions-delete
|
56 |
-
msgid "More b*web Plugins"
|
57 |
-
msgstr ""
|
58 |
-
|
59 |
-
#: re-add-underline-justify.php:44
|
60 |
-
#@ default
|
61 |
-
msgid "Donate to this plugin »"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: re-add-underline-justify.php:89
|
65 |
-
#@ re-add-underline-justify
|
66 |
-
msgid "Editor style"
|
67 |
-
msgstr "Style de l'éditeur"
|
68 |
-
|
69 |
-
#: re-add-underline-justify.php:114
|
70 |
-
#@ re-add-underline-justify
|
71 |
-
msgid "Default - without underline & justify buttons"
|
72 |
-
msgstr "Défaut - sans les boutons souligner & justifier"
|
73 |
-
|
74 |
-
#: re-add-underline-justify.php:115
|
75 |
-
#@ re-add-underline-justify
|
76 |
-
msgid "Re-add underline & justify buttons"
|
77 |
-
msgstr "Ajouter les boutons souligner & justifier"
|
78 |
-
|
79 |
-
#: re-add-underline-justify.php:116
|
80 |
-
#@ re-add-underline-justify
|
81 |
-
msgid "Re-add underline & justify + rearrange"
|
82 |
-
msgstr "Ajouter les boutons souligner & justifier + les réordonner"
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1/re-add-underline-justify.php
DELETED
@@ -1,241 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Plugin Name: Re-add text underline and justify
|
4 |
-
* Plugin URI: http://b-website.com/re-add-text-underline-and-justify
|
5 |
-
* Description: This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7.
|
6 |
-
* Author: Brice Capobianco
|
7 |
-
* Version: 0.1
|
8 |
-
* Author URI: http:// b-website.com/
|
9 |
-
* Domain Path: /langs
|
10 |
-
* Text Domain: re-add-underline-justify
|
11 |
-
*/
|
12 |
-
|
13 |
-
/* Copyright 2016 Brice CAPOBIANCO (contact : http:// b-website.com/contact)
|
14 |
-
|
15 |
-
This program is free software; you can redistribute it and/or modify
|
16 |
-
it under the terms of the GNU General Public License, version 2, as
|
17 |
-
published by the Free Software Foundation.
|
18 |
-
|
19 |
-
This program is distributed in the hope that it will be useful,
|
20 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
-
GNU General Public License for more details.
|
23 |
-
|
24 |
-
You should have received a copy of the GNU General Public License
|
25 |
-
along with this program; if not, write to the Free Software
|
26 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
-
*/
|
28 |
-
|
29 |
-
|
30 |
-
/***************************************************************
|
31 |
-
* SECURITY : Exit if accessed directly
|
32 |
-
***************************************************************/
|
33 |
-
if ( !defined( 'ABSPATH' ) ) {
|
34 |
-
die( 'Direct access not allowed!' );
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
/***************************************************************
|
39 |
-
* Add custom meta link on plugin list page
|
40 |
-
***************************************************************/
|
41 |
-
function ratb_meta_links( $links, $file ) {
|
42 |
-
if ( $file === 're-add-underline-justify/re-add-underline-justify.php' ) {
|
43 |
-
$links[] = '<a href="http:// b-website.com/category/plugins" target="_blank" title="' . __( 'More b*web Plugins', 'simple-revisions-delete' ) . '">'. __( 'More b*web Plugins', 'simple-revisions-delete' ) .'</a>';
|
44 |
-
$links[] = '<a href="https:// www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8" target="_blank" title="' . __( 'Donate to this plugin »' ) . '"><strong>' . __( 'Donate to this plugin »' ) . '</strong></a>';
|
45 |
-
}
|
46 |
-
return $links;
|
47 |
-
}
|
48 |
-
add_filter( 'plugin_row_meta', 'ratb_meta_links', 10, 2 );
|
49 |
-
|
50 |
-
|
51 |
-
/***************************************************************
|
52 |
-
* Load plugin textdomain
|
53 |
-
***************************************************************/
|
54 |
-
function ratb_load_textdomain() {
|
55 |
-
$path = dirname( plugin_basename( __FILE__ ) ) . '/langs/';
|
56 |
-
load_plugin_textdomain( 're-add-underline-justify', FALSE, $path );
|
57 |
-
}
|
58 |
-
add_action( 'init', 'ratb_load_textdomain' );
|
59 |
-
|
60 |
-
|
61 |
-
/***************************************************************
|
62 |
-
* Remove plugin settings from DB on plugin deletion
|
63 |
-
***************************************************************/
|
64 |
-
function ratb_uninstall() {
|
65 |
-
// Remove option from DB
|
66 |
-
delete_option( 'ratb_options' );
|
67 |
-
}
|
68 |
-
|
69 |
-
|
70 |
-
/***************************************************************
|
71 |
-
* Hooks for install & uninstall
|
72 |
-
***************************************************************/
|
73 |
-
function ratb_activation() {
|
74 |
-
register_uninstall_hook( __FILE__, 'ratb_uninstall' );
|
75 |
-
}
|
76 |
-
register_activation_hook( __FILE__, 'ratb_activation' );
|
77 |
-
|
78 |
-
|
79 |
-
/***************************************************************
|
80 |
-
* Register the new setting on the Wrinting screen
|
81 |
-
***************************************************************/
|
82 |
-
function ratb_admin_init(){
|
83 |
-
register_setting(
|
84 |
-
'writing', // settings page
|
85 |
-
'ratb_options' // option name
|
86 |
-
);
|
87 |
-
add_settings_field(
|
88 |
-
'ratb_mce_style', // id
|
89 |
-
__( 'Editor style', 're-add-underline-justify' ), // setting title
|
90 |
-
'ratb_setting_input', // display callback
|
91 |
-
'writing', // settings page
|
92 |
-
'default' // settings section
|
93 |
-
);
|
94 |
-
}
|
95 |
-
add_action('admin_init', 'ratb_admin_init');
|
96 |
-
|
97 |
-
|
98 |
-
/***************************************************************
|
99 |
-
* Display the select on the Wrinting screen
|
100 |
-
***************************************************************/
|
101 |
-
function ratb_setting_input() {
|
102 |
-
|
103 |
-
//Retrieve the option value
|
104 |
-
$options = get_option( 'ratb_options' );
|
105 |
-
|
106 |
-
//Default value
|
107 |
-
if( empty( $options ) ){
|
108 |
-
$options['ratb_mce_style'] = 1;
|
109 |
-
}
|
110 |
-
|
111 |
-
// Output the field
|
112 |
-
echo '
|
113 |
-
<select id="ratb_mce_style" name="ratb_options[ratb_mce_style]">
|
114 |
-
<option value="1"' . selected( $options['ratb_mce_style'], 1, false ) . '>' . __( 'Default - without underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
115 |
-
<option value="2"' . selected( $options['ratb_mce_style'], 2, false ) . '>' . __( 'Re-add underline & justify buttons', 're-add-underline-justify' ) . '</option>
|
116 |
-
<option value="3"' . selected( $options['ratb_mce_style'], 3, false ) . '>' . __( 'Re-add underline & justify + rearrange', 're-add-underline-justify' ) . '</option>
|
117 |
-
</select>';
|
118 |
-
|
119 |
-
}
|
120 |
-
|
121 |
-
|
122 |
-
/***************************************************************
|
123 |
-
* Update tinyMCE buttons lines
|
124 |
-
***************************************************************/
|
125 |
-
function ratb_buttons_lines_tiny_mce(){
|
126 |
-
|
127 |
-
//Retrieve the option value
|
128 |
-
$options = get_option( 'ratb_options' );
|
129 |
-
|
130 |
-
// Conditionnal MCE display
|
131 |
-
if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 2 ) {
|
132 |
-
|
133 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons' );
|
134 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2' );
|
135 |
-
|
136 |
-
} else if ( isset( $options['ratb_mce_style'] ) && $options['ratb_mce_style'] == 3 ) {
|
137 |
-
|
138 |
-
add_filter( 'mce_buttons', 'ratb_tiny_mce_buttons_rearrange' );
|
139 |
-
add_filter( 'mce_buttons_2', 'ratb_tiny_mce_buttons_2_rearrange' );
|
140 |
-
|
141 |
-
}
|
142 |
-
//Else, do nothing... use the default editor style
|
143 |
-
|
144 |
-
}
|
145 |
-
add_filter( 'the_editor_content', 'ratb_buttons_lines_tiny_mce', 9 );
|
146 |
-
|
147 |
-
|
148 |
-
/***************************************************************
|
149 |
-
* First editor row buttons - 4.6
|
150 |
-
***************************************************************/
|
151 |
-
function ratb_tiny_mce_buttons( $buttons_array ){
|
152 |
-
$mce_buttons = array(
|
153 |
-
'bold', // Applies the bold format to the current selection.
|
154 |
-
'italic', // Applies the italic format to the current selection.
|
155 |
-
'strikethrough', // Applies strike though format to the current selection.
|
156 |
-
'bullist', // Formats the current selection as a bullet list.
|
157 |
-
'numlist', // Formats the current selection as a numbered list.
|
158 |
-
'blockquote', // Applies block quote format to the current block level element.
|
159 |
-
'hr', // Inserts a horizontal rule into the editor.
|
160 |
-
'alignleft', // Left aligns the current block or image.
|
161 |
-
'aligncenter', // Left aligns the current block or image.
|
162 |
-
'alignright', // Right aligns the current block or image.
|
163 |
-
'link', // Creates/Edits links within the editor.
|
164 |
-
'unlink', // Removes links from the current selection.
|
165 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
166 |
-
'spellchecker', // ???
|
167 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
168 |
-
'dfw' // Distraction-free mode on/off.
|
169 |
-
);
|
170 |
-
return $mce_buttons;
|
171 |
-
}
|
172 |
-
|
173 |
-
|
174 |
-
/***************************************************************
|
175 |
-
* Second editor row buttons - 4.6
|
176 |
-
***************************************************************/
|
177 |
-
function ratb_tiny_mce_buttons_2( $buttons_array ){
|
178 |
-
$mce_buttons_2 = array(
|
179 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
180 |
-
'underline', // Applies the underline format to the current selection.
|
181 |
-
'alignjustify', // Full aligns the current block or image.
|
182 |
-
'forecolor', // Applies foreground/text color to selection.
|
183 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
184 |
-
'removeformat', // Removes the formatting from the current selection.
|
185 |
-
'charmap', // Inserts custom characters into the editor.
|
186 |
-
'outdent', // Outdents the current list item or block element.
|
187 |
-
'indent', // Indents the current list item or block element.
|
188 |
-
'undo', // Undoes the last operation.
|
189 |
-
'redo', // Redoes the last undoed operation.
|
190 |
-
'wp_help' // Opens the help.
|
191 |
-
);
|
192 |
-
return $mce_buttons_2;
|
193 |
-
}
|
194 |
-
|
195 |
-
|
196 |
-
/***************************************************************
|
197 |
-
* First editor row buttons - 4.7 + rearrange
|
198 |
-
***************************************************************/
|
199 |
-
function ratb_tiny_mce_buttons_rearrange( $buttons_array ){
|
200 |
-
$mce_buttons = array(
|
201 |
-
'formatselect', // Dropdown list with block formats to apply to selection.
|
202 |
-
'bold', // Applies the bold format to the current selection.
|
203 |
-
'italic', // Applies the italic format to the current selection.
|
204 |
-
'underline', // Applies the underline format to the current selection.
|
205 |
-
'bullist', // Formats the current selection as a bullet list.
|
206 |
-
'numlist', // Formats the current selection as a numbered list.
|
207 |
-
'blockquote', // Applies block quote format to the current block level element.
|
208 |
-
'hr', // Inserts a horizontal rule into the editor.
|
209 |
-
'alignleft', // Left aligns the current block or image.
|
210 |
-
'aligncenter', // Left aligns the current block or image.
|
211 |
-
'alignright', // Right aligns the current block or image.
|
212 |
-
'alignjustify', // Full aligns the current block or image.
|
213 |
-
'link', // Creates/Edits links within the editor.
|
214 |
-
'unlink', // Removes links from the current selection.
|
215 |
-
'wp_more', // Inserts the <!-- more --> tag.
|
216 |
-
'spellchecker', // ???
|
217 |
-
'wp_adv', // Toggles the second toolbar on/off.
|
218 |
-
'dfw' // Distraction-free mode on/off.
|
219 |
-
);
|
220 |
-
return $mce_buttons;
|
221 |
-
}
|
222 |
-
|
223 |
-
|
224 |
-
/***************************************************************
|
225 |
-
* Second editor row buttons - 4.7 + rearrange
|
226 |
-
***************************************************************/
|
227 |
-
function ratb_tiny_mce_buttons_2_rearrange( $buttons_array ){
|
228 |
-
$mce_buttons_2 = array(
|
229 |
-
'strikethrough', // Applies strike though format to the current selection.
|
230 |
-
'forecolor', // Applies foreground/text color to selection.
|
231 |
-
'pastetext', // Toggles plain text pasting mode on/off.
|
232 |
-
'removeformat', // Removes the formatting from the current selection.
|
233 |
-
'charmap', // Inserts custom characters into the editor.
|
234 |
-
'outdent', // Outdents the current list item or block element.
|
235 |
-
'indent', // Indents the current list item or block element.
|
236 |
-
'undo', // Undoes the last operation.
|
237 |
-
'redo', // Redoes the last undoed operation.
|
238 |
-
'wp_help' // Opens the help.
|
239 |
-
);
|
240 |
-
return $mce_buttons_2;
|
241 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1/readme.txt
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
=== Re-add text underline and justify ===
|
2 |
-
Contributors: briKou
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7Z6YVM63739Y8
|
4 |
-
Tags: mce, editor, underline, justify, tinyMCE, 4.7, wysiwyg, visual editor
|
5 |
-
Requires at least: 4.7
|
6 |
-
Tested up to: 4.7
|
7 |
-
Stable tag: 0.1
|
8 |
-
License: GPLv2 or later
|
9 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
-
|
11 |
-
This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7.
|
12 |
-
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
In WordPress 4.7, the core developper team decided to make various changes in the editor, including removing the **underline and justify buttons** and rearranging some of the toolbar buttons.
|
17 |
-
If you don't want to change the way you edit your content and/or don't want to confuse your customers with a new contribution interface, this simple and lightweight plugin will set the editor style back to its previous state.
|
18 |
-
|
19 |
-
**You may change the Editor style from the Writing option page.**
|
20 |
-
|
21 |
-
3 options are available for the Editor style :
|
22 |
-
|
23 |
-
* Default - without underline & justify buttons
|
24 |
-
* Re-add underline & justify buttons
|
25 |
-
* Re-add underline & justify + rearrange
|
26 |
-
|
27 |
-
Please note, the third option is, in my opinion, a good compromise between the 4.6 and 4.7 editor versions.
|
28 |
-
|
29 |
-
[DOCUMENTATION](http://b-website.com/re-add-text-underline-and-justify "Plugin documentation")
|
30 |
-
|
31 |
-
[CHECK OUT MY OTHER PLUGINS](http://b-website.com/category/plugins-en "More plugins by b*web")
|
32 |
-
|
33 |
-
|
34 |
-
**Please ask for help or report bugs if anything goes wrong. It is the best way to make the community benefit!**
|
35 |
-
|
36 |
-
|
37 |
-
== Installation ==
|
38 |
-
|
39 |
-
1. Upload and activate the plugin (or install it through the WP admin console)
|
40 |
-
2. Go to Settings -> Writing and select the option you want under "Editor style".
|
41 |
-
3. That's it, it is ready to use!
|
42 |
-
|
43 |
-
== Frequently Asked Questions ==
|
44 |
-
|
45 |
-
= Where can I change the Editor style? =
|
46 |
-
Just go to Settings -> Writing and select the option you want under "Editor style".
|
47 |
-
|
48 |
-
|
49 |
-
== Screenshots ==
|
50 |
-
|
51 |
-
1. Change the Editor style from the Writing option page
|
52 |
-
2. Default - without underline & justify buttons
|
53 |
-
3. Re-add underline & justify buttons
|
54 |
-
4. Re-add underline & justify + rearrange
|
55 |
-
|
56 |
-
|
57 |
-
== Changelog ==
|
58 |
-
|
59 |
-
= 0.1 - 11/06/2016 =
|
60 |
-
* First release.
|
61 |
-
|
62 |
-
== Upgrade Notice ==
|
63 |
-
|
64 |
-
= 0.1 =
|
65 |
-
* First release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trunk/index.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Kisses from France...
|
|
|
|
trunk/langs/re-add-underline-justify-fr_FR.mo
DELETED
Binary file
|
trunk/langs/re-add-underline-justify-fr_FR.po
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Re-add text underline and justify v0.1.3\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2017-01-14 11:35:24+0000\n"
|
7 |
-
"Last-Translator: Brice Capobianco\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n>1;\n"
|
13 |
-
"X-Generator: CSL v1.x\n"
|
14 |
-
"X-Poedit-Language: French\n"
|
15 |
-
"X-Poedit-Country: FRANCE\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
-
"X-Poedit-Basepath: ../\n"
|
19 |
-
"X-Poedit-Bookmarks: \n"
|
20 |
-
"X-Poedit-SearchPath-0: .\n"
|
21 |
-
"X-Textdomain-Support: yes"
|
22 |
-
|
23 |
-
#. translators: plugin header field 'Name'
|
24 |
-
#: re-add-underline-justify.php:0
|
25 |
-
#@ re-add-underline-justify
|
26 |
-
msgid "Re-add text underline and justify"
|
27 |
-
msgstr "Re-add text underline and justify"
|
28 |
-
|
29 |
-
#. translators: plugin header field 'AuthorURI'
|
30 |
-
#: re-add-underline-justify.php:0
|
31 |
-
#@ re-add-underline-justify
|
32 |
-
msgid "http:// b-website.com/"
|
33 |
-
msgstr "http:// b-website.com/"
|
34 |
-
|
35 |
-
#. translators: plugin header field 'Description'
|
36 |
-
#: re-add-underline-justify.php:0
|
37 |
-
#@ re-add-underline-justify
|
38 |
-
msgid "This very simple plugin re-adds the Editor text underline, text justify and rearrange buttons as they were before WordPress 4.7."
|
39 |
-
msgstr "Ce plugin permet de remettre en place les boutons pour souligner et justifier le texte et de réorganiser les boutons comme ils l'étaient avant WordPress 4.7."
|
40 |
-
|
41 |
-
#. translators: plugin header field 'Author'
|
42 |
-
#: re-add-underline-justify.php:0
|
43 |
-
#@ re-add-underline-justify
|
44 |
-
msgid "Brice Capobianco"
|
45 |
-
msgstr "Brice Capobianco"
|
46 |
-
|
47 |
-
#: re-add-underline-justify.php:44
|
48 |
-
#@ simple-revisions-delete
|
49 |
-
msgid "More b*web Plugins"
|
50 |
-
msgstr ""
|
51 |
-
|
52 |
-
#: re-add-underline-justify.php:45
|
53 |
-
#@ default
|
54 |
-
msgid "Donate to this plugin »"
|
55 |
-
msgstr ""
|
56 |
-
|
57 |
-
#: re-add-underline-justify.php:90
|
58 |
-
#@ re-add-underline-justify
|
59 |
-
msgid "Editor style"
|
60 |
-
msgstr "Style de l'éditeur"
|
61 |
-
|
62 |
-
#: re-add-underline-justify.php:115
|
63 |
-
#@ re-add-underline-justify
|
64 |
-
msgid "Default - without underline & justify buttons"
|
65 |
-
msgstr "Défaut - sans les boutons souligner & justifier"
|
66 |
-
|
67 |
-
#: re-add-underline-justify.php:116
|
68 |
-
#@ re-add-underline-justify
|
69 |
-
msgid "Re-add underline & justify buttons"
|
70 |
-
msgstr "Ajouter les boutons souligner & justifier"
|
71 |
-
|
72 |
-
#: re-add-underline-justify.php:117
|
73 |
-
#@ re-add-underline-justify
|
74 |
-
msgid "Re-add underline & justify + rearrange"
|
75 |
-
msgstr "Ajouter les boutons souligner & justifier + les réordonner"
|
76 |
-
|
77 |
-
#. translators: plugin header field 'PluginURI'
|
78 |
-
#: re-add-underline-justify.php:0
|
79 |
-
#@ re-add-underline-justify
|
80 |
-
msgid "http://b-website.com/re-add-text-underline-and-justify"
|
81 |
-
msgstr "https://www.b-website.com/remettre-place-boutons-souligner-justifier-de-lediteur-wordpress-4-7"
|
82 |
-
|
83 |
-
#. translators: plugin header field 'Version'
|
84 |
-
#: re-add-underline-justify.php:0
|
85 |
-
#@ re-add-underline-justify
|
86 |
-
msgid "0.1.3"
|
87 |
-
msgstr ""
|
88 |
-
|
89 |
-
#: re-add-underline-justify.php:118
|
90 |
-
#@ re-add-underline-justify
|
91 |
-
msgid "Re-add justify only"
|
92 |
-
msgstr "Ajouter uniquement le bouton justifier"
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|