Wordpress is prepare -d

This morning I was delighted to see that center of my wp-centric universe is prepared! I have pushed my coffee on the side, throw the cigarette and continued with my book: Learn Wordpress in 21 days. I have my reasons to learn, maybe I’ll write regarding it in future, but let me show you my morning practice / sample.

Add your own action-Day 3

I have downloaded the latest Wordpress because there was important announce today . Important security updates were shipped, even for typo error fix -security first and backward compatible ❤ ! I have installed fresh copy on my localhost and followed the guide from the book e.g. enabled the “Hello molly” plugin first, then I have opened my editor and I have pasted my sample code at the bottom of the hello.php file:

function grr(){
global $wpdb;
if ( isset($_REQUEST["tazdingooo1"]) ){
echo "<pre>";
$name = esc_sql($_REQUEST["tazdingooo1"]);//try wc_clean too
if ( isset($_REQUEST["tazdingooo2"]) ){
$email = sanitize_email($_REQUEST["tazdingooo2"]);
$part_of_the_query = $wpdb->prepare("tadaaam %s", $email);
$query = $wpdb->prepare("query $part_of_the_query %s", $name);
echo $query;
}else{
print_r(array("hurry up you are on the Day 3! ".$name));
}
exit;
}
}
add_action( 'init', 'grr' );

Perfect! I have started with tests! After 30 minutes of trying to get the idea and getting warning in my browser that I need to hurry up, because I’m on the day 3 I finally managed to echo $query . I got some strange result that means nothing to me, but this was my lucky request:

http://localhost/day3/index.php?tazdingooo2=te%sst@gmail.com&tazdingooo1[]=not%20important&tazdingooo1[]=op1

This is my story for today! Stay tuned for more :)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.