adsense

How to Write a WordPress User Bridge





1. Assign your plug-in a unique name. Search the directory before selecting the name to determine that it isn't already taken; then create a PHP file with a corresponding name -- if you name your plug-in YouTube Bridge, the file should have a name such as youtubebridge.php.
2. Document your bridge. If you want WordPress to include the bridge in its plug-in directory, provide a readme.txt file along with your plug-in. WordPress also recommends creating a Web page providing details of what your bridge does, how to install it and how to use it.

3. Write a header for your plug-in's main PHP file. You must have a header in order for WordPress to recognize your program, load it and run it. The PHP in the header must give the plug-in's name -- though you can include added information as well -- and must be written with UTF-8 encoding.
4. Program your plug-in's functions. Among the functions to consider, in addition to bridging to the other software, are connecting to a WordPress hook -- a way for WordPress to check when a plug-in is usable -- and saving data from the plug-in in the WordPress database.
5. Review your finished PHP code and confirm that it complies with WordPress requirements. The rules include that you use single and double quotes when appropriate, put spaces after commas and always use full PHP tags rather than shorthand tags.

Comments

0 Responses to "How to Write a WordPress User Bridge"

Post a Comment

Popular Posts

About