diff --git a/css/video-container UNCOMPRESSED.css b/css/video-container UNCOMPRESSED.css deleted file mode 100644 index b81fdb8..0000000 --- a/css/video-container UNCOMPRESSED.css +++ /dev/null @@ -1,16 +0,0 @@ -.ce-video-container { - position: relative; - padding-bottom: 56.25%; - height: 0; - overflow: hidden; -} - -.ce-video-container iframe, -.ce-video-container object, -.ce-video-container embed { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} \ No newline at end of file diff --git a/css/video-container.css b/css/video-container.css index 1e000ba..2029079 100644 --- a/css/video-container.css +++ b/css/video-container.css @@ -1 +1,16 @@ -.ce-video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;}.ce-video-container iframe,.ce-video-container object,.ce-video-container embed{position:absolute;top:0;left:0;width:100%;height:100%;} \ No newline at end of file +.ce-video-container { + position: relative; + padding-bottom: 56.25%; + height: 0; + overflow: hidden; +} + +.ce-video-container iframe, +.ce-video-container object, +.ce-video-container embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} diff --git a/css/video-container.min.css b/css/video-container.min.css new file mode 100644 index 0000000..1e000ba --- /dev/null +++ b/css/video-container.min.css @@ -0,0 +1 @@ +.ce-video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;}.ce-video-container iframe,.ce-video-container object,.ce-video-container embed{position:absolute;top:0;left:0;width:100%;height:100%;} \ No newline at end of file diff --git a/includes/add-embeds.php b/includes/add-embeds.php index 05aa817..5696ded 100644 --- a/includes/add-embeds.php +++ b/includes/add-embeds.php @@ -1,317 +1,327 @@ - 1 ) { $res_pos = strpos( $suffix, '_RES', 1 ); } - - if ( $res_pos !== false ) { - - // If responsive section found, check it's at the end of has an underscore afterwards - // Otherwise it may be part of something else - - if ( $res_pos == strlen( $suffix) - 4 ) { - $responsive = true; - } else { - if ( substr( $suffix, $res_pos+4, 1 ) == '_' ) { - $responsive = true; - $max_width = substr( $suffix, $res_pos + 5 ); - if ( !is_numeric( $max_width ) ) { $max_width = ''; } - } - } - - if ( $responsive ) { $suffix = substr( $suffix, 0, $res_pos ); } - } - - // Get the custom field data and replace in the post - - $search = $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . $suffix . $options[ 'closing_ident' ]; - - // Get the meta for the current post - - $post_meta = get_post_meta( $post -> ID, $options[ 'keyword_ident' ].$suffix, false ); - if ( isset( $post_meta[ 0 ] ) ) { - $html = $post_meta[ 0 ]; - } else { - // No meta found, so look for it elsewhere - $html = ce_get_embed_code( $options[ 'keyword_ident' ], $suffix ); - } - - // Build the string to search for - - $search = $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . $full_suffix . $options[ 'closing_ident' ]; - - // Build the string of code to replace with - - $replace = ce_generate_code( $html, 'Code Embed', $responsive, $max_width, $options[ 'debug' ] ); - - // Now modify all references - - $content = str_replace( $search , $replace, $content ); - - } - $found_pos = strpos( $content, $options[ 'opening_ident' ] . $options[ 'keyword_ident' ], $found_pos + 1 ); - } - - // Loop around the post content looking for HTTP addresses - - $content = ce_quick_replace( $content, $options, 'http://' ); - - // Loop around the post content looking for HTTPS addresses - - $content = ce_quick_replace( $content, $options, 'https://' ); - - return $content; -} - -add_filter( 'the_content', 'ce_filter' ); -add_filter( 'widget_content', 'ce_filter' ); - -/** -* Quick Replace -* -* Function to do a quick search/replace of the content -* -* @since 2.0 -* -* @param $content string The content -* @param $options string The options array -* @param $search string The string to search for -* @return string The updated content -*/ - -function ce_quick_replace( $content = '', $options = '', $search = '' ) { - - $start_pos = strpos( $content, $options[ 'opening_ident' ] . $search, 0 ); - $prefix_len = strlen( $options[ 'opening_ident' ] ); - - while ( $start_pos !== false ) { - - $start_pos = $start_pos + strlen( $options[ 'opening_ident' ] ); - $end_pos = strpos( $content, $options[ 'closing_ident' ], $start_pos ); - if ( $end_pos !== false ) { - $url = substr( $content, $start_pos, $end_pos - $start_pos ); - $file = ce_get_file( $url ); - $content = str_replace ( $options[ 'opening_ident' ] . $url . $options[ 'closing_ident' ], $file[ 'file' ], $content ); - } - $start_pos = strpos( $content, $options[ 'opening_ident' ] . $search, $found_pos ); - - } - - return $content; -} - -/** -* Generate Embed Code -* -* Function to generate the embed code that will be output -* -* @since 2.0 -* -* @param $html string The embed code (required) -* @param $plugin_name string The name of the plugin (required) -* @param $responsive string Responsive output required? (optional) -* @param $max_width string Maximum width of responsive output (optional) -* @param $debug boolean Whether to suppress debug output (1) or not -* @return string The embed code -*/ - -function ce_generate_code( $html, $plugin_name, $responsive = '', $max_width = '', $debug = '' ) { - - $code = "\n"; - if ( $debug != 1 ) { $code .= '\n"; } - - if ( $max_width !== false ) { $code .= '
' . $plugin_name . ': ' . $error . "
\n"; - - if ( $echo ) { - echo $output; - return true; - } else { - return $output; - } - -} -?> \ No newline at end of file +ID, $options['keyword_ident'] . $suffix, false ); + if ( isset( $post_meta[0] ) ) { + $html = $post_meta[0]; + } else { + // No meta found, so look for it elsewhere + $html = ce_get_embed_code( $options['keyword_ident'], $suffix ); + } + + // Build the string to search for + + $search = $options['opening_ident'] . $options['keyword_ident'] . $full_suffix . $options['closing_ident']; + + // Build the string of code to replace with + + $replace = ce_generate_code( $html, $responsive, $max_width, $options['debug'] ); + + // Now modify all references + + $content = str_replace( $search, $replace, $content ); + + } + $found_pos = strpos( $content, $options['opening_ident'] . $options['keyword_ident'], $found_pos + 1 ); + } + + // Loop around the post content looking for HTTP addresses + + $content = ce_quick_replace( $content, $options, 'http://' ); + + // Loop around the post content looking for HTTPS addresses + + $content = ce_quick_replace( $content, $options, 'https://' ); + + return $content; +} + +add_filter( 'the_content', 'ce_filter' ); +add_filter( 'widget_content', 'ce_filter' ); + +/** +* Quick Replace +* +* Function to do a quick search/replace of the content +* +* @since 2.0 +* +* @param $content string The content +* @param $options string The options array +* @param $search string The string to search for +* @return string The updated content +*/ + +function ce_quick_replace( $content = '', $options = '', $search = '' ) { + + $start_pos = strpos( $content, $options['opening_ident'] . $search, 0 ); + $prefix_len = strlen( $options['opening_ident'] ); + + while ( false !== $start_pos ) { + + $start_pos = $start_pos + strlen( $options['opening_ident'] ); + $end_pos = strpos( $content, $options['closing_ident'], $start_pos ); + + if ( false !== $end_pos ) { + $url = substr( $content, $start_pos, $end_pos - $start_pos ); + $file = ce_get_file( $url ); + if ( false !== $file ) { + $content = str_replace( $options['opening_ident'] . $url . $options['closing_ident'], $file['file'], $content ); + } else { + ce_report_error( __( 'File could not be fetched', 'simple-embed-code' ), 'Code Embed', false ); + } + } + } + + return $content; +} + +/** +* Generate Embed Code +* +* Function to generate the embed code that will be output +* +* @since 2.0 +* +* @param $html string The embed code (required) +* @param $responsive string Responsive output required? (optional) +* @param $max_width string Maximum width of responsive output (optional) +* @param $debug boolean Whether to suppress debug output (1) or not +* @return string The embed code +*/ + +function ce_generate_code( $html, $responsive = '', $max_width = '', $debug = '' ) { + + $code = "\n"; + if ( 1 !== $debug ) { + $code .= '\n"; + } + + if ( false !== $max_width ) { + $code .= '' . $plugin_name . ': ' . $error . "
\n"; + + if ( $echo ) { + echo esc_html( $output ); + return true; + } else { + return $output; + } + +} + diff --git a/includes/add-scripts.php b/includes/add-scripts.php index f1a2446..7d8cd72 100644 --- a/includes/add-scripts.php +++ b/includes/add-scripts.php @@ -1,27 +1,26 @@ - \ No newline at end of file +' . __( 'Settings', 'simple-embed-code' ) . ''; - array_unshift( $links, $settings_link ); - } - - return $links; -} - -add_filter( 'plugin_action_links', 'ce_add_settings_link', 10, 2 ); - -/** -* Add meta to plugin details -* -* Add options to plugin meta line -* -* @since 1.6 -* -* @param string $links Current links -* @param string $file File in use -* @return string Links, now with settings added -*/ - -function ce_set_plugin_meta( $links, $file ) { - - if ( strpos( $file, 'code-embed.php' ) !== false ) { $links = array_merge( $links, array( '' . __( 'Support', 'simple-embed-code' ) . '' ) ); } - - return $links; -} - -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 -*/ - -function ce_menu() { - - // Add search sub-menu - - global $ce_search_hook; - - $ce_search_hook = add_submenu_page( 'tools.php', __( 'Code Embed Search', 'simple-embed-code' ), __( 'Code Search', 'simple-embed-code' ), 'edit_posts', 'ce-search', 'ce_search' ); - - add_action('load-'.$ce_search_hook, 'ce_add_search_help'); - - // Add options sub-menu - - global $ce_options_hook; - - $ce_options_hook = add_submenu_page( 'options-general.php', __( 'Code Embed Settings', 'simple-embed-code' ), __( 'Code Embed', 'simple-embed-code' ), 'manage_options', 'ce-options', 'ce_options' ); - - add_action('load-'.$ce_options_hook, 'ce_add_options_help'); - -} - -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 -*/ - -function ce_add_options_help() { - - global $ce_options_hook; - $screen = get_current_screen(); - - if ( $screen->id != $ce_options_hook ) { return; } - - $screen -> add_help_tab( array( 'id' => 'ce-options-help-tab', 'title' => __( 'Help', 'simple-embed-code' ), 'content' => ce_options_help() ) ); -} - -/** -* Add Search Help -* -* Add help tab to search screen -* -* @since 2.0 -* -* @uses ce_search_help Return help text -*/ - -function ce_add_search_help() { - - global $ce_search_hook; - $screen = get_current_screen(); - - if ( $screen->id != $ce_search_hook ) { return; } - - $screen -> add_help_tab( array( 'id' => 'ce-search-help-tab', 'title' => __( 'Help', 'simple-embed-code' ), 'content' => ce_search_help() ) ); -} - -/** -* Code Embed Options -* -* Define an option screen -* -* @since 1.4 -*/ - -function ce_options() { - - 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 -*/ - -function ce_search() { - - 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 -*/ - -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' ) . '
'; - $help_text .= '' . __( 'The first option allows to suppress debug output. Normally this is an HTML comment in your page source - if you wish to hide this then simply tick this option.', 'simple-embed-code' ) . '
'; - $help_text .= '' . __( 'The second option allows to specify whether code embed requests should work in excerpts.', 'simple-embed-code' ) . '
'; - $help_text .= '' . __( 'The keyword is the name used for your custom field. The custom field\'s value is the code that you wish to embed.', 'simple-embed-code' ) . '
'; - $help_text .= '' . __( 'The keyword, sandwiched with the identifier before and after, is what you then need to add to your post or page to activate the embed code.', 'simple-embed-code' ) . '
'; - - return $help_text; -} - -/** -* Code Embed Search Help -* -* Return help text for search screen -* -* @since 1.6 -* -* @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' ) . '
'; - $help_text .= '' . __( 'Simply enter the code suffix that you wish to search for and press the \'Search\' key to display a list of all the posts using it. In addition the code will be shown alongside it. Click on the post name to edit the post.', 'simple-embed-code' ) . '
'; - $help_text .= '' . __( 'The search results are grouped together in matching code groups, so posts with the same code will be shown together with the same color background.', 'simple-embed-code' ) . '
'; - - return $help_text; -} -?> \ No newline at end of file +' . __( 'Settings', 'simple-embed-code' ) . ''; + array_unshift( $links, $settings_link ); + } + + return $links; +} + +add_filter( 'plugin_action_links', 'ce_add_settings_link', 10, 2 ); + +/** +* Add meta to plugin details +* +* Add options to plugin meta line +* +* @since 1.6 +* +* @param string $links Current links +* @param string $file File in use +* @return string Links, now with settings added +*/ + +function ce_set_plugin_meta( $links, $file ) { + + if ( false !== strpos( $file, 'code-embed.php' ) ) { + + $links = array_merge( $links, array( '' . __( 'Github', 'simple-embed-code' ) . '' ) ); + + $links = array_merge( $links, array( '' . __( 'Support', 'simple-embed-code' ) . '' ) ); + } + + return $links; +} + +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 +*/ + +function ce_menu() { + + // Add search sub-menu + + global $ce_search_hook; + + $ce_search_hook = add_submenu_page( 'tools.php', __( 'Code Embed Search', 'simple-embed-code' ), __( 'Code Search', 'simple-embed-code' ), 'edit_posts', 'ce-search', 'ce_search' ); + + add_action( 'load-' . $ce_search_hook, 'ce_add_search_help' ); + + // Add options sub-menu + + global $ce_options_hook; + + $ce_options_hook = add_submenu_page( 'options-general.php', __( 'Code Embed Settings', 'simple-embed-code' ), __( 'Code Embed', 'simple-embed-code' ), 'manage_options', 'ce-options', 'ce_options' ); + + add_action( 'load-' . $ce_options_hook, 'ce_add_options_help' ); + +} + +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 +*/ + +function ce_add_options_help() { + + global $ce_options_hook; + $screen = get_current_screen(); + + if ( $screen->id !== $ce_options_hook ) { + return; + } + + $screen->add_help_tab( + array( + 'id' => 'ce-options-help-tab', + 'title' => __( 'Help', 'simple-embed-code' ), + 'content' => ce_options_help(), + ) + ); + + $screen->set_help_sidebar( ce_help_sidebar() ); +} + +/** +* Add Search Help +* +* Add help tab to search screen +* +* @since 2.0 +* +* @uses ce_search_help Return help text +*/ + +function ce_add_search_help() { + + global $ce_search_hook; + $screen = get_current_screen(); + + if ( $screen->id !== $ce_search_hook ) { + return; + } + + $screen->add_help_tab( + array( + 'id' => 'ce-search-help-tab', + 'title' => __( 'Help', 'simple-embed-code' ), + 'content' => ce_search_help(), + ) + ); + + $screen->set_help_sidebar( ce_help_sidebar() ); +} + +/** +* Code Embed Options +* +* Define an option screen +* +* @since 1.4 +*/ + +function ce_options() { + + 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 +*/ + +function ce_search() { + + 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 +*/ + +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' ) . '
'; + $help_text .= '' . __( 'The first option allows to suppress debug output. Normally this is an HTML comment in your page source - if you wish to hide this then simply tick this option.', 'simple-embed-code' ) . '
'; + $help_text .= '' . __( 'The second option allows to specify whether code embed requests should work in excerpts.', 'simple-embed-code' ) . '
'; + $help_text .= '' . __( 'The keyword is the name used for your custom field. The custom field\'s value is the code that you wish to embed.', 'simple-embed-code' ) . '
'; + $help_text .= '' . __( 'The keyword, sandwiched with the identifier before and after, is what you then need to add to your post or page to activate the embed code.', 'simple-embed-code' ) . '
'; + + return $help_text; +} + +/** +* Code Embed Search Help +* +* Return help text for search screen +* +* @since 1.6 +* +* @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' ) . '
'; + $help_text .= '' . __( 'Simply enter the code suffix that you wish to search for and press the \'Search\' key to display a list of all the posts using it. In addition the code will be shown alongside it. Click on the post name to edit the post.', 'simple-embed-code' ) . '
'; + $help_text .= '' . __( 'The search results are grouped together in matching code groups, so posts with the same code will be shown together with the same color background.', 'simple-embed-code' ) . '
'; + + return $help_text; +} + +/** +* Code Embed Help Sidebar +* +* Return sidebar help text +* +* @since 2.3 +* +* @return string Help Text +*/ + +function ce_help_sidebar() { + + $help_text = '' . __( 'For more information:', 'simple-embed-code' ) . '
'; + $help_text .= '' . __( 'Instructions', 'simple-embed-code' ) . '
'; + $help_text .= '' . __( 'Github (code and issues)', 'simple-embed-code' ) . '
'; + $help_text .= '' . __( 'Support Forum', 'simple-embed-code' ) . '
'; + + return $help_text; +} diff --git a/includes/initialise.php b/includes/initialise.php index 5821c9d..91468f2 100644 --- a/includes/initialise.php +++ b/includes/initialise.php @@ -1,57 +1,58 @@ - '%', - 'keyword_ident' => 'CODE', - 'closing_ident' => '%', - 'debug' => '', - 'excerpts' => '', - ); - - // Merge existing and default options - any missing from existing will take the default settings - - $new_options = array_merge( $default_array, $options ); - - // Update the options, if changed, and return the result - - if ( $options != $new_options ) { update_option( 'artiss_code_embed', $new_options ); } - - } - -} - -add_action( 'init', 'ce_initialisation' ); -?> \ No newline at end of file + '{{', + 'keyword_ident' => 'CODE', + 'closing_ident' => '}}', + 'debug' => '', + 'excerpts' => '', + ); + + // Merge existing and default options - any missing from existing will take the default settings + + $new_options = array_merge( $default_array, $options ); + + // Update the options, if changed, and return the result + + if ( $options !== $new_options ) { + update_option( 'artiss_code_embed', $new_options ); + } + } +} + +add_action( 'init', 'ce_initialisation' ); diff --git a/includes/options-screen.php b/includes/options-screen.php index 205cdcf..b965fec 100644 --- a/includes/options-screen.php +++ b/includes/options-screen.php @@ -1,97 +1,130 @@ - -' . sprintf ( __( 'Based upon your current settings to embed some code simply add a custom field named %s, where %s is any suffix you wish. The code to embed is then added as the field value.', 'simple-embed-code' ), '' . $options[ 'keyword_ident' ] . 'x', 'x' ) . "\n"; -echo ' ' . sprintf ( __( 'Then, to add the code into your post simple add %s where you wish it to appear. %s is the suffix you used for the custom field name.', 'simple-embed-code' ), '' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "x" . $options[ 'closing_ident' ] . '', 'x' ) . "
\n"; -echo '' . sprintf ( __( 'For example, I may add a custom field named %s, where the value is the code I wish to embed. I would then in my post add %s where I wish the code to then appear.', 'simple-embed-code' ), '' . $options[ 'keyword_ident' ].'1', '' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "1" . $options[ 'closing_ident' ] . '' ) . "
\n"; -echo '' . sprintf ( __( 'To embed the same code but to make it responsive you would use %s. To set a maximum width you would use %s, where %s is the maximum width in pixels.', 'simple-embed-code' ), '' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "x_RES" . $options[ 'closing_ident' ] . '', '' . $options[ 'opening_ident' ] . $options[ 'keyword_ident' ] . "x_RES_y" . $options[ 'closing_ident' ] . '', 'y' ) . "
\n"; -echo '' . sprintf ( __( 'To embed an external URL you would type %s, where %s is the URL.', 'simple-embed-code' ), '' . $options[ 'opening_ident' ] . 'url' . $options[ 'closing_ident' ] . '', 'url' ) . "
\n"; -?> - -' . esc_html( __( 'Settings saved.', 'simple-embed-code' ) ) . "
' . sprintf( esc_html__( 'Based upon your current settings to embed some code simply add a custom field named %1$s, where %2$s is any suffix you wish. The code to embed is then added as the field value.', 'simple-embed-code' ), '' . esc_html( $options['keyword_ident'] ) . 'x', 'x' ) . "\n"; + +/* translators: %1$s: example of how to embed code in a post based on current settings, %2$s: details of key used in example */ +echo ' ' . sprintf( esc_html__( 'Then, to add the code into your post simple add %1$s where you wish it to appear. %2$s is the suffix you used for the custom field name.', 'simple-embed-code' ), '' . esc_html( $options['opening_ident'] ) . esc_html( $options['keyword_ident'] ) . 'x' . esc_html( $options['closing_ident'] ) . '', 'x' ) . "
\n"; + +/* translators: %1$s: another example of adding a custom field, %2$s: another example of adding embed to a post */ +echo '' . sprintf( esc_html__( 'For example, I may add a custom field named %1$s, where the value is the code I wish to embed. I would then in my post add %2$s where I wish the code to then appear.', 'simple-embed-code' ), '' . esc_html( $options['keyword_ident'] ) . '1', '' . esc_html( $options['opening_ident'] ) . esc_html( $options['keyword_ident'] ) . '1' . esc_html( $options['closing_ident'] ) . '' ) . "
\n"; + +/* translators: %1$s: example embedding for responsive layout , %2$s: details of key used in example */ +echo '' . sprintf( esc_html__( 'To embed the same code but to make it responsive you would use %1$s. To set a maximum width you would use %2$s, where %3$s is the maximum width in pixels.', 'simple-embed-code' ), '' . esc_html( $options['opening_ident'] ) . esc_html( $options['keyword_ident'] ) . 'x_RES' . esc_html( $options['closing_ident'] ) . '', '' . esc_html( $options['opening_ident'] ) . esc_html( $options['keyword_ident'] ) . 'x_RES_y' . esc_html( $options['closing_ident'] ) . '', 'y' ) . "
\n"; + +/* translators: %1$s: example of embedding a file, %2$s: details of key used in example */ +echo '' . sprintf( esc_html__( 'To embed an external URL you would type %1$s, where %2$s is the URL.', 'simple-embed-code' ), '' . esc_html( $options['opening_ident'] ) . 'url' . esc_html( $options['closing_ident'] ) . '', 'url' ) . "
\n"; +?> + + diff --git a/includes/search-screen.php b/includes/search-screen.php index 628293f..d269e5d 100644 --- a/includes/search-screen.php +++ b/includes/search-screen.php @@ -1,93 +1,94 @@ - -| '.$post_title." | \n"; - echo '\n"; - echo " |
" . __( 'No posts were found containing that embed code.', 'simple-embed-code' ) . "
\n"; - - } -} -?> - -| ' . esc_html( $post_title ) . " | \n"; + echo '\n"; + echo " |
' . esc_html__( 'No posts were found containing that embed code.', 'simple-embed-code' ) . "
\n"; + + } +} +?> + +