In this blog we are going to show the potential of this new API for PHP called RedFruits.
RedFruits is a PHP API (or framework) to write webs in PHP, quickly and safety. It’s an Object Oriented API and allows to write web sites with no HTML code. Web sites and, now, plugins for WordPress.
You can download it from the wordpress’ plugins repository http://wordpress.org/extend/plugins/redfruits/.
<?php require_once(REDFRUITS_PATH.'gui/ADCoreGui.php'); $form = new ADForm(); $form->add(new ADLabeledField('User:', new ADTextField('name', '', 8, 8))); $form->add(new ADLabeledField('Pwd:', new ADTextField('pass', '', 8, 8))); $form->add(new ADSubmit('login', 'login')); echo $form->render('ADSimpleRender'); ?>;
the code below shows a typical login form.