From ae541ffc322693809eeb4c5f9ffa9f4c2a1b17e2 Mon Sep 17 00:00:00 2001 From: David Artiss Date: Thu, 23 Apr 2020 15:39:46 +0100 Subject: [PATCH] Version 2.3.3 --- includes/add-embeds.php | 6 -- includes/admin-config.php | 174 +++++++++++++++--------------------- includes/initialise.php | 1 - includes/options-screen.php | 13 --- readme.txt | 11 ++- simple-code-embed.php | 27 +++--- 6 files changed, 91 insertions(+), 141 deletions(-) diff --git a/includes/add-embeds.php b/includes/add-embeds.php index 47eeae7..f691dce 100644 --- a/includes/add-embeds.php +++ b/includes/add-embeds.php @@ -179,9 +179,6 @@ function ce_quick_replace( $content = '', $options = '', $search = '' ) { function ce_generate_code( $html, $responsive = '', $max_width = '', $debug = '' ) { $code = "\n"; - if ( 1 !== $debug ) { - $code .= '\n"; - } if ( false !== $max_width ) { $code .= '
'; @@ -202,9 +199,6 @@ function ce_generate_code( $html, $responsive = '', $max_width = '', $debug = '' } $code .= "\n"; - if ( 1 !== $debug ) { - $code .= '\n"; - } return $code; } diff --git a/includes/admin-config.php b/includes/admin-config.php index e90d5c3..232dede 100644 --- a/includes/admin-config.php +++ b/includes/admin-config.php @@ -1,24 +1,21 @@ ' . __( 'Github', 'simple-embed-code' ) . '' ) ); $links = array_merge( $links, array( '' . __( 'Support', 'simple-embed-code' ) . '' ) ); + + $links = array_merge( $links, array( '' . __( 'Donate', 'simple-embed-code' ) . '' ) ); + + $links = array_merge( $links, array( '' . __( 'Write a Review', 'simple-embed-code' ) . ' ⭐️⭐️⭐️⭐️⭐️' ) ); } return $links; @@ -64,18 +62,15 @@ function ce_set_plugin_meta( $links, $file ) { add_filter( 'plugin_row_meta', 'ce_set_plugin_meta', 10, 2 ); /** -* Code Embed Menu -* -* Add a new option to the Admin menu and context menu -* -* @since 1.4 -* -* @uses ce_help Return help text -*/ - + * Code Embed Menu + * + * Add a new option to the Admin menu and context menu + * + * @uses ce_help Return help text + */ function ce_menu() { - // Add search sub-menu + // Add search sub-menu. global $ce_search_hook; @@ -83,7 +78,7 @@ function ce_menu() { add_action( 'load-' . $ce_search_hook, 'ce_add_search_help' ); - // Add options sub-menu + // Add options sub-menu. global $ce_options_hook; @@ -96,15 +91,12 @@ function ce_menu() { add_action( 'admin_menu', 'ce_menu' ); /** -* Add Options Help -* -* Add help tab to options screen -* -* @since 2.0 -* -* @uses ce_options_help Return help text -*/ - + * Add Options Help + * + * Add help tab to options screen + * + * @uses ce_options_help Return help text. + */ function ce_add_options_help() { global $ce_options_hook; @@ -126,15 +118,12 @@ function ce_add_options_help() { } /** -* Add Search Help -* -* Add help tab to search screen -* -* @since 2.0 -* -* @uses ce_search_help Return help text -*/ - + * Add Search Help + * + * Add help tab to search screen + * + * @uses ce_search_help Return help text. + */ function ce_add_search_help() { global $ce_search_hook; @@ -156,43 +145,34 @@ function ce_add_search_help() { } /** -* Code Embed Options -* -* Define an option screen -* -* @since 1.4 -*/ - + * Code Embed Options + * + * Define an option screen + */ function ce_options() { - include_once( WP_PLUGIN_DIR . '/' . str_replace( basename( __FILE__ ), '', plugin_basename( __FILE__ ) ) . 'options-screen.php' ); + include_once WP_PLUGIN_DIR . '/' . str_replace( basename( __FILE__ ), '', plugin_basename( __FILE__ ) ) . 'options-screen.php'; } /** -* Code Embed Search -* -* Define a the search screen -* -* @since 1.6 -*/ - + * Code Embed Search + * + * Define a the search screen + */ function ce_search() { - include_once( WP_PLUGIN_DIR . '/' . str_replace( basename( __FILE__ ), '', plugin_basename( __FILE__ ) ) . 'search-screen.php' ); + include_once WP_PLUGIN_DIR . '/' . str_replace( basename( __FILE__ ), '', plugin_basename( __FILE__ ) ) . 'search-screen.php'; } /** -* Code Embed Options Help -* -* Return help text for options screen -* -* @since 1.5 -* -* @return string Help Text -*/ - + * Code Embed Options Help + * + * Return help text for options screen + * + * @return string Help Text. + */ function ce_options_help() { $help_text = '

' . __( 'Use this screen to modify the various settings, including the identifiers and keyword used to specify your embedded code.', 'simple-embed-code' ) . '

'; @@ -205,15 +185,12 @@ function ce_options_help() { } /** -* Code Embed Search Help -* -* Return help text for search screen -* -* @since 1.6 -* -* @return string Help Text -*/ - + * Code Embed Search Help + * + * Return help text for search screen + * + * @return string Help Text + */ function ce_search_help() { $help_text = '

' . __( 'This screen allows you to search for the post and pages that a particular code embed has been used in.', 'simple-embed-code' ) . '

'; @@ -224,15 +201,12 @@ function ce_search_help() { } /** -* Code Embed Help Sidebar -* -* Return sidebar help text -* -* @since 2.3 -* -* @return string Help Text -*/ - + * Code Embed Help Sidebar + * + * Return sidebar help text + * + * @return string Help Text. + */ function ce_help_sidebar() { $help_text = '

' . __( 'For more information:', 'simple-embed-code' ) . '

'; diff --git a/includes/initialise.php b/includes/initialise.php index 461e415..7b53a5e 100644 --- a/includes/initialise.php +++ b/includes/initialise.php @@ -39,7 +39,6 @@ function ce_initialisation() { 'opening_ident' => '{{', 'keyword_ident' => 'CODE', 'closing_ident' => '}}', - 'debug' => '', 'excerpts' => '', ); diff --git a/includes/options-screen.php b/includes/options-screen.php index b965fec..d6c27dd 100644 --- a/includes/options-screen.php +++ b/includes/options-screen.php @@ -38,12 +38,6 @@ $options['closing_ident'] = '}}'; } - if ( ! empty( $_POST['code_embed_debug'] ) ) { - $options['debug'] = sanitize_text_field( wp_unslash( $_POST['code_embed_debug'] ) ); // Input var okay. - } else { - $options['debug'] = ''; - } - if ( isset( $_POST['code_embed_excerpt'] ) ) { $options['excerpt'] = sanitize_text_field( wp_unslash( $_POST['code_embed_excerpt'] ) ); // Input var okay. } else { @@ -63,13 +57,6 @@
- - - - -
-/>