Tags

Usefull functions to get started with WordPress

WordPress, provides us with many usefull functions, that make our lives easier, and by which, we can customize or create new themes rapidly.

If you haven’t visited the official WordPress functions referance page, then do it and don’t get overwhelmed. After reading it more closely, you will find out that this is a very usefull recource for you to learn in depth WordPress.

Continue reading “Usefull functions to get started with WordPress”

0

PHP Classes – Oblects notes

Object oriented programming logic is very usefull if you want your code to reach your imagination limits. OOP helps your code to extend easier and at the same time helps your scripts to be cleaner, reusable, and saperated according to the logic you choose. Much stuff here is taken from the official php manual paraphrased and summarized by me in an efford to create a quick guide to PHP classes and objects. Most of the examples are mine and I tried to make them playful and educational.

Continue reading “PHP Classes – Oblects notes”

0

PHP functions mini guide

Any valid PHP code may appear inside a function even other function and class definitions.
The function name must start with any letter or underscore followed by digits, letters, underscores. They are case insensitive.
Funcs need not to be defined before they are referenced, except when a function is conditionally defined.
PHP does not support function overloadind, nor it is possible to undefine or redifine previously-declared functions.
func_num_args() , func_get_arg() , func_get_args()
All functions and classes have the global scope.
It is possible to call recursive functions

function foo(){
   function bar(){
      echo "I don't exist until foo() is called. \n";    
   }
}


function recursion($a){
   if($a < 20){
      echo "$a\n";
      recursion($a+1);
   }
}

Continue reading “PHP functions mini guide”

0