| @@ -1,28 +1,19 @@ | ||
| 1 | 1 | <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> |
| 2 | 2 | <?php |
| 3 | 3 | |
| 4 | 4 | // ================================================================== |
| 5 | -// This function create a content in mysql that will fit the database and will ignore marks like ("", \, =) | |
| 5 | +// output the values into the the page or input in the correct way | |
| 6 | +// allowing to have double and single quotes inside input | |
| 6 | 7 | // ================================================================== |
| 7 | 8 | |
| 8 | -function yydev_phone_btn_mysql_prep( $value ) { | |
| 9 | - $magic_quotes_active = get_magic_quotes_gpc(); | |
| 10 | - $new_enough_php = function_exists( "mysql_real_escape_string" ); // i.e. PHP >= v4.3.0 | |
| 11 | - if( $new_enough_php ) { // PHP v4.3.0 or higher | |
| 12 | - // undo any magic quote effects so mysql_real_escape_string can do the work | |
| 13 | - if( $magic_quotes_active ) { $value = stripslashes( $value ); } | |
| 14 | - } else { // before PHP v4.3.0 | |
| 15 | - // if magic quotes aren't already on then add slashes manually | |
| 16 | - if( !$magic_quotes_active ) { $value = addslashes( $value ); } | |
| 17 | - // if magic quotes are active, then the slashes already exist | |
| 18 | - } | |
| 19 | - $value = trim($value); | |
| 20 | - $value = stripslashes($value); | |
| 21 | - $value = stripslashes_deep($value); | |
| 22 | - | |
| 23 | - return $value; | |
| 24 | -} // function yydev_phone_btn_mysql_prep( $value ) { | |
| 9 | +function yydev_phone_btn_html_output($output_code) { | |
| 10 | + | |
| 11 | + $output_code = stripslashes_deep($output_code); | |
| 12 | + $output_code = esc_html($output_code); | |
| 13 | + return $output_code; | |
| 14 | + | |
| 15 | +} // function yydev_phone_btn_html_output($output_code) { | |
| 25 | 16 | |
| 26 | 17 | // ================================================================== |
| 27 | 18 | // This function will display error message if there was something wrong |
| 28 | 19 | // $error_message will be the name of the string we define and if it's exists |