Advertisement
Guest User

code

a guest
Nov 14th, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.52 KB | None | 0 0
  1. <?php
  2. /*
  3. PLUGIN NAME: Easy Contact
  4. PLUGIN URI: http://www.plaintxt.org/experiments/easy-contact/
  5. DESCRIPTION: Easy Contact is a simple, semantic contact form that utilizes the <a href="http://www.plaintxt.org/themes/sandbox/">Sandbox</a> design patterns. Insert using <code>[easy-contact]</code>. A plaintxt.org experiment for WordPress.
  6. AUTHOR: Scott Allan Wallick
  7. AUTHOR URI: http://scottwallick.com/
  8. VERSION: 0.1.2 &beta;
  9. */
  10.  
  11. /*
  12. EASY CONTACT
  13. by SCOTT ALLAN WALLICK, http://scottwallick.com/
  14. from PLAINTXT.ORG, http://www.plaintxt.org/
  15.  
  16. EASY CONTACT is free software: you can redistribute it and/or
  17. modify it under the terms of the GNU General Public License as
  18. published by the Free Software Foundation, either version 3 of
  19. the License, or (at your option) any later version.
  20.  
  21. EASY CONTACT is distributed in the hope that it will be useful,
  22. but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. GNU General Public License for details.
  25.  
  26. You should have received a copy of the GNU General Public License
  27. along with EASY CONTACT. If not, see www.gnu.org/licenses/.
  28. */
  29.  
  30. // We begin by stating our initial form inputs, cleaning values if the form data is coming back at us
  31. $ec_form_fields = array(
  32. 'name' => '<input id="ec_name" name="ec_name" class="text required" type="text" value="' . strip_tags(stripslashes($_POST['ec_name'])) . '" size="30" maxlength="50" />',
  33. 'email' => '<input id="ec_email" name="ec_email" class="text required" type="text" value="' . strip_tags(stripslashes($_POST['ec_email'])) . '" size="30" maxlength="50" />',
  34. 'url' => '<input id="ec_url" name="ec_url" class="text optional" type="text" value="' . strip_tags(stripslashes($_POST['ec_url'])) . '" size="30" maxlength="50" />',
  35. 'subject' => '<input id="ec_subject" name="ec_subject" class="text required" type="text" value="' . strip_tags(stripslashes($_POST['ec_subject'])) . '" size="30" maxlength="50" />',
  36. 'message' => '<textarea id="ec_message" name="ec_message" class="text required" cols="40" rows="8">' . strip_tags(stripslashes($_POST['ec_message'])) . '</textarea>',
  37. 'math_a' => '<input id="ec_math_a" name="ec_math_a" class="text required" type="text" value="" size="30" maxlength="50" />',
  38. 'challenge_a' => '<input id="ec_challenge_a" name="ec_challenge_a" class="text required" type="text" value="" size="30" maxlength="50" />',
  39. 'option_cc' => '<input id="ec_option_cc" name="ec_option_cc" class="check optional" type="checkbox" value="true" />',
  40. 'error' => ''
  41. );
  42. // Tracks and validates our challenge question
  43. function ec_is_challenge($input) {
  44. $is_challenge = false;
  45. // Let's make the user response case insensitive
  46. $answer = strtolower(stripslashes(get_option('ec_challenge_a')));
  47. $input = strtolower($input);
  48. if ( $input == $answer ) {
  49. // Do we have a winner?
  50. $is_challenge = true;
  51. }
  52. return $is_challenge;
  53. }
  54. // We should respond appropriately to malicious code in our form
  55. function ec_is_malicious($input) {
  56. $is_malicious = false;
  57. // Content we will consider malicious to check for
  58. $bad_inputs = array( "\r", "\n", "mime-version", "content-type", "bcc:", "cc:", "to:", "<", ">", "&lt;", "&rt;", "a href", "/a", "http:", "/URL", "URL=" );
  59. // And if we have some nasty input . . .
  60. foreach ( $bad_inputs as $bad_input ) {
  61. if ( strpos(strtolower($input), strtolower($bad_input) ) !== false ) {
  62. $is_malicious = true;
  63. // Boom!
  64. break;
  65. }
  66. }
  67. // Houston, we have a problem.
  68. return $is_malicious;
  69. }
  70. // Get the user IP for tracking
  71. function ec_get_ip() {
  72. if ( isset($_SERVER) ) {
  73. if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'])) {
  74. $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
  75. } elseif ( isset( $_SERVER['HTTP_CLIENT_IP'])) {
  76. $ip_address = $_SERVER['HTTP_CLIENT_IP'];
  77. } else {
  78. $ip_address = $_SERVER['REMOTE_ADDR'];
  79. }
  80. } else {
  81. if ( getenv('HTTP_X_FORWARDED_FOR') ) {
  82. $ip_address = getenv('HTTP_X_FORWARDED_FOR');
  83. } elseif ( getenv('HTTP_CLIENT_IP') ) {
  84. $ip_address = getenv('HTTP_CLIENT_IP');
  85. } else {
  86. $ip_address = getenv('REMOTE_ADDR');
  87. }
  88. }
  89. // Return the IP address
  90. return $ip_address;
  91. }
  92. // If refered from a search query, we'd like to know
  93. function ec_get_query($query) {
  94. if ( strpos( $query, "google." ) ) {
  95. $pattern = '/^.*\/search\?.*q=(.*)$/';
  96. } elseif ( strpos( $query, "msn." ) || strpos( $query, "live" ) ) {
  97. $pattern = '/^.*q=(.*)$/';
  98. } elseif ( strpos( $query, "yahoo." ) ) {
  99. $pattern = '/^.*[\?&]p=(.*)$/';
  100. } elseif ( strpos( $query, "ask." ) ) {
  101. $pattern = '/^.*[\?&]q=(.*)$/';
  102. } else {
  103. return false;
  104. }
  105. preg_match( $pattern, $query, $matches );
  106. $querystr = substr( $matches[1], 0, strpos( $matches[1], '&' ) );
  107. return urldecode($querystr);
  108. }
  109. // Tracks the session for (potential) form submission
  110. function ec_session_referer($unused) {
  111. if ( !isset( $_SESSION ) ) {
  112. session_start();
  113. }
  114. if ( !isset( $_SESSION['orig_referer'])) {
  115. $_SESSION['orig_referer'] = $_SERVER['HTTP_REFERER'];
  116. }
  117. }
  118. // Process input from the form
  119. function ec_check_input() {
  120. // Let's break the form if something dodgy is happening
  121. if ( !( isset( $_POST['ec_stage'])) ) {
  122. // Break if form data wasn't submitted from our page
  123. return false;
  124. } elseif ( !( isset( $_POST['ec_orig_referer'])) ) {
  125. // Break if form data wasn't submitted from our page
  126. return false;
  127. }
  128. // Keep our form data clean
  129. $_POST['ec_name'] = stripslashes(trim($_POST['ec_name']));
  130. $_POST['ec_email'] = stripslashes(trim($_POST['ec_email']));
  131. $_POST['ec_url'] = stripslashes(trim($_POST['ec_url']));
  132. $_POST['ec_subject'] = stripslashes(trim($_POST['ec_subject']));
  133. $_POST['ec_message'] = stripslashes(trim($_POST['ec_message']));
  134. // Carry over the form data
  135. global $ec_form_fields;
  136. // Clear any prior errors
  137. $proceed = true;
  138. // Do not proceed reasons
  139. // 1: empty field
  140. // 2: invalid email
  141. // 3: incorrect answer
  142. // 4: malicious code
  143. // Check the name input for problems.
  144. if ( empty($_POST['ec_name'] )) {
  145. $proceed = false;
  146. $reason = 1;
  147. $ec_form_fields['name'] = '<input id="ec_name" name="ec_name" class="text required error" type="text" value="' . $_POST['ec_name'] . '" size="30" maxlength="20" />';
  148. }
  149. // Check the e-mail input for problems.
  150. if ( !is_email($_POST['ec_email'])) {
  151. $proceed = false;
  152. $reason = 2;
  153. $ec_form_fields['email'] = '<input id="ec_email" name="ec_email" class="text required error" type="text" value="' . $_POST['ec_email'] . '" size="30" maxlength="50" />';
  154. }
  155. // Check the subject input for problems.
  156. if ( empty($_POST['ec_subject'])) {
  157. $proceed = false;
  158. $reason = 1;
  159. $ec_form_fields['subject'] = '<input id="ec_subject" name="ec_subject" class="text required error" type="text" value="' . $_POST['ec_subject'] . '" size="30" maxlength="50" />';
  160. }
  161. // Check the message input for problems.
  162. if ( empty( $_POST['ec_message'])) {
  163. $proceed = false;
  164. $reason = 1;
  165. $ec_form_fields['message'] = '<textarea id="ec_message" name="ec_message" class="text required error" cols="40" rows="8">' . $_POST['ec_message'] . '</textarea>';
  166. }
  167. // Do we have a spam-reduction option enabled?
  168. $option_verf = get_option('ec_option_verf');
  169. // We're using a challenge question, so check its answer
  170. if ( $option_verf == 2 || $option_verf == 4 ) {
  171. if ( !ec_is_challenge($_POST['ec_challenge_a']) ) {
  172. $proceed = false;
  173. $reason = 3;
  174. }
  175. }
  176. // We're using a math-based question, so check its answer
  177. if ( $option_verf == 3 || $option_verf == 4 ) {
  178. if ( $_SESSION['check_math'] != $_POST['ec_math_a'] ) {
  179. $proceed = false;
  180. $reason = 3;
  181. }
  182. }
  183. // Check the input for any malicious code
  184. if ( ec_is_malicious( $_POST['ec_name'] ) || ec_is_malicious( $_POST['ec_email'] ) || ec_is_malicious( $_POST['ec_subject'])) {
  185. $proceed = false;
  186. $reason = 4;
  187. }
  188. // Now we see if we have a problem
  189. if ( $proceed == true ) {
  190. // No problem? Move along.
  191. return true;
  192. } else {
  193. // A problem? Give an appropriate response message.
  194. if ( $reason == 1 ) {
  195. $ec_form_fields['error'] = get_option('ec_msg_empty');
  196. } elseif ( $reason == 2 ) {
  197. $ec_form_fields['error'] = get_option('ec_msg_invalid');
  198. } elseif ( $reason == 3 ) {
  199. $ec_form_fields['error'] = get_option('ec_msg_incorrect');
  200. } elseif ( $reason == 4 ) {
  201. $ec_form_fields['error'] = get_option('ec_msg_malicious');
  202. }
  203. // If we have an error, but no corresponding message, something has gone wrong. Let's break the process
  204. return false;
  205. }
  206. }
  207. // Finds [easy-contact] shortcode and produces the form in the content
  208. function ec_shortcode($attr) {
  209. global $ec_form_fields;
  210. // If we're processing $POST data without a problem, let's send an email
  211. if ( ec_check_input() ) {
  212. // Let's get some variables we're going to use multiple times
  213. $cc_option = get_option('ec_option_cc');
  214. $recipient = attribute_escape(get_option('ec_recipient_name')) . ' <' . attribute_escape(get_option('ec_recipient_email')) . '>';
  215. $user = strip_tags(trim($_POST['ec_name'])) . ' <' . strip_tags(trim($_POST['ec_email'])) . '>';
  216. $orig_referer = strip_tags(trim($_POST['ec_orig_referer']));
  217. $keywords = ec_get_query($orig_referer);
  218. // Start our email with its headers
  219. $headers = "MIME-Version: 1.0\r\n";
  220. // Our form has to match the encoding the user is typing it in, i.e., your blog charset
  221. $headers .= 'Content-Type: text/plain; charset="' . get_option('blog_charset') . "\"\r\n";
  222. // Our generic mailer-daemon is just going to be WordPress@EXAMPLE.COM, where EXAMPLE.COM is your domain in lowercase
  223. $sitename = strtolower($_SERVER['SERVER_NAME']);
  224. // If we have the www., let's drop it safely
  225. if ( substr( $sitename, 0, 4 ) == 'www.' ) {
  226. $sitename = substr( $sitename, 4 );
  227. }
  228. // Our from email address
  229. $from_email = apply_filters( "wp_mail_from", "wordpress@$sitename" );
  230. // Our from email name
  231. $from_name = apply_filters( 'wp_mail_from_name', 'WordPress' );
  232. // And we begin the headers
  233. $headers .= "From: $from_name <$from_email>\r\n";
  234. $headers .= "Reply-To: $user\r\n";
  235. // Since we allow CC'ing, we can smartly only send one email
  236. if ( $cc_option && $_POST['ec_option_cc'] ) {
  237. // If CC'ing, we'll BCC: you and TO: the user.
  238. $to = $user;
  239. $headers .= "Bcc: $recipient\r\n";
  240. } else {
  241. // If no, just TO: you.
  242. $to = $recipient;
  243. }
  244. // We should include X data for the mailer version
  245. $headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";
  246. // Build our subject line fo the email
  247. $subject = attribute_escape(get_option('ec_subject')) . ' ' . $_POST['ec_subject'];
  248. // And our actual message with extra stuff
  249. $message = strip_tags(trim($_POST['ec_message'])) . "\n\n---\n";
  250. $message .= __( 'Website: ', 'easy_contact' ) . strip_tags(trim($_POST['ec_url'])) . "\n\n---\n";
  251. $message .= __( 'IP address: ', 'easy_contact' ) . 'http://ws.arin.net/whois/?queryinput=' . ec_get_ip() . "\n";
  252. // Don't show keywords in the email unless we have some
  253. if ($keywords) {
  254. $message .= __( 'Keywords: ', 'easy_contact' ) . $keywords . "\n";
  255. }
  256. $message .= __( 'Form referrer: ', 'easy_contact' ) . strip_tags(trim($_POST['ec_referer'])) . "\n";
  257. $message .= __( 'Orig. referrer: ', 'easy_contact' ) . $orig_referer . "\n";
  258. $message .= __( 'User agent: ', 'easy_contact' ) . trim($_SERVER['HTTP_USER_AGENT']) . "\n";
  259. // Let's build our email and send it
  260. mail( $to, $subject, $message, $headers );
  261. // And then build the response message output for the user
  262. $output = "\n" . '<div class="formcontainer">' . "\n\t" . stripslashes(get_option('ec_msg_success')) . "\n</div>";
  263. // Returns the success message to the user
  264. return $output;
  265. // Otherwise, let's build us a form
  266. } else {
  267. // We begin our form.
  268. $form = '<div class="formcontainer">';
  269. // If we have an error, display it
  270. if ( $ec_form_fields['error'] != null ) {
  271. // Display an error message first. (We're applying our own easy_contact_text filter to prettify the message.)
  272. $form .= "\n\t" . apply_filters( 'easy_contact_text', stripslashes($ec_form_fields['error']) );
  273. } else {
  274. // Otherwise, display the intro message. (Also, filter this too.)
  275. $form .= "\n\t" . apply_filters( 'easy_contact_text', stripslashes(get_option('ec_msg_intro')) );
  276. }
  277. // Gather variables for multiple uses
  278. $required = stripslashes(get_option('ec_text_required'));
  279. $option_verf = get_option('ec_option_verf');
  280. // And continuing with our form
  281. $form .= '
  282. <form class="contact-form" action="' . get_permalink() . '" method="post">
  283. <fieldset>
  284. <legend>' . attribute_escape(get_option('ec_field_info')) . '</legend>
  285. <div class="form-label"><label for="ec_name">' . stripslashes(wp_filter_post_kses(get_option('ec_label_name'))) . ' ' . $required . '</label></div>
  286. <div class="form-input">' . $ec_form_fields['name'] . '</div>
  287. <div class="form-label"><label for="ec_email">' . stripslashes(wp_filter_post_kses(get_option('ec_label_email'))) . ' ' . $required . '</label></div>
  288. <div class="form-input">' . $ec_form_fields['email'] . '</div>
  289. <div class="form-label"><label for="ec_url">' . stripslashes(wp_filter_post_kses(get_option('ec_label_website'))) . '</label></div>
  290. <div class="form-input">' . $ec_form_fields['url'] . '</div>
  291. </fieldset>
  292. <fieldset>
  293. <legend>' . attribute_escape(get_option('ec_field_message')) . '</legend>
  294. <div class="form-label"><label for="ec_subject">' . stripslashes(wp_filter_post_kses(get_option('ec_label_subject'))) . ' ' . $required . '</label></div>
  295. <div class="form-input">' . $ec_form_fields['subject'] . '</div>
  296. <div class="form-label"><label for="ec_message">' . stripslashes(wp_filter_post_kses(get_option('ec_label_message'))) . ' ' . $required . '</label></div>
  297. <div class="form-textarea">' . $ec_form_fields['message'] . '</div>
  298. </fieldset>
  299. <fieldset>
  300. <legend>' . attribute_escape(get_option('ec_field_confirm')) . '</legend>';
  301. // If employing a spam-reduction question, insert it
  302. if ( $option_verf > 1 ) {
  303. if ( $option_verf == 2 || $option_verf == 4 ) {
  304. $form .= '
  305. <div class="form-label"><label for="ec_challenge_a">' . apply_filters( 'easy_contact_text', stripslashes(wp_filter_post_kses(get_option('ec_challenge_q'))) ) . ' ' . $required . '</label></div>
  306. <div class="form-input">' . $ec_form_fields['challenge_a'] . '</div>';
  307. }
  308. if ( $option_verf == 3 || $option_verf == 4 ) {
  309. // Big number is between 1 and 1,000.
  310. $big = rand( 1, 1000 );
  311. // Small number is between 1 and 10.
  312. $small = rand( 1, 10 );
  313. // We need to remember this session to validate the answer
  314. $_SESSION['check_math'] = $big+$small;
  315. $form .= '
  316. <div class="form-label"><label for="ec_math_a">' . __( "What is the sum of $big and $small?", "easy_contact" ) . ' ' . $required . '</label></div>
  317. <div class="form-input">' . $ec_form_fields['math_a'] . '</div>';
  318. }
  319. }
  320. // If the user can CC themselves, give them a box to tick
  321. if ( get_option('ec_option_cc') == true ) {
  322. $form .= '
  323. <div class="form-option">' . $ec_form_fields['option_cc'] . ' <label for="ec_option_cc">' . apply_filters( 'easy_contact_text', stripslashes(wp_filter_post_kses(get_option('ec_label_cc'))) ) . '</label></div>';
  324. }
  325. // Let's finish up with this form.
  326. $form .= '
  327. <div class="form-submit">
  328. <input type="submit" name="submit" class="button" value="' . attribute_escape(get_option('ec_text_submit')) . '" />
  329. <input type="hidden" name="ec_stage" value="process" />
  330. <input type="hidden" name="ec_referer" value="' . wp_specialchars( $_SERVER['HTTP_REFERER'], 1 ) . '" />
  331. <input type="hidden" name="ec_orig_referer" value="' . wp_specialchars( $_SESSION['orig_referer'], 1 ) . '" />
  332. </div>
  333. </fieldset>
  334. </form>
  335. </div>';
  336. // The output is the form.
  337. $output = $form;
  338. // So output it.
  339. return $output;
  340. }
  341. }
  342. // Add default options upon activation
  343. function ec_activation() {
  344. // A default setting, load the admin email
  345. $new_opt = get_bloginfo('admin_email');
  346. add_option( "ec_recipient_email", "$new_opt", "", "yes" );
  347. // A default setting, use the blog name for the subject line
  348. $new_opt = get_bloginfo('Max Cleaning Service');
  349. add_option( "ec_subject", "[$new_opt]", "", "yes" );
  350. add_option( 'ec_challenge_a', __( 'Paris', 'easy_contact' ), '', 'yes' );
  351. add_option( 'ec_challenge_q', __( 'What is the capital of France?', 'easy_contact' ), '', 'yes' );
  352. add_option( 'ec_field_confirm', __( 'Bevestiging', 'easy_contact' ), '', 'yes' );
  353. add_option( 'ec_field_info', __( 'Uw gegevens', 'easy_contact' ), '', 'yes' );
  354. add_option( 'ec_field_message', __( 'Uw bericht', 'easy_contact' ), '', 'yes' );
  355. add_option( 'ec_label_cc', __( 'Kopie naar uzelf sturen?', 'easy_contact' ), '', 'yes' );
  356. add_option( 'ec_label_email', __( 'Email', 'easy_contact' ), '', 'yes' );
  357. add_option( 'ec_label_message', __( 'Bericht', 'easy_contact' ), '', 'yes' );
  358. add_option( 'ec_label_name', __( 'Naam', 'easy_contact' ), '', 'yes' );
  359. add_option( 'ec_label_subject', __( 'Onderwerp', 'easy_contact' ), '', 'yes' );
  360. add_option( 'ec_msg_empty', __( '<p class="error">Vul alsjeblieft alle velden correct in.</p>', 'easy_contact' ), '', 'yes' );
  361. add_option( 'ec_msg_incorrect', __( '<p class="important">Your answer is incorrect. <em>Cookies must be enabled to validate your response.</em></p>', 'easy_contact' ), '', 'yes' );
  362. add_option( 'ec_msg_intro', __( '<p class="information">Verplichte velden zijn gemarkeerd.<span class="required">*</span>.</p>', 'easy_contact' ), '', 'yes' );
  363. add_option( 'ec_msg_invalid', __( '<p class="error">Please provide a valid email address.</p>', 'easy_contact' ), '', 'yes' );
  364. add_option( 'ec_msg_malicious', __( '<p class="important">Potentially malicious content was detected. You may not use <abbr title="HyperText Markup Language">HTML</abbr> or other code, including <code>&lt;</code> and <code>&gt;</code>.</p>', 'easy_contact' ), '', 'yes' );
  365. add_option( 'ec_msg_success', __( '<p class="success">Bedankt, uw email is verzonden.</p>', 'easy_contact' ), '', 'yes' );
  366. add_option( 'ec_option_cc', true, '', 'yes' );
  367. add_option( 'ec_option_verf', 1, '', 'yes' );
  368. add_option( 'ec_recipient_name', __( 'Administrator', 'easy_contact' ), '', 'yes' );
  369. add_option( 'ec_text_required', __( '<span class="required">*</span>', 'easy_contact' ), '', 'yes' );
  370. add_option( 'ec_text_submit', __( 'Verzend', 'easy_contact' ), '', 'yes' );
  371. }
  372. // Delete options upon deactivation
  373. function ec_deactivation() {
  374. delete_option('ec_challenge_a');
  375. delete_option('ec_challenge_q');
  376. delete_option('ec_field_confirm');
  377. delete_option('ec_field_info');
  378. delete_option('ec_field_message');
  379. delete_option('ec_label_cc');
  380. delete_option('ec_label_email');
  381. delete_option('ec_label_message');
  382. delete_option('ec_label_name');
  383. delete_option('ec_label_subject');
  384. delete_option('ec_label_website');
  385. delete_option('ec_msg_empty');
  386. delete_option('ec_msg_incorrect');
  387. delete_option('ec_msg_intro');
  388. delete_option('ec_msg_invalid');
  389. delete_option('ec_msg_malicious');
  390. delete_option('ec_msg_success');
  391. delete_option('ec_option_cc');
  392. delete_option('ec_option_stylesheet');
  393. delete_option('ec_option_stylesheet_page');
  394. delete_option('ec_option_verf');
  395. delete_option('ec_recipient_email');
  396. delete_option('ec_recipient_name');
  397. delete_option('ec_subject');
  398. delete_option('ec_text_required');
  399. delete_option('ec_text_submit');
  400. delete_option('ec_version');
  401. }
  402. // Adds our options submenu
  403. function ec_initialize() {
  404. // But only if that function actually exists
  405. if ( function_exists('add_options_page') ) {
  406. // We'll use a longer title for the TITLE element and a shorter one for the options page link
  407. add_options_page( __( 'Easy Contact', 'easy_contact' ), __( 'Contact', 'easy_contact' ), 'manage_options', 'easy-contact/econtact-menu.php', '' );
  408. }
  409. }
  410. // Initialize the session referer to track users
  411. add_action( 'init', 'ec_session_referer' );
  412. // Register the shortcode to the function ec_shortcode()
  413. add_shortcode( 'easy-contact', 'ec_shortcode' );
  414. // Register hooks for activation/deactivation. (I'm tidy.)
  415. register_activation_hook( __FILE__, 'ec_activation' );
  416. register_deactivation_hook( __FILE__, 'ec_deactivation' );
  417. // Allow localization, if applicable
  418. load_plugin_textdomain( 'easy_contact', false, 'easy-contact' );
  419. // Register the options menu
  420. add_action( 'admin_menu', 'ec_initialize' );
  421. // Let's filter certain text in the form to help make it pretty
  422. add_filter( 'easy_contact_text', 'wptexturize' );
  423. add_filter( 'easy_contact_text', 'convert_chars' );
  424. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement