Completed
Push — master ( 0758ea...932174 )
by David
02:31
created
src/wordlift_editor.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -9,32 +9,32 @@  discard block
 block discarded – undo
9 9
  */
10 10
 function wordlift_mce_css( $mce_css ) {
11 11
 
12
-	/*
12
+    /*
13 13
 	 * Call the `wl_can_see_classification_box` filter to determine whether we can display the classification box.
14 14
 	 *
15 15
 	 * @since 3.20.3
16 16
 	 *
17 17
 	 * @see https://github.com/insideout10/wordlift-plugin/issues/914
18 18
 	 */
19
-	if ( ! apply_filters( 'wl_can_see_classification_box', true ) ) {
20
-		return $mce_css;
21
-	}
22
-
23
-	if ( ! empty( $mce_css ) ) {
24
-		$mce_css .= ',';
25
-	}
26
-
27
-	/**
28
-	 * Replacing the legacy `wordlift-reloaded.min.css` with tiny-mce.css.
29
-	 *
30
-	 * tiny-mce.css is generated using the new webpack project and its rules are shared with Gutenberg.
31
-	 *
32
-	 * @author David Riccitelli <[email protected]>
33
-	 * @since 3.23.0
34
-	 */
35
-	$mce_css .= plugin_dir_url( __FILE__ ) . 'js/dist/tiny-mce.css';
36
-
37
-	return $mce_css;
19
+    if ( ! apply_filters( 'wl_can_see_classification_box', true ) ) {
20
+        return $mce_css;
21
+    }
22
+
23
+    if ( ! empty( $mce_css ) ) {
24
+        $mce_css .= ',';
25
+    }
26
+
27
+    /**
28
+     * Replacing the legacy `wordlift-reloaded.min.css` with tiny-mce.css.
29
+     *
30
+     * tiny-mce.css is generated using the new webpack project and its rules are shared with Gutenberg.
31
+     *
32
+     * @author David Riccitelli <[email protected]>
33
+     * @since 3.23.0
34
+     */
35
+    $mce_css .= plugin_dir_url( __FILE__ ) . 'js/dist/tiny-mce.css';
36
+
37
+    return $mce_css;
38 38
 }
39 39
 
40 40
 // hook the TinyMCE custom styles function.
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
  */
50 50
 function wordlift_filter_tiny_mce_before_init( $options ) {
51 51
 
52
-	if ( ! isset( $options['extended_valid_elements'] ) ) {
53
-		$options['extended_valid_elements'] = '';
54
-	}
52
+    if ( ! isset( $options['extended_valid_elements'] ) ) {
53
+        $options['extended_valid_elements'] = '';
54
+    }
55 55
 
56
-	$options['extended_valid_elements'] .= ",span[*]";
56
+    $options['extended_valid_elements'] .= ",span[*]";
57 57
 
58
-	return $options;
58
+    return $options;
59 59
 }
60 60
 
61 61
 add_filter( 'tiny_mce_before_init', 'wordlift_filter_tiny_mce_before_init', PHP_INT_MAX );
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  * @return string The updated list of styles, including the custom style provided by WordLift.
9 9
  */
10
-function wordlift_mce_css( $mce_css ) {
10
+function wordlift_mce_css($mce_css) {
11 11
 
12 12
 	/*
13 13
 	 * Call the `wl_can_see_classification_box` filter to determine whether we can display the classification box.
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 	 *
17 17
 	 * @see https://github.com/insideout10/wordlift-plugin/issues/914
18 18
 	 */
19
-	if ( ! apply_filters( 'wl_can_see_classification_box', true ) ) {
19
+	if ( ! apply_filters('wl_can_see_classification_box', true)) {
20 20
 		return $mce_css;
21 21
 	}
22 22
 
23
-	if ( ! empty( $mce_css ) ) {
23
+	if ( ! empty($mce_css)) {
24 24
 		$mce_css .= ',';
25 25
 	}
26 26
 
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
 	 * @author David Riccitelli <[email protected]>
33 33
 	 * @since 3.23.0
34 34
 	 */
35
-	$mce_css .= plugin_dir_url( __FILE__ ) . 'js/dist/tiny-mce.css';
35
+	$mce_css .= plugin_dir_url(__FILE__).'js/dist/tiny-mce.css';
36 36
 
37 37
 	return $mce_css;
38 38
 }
39 39
 
40 40
 // hook the TinyMCE custom styles function.
41
-add_filter( 'mce_css', 'wordlift_mce_css' );
41
+add_filter('mce_css', 'wordlift_mce_css');
42 42
 
43 43
 /**
44 44
  * Set TinyMCE options, in particular enable microdata tagging.
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
  *
48 48
  * @return mixed
49 49
  */
50
-function wordlift_filter_tiny_mce_before_init( $options ) {
50
+function wordlift_filter_tiny_mce_before_init($options) {
51 51
 
52
-	if ( ! isset( $options['extended_valid_elements'] ) ) {
52
+	if ( ! isset($options['extended_valid_elements'])) {
53 53
 		$options['extended_valid_elements'] = '';
54 54
 	}
55 55
 
@@ -58,4 +58,4 @@  discard block
 block discarded – undo
58 58
 	return $options;
59 59
 }
60 60
 
61
-add_filter( 'tiny_mce_before_init', 'wordlift_filter_tiny_mce_before_init', PHP_INT_MAX );
61
+add_filter('tiny_mce_before_init', 'wordlift_filter_tiny_mce_before_init', PHP_INT_MAX);
Please login to merge, or discard this patch.