Esempio n. 1
0
 /**
 * Add a honeypot field to a form 
 *
 * We need to display an input field that is hidden from the normal user by display: none;
 * This may be completed by the spam bot since it thinks it's a field to complete.
 
 		<p class="th_rh_name_field">
 			<label for="th_rh_name"><?php _e( 'Only fill in if you are not human', 'registration-honeypot' ); ?></label><br />
 			<input type="text" name="th_rh_name" id="th_rh_name" class="input" value="" size="25" autocomplete="off" /></label>
 		</p>
 */
 function oik_honeypot_add_honeypot()
 {
     $field_name = oik_honeypot_field_name();
     //span( "label $field_name" );
     //e( "Humans leave this blank" );
     //epan();
     stag("div", null, null, kv("style", "display:none"));
     bw_textfield($field_name, 10, "Humans leave this blank", "");
     etag("div");
 }
Esempio n. 2
0
 /**
  * Create a textfield for an array options field 
  *
  * @param string $name field name
  * @param string $text field label
  * @param array $array 
  * @param integer $index
  * @param integer $len
  * @param string $class
  * @param string $extras
  */
 function bw_textfield_arr($name, $text, $array, $index, $len, $class = null, $extras = null)
 {
     $name_index = $name . '[' . $index . ']';
     $value = bw_array_get($array, $index, NULL);
     bw_textfield($name_index, $len, $text, $value, $class, $extras);
 }
Esempio n. 3
0
 /**
  * Display the edit settings form
  */
 function oik_plugins_edit_settings()
 {
     global $bw_plugin;
     bw_form();
     stag("table", "wide-fat");
     bw_tablerow(array("plugin", $bw_plugin['plugin'] . ihidden('plugin', $bw_plugin['plugin'])));
     bw_textfield("server", 100, "server", stripslashes($bw_plugin['server']));
     bw_textfield("apikey", 26, "apikey?", $bw_plugin["apikey"]);
     etag("table");
     p(isubmit("_oik_plugins_edit_settings", "Change plugin", null, "button-primary"));
     etag("form");
 }
Esempio n. 4
0
/**
 * Display the form to accept the input
 * 
 * to compare filter logic output
 */
function trac_29608_form($value)
{
    oik_require("bobbforms.inc");
    e("<!--notext:-->");
    bw_form();
    stag("table");
    bw_textarea("input_29608", 100, "Input", $value);
    bw_checkbox("autop", "Perform wpautop processing", trac_29608_get_field("autop"));
    bw_textfield("limit", 6, "Performance test iterations", trac_29608_get_field("limit"));
    etag("table");
    e(wp_nonce_field("_29608_form", "_29608_nonce", false));
    p(isubmit("_filter_29608", __("Filter")));
    etag("form");
    e("<!--dotext:-->");
}