Archive for the ‘PHP’ Category

Use Session in WordPress

Extra attention must be paid to the use of session in wordpress especially when objects are stored. if you are not careful, ‘__PHP_Incomplete_Class’ is waiting to happen. Read the rest of this entry »


Pass PHP String To Javascript Variable

When you try to pass a php string to a javascript varaible like

  var myvar = "<?php echo $myVarValue;?>";

If there is any special characters like quote or new line, it is very likely javascript will be broken with an error message like:unterminated string literal Read the rest of this entry »

OAuth and PHP

As in another article I presented how to just use OauthBase.cs in .net to implement oauth both in service and client. Here is my example of php equivalent.It just uses Andy Smith’s basic PHP library for OAuth from here Read the rest of this entry »


Using Javascript and CSS in WordPress Plugin

Most of blogs out there are suggesting that to use following line to reference javascript files like jquery in your wordpress plugin.

<?php wp_enqueue_script("jquery"); ?>

Read the rest of this entry »


WP_Query Query_Posts And Get_Posts

Headching by just looking at the title?

When I first started programming in wordpress, I was really confused by the query tools that are at our disposal, wondering that if there is any difference between them and what is the difference. Read the rest of this entry »


Page 4 of 6« First...23456