Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated meta data

  • Loading branch information...
commit 185b5bf7dd9351ad4366822377eb3e2f24de486f 1 parent 9c401d0
@alanhogan authored
View
184 README.txt
@@ -1,92 +1,92 @@
-=== Contact Form 8 ===
-Contributors: takayukister
-Donate link: http://pledgie.com/campaigns/3117
-Tags: contact, contact form, email, ajax, captcha, akismet
-Requires at least: 2.7
-Tested up to: 2.9-rare
-Stable tag: 2.0.1
-
-License: GPL?
-
-A fork of Contact Form 7, Contact Form 8 improves things like checkboxes (labels!).
-
-== Description ==
-
-Just another contact form plugin. Simple but flexible.
-
-Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.
-
-**Note: Contact Form 7's CAPTCHA module has been separated as [Really Simple CAPTCHA](http://wordpress.org/extend/plugins/really-simple-captcha/) plugin. Now you need to install it if you use CAPTCHA. If you don't, you can use as in the past.**
-
-Since being published in August 2007, Contact Form 7 has been translated into a number of languages. Our thanks and appreciation must go to the following for their contributions:
-
-* Albanian (sq) - [Olgi Zenullari](http://www.olgizenullari.com/)
-* Arabic (ar) - [Tarek Chaaban](http://www.chaaban.info/) and Muhammed Lardi
-* Bangla (bn_BD) - [SM Mehdi Akram](http://www.shamokaldarpon.com/)
-* Bosnian (bs) - [Vedran](http://www.seorabbit.com/)
-* Brazilian Portuguese (pt_BR) - [Leonardo Pinheiro](http://www.eletrikabarbarella.com.br/) (updated by [Henrique Vianna](http://henriquevianna.com/))
-* Bulgarian (bg_BG) - [Iliyan Darganov](http://www.darganov.com/)
-* Catalan (ca_ES) - [Jordi Sancho](http://www.qasolutions.net/blog)
-* Chinese, Simplified (zh_CN) - [Soz](http://www.webtoolol.com/)
-* Chinese, Traditional (zh_TW) - [James Wu](http://jameswublog.com)
-* Croatian (hr) - [tolingo Translation Services](http://www.tolingo.com)
-* Czech (cs_CZ) - Korry
-* Danish (da_DK) - [Jens Griebel](http://www.kompas-it.dk/) (updated by [Georg S. Adamsen](http://wordpress.blogos.dk/))
-* Dutch (nl_NL) - [Chris Devriese](http://www.100it.be/) (updated by [Martin Hein](http://www.split-a-pixel.nl/))
-* Estonian (et) - [Peeter Rahuvarm](http://www.kraabus.ee)
-* Finnish (fi) - [Miika Turunen](http://www.webwork.fi/)
-* French (fr_FR) - [Jillij](http://www.jillij.com/) (updated by [Maître Mô](http://maitremo.fr/))
-* Georgian (ka_GE) - [Nodar Davituri](http://omedia.ge/)
-* German (de_DE) - [Marcel Spitau](http://blog.spitau.de) (updated by [Ivan Graf](http://blog.bildergallery.com/))
-* Greek (el) - [Nick Mouratidis](http://www.kepik.gr/) (updated by [Pr. friedlich](http://friedlich.wordpress.com/))
-* Hebrew (he_IL) - [Yaron Ofer](http://www.gadgetguru.co.il/)
-* Hindi (hi_IN) - [Tarun Joshi](http://www.readers-cafe.net/)
-* Hungarian (hu_HU) - [Andras Hirschler](http://hia.itblog.hu/)
-* Indonesian (id_ID) - [Hendry Lee](http://blogbuildingu.com/)
-* Italian (it_IT) - [Bruno](http://www.brunosalzano.com) (updated by [Gianni Diurno](http://gidibao.net/))
-* Japanese (ja) - [Takayuki Miyoshi](http://ideasilo.wordpress.com) (plugin author)
-* Korean (ko_KR) - Seong Eun Lee (updated by [Jong-In Kim](http://incommunity.codex.kr/wordpress/))
-* Latvian (lv) - [Sandis Veinbergs](http://www.kleofass.lv/)
-* Norwegian (nb_NO) - Kjetil M. Bergem
-* Persian (Farsi; fa_IR) - [Mohammad Musavi](http://www.musavis.com/)
-* Polish (pl_PL) - [Zbigniew Czernik](http://zibik.jogger.pl/)
-* Portuguese (pt_PT) - [Hugo Baeta](http://hugobaeta.com)
-* Russian (ru_RU) - [Dmitry Volotovich](http://www.volnov.com)
-* Romanian (ro_RO) - [Stas Sushkov](http://stas.nerd.ro/)
-* Serbian (sr_RS) - [Vedran](http://www.seorabbit.com/)
-* Slovak (sk) - [Patrik Bóna](http://www.mrhead.sk/)
-* Slovene (sl_SI) - [Mihael Simonič](http://smihael.bplaced.net)
-* Spanish (es_ES) - [Jordi Sancho](http://www.qasolutions.net/blog)
-(updated by [Vladimir Prieto](http://vladimir.prie.to/), [Federico Mikaelian](http://www.fedemika.com.ar/) and [Matias Baldanza](http://matiasbaldanza.com/))
-* Swedish (sv_SE) - [Fredrik Jonsson](http://www.fredda-o-ac.se/) (updated by [the Swedish community](http://wp-support.se/))
-* Turkish (tr_TR) - [Roman Neumuller](http://katpatuka.wordpress.com) (updated by [Hasan Yılmaz](http://hedefturkce.com/))
-* Ukrainian (uk_UA) - [Andrey Kovba](http://myserver.com.ua/)
-* Vietnamese (vi) - Thanh Hải, Hà
-
-If you have created your own language pack, or have an update of an existing one, you can send [gettext .po and .mo files](http://codex.wordpress.org/Translating_WordPress) to me so that I can bundle it into Contact Form 7.
-
-== Installation ==
-
-1. Upload the entire `contact-form-7` folder to the `/wp-content/plugins/` directory.
-1. Activate the plugin through the 'Plugins' menu in WordPress.
-
-You will find 'Contact' menu in your WordPress admin panel.
-
-For basic usage, you can also have a look at the [plugin homepage](http://ideasilo.wordpress.com/2007/04/30/contact-form-7/) and [FAQ](http://ideasilo.wordpress.com/2008/03/29/contact-form-7-faq/).
-
-== Frequently Asked Questions ==
-
-Please see [FAQ](http://ideasilo.wordpress.com/2008/03/29/contact-form-7-faq/).
-
-If you have any further questions,
-please submit them [to the support forum](http://wordpress.org/tags/contact-form-7#postform).
-
-Attention: [Check your site before reporting trouble, please!](http://ideasilo.wordpress.com/2009/01/20/check-your-site-before-reporting-trouble-please/)
-
-== Screenshots ==
-
-1. screenshot-1.png
-
-== Changelog ==
-
-[See change logs in author's blog.](http://ideasilo.wordpress.com/tag/contact-form-7/)
+=== Contact Form 8 ===
+Contributors: takayukister
+Donate link: http://pledgie.com/campaigns/3117
+Tags: contact, contact form, email, ajax, captcha, akismet
+Requires at least: 2.7
+Tested up to: 2.9-rare
+Stable tag: 2.0.1
+
+License: GPL?
+
+A fork of Contact Form 7, Contact Form 8 improves things like checkboxes (labels!).
+
+== Description ==
+
+Just another contact form plugin. Simple but flexible.
+
+Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.
+
+**Note: Contact Form 7's CAPTCHA module has been separated as [Really Simple CAPTCHA](http://wordpress.org/extend/plugins/really-simple-captcha/) plugin. Now you need to install it if you use CAPTCHA. If you don't, you can use as in the past.**
+
+Since being published in August 2007, Contact Form 7 has been translated into a number of languages. Our thanks and appreciation must go to the following for their contributions:
+
+* Albanian (sq) - [Olgi Zenullari](http://www.olgizenullari.com/)
+* Arabic (ar) - [Tarek Chaaban](http://www.chaaban.info/) and Muhammed Lardi
+* Bangla (bn_BD) - [SM Mehdi Akram](http://www.shamokaldarpon.com/)
+* Bosnian (bs) - [Vedran](http://www.seorabbit.com/)
+* Brazilian Portuguese (pt_BR) - [Leonardo Pinheiro](http://www.eletrikabarbarella.com.br/) (updated by [Henrique Vianna](http://henriquevianna.com/))
+* Bulgarian (bg_BG) - [Iliyan Darganov](http://www.darganov.com/)
+* Catalan (ca_ES) - [Jordi Sancho](http://www.qasolutions.net/blog)
+* Chinese, Simplified (zh_CN) - [Soz](http://www.webtoolol.com/)
+* Chinese, Traditional (zh_TW) - [James Wu](http://jameswublog.com)
+* Croatian (hr) - [tolingo Translation Services](http://www.tolingo.com)
+* Czech (cs_CZ) - Korry
+* Danish (da_DK) - [Jens Griebel](http://www.kompas-it.dk/) (updated by [Georg S. Adamsen](http://wordpress.blogos.dk/))
+* Dutch (nl_NL) - [Chris Devriese](http://www.100it.be/) (updated by [Martin Hein](http://www.split-a-pixel.nl/))
+* Estonian (et) - [Peeter Rahuvarm](http://www.kraabus.ee)
+* Finnish (fi) - [Miika Turunen](http://www.webwork.fi/)
+* French (fr_FR) - [Jillij](http://www.jillij.com/) (updated by [Maître Mô](http://maitremo.fr/))
+* Georgian (ka_GE) - [Nodar Davituri](http://omedia.ge/)
+* German (de_DE) - [Marcel Spitau](http://blog.spitau.de) (updated by [Ivan Graf](http://blog.bildergallery.com/))
+* Greek (el) - [Nick Mouratidis](http://www.kepik.gr/) (updated by [Pr. friedlich](http://friedlich.wordpress.com/))
+* Hebrew (he_IL) - [Yaron Ofer](http://www.gadgetguru.co.il/)
+* Hindi (hi_IN) - [Tarun Joshi](http://www.readers-cafe.net/)
+* Hungarian (hu_HU) - [Andras Hirschler](http://hia.itblog.hu/)
+* Indonesian (id_ID) - [Hendry Lee](http://blogbuildingu.com/)
+* Italian (it_IT) - [Bruno](http://www.brunosalzano.com) (updated by [Gianni Diurno](http://gidibao.net/))
+* Japanese (ja) - [Takayuki Miyoshi](http://ideasilo.wordpress.com) (plugin author)
+* Korean (ko_KR) - Seong Eun Lee (updated by [Jong-In Kim](http://incommunity.codex.kr/wordpress/))
+* Latvian (lv) - [Sandis Veinbergs](http://www.kleofass.lv/)
+* Norwegian (nb_NO) - Kjetil M. Bergem
+* Persian (Farsi; fa_IR) - [Mohammad Musavi](http://www.musavis.com/)
+* Polish (pl_PL) - [Zbigniew Czernik](http://zibik.jogger.pl/)
+* Portuguese (pt_PT) - [Hugo Baeta](http://hugobaeta.com)
+* Russian (ru_RU) - [Dmitry Volotovich](http://www.volnov.com)
+* Romanian (ro_RO) - [Stas Sushkov](http://stas.nerd.ro/)
+* Serbian (sr_RS) - [Vedran](http://www.seorabbit.com/)
+* Slovak (sk) - [Patrik Bóna](http://www.mrhead.sk/)
+* Slovene (sl_SI) - [Mihael Simonič](http://smihael.bplaced.net)
+* Spanish (es_ES) - [Jordi Sancho](http://www.qasolutions.net/blog)
+(updated by [Vladimir Prieto](http://vladimir.prie.to/), [Federico Mikaelian](http://www.fedemika.com.ar/) and [Matias Baldanza](http://matiasbaldanza.com/))
+* Swedish (sv_SE) - [Fredrik Jonsson](http://www.fredda-o-ac.se/) (updated by [the Swedish community](http://wp-support.se/))
+* Turkish (tr_TR) - [Roman Neumuller](http://katpatuka.wordpress.com) (updated by [Hasan Yılmaz](http://hedefturkce.com/))
+* Ukrainian (uk_UA) - [Andrey Kovba](http://myserver.com.ua/)
+* Vietnamese (vi) - Thanh Hải, Hà
+
+If you have created your own language pack, or have an update of an existing one, you can send [gettext .po and .mo files](http://codex.wordpress.org/Translating_WordPress) to me so that I can bundle it into Contact Form 7.
+
+== Installation ==
+
+1. Upload the entire `contact-form-7` folder to the `/wp-content/plugins/` directory.
+1. Activate the plugin through the 'Plugins' menu in WordPress.
+
+You will find 'Contact' menu in your WordPress admin panel.
+
+For basic usage, you can also have a look at the [plugin homepage](http://ideasilo.wordpress.com/2007/04/30/contact-form-7/) and [FAQ](http://ideasilo.wordpress.com/2008/03/29/contact-form-7-faq/).
+
+== Frequently Asked Questions ==
+
+Please see [FAQ](http://ideasilo.wordpress.com/2008/03/29/contact-form-7-faq/).
+
+If you have any further questions,
+please submit them [to the support forum](http://wordpress.org/tags/contact-form-7#postform).
+
+Attention: [Check your site before reporting trouble, please!](http://ideasilo.wordpress.com/2009/01/20/check-your-site-before-reporting-trouble-please/)
+
+== Screenshots ==
+
+1. screenshot-1.png
+
+== Changelog ==
+
+[See change logs in author's blog.](http://ideasilo.wordpress.com/tag/contact-form-7/)
View
678 admin/admin-panel.php
@@ -1,339 +1,339 @@
-<?php
-
-/* No table warning */
-if ( ! wpcf7_table_exists() ) {
- if ( current_user_can( 'activate_plugins' ) ) {
- $create_table_link_url = wpcf7_admin_url( 'admin.php', array( 'wpcf7-create-table' => 1 ) );
- $create_table_link_url = wp_nonce_url( $create_table_link_url, 'wpcf7-create-table' );
- $message = sprintf(
- __( '<strong>The database table for Contact Form 7 does not exist.</strong> You must <a href="%s">create the table</a> for it to work.', 'wpcf7' ),
- $create_table_link_url );
- } else {
- $message = __( "<strong>The database table for Contact Form 7 does not exist.</strong>", 'wpcf7' );
- }
-?>
- <div class="wrap">
- <?php screen_icon( 'edit-pages' ); ?>
- <h2><?php echo esc_html( __( 'Contact Form 7', 'wpcf7' ) ); ?></h2>
- <div id="message" class="updated fade">
- <p><?php echo $message; ?></p>
- </div>
- </div>
-<?php
- return;
-}
-
-?><div class="wrap wpcf7">
-
- <?php screen_icon( 'edit-pages' ); ?>
-
- <h2><?php echo esc_html( __( 'Contact Form 7', 'wpcf7' ) ); ?></h2>
-
- <?php wpcf7_donation_link(); ?>
-
- <?php if ( isset( $updated_message ) ) : ?>
- <div id="message" class="updated fade"><p><?php echo $updated_message; ?></p></div>
- <?php endif; ?>
-
- <ul class="subsubsub">
- <?php foreach ( $contact_forms as $v ) : ?>
- <li><a href="<?php echo wpcf7_admin_url( 'admin.php', array( 'contactform' => $v->id ) ); ?>"<?php if ( $v->id == $current ) echo ' class="current"'; ?>>
- <?php echo esc_html( $v->title ); ?></a> |</li>
- <?php endforeach; ?>
-
- <?php if ( wpcf7_admin_has_edit_cap() ) : ?>
- <li class="addnew"><a href="<?php echo wpcf7_admin_url( 'admin.php', array( 'contactform' => 'new' ) ); ?>"<?php if ( $unsaved ) echo ' class="current"'; ?>><?php echo esc_html( __( 'Add new', 'wpcf7' ) ); ?></a></li>
- <?php endif; ?>
- </ul>
-
- <br class="clear" />
-
-<?php if ( $cf ) : ?>
-<?php $disabled = ( wpcf7_admin_has_edit_cap() ) ? '' : ' disabled="disabled"'; ?>
-
-<form method="post" action="<?php echo wpcf7_admin_url( 'admin.php', array( 'contactform' => $current ) ); ?>" id="wpcf7-admin-form-element">
- <?php if ( wpcf7_admin_has_edit_cap() ) wp_nonce_field( 'wpcf7-save_' . $current ); ?>
- <input type="hidden" id="wpcf7-id" name="wpcf7-id" value="<?php echo $current; ?>" />
-
- <table class="widefat">
- <tbody>
- <tr>
- <td scope="col">
- <div style="position: relative;">
- <input type="text" id="wpcf7-title" name="wpcf7-title" size="40" value="<?php echo esc_attr( $cf->title ); ?>"<?php echo $disabled; ?> />
-
- <?php if ( ! $unsaved ) : ?>
- <p class="tagcode">
- <?php echo esc_html( __( "Copy this code and paste it into your post, page or text widget content.", 'wpcf7' ) ); ?><br />
-
- <input type="text" id="contact-form-anchor-text" onfocus="this.select();" readonly="readonly" />
- </p>
- <?php endif; ?>
-
- <?php if ( wpcf7_admin_has_edit_cap() ) : ?>
- <div class="save-contact-form">
- <input type="submit" class="button button-highlighted" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'wpcf7' ) ); ?>" />
- </div>
- <?php endif; ?>
-
- <?php if ( wpcf7_admin_has_edit_cap() && ! $unsaved ) : ?>
- <div class="actions-link">
- <?php $copy_nonce = wp_create_nonce( 'wpcf7-copy_' . $current ); ?>
- <input type="submit" name="wpcf7-copy" class="copy" value="<?php echo esc_attr( __( 'Copy', 'wpcf7' ) ); ?>"
- <?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; return true;\""; ?> />
- |
-
- <?php $delete_nonce = wp_create_nonce( 'wpcf7-delete_' . $current ); ?>
- <input type="submit" name="wpcf7-delete" class="delete" value="<?php echo esc_attr( __( 'Delete', 'wpcf7' ) ); ?>"
- <?php echo "onclick=\"if (confirm('" .
- esc_js( __( "You are about to delete this contact form.\n 'Cancel' to stop, 'OK' to delete.", 'wpcf7' ) ) .
- "')) {this.form._wpnonce.value = '$delete_nonce'; return true;} return false;\""; ?> />
- </div>
- <?php endif; ?>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
-
- <?php if ( wpcf7_admin_has_edit_cap() ) : ?>
-
- <table class="widefat" style="margin-top: 1em;">
- <thead><tr><th scope="col" colspan="2"><?php echo esc_html( __( 'Form', 'wpcf7' ) ); ?></th></tr></thead>
-
- <tbody>
- <tr>
-
- <td scope="col" style="width: 50%;">
- <div><textarea id="wpcf7-form" name="wpcf7-form" cols="100" rows="20"><?php echo esc_html( $cf->form ); ?></textarea></div>
- </td>
-
- <td scope="col" style="width: 50%;">
- <div id="tag-generator-div"></div>
- </td>
-
- </tr>
- </tbody>
- </table>
-
- <table class="widefat" style="margin-top: 1em;">
- <thead><tr><th scope="col" colspan="2"><?php echo esc_html( __( 'Mail', 'wpcf7' ) ); ?></th></tr></thead>
-
- <tbody>
- <tr>
- <td scope="col" style="width: 50%;">
-
- <div class="mail-field">
- <label for="wpcf7-mail-recipient"><?php echo esc_html( __( 'To:', 'wpcf7' ) ); ?></label><br />
- <input type="text" id="wpcf7-mail-recipient" name="wpcf7-mail-recipient" class="wide" size="70" value="<?php echo esc_attr( $cf->mail['recipient'] ); ?>" />
- </div>
-
- <div class="mail-field">
- <label for="wpcf7-mail-sender"><?php echo esc_html( __( 'From:', 'wpcf7' ) ); ?></label><br />
- <input type="text" id="wpcf7-mail-sender" name="wpcf7-mail-sender" class="wide" size="70" value="<?php echo esc_attr( $cf->mail['sender'] ); ?>" />
- </div>
-
- <div class="mail-field">
- <label for="wpcf7-mail-subject"><?php echo esc_html( __( 'Subject:', 'wpcf7' ) ); ?></label><br />
- <input type="text" id="wpcf7-mail-subject" name="wpcf7-mail-subject" class="wide" size="70" value="<?php echo esc_attr( $cf->mail['subject'] ); ?>" />
- </div>
-
- <div class="pseudo-hr"></div>
-
- <div class="mail-field">
- <label for="wpcf7-mail-additional-headers"><?php echo esc_html( __( 'Additional headers:', 'wpcf7' ) ); ?></label><br />
- <textarea id="wpcf7-mail-additional-headers" name="wpcf7-mail-additional-headers" cols="100" rows="2"><?php echo esc_html( $cf->mail['additional_headers'] ); ?></textarea>
- </div>
-
- <div class="mail-field">
- <label for="wpcf7-mail-attachments"><?php echo esc_html( __( 'File attachments:', 'wpcf7' ) ); ?></label><br />
- <input type="text" id="wpcf7-mail-attachments" name="wpcf7-mail-attachments" class="wide" size="70" value="<?php echo esc_attr( $cf->mail['attachments'] ); ?>" />
- </div>
-
- <div class="pseudo-hr"></div>
-
- <div class="mail-field">
- <input type="checkbox" id="wpcf7-mail-use-html" name="wpcf7-mail-use-html" value="1"<?php echo ( $cf->mail['use_html'] ) ? ' checked="checked"' : ''; ?> />
- <label for="wpcf7-mail-use-html"><?php echo esc_html( __( 'Use HTML content type', 'wpcf7' ) ); ?></label>
- </div>
-
- </td>
- <td scope="col" style="width: 50%;">
-
- <div class="mail-field">
- <label for="wpcf7-mail-body"><?php echo esc_html( __( 'Message body:', 'wpcf7' ) ); ?></label><br />
- <textarea id="wpcf7-mail-body" name="wpcf7-mail-body" cols="100" rows="16"><?php echo esc_html( $cf->mail['body'] ); ?></textarea>
- </div>
-
- </td>
- </tr>
- </tbody>
- </table>
-
- <table class="widefat" style="margin-top: 1em;">
- <thead><tr><th scope="col" colspan="2"><?php echo esc_html( __( 'Mail (2)', 'wpcf7' ) ); ?></th></tr></thead>
-
- <tbody>
- <tr>
- <td scope="col" colspan="2">
- <input type="checkbox" id="wpcf7-mail-2-active" name="wpcf7-mail-2-active" value="1"<?php echo ( $cf->mail_2['active'] ) ? ' checked="checked"' : ''; ?> />
- <label for="wpcf7-mail-2-active"><?php echo esc_html( __( 'Use mail (2)', 'wpcf7' ) ); ?></label>
- </td>
- </tr>
-
- <tr id="mail-2-fields">
- <td scope="col" style="width: 50%;">
-
- <div class="mail-field">
- <label for="wpcf7-mail-2-recipient"><?php echo esc_html( __( 'To:', 'wpcf7' ) ); ?></label><br />
- <input type="text" id="wpcf7-mail-2-recipient" name="wpcf7-mail-2-recipient" class="wide" size="70" value="<?php echo esc_attr( $cf->mail_2['recipient'] ); ?>" />
- </div>
-
- <div class="mail-field">
- <label for="wpcf7-mail-2-sender"><?php echo esc_html( __( 'From:', 'wpcf7' ) ); ?></label><br />
- <input type="text" id="wpcf7-mail-2-sender" name="wpcf7-mail-2-sender" class="wide" size="70" value="<?php echo esc_attr( $cf->mail_2['sender'] ); ?>" />
- </div>
-
- <div class="mail-field">
- <label for="wpcf7-mail-2-subject"><?php echo esc_html( __( 'Subject:', 'wpcf7' ) ); ?></label><br />
- <input type="text" id="wpcf7-mail-2-subject" name="wpcf7-mail-2-subject" class="wide" size="70" value="<?php echo esc_attr( $cf->mail_2['subject'] ); ?>" />
- </div>
-
- <div class="pseudo-hr"></div>
-
- <div class="mail-field">
- <label for="wpcf7-mail-2-additional-headers"><?php echo esc_html( __( 'Additional headers:', 'wpcf7' ) ); ?></label><br />
- <textarea id="wpcf7-mail-2-additional-headers" name="wpcf7-mail-2-additional-headers" cols="100" rows="2"><?php echo esc_html( $cf->mail_2['additional_headers'] ); ?></textarea>
- </div>
-
- <div class="mail-field">
- <label for="wpcf7-mail-2-attachments"><?php echo esc_html( __( 'File attachments:', 'wpcf7' ) ); ?></label><br />
- <input type="text" id="wpcf7-mail-2-attachments" name="wpcf7-mail-2-attachments" class="wide" size="70" value="<?php echo esc_attr( $cf->mail_2['attachments'] ); ?>" />
- </div>
-
- <div class="pseudo-hr"></div>
-
- <div class="mail-field">
- <input type="checkbox" id="wpcf7-mail-2-use-html" name="wpcf7-mail-2-use-html" value="1"<?php echo ( $cf->mail_2['use_html'] ) ? ' checked="checked"' : ''; ?> />
- <label for="wpcf7-mail-2-use-html"><?php echo esc_html( __( 'Use HTML content type', 'wpcf7' ) ); ?></label>
- </div>
-
- </td>
- <td scope="col" style="width: 50%;">
-
- <div class="mail-field">
- <label for="wpcf7-mail-2-body"><?php echo esc_html( __( 'Message body:', 'wpcf7' ) ); ?></label><br />
- <textarea id="wpcf7-mail-2-body" name="wpcf7-mail-2-body" cols="100" rows="16"><?php echo esc_html( $cf->mail_2['body'] ); ?></textarea>
- </div>
-
- </td>
- </tr>
- </tbody>
- </table>
-
- <table class="widefat" style="margin-top: 1em;">
- <thead><tr><th scope="col"><?php echo esc_html( __( 'Messages', 'wpcf7' ) ); ?> <span id="message-fields-toggle-switch"></span></th></tr></thead>
-
- <tbody>
- <tr>
- <td scope="col">
- <div id="message-fields">
-
- <div class="message-field">
- <label for="wpcf7-message-mail-sent-ok"><em># <?php echo esc_html( __( "Sender's message was sent successfully", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-mail-sent-ok" name="wpcf7-message-mail-sent-ok" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['mail_sent_ok'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-mail-sent-ng"><em># <?php echo esc_html( __( "Sender's message was failed to send", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-mail-sent-ng" name="wpcf7-message-mail-sent-ng" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['mail_sent_ng'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-akismet-says-spam"><em># <?php echo esc_html( __( "Akismet judged the sending activity as spamming", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-akismet-says-spam" name="wpcf7-message-akismet-says-spam" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['akismet_says_spam'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-validation-error"><em># <?php echo esc_html( __( "Validation errors occurred", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-validation-error" name="wpcf7-message-validation-error" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['validation_error'] ); ?>" />
- </div>
-
- <div class="message-field" style="margin-top: 1em;">
- <label for="wpcf7-message-invalid-required"><em># <?php echo esc_html( __( "There is a field that sender is needed to fill in", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-invalid-required" name="wpcf7-message-invalid-required" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['invalid_required'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-invalid-email"><em># <?php echo esc_html( __( "Email address that sender entered is invalid", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-invalid-email" name="wpcf7-message-invalid-email" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['invalid_email'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-accept-terms"><em># <?php echo esc_html( __( "There is a field of term that sender is needed to accept", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-accept-terms" name="wpcf7-message-accept-terms" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['accept_terms'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-quiz-answer-not-correct"><em># <?php echo esc_html( __( "Sender doesn't enter the correct answer to the quiz", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-quiz-answer-not-correct" name="wpcf7-message-quiz-answer-not-correct" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['quiz_answer_not_correct'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-captcha-not-match"><em># <?php echo esc_html( __( "The code that sender entered does not match the CAPTCHA", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-captcha-not-match" name="wpcf7-message-captcha-not-match" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['captcha_not_match'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-upload-failed"><em># <?php echo esc_html( __( "Uploading a file fails for any reason", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-upload-failed" name="wpcf7-message-upload-failed" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['upload_failed'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-upload-file-type-invalid"><em># <?php echo esc_html( __( "Uploaded file is not allowed file type", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-upload-file-type-invalid" name="wpcf7-message-upload-file-type-invalid" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['upload_file_type_invalid'] ); ?>" />
- </div>
-
- <div class="message-field">
- <label for="wpcf7-message-upload-file-too-large"><em># <?php echo esc_html( __( "Uploaded file is too large", 'wpcf7' ) ); ?></em></label><br />
- <input type="text" id="wpcf7-message-upload-file-too-large" name="wpcf7-message-upload-file-too-large" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['upload_file_too_large'] ); ?>" />
- </div>
-
- </div>
- </td>
- </tr>
- </tbody>
- </table>
-
- <table class="widefat" style="margin-top: 1em;">
- <thead><tr><th scope="col"><?php echo esc_html( __( 'Additional Settings', 'wpcf7' ) ); ?> <span id="additional-settings-fields-toggle-switch"></span></th></tr></thead>
-
- <tbody>
- <tr>
- <td scope="col">
- <div id="additional-settings-fields">
- <textarea id="wpcf7-additional-settings" name="wpcf7-additional-settings" cols="100" rows="8"><?php echo esc_html( $cf->additional_settings ); ?></textarea>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
-
- <table class="widefat" style="margin-top: 1em;">
- <tbody>
- <tr>
- <td scope="col">
- <div class="save-contact-form">
- <input type="submit" class="button button-highlighted" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'wpcf7' ) ); ?>" />
- </div>
- </td>
- </tr>
- </tbody>
- </table>
-
- <?php endif; ?>
-
-</form>
-
-<?php endif; ?>
-</div>
+<?php
+
+/* No table warning */
+if ( ! wpcf7_table_exists() ) {
+ if ( current_user_can( 'activate_plugins' ) ) {
+ $create_table_link_url = wpcf7_admin_url( 'admin.php', array( 'wpcf7-create-table' => 1 ) );
+ $create_table_link_url = wp_nonce_url( $create_table_link_url, 'wpcf7-create-table' );
+ $message = sprintf(
+ __( '<strong>The database table for Contact Form 7 does not exist.</strong> You must <a href="%s">create the table</a> for it to work.', 'wpcf7' ),
+ $create_table_link_url );
+ } else {
+ $message = __( "<strong>The database table for Contact Form 7 does not exist.</strong>", 'wpcf7' );
+ }
+?>
+ <div class="wrap">
+ <?php screen_icon( 'edit-pages' ); ?>
+ <h2><?php echo esc_html( __( 'Contact Form 7', 'wpcf7' ) ); ?></h2>
+ <div id="message" class="updated fade">
+ <p><?php echo $message; ?></p>
+ </div>
+ </div>
+<?php
+ return;
+}
+
+?><div class="wrap wpcf7">
+
+ <?php screen_icon( 'edit-pages' ); ?>
+
+ <h2><?php echo esc_html( __( 'Contact Form 7', 'wpcf7' ) ); ?></h2>
+
+ <?php wpcf7_donation_link(); ?>
+
+ <?php if ( isset( $updated_message ) ) : ?>
+ <div id="message" class="updated fade"><p><?php echo $updated_message; ?></p></div>
+ <?php endif; ?>
+
+ <ul class="subsubsub">
+ <?php foreach ( $contact_forms as $v ) : ?>
+ <li><a href="<?php echo wpcf7_admin_url( 'admin.php', array( 'contactform' => $v->id ) ); ?>"<?php if ( $v->id == $current ) echo ' class="current"'; ?>>
+ <?php echo esc_html( $v->title ); ?></a> |</li>
+ <?php endforeach; ?>
+
+ <?php if ( wpcf7_admin_has_edit_cap() ) : ?>
+ <li class="addnew"><a href="<?php echo wpcf7_admin_url( 'admin.php', array( 'contactform' => 'new' ) ); ?>"<?php if ( $unsaved ) echo ' class="current"'; ?>><?php echo esc_html( __( 'Add new', 'wpcf7' ) ); ?></a></li>
+ <?php endif; ?>
+ </ul>
+
+ <br class="clear" />
+
+<?php if ( $cf ) : ?>
+<?php $disabled = ( wpcf7_admin_has_edit_cap() ) ? '' : ' disabled="disabled"'; ?>
+
+<form method="post" action="<?php echo wpcf7_admin_url( 'admin.php', array( 'contactform' => $current ) ); ?>" id="wpcf7-admin-form-element">
+ <?php if ( wpcf7_admin_has_edit_cap() ) wp_nonce_field( 'wpcf7-save_' . $current ); ?>
+ <input type="hidden" id="wpcf7-id" name="wpcf7-id" value="<?php echo $current; ?>" />
+
+ <table class="widefat">
+ <tbody>
+ <tr>
+ <td scope="col">
+ <div style="position: relative;">
+ <input type="text" id="wpcf7-title" name="wpcf7-title" size="40" value="<?php echo esc_attr( $cf->title ); ?>"<?php echo $disabled; ?> />
+
+ <?php if ( ! $unsaved ) : ?>
+ <p class="tagcode">
+ <?php echo esc_html( __( "Copy this code and paste it into your post, page or text widget content.", 'wpcf7' ) ); ?><br />
+
+ <input type="text" id="contact-form-anchor-text" onfocus="this.select();" readonly="readonly" />
+ </p>
+ <?php endif; ?>
+
+ <?php if ( wpcf7_admin_has_edit_cap() ) : ?>
+ <div class="save-contact-form">
+ <input type="submit" class="button button-highlighted" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'wpcf7' ) ); ?>" />
+ </div>
+ <?php endif; ?>
+
+ <?php if ( wpcf7_admin_has_edit_cap() && ! $unsaved ) : ?>
+ <div class="actions-link">
+ <?php $copy_nonce = wp_create_nonce( 'wpcf7-copy_' . $current ); ?>
+ <input type="submit" name="wpcf7-copy" class="copy" value="<?php echo esc_attr( __( 'Copy', 'wpcf7' ) ); ?>"
+ <?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; return true;\""; ?> />
+ |
+
+ <?php $delete_nonce = wp_create_nonce( 'wpcf7-delete_' . $current ); ?>
+ <input type="submit" name="wpcf7-delete" class="delete" value="<?php echo esc_attr( __( 'Delete', 'wpcf7' ) ); ?>"
+ <?php echo "onclick=\"if (confirm('" .
+ esc_js( __( "You are about to delete this contact form.\n 'Cancel' to stop, 'OK' to delete.", 'wpcf7' ) ) .
+ "')) {this.form._wpnonce.value = '$delete_nonce'; return true;} return false;\""; ?> />
+ </div>
+ <?php endif; ?>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <?php if ( wpcf7_admin_has_edit_cap() ) : ?>
+
+ <table class="widefat" style="margin-top: 1em;">
+ <thead><tr><th scope="col" colspan="2"><?php echo esc_html( __( 'Form', 'wpcf7' ) ); ?></th></tr></thead>
+
+ <tbody>
+ <tr>
+
+ <td scope="col" style="width: 50%;">
+ <div><textarea id="wpcf7-form" name="wpcf7-form" cols="100" rows="20"><?php echo esc_html( $cf->form ); ?></textarea></div>
+ </td>
+
+ <td scope="col" style="width: 50%;">
+ <div id="tag-generator-div"></div>
+ </td>
+
+ </tr>
+ </tbody>
+ </table>
+
+ <table class="widefat" style="margin-top: 1em;">
+ <thead><tr><th scope="col" colspan="2"><?php echo esc_html( __( 'Mail', 'wpcf7' ) ); ?></th></tr></thead>
+
+ <tbody>
+ <tr>
+ <td scope="col" style="width: 50%;">
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-recipient"><?php echo esc_html( __( 'To:', 'wpcf7' ) ); ?></label><br />
+ <input type="text" id="wpcf7-mail-recipient" name="wpcf7-mail-recipient" class="wide" size="70" value="<?php echo esc_attr( $cf->mail['recipient'] ); ?>" />
+ </div>
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-sender"><?php echo esc_html( __( 'From:', 'wpcf7' ) ); ?></label><br />
+ <input type="text" id="wpcf7-mail-sender" name="wpcf7-mail-sender" class="wide" size="70" value="<?php echo esc_attr( $cf->mail['sender'] ); ?>" />
+ </div>
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-subject"><?php echo esc_html( __( 'Subject:', 'wpcf7' ) ); ?></label><br />
+ <input type="text" id="wpcf7-mail-subject" name="wpcf7-mail-subject" class="wide" size="70" value="<?php echo esc_attr( $cf->mail['subject'] ); ?>" />
+ </div>
+
+ <div class="pseudo-hr"></div>
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-additional-headers"><?php echo esc_html( __( 'Additional headers:', 'wpcf7' ) ); ?></label><br />
+ <textarea id="wpcf7-mail-additional-headers" name="wpcf7-mail-additional-headers" cols="100" rows="2"><?php echo esc_html( $cf->mail['additional_headers'] ); ?></textarea>
+ </div>
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-attachments"><?php echo esc_html( __( 'File attachments:', 'wpcf7' ) ); ?></label><br />
+ <input type="text" id="wpcf7-mail-attachments" name="wpcf7-mail-attachments" class="wide" size="70" value="<?php echo esc_attr( $cf->mail['attachments'] ); ?>" />
+ </div>
+
+ <div class="pseudo-hr"></div>
+
+ <div class="mail-field">
+ <input type="checkbox" id="wpcf7-mail-use-html" name="wpcf7-mail-use-html" value="1"<?php echo ( $cf->mail['use_html'] ) ? ' checked="checked"' : ''; ?> />
+ <label for="wpcf7-mail-use-html"><?php echo esc_html( __( 'Use HTML content type', 'wpcf7' ) ); ?></label>
+ </div>
+
+ </td>
+ <td scope="col" style="width: 50%;">
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-body"><?php echo esc_html( __( 'Message body:', 'wpcf7' ) ); ?></label><br />
+ <textarea id="wpcf7-mail-body" name="wpcf7-mail-body" cols="100" rows="16"><?php echo esc_html( $cf->mail['body'] ); ?></textarea>
+ </div>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table class="widefat" style="margin-top: 1em;">
+ <thead><tr><th scope="col" colspan="2"><?php echo esc_html( __( 'Mail (2)', 'wpcf7' ) ); ?></th></tr></thead>
+
+ <tbody>
+ <tr>
+ <td scope="col" colspan="2">
+ <input type="checkbox" id="wpcf7-mail-2-active" name="wpcf7-mail-2-active" value="1"<?php echo ( $cf->mail_2['active'] ) ? ' checked="checked"' : ''; ?> />
+ <label for="wpcf7-mail-2-active"><?php echo esc_html( __( 'Use mail (2)', 'wpcf7' ) ); ?></label>
+ </td>
+ </tr>
+
+ <tr id="mail-2-fields">
+ <td scope="col" style="width: 50%;">
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-2-recipient"><?php echo esc_html( __( 'To:', 'wpcf7' ) ); ?></label><br />
+ <input type="text" id="wpcf7-mail-2-recipient" name="wpcf7-mail-2-recipient" class="wide" size="70" value="<?php echo esc_attr( $cf->mail_2['recipient'] ); ?>" />
+ </div>
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-2-sender"><?php echo esc_html( __( 'From:', 'wpcf7' ) ); ?></label><br />
+ <input type="text" id="wpcf7-mail-2-sender" name="wpcf7-mail-2-sender" class="wide" size="70" value="<?php echo esc_attr( $cf->mail_2['sender'] ); ?>" />
+ </div>
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-2-subject"><?php echo esc_html( __( 'Subject:', 'wpcf7' ) ); ?></label><br />
+ <input type="text" id="wpcf7-mail-2-subject" name="wpcf7-mail-2-subject" class="wide" size="70" value="<?php echo esc_attr( $cf->mail_2['subject'] ); ?>" />
+ </div>
+
+ <div class="pseudo-hr"></div>
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-2-additional-headers"><?php echo esc_html( __( 'Additional headers:', 'wpcf7' ) ); ?></label><br />
+ <textarea id="wpcf7-mail-2-additional-headers" name="wpcf7-mail-2-additional-headers" cols="100" rows="2"><?php echo esc_html( $cf->mail_2['additional_headers'] ); ?></textarea>
+ </div>
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-2-attachments"><?php echo esc_html( __( 'File attachments:', 'wpcf7' ) ); ?></label><br />
+ <input type="text" id="wpcf7-mail-2-attachments" name="wpcf7-mail-2-attachments" class="wide" size="70" value="<?php echo esc_attr( $cf->mail_2['attachments'] ); ?>" />
+ </div>
+
+ <div class="pseudo-hr"></div>
+
+ <div class="mail-field">
+ <input type="checkbox" id="wpcf7-mail-2-use-html" name="wpcf7-mail-2-use-html" value="1"<?php echo ( $cf->mail_2['use_html'] ) ? ' checked="checked"' : ''; ?> />
+ <label for="wpcf7-mail-2-use-html"><?php echo esc_html( __( 'Use HTML content type', 'wpcf7' ) ); ?></label>
+ </div>
+
+ </td>
+ <td scope="col" style="width: 50%;">
+
+ <div class="mail-field">
+ <label for="wpcf7-mail-2-body"><?php echo esc_html( __( 'Message body:', 'wpcf7' ) ); ?></label><br />
+ <textarea id="wpcf7-mail-2-body" name="wpcf7-mail-2-body" cols="100" rows="16"><?php echo esc_html( $cf->mail_2['body'] ); ?></textarea>
+ </div>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table class="widefat" style="margin-top: 1em;">
+ <thead><tr><th scope="col"><?php echo esc_html( __( 'Messages', 'wpcf7' ) ); ?> <span id="message-fields-toggle-switch"></span></th></tr></thead>
+
+ <tbody>
+ <tr>
+ <td scope="col">
+ <div id="message-fields">
+
+ <div class="message-field">
+ <label for="wpcf7-message-mail-sent-ok"><em># <?php echo esc_html( __( "Sender's message was sent successfully", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-mail-sent-ok" name="wpcf7-message-mail-sent-ok" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['mail_sent_ok'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-mail-sent-ng"><em># <?php echo esc_html( __( "Sender's message was failed to send", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-mail-sent-ng" name="wpcf7-message-mail-sent-ng" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['mail_sent_ng'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-akismet-says-spam"><em># <?php echo esc_html( __( "Akismet judged the sending activity as spamming", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-akismet-says-spam" name="wpcf7-message-akismet-says-spam" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['akismet_says_spam'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-validation-error"><em># <?php echo esc_html( __( "Validation errors occurred", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-validation-error" name="wpcf7-message-validation-error" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['validation_error'] ); ?>" />
+ </div>
+
+ <div class="message-field" style="margin-top: 1em;">
+ <label for="wpcf7-message-invalid-required"><em># <?php echo esc_html( __( "There is a field that sender is needed to fill in", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-invalid-required" name="wpcf7-message-invalid-required" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['invalid_required'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-invalid-email"><em># <?php echo esc_html( __( "Email address that sender entered is invalid", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-invalid-email" name="wpcf7-message-invalid-email" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['invalid_email'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-accept-terms"><em># <?php echo esc_html( __( "There is a field of term that sender is needed to accept", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-accept-terms" name="wpcf7-message-accept-terms" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['accept_terms'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-quiz-answer-not-correct"><em># <?php echo esc_html( __( "Sender doesn't enter the correct answer to the quiz", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-quiz-answer-not-correct" name="wpcf7-message-quiz-answer-not-correct" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['quiz_answer_not_correct'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-captcha-not-match"><em># <?php echo esc_html( __( "The code that sender entered does not match the CAPTCHA", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-captcha-not-match" name="wpcf7-message-captcha-not-match" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['captcha_not_match'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-upload-failed"><em># <?php echo esc_html( __( "Uploading a file fails for any reason", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-upload-failed" name="wpcf7-message-upload-failed" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['upload_failed'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-upload-file-type-invalid"><em># <?php echo esc_html( __( "Uploaded file is not allowed file type", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-upload-file-type-invalid" name="wpcf7-message-upload-file-type-invalid" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['upload_file_type_invalid'] ); ?>" />
+ </div>
+
+ <div class="message-field">
+ <label for="wpcf7-message-upload-file-too-large"><em># <?php echo esc_html( __( "Uploaded file is too large", 'wpcf7' ) ); ?></em></label><br />
+ <input type="text" id="wpcf7-message-upload-file-too-large" name="wpcf7-message-upload-file-too-large" class="wide" size="70" value="<?php echo esc_attr( $cf->messages['upload_file_too_large'] ); ?>" />
+ </div>
+
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table class="widefat" style="margin-top: 1em;">
+ <thead><tr><th scope="col"><?php echo esc_html( __( 'Additional Settings', 'wpcf7' ) ); ?> <span id="additional-settings-fields-toggle-switch"></span></th></tr></thead>
+
+ <tbody>
+ <tr>
+ <td scope="col">
+ <div id="additional-settings-fields">
+ <textarea id="wpcf7-additional-settings" name="wpcf7-additional-settings" cols="100" rows="8"><?php echo esc_html( $cf->additional_settings ); ?></textarea>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table class="widefat" style="margin-top: 1em;">
+ <tbody>
+ <tr>
+ <td scope="col">
+ <div class="save-contact-form">
+ <input type="submit" class="button button-highlighted" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'wpcf7' ) ); ?>" />
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <?php endif; ?>
+
+</form>
+
+<?php endif; ?>
+</div>
View
42 admin/admin-stylesheet-rtl.css
@@ -1,22 +1,22 @@
-ul.subsubsub li.addnew {
- margin-left: 0;
- margin-right: 0.5em;
-}
-div.save-contact-form {
- direction: rtl;
-}
-div.actions-link {
- right: auto;
- left: 0;
-}
-span#message-fields-toggle-switch {
- margin-left: 0;
- margin-right: 1em;
-}
-div.tg-pane table caption {
- text-align: right;
-}
-div.tg-dropdown {
- left: auto;
- right: 0;
+ul.subsubsub li.addnew {
+ margin-left: 0;
+ margin-right: 0.5em;
+}
+div.save-contact-form {
+ direction: rtl;
+}
+div.actions-link {
+ right: auto;
+ left: 0;
+}
+span#message-fields-toggle-switch {
+ margin-left: 0;
+ margin-right: 1em;
+}
+div.tg-pane table caption {
+ text-align: right;
+}
+div.tg-dropdown {
+ left: auto;
+ right: 0;
}
View
340 admin/admin-stylesheet.css
@@ -1,170 +1,170 @@
-div.wpcf7 div.donation {
- border-width: 1px;
- border-style: solid;
- padding: 0 0.6em;
- margin: 5px 0 15px;
- -moz-border-radius: 3px;
- -khtml-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- background-color: #ffffe0;
- border-color: #e6db55;
- text-align: center;
-}
-
-div.wpcf7 div.donation p {
- margin: 0.5em 0;
- line-height: 1;
- padding: 2px;
-}
-
-div.wpcf7 div.donation p img {
- vertical-align: text-bottom;
-}
-
-div.wpcf7 div.donation p em {
- padding-left: 1em;
- color: #555;
- font-weight: bold;
-}
-
-div.wpcf7 ul.subsubsub {
- white-space: normal;
-}
-ul.subsubsub li.addnew {
- margin-left: 0.5em;
-}
-ul.subsubsub li.addnew a {
- color: #e6255b;
-}
-ul.subsubsub li.addnew a:hover,
-ul.subsubsub li.addnew a:active {
- color: #999;
-}
-div.save-contact-form {
- padding: 1.4em 0 0 0;
- text-align: right;
-}
-div.actions-link {
- position: absolute;
- top: 0;
- right: 0;
- margin: 0;
- padding: 0;
-}
-div.actions-link input {
- padding: 0;
- margin: 0;
- border: none;
- background-color: #fff;
- font-size: 11px;
- cursor: pointer;
-}
-div.actions-link input.copy {
- color: #006505;
-}
-div.actions-link input.delete {
- color: #bc0b0b;
-}
-input#wpcf7-title {
- color: #555;
- background-color: #fff;
- border: none;
- font: bold 20px serif;
-}
-p.tagcode {
- color: #333;
- margin: 2ex 0 1ex 1em;
-}
-input#contact-form-anchor-text {
- color: #fff;
- background: #8a796d;
- border: none;
- width: 96%;
- -moz-border-radius: 6px;
- -khtml-border-radius: 6px;
- -webkit-border-radius: 6px;
- border-radius: 6px;
-}
-span#message-fields-toggle-switch, span#additional-settings-fields-toggle-switch {
- margin-left: 1em;
- font-weight: normal;
- font-size: smaller;
- color: #2583ad;
- cursor: pointer;
-}
-div.pseudo-hr {
- border-bottom: 1px solid #fff;
- margin: 0.7em 0;
-}
-input, textarea {
- border: 1px solid #dfdfdf;
-}
-input.wide {
- width: 100%;
-}
-textarea {
- width: 100%;
-}
-label.disabled {
- color: #777;
-}
-div.tag-generator {
- position: relative;
- background: #fff;
- padding: 5px 0 5px 1px;
-}
-div.tg-pane {
- border: 1px dashed #999;
- background: #f1f1f1;
- margin: 1ex 0 0 0;
- padding: 10px;
- -moz-border-radius: 6px;
- -khtml-border-radius: 6px;
- -webkit-border-radius: 6px;
- border-radius: 6px;
-}
-div.tg-pane table {
- width: 100%;
- margin: 0 0 0.7em 0;
-}
-div.tg-pane table caption {
- text-align: left;
- padding: 0 0 0.2em 0;
- font-weight: bolder;
- color: #777;
-}
-div.tg-pane table code {
- background-color: inherit;
-}
-div.tg-pane table td {
- vertical-align: top;
- width: 50%;
-}
-div.tg-pane input.tag {
- border: none;
- color: #fff;
- background-color: #8a796d;
- -moz-border-radius: 6px;
- -khtml-border-radius: 6px;
- -webkit-border-radius: 6px;
- border-radius: 6px;
-}
-div.tg-dropdown {
- position: absolute;
- top: 26px;
- left: 0;
- z-index: 10;
- border: 1px solid #ddd;
-}
-span.tg-closebutton {
- color: #777;
- font: bold 18px monospace;
- padding: 1px 4px;
- cursor: pointer;
-}
-div.tg-panetitle {
- font: bold 132% sans-serif;
- margin: 0 0 10px;
- color: #777;
-}
+div.wpcf7 div.donation {
+ border-width: 1px;
+ border-style: solid;
+ padding: 0 0.6em;
+ margin: 5px 0 15px;
+ -moz-border-radius: 3px;
+ -khtml-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ background-color: #ffffe0;
+ border-color: #e6db55;
+ text-align: center;
+}
+
+div.wpcf7 div.donation p {
+ margin: 0.5em 0;
+ line-height: 1;
+ padding: 2px;
+}
+
+div.wpcf7 div.donation p img {
+ vertical-align: text-bottom;
+}
+
+div.wpcf7 div.donation p em {
+ padding-left: 1em;
+ color: #555;
+ font-weight: bold;
+}
+
+div.wpcf7 ul.subsubsub {
+ white-space: normal;
+}
+ul.subsubsub li.addnew {
+ margin-left: 0.5em;
+}
+ul.subsubsub li.addnew a {
+ color: #e6255b;
+}
+ul.subsubsub li.addnew a:hover,
+ul.subsubsub li.addnew a:active {
+ color: #999;
+}
+div.save-contact-form {
+ padding: 1.4em 0 0 0;
+ text-align: right;
+}
+div.actions-link {
+ position: absolute;
+ top: 0;
+ right: 0;
+ margin: 0;
+ padding: 0;
+}
+div.actions-link input {
+ padding: 0;
+ margin: 0;
+ border: none;
+ background-color: #fff;
+ font-size: 11px;
+ cursor: pointer;
+}
+div.actions-link input.copy {
+ color: #006505;
+}
+div.actions-link input.delete {
+ color: #bc0b0b;
+}
+input#wpcf7-title {
+ color: #555;
+ background-color: #fff;
+ border: none;
+ font: bold 20px serif;
+}
+p.tagcode {
+ color: #333;
+ margin: 2ex 0 1ex 1em;
+}
+input#contact-form-anchor-text {
+ color: #fff;
+ background: #8a796d;
+ border: none;
+ width: 96%;
+ -moz-border-radius: 6px;
+ -khtml-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ border-radius: 6px;
+}
+span#message-fields-toggle-switch, span#additional-settings-fields-toggle-switch {
+ margin-left: 1em;
+ font-weight: normal;
+ font-size: smaller;
+ color: #2583ad;
+ cursor: pointer;
+}
+div.pseudo-hr {
+ border-bottom: 1px solid #fff;
+ margin: 0.7em 0;
+}
+input, textarea {
+ border: 1px solid #dfdfdf;
+}
+input.wide {
+ width: 100%;
+}
+textarea {
+ width: 100%;
+}
+label.disabled {
+ color: #777;
+}
+div.tag-generator {
+ position: relative;
+ background: #fff;
+ padding: 5px 0 5px 1px;
+}
+div.tg-pane {
+ border: 1px dashed #999;
+ background: #f1f1f1;
+ margin: 1ex 0 0 0;
+ padding: 10px;
+ -moz-border-radius: 6px;
+ -khtml-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ border-radius: 6px;
+}
+div.tg-pane table {
+ width: 100%;
+ margin: 0 0 0.7em 0;
+}
+div.tg-pane table caption {
+ text-align: left;
+ padding: 0 0 0.2em 0;
+ font-weight: bolder;
+ color: #777;
+}
+div.tg-pane table code {
+ background-color: inherit;
+}
+div.tg-pane table td {
+ vertical-align: top;
+ width: 50%;
+}
+div.tg-pane input.tag {
+ border: none;
+ color: #fff;
+ background-color: #8a796d;
+ -moz-border-radius: 6px;
+ -khtml-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ border-radius: 6px;
+}
+div.tg-dropdown {
+ position: absolute;
+ top: 26px;
+ left: 0;
+ z-index: 10;
+ border: 1px solid #ddd;
+}
+span.tg-closebutton {
+ color: #777;
+ font: bold 18px monospace;
+ padding: 1px 4px;
+ cursor: pointer;
+}
+div.tg-panetitle {
+ font: bold 132% sans-serif;
+ margin: 0 0 10px;
+ color: #777;
+}
View
764 admin/admin.php
@@ -1,383 +1,383 @@
-<?php
-
-function wpcf7_admin_has_edit_cap() {
- return current_user_can( WPCF7_ADMIN_READ_WRITE_CAPABILITY );
-}
-
-function wpcf7_admin_add_pages() {
-
- if ( isset( $_POST['wpcf7-save'] ) && wpcf7_admin_has_edit_cap() ) {
- $id = $_POST['wpcf7-id'];
- check_admin_referer( 'wpcf7-save_' . $id );
-
- if ( ! $contact_form = wpcf7_contact_form( $id ) ) {
- $contact_form = new WPCF7_ContactForm();
- $contact_form->initial = true;
- }
-
- $title = trim( $_POST['wpcf7-title'] );
- $form = trim( $_POST['wpcf7-form'] );
- $mail = array(
- 'subject' => trim( $_POST['wpcf7-mail-subject'] ),
- 'sender' => trim( $_POST['wpcf7-mail-sender'] ),
- 'body' => trim( $_POST['wpcf7-mail-body'] ),
- 'recipient' => trim( $_POST['wpcf7-mail-recipient'] ),
- 'additional_headers' => trim( $_POST['wpcf7-mail-additional-headers'] ),
- 'attachments' => trim( $_POST['wpcf7-mail-attachments'] ),
- 'use_html' => ( 1 == $_POST['wpcf7-mail-use-html'] ) ? true : false
- );
- $mail_2 = array(
- 'active' => ( 1 == $_POST['wpcf7-mail-2-active'] ) ? true : false,
- 'subject' => trim( $_POST['wpcf7-mail-2-subject'] ),
- 'sender' => trim( $_POST['wpcf7-mail-2-sender'] ),
- 'body' => trim( $_POST['wpcf7-mail-2-body'] ),
- 'recipient' => trim( $_POST['wpcf7-mail-2-recipient'] ),
- 'additional_headers' => trim( $_POST['wpcf7-mail-2-additional-headers'] ),
- 'attachments' => trim( $_POST['wpcf7-mail-2-attachments'] ),
- 'use_html' => ( 1 == $_POST['wpcf7-mail-2-use-html'] ) ? true : false
- );
- $messages = array(
- 'mail_sent_ok' => trim( $_POST['wpcf7-message-mail-sent-ok'] ),
- 'mail_sent_ng' => trim( $_POST['wpcf7-message-mail-sent-ng'] ),
- 'akismet_says_spam' => trim( $_POST['wpcf7-message-akismet-says-spam'] ),
- 'validation_error' => trim( $_POST['wpcf7-message-validation-error'] ),
- 'accept_terms' => trim( $_POST['wpcf7-message-accept-terms'] ),
- 'invalid_email' => trim( $_POST['wpcf7-message-invalid-email'] ),
- 'invalid_required' => trim( $_POST['wpcf7-message-invalid-required'] ),
- 'quiz_answer_not_correct' => trim( $_POST['wpcf7-message-quiz-answer-not-correct'] ),
- 'captcha_not_match' => trim( $_POST['wpcf7-message-captcha-not-match'] ),
- 'upload_failed' => trim( $_POST['wpcf7-message-upload-failed'] ),
- 'upload_file_type_invalid' => trim( $_POST['wpcf7-message-upload-file-type-invalid'] ),
- 'upload_file_too_large' => trim( $_POST['wpcf7-message-upload-file-too-large'] )
- );
- $additional_settings = trim( $_POST['wpcf7-additional-settings'] );
-
- $query = array();
- $query['message'] = ( $contact_form->initial ) ? 'created' : 'saved';
-
- $contact_form->title = $title;
- $contact_form->form = $form;
- $contact_form->mail = $mail;
- $contact_form->mail_2 = $mail_2;
- $contact_form->messages = $messages;
- $contact_form->additional_settings = $additional_settings;
-
- $contact_form->save();
-
- $query['contactform'] = $contact_form->id;
- $redirect_to = wpcf7_admin_url( 'admin.php', $query );
- wp_redirect( $redirect_to );
- exit();
- } elseif ( isset( $_POST['wpcf7-copy'] ) && wpcf7_admin_has_edit_cap() ) {
- $id = $_POST['wpcf7-id'];
- check_admin_referer( 'wpcf7-copy_' . $id );
-
- $query = array();
-
- if ( $contact_form = wpcf7_contact_form( $id ) ) {
- $new_contact_form = $contact_form->copy();
- $new_contact_form->save();
-
- $query['contactform'] = $new_contact_form->id;
- $query['message'] = 'created';
- } else {
- $query['contactform'] = $contact_form->id;
- }
-
- $redirect_to = wpcf7_admin_url( 'admin.php', $query );
- wp_redirect( $redirect_to );
- exit();
- } elseif ( isset( $_POST['wpcf7-delete'] ) && wpcf7_admin_has_edit_cap() ) {
- $id = $_POST['wpcf7-id'];
- check_admin_referer( 'wpcf7-delete_' . $id );
-
- if ( $contact_form = wpcf7_contact_form( $id ) )
- $contact_form->delete();
-
- $redirect_to = wpcf7_admin_url( 'admin.php', array( 'message' => 'deleted' ) );
- wp_redirect( $redirect_to );
- exit();
- } elseif ( isset( $_GET['wpcf7-create-table'] ) ) {
- check_admin_referer( 'wpcf7-create-table' );
-
- $query = array();
-
- if ( ! wpcf7_table_exists() && current_user_can( 'activate_plugins' ) ) {
- wpcf7_install();
- if ( wpcf7_table_exists() ) {
- $query['message'] = 'table_created';
- } else {
- $query['message'] = 'table_not_created';
- }
- }
-
- wp_redirect( wpcf7_admin_url( 'admin.php', $query ) );
- exit();
- }
-
- add_menu_page( __( 'Contact Form 7', 'wpcf7' ), __( 'Contact', 'wpcf7' ),
- WPCF7_ADMIN_READ_CAPABILITY, __FILE__, 'wpcf7_admin_management_page' );
-
- add_submenu_page( __FILE__, __( 'Edit Contact Forms', 'wpcf7' ), __( 'Edit', 'wpcf7' ),
- WPCF7_ADMIN_READ_CAPABILITY, __FILE__, 'wpcf7_admin_management_page' );
-}
-
-add_action( 'admin_menu', 'wpcf7_admin_add_pages' );
-
-function wpcf7_admin_head() {
- global $plugin_page;
-
- if ( isset( $plugin_page ) && $plugin_page == plugin_basename( __FILE__ ) ) {
-
- $admin_stylesheet_url = wpcf7_plugin_url( 'admin/admin-stylesheet.css' );
- echo '<link rel="stylesheet" href="' . $admin_stylesheet_url . '" type="text/css" />';
-
- if ( 'rtl' == get_bloginfo( 'text_direction' ) ) {
- $admin_stylesheet_rtl_url = wpcf7_plugin_url( 'admin/admin-stylesheet-rtl.css' );
- echo '<link rel="stylesheet" href="' . $admin_stylesheet_rtl_url . '" type="text/css" />';
- }
-
-?>
-<script type="text/javascript">
-//<![CDATA[
-var _wpcf7 = {
- captchaMod: <?php echo ( class_exists( 'ReallySimpleCaptcha' ) ) ? 'true' : 'false' ?>
-};
-//]]>
-</script>
-<?php
- }
-}
-
-add_action( 'admin_head', 'wpcf7_admin_head' );
-
-function wpcf7_admin_load_js() {
- global $pagenow;
-
- if ( ! is_admin() )
- return;
-
- if ( 'admin.php' != $pagenow )
- return;
-
- if ( false === strpos( $_GET['page'], 'contact-form-7' ) )
- return;
-
- wp_enqueue_script( 'wpcf7-admin', wpcf7_plugin_url( 'admin/wpcf7-admin.js' ), array('jquery'), WPCF7_VERSION, true );
- wp_localize_script( 'wpcf7-admin', '_wpcf7L10n', array(
- 'optional' => __( 'optional', 'wpcf7' ),
- 'generateTag' => __( 'Generate Tag', 'wpcf7' ),
- 'textField' => __( 'Text field', 'wpcf7' ),
- 'emailField' => __( 'Email field', 'wpcf7' ),
- 'textArea' => __( 'Text area', 'wpcf7' ),
- 'menu' => __( 'Drop-down menu', 'wpcf7' ),
- 'checkboxes' => __( 'Checkboxes', 'wpcf7' ),
- 'radioButtons' => __( 'Radio buttons', 'wpcf7' ),
- 'acceptance' => __( 'Acceptance', 'wpcf7' ),
- 'isAcceptanceDefaultOn' => __( "Make this checkbox checked by default?", 'wpcf7' ),
- 'isAcceptanceInvert' => __( "Make this checkbox work inversely?", 'wpcf7' ),
- 'isAcceptanceInvertMeans' => __( "* That means visitor who accepts the term unchecks it.", 'wpcf7' ),
- 'captcha' => __( 'CAPTCHA', 'wpcf7' ),
- 'quiz' => __( 'Quiz', 'wpcf7' ),
- 'quizzes' => __( 'Quizzes', 'wpcf7' ),
- 'quizFormatDesc' => __( "* quiz|answer (e.g. 1+1=?|2)", 'wpcf7' ),
- 'fileUpload' => __( 'File upload', 'wpcf7' ),
- 'bytes' => __( 'bytes', 'wpcf7' ),
- 'submit' => __( 'Submit button', 'wpcf7' ),
- 'tagName' => __( 'Name', 'wpcf7' ),
- 'isRequiredField' => __( 'Required field?', 'wpcf7' ),
- 'allowsMultipleSelections' => __( 'Allow multiple selections?', 'wpcf7' ),
- 'insertFirstBlankOption' => __( 'Insert a blank item as the first option?', 'wpcf7' ),
- 'makeCheckboxesExclusive' => __( 'Make checkboxes exclusive?', 'wpcf7' ),
- 'menuChoices' => __( 'Choices', 'wpcf7' ),
- 'label' => __( 'Label', 'wpcf7' ),
- 'defaultValue' => __( 'Default value', 'wpcf7' ),
- 'akismet' => __( 'Akismet', 'wpcf7' ),
- 'akismetAuthor' => __( "This field requires author's name", 'wpcf7' ),
- 'akismetAuthorUrl' => __( "This field requires author's URL", 'wpcf7' ),
- 'akismetAuthorEmail' => __( "This field requires author's email address", 'wpcf7' ),
- 'generatedTag' => __( "Copy this code and paste it into the form left.", 'wpcf7' ),
- 'fgColor' => __( "Foreground color", 'wpcf7' ),
- 'bgColor' => __( "Background color", 'wpcf7' ),
- 'imageSize' => __( "Image size", 'wpcf7' ),
- 'imageSizeSmall' => __( "Small", 'wpcf7' ),
- 'imageSizeMedium' => __( "Medium", 'wpcf7' ),
- 'imageSizeLarge' => __( "Large", 'wpcf7' ),
- 'imageSettings' => __( "Image settings", 'wpcf7' ),
- 'inputFieldSettings' => __( "Input field settings", 'wpcf7' ),
- 'tagForImage' => __( "For image", 'wpcf7' ),
- 'tagForInputField' => __( "For input field", 'wpcf7' ),
- 'oneChoicePerLine' => __( "* One choice per line.", 'wpcf7' ),
- 'show' => __( "Show", 'wpcf7' ),
- 'hide' => __( "Hide", 'wpcf7' ),
- 'fileSizeLimit' => __( "File size limit", 'wpcf7' ),
- 'acceptableFileTypes' => __( "Acceptable file types", 'wpcf7' ),
- 'needReallySimpleCaptcha' => __( "Note: To use CAPTCHA, you need Really Simple CAPTCHA plugin installed.", 'wpcf7' )
- ) );
-}
-
-add_action( 'wp_print_scripts', 'wpcf7_admin_load_js' );
-
-function wpcf7_admin_management_page() {
- global $wp_version;
-
- switch ( $_GET['message'] ) {
- case 'created':
- $updated_message = __( "Contact form created.", 'wpcf7' );
- break;
- case 'saved':
- $updated_message = __( "Contact form saved.", 'wpcf7' );
- break;
- case 'deleted':
- $updated_message = __( "Contact form deleted.", 'wpcf7' );
- break;
- case 'table_created':
- $updated_message = __( "Database table created.", 'wpcf7' );
- break;
- case 'table_not_created':
- $updated_message = __( "Failed to create database table.", 'wpcf7' );
- break;
- }
-
- $contact_forms = wpcf7_contact_forms();
-
- $id = $_POST['wpcf7-id'];
-
- if ( 'new' == $_GET['contactform'] ) {
- $unsaved = true;
- $current = -1;
- $cf = wpcf7_contact_form_default_pack();
- } elseif ( $cf = wpcf7_contact_form( $_GET['contactform'] ) ) {
- $current = (int) $_GET['contactform'];
- } else {
- $first = reset( $contact_forms ); // Returns first item
- $current = $first->id;
- $cf = wpcf7_contact_form( $current );
- }
-
- require_once WPCF7_PLUGIN_DIR . '/admin/admin-panel.php';
-}
-
-/* Install and default settings */
-
-function wpcf7_install() {
- global $wpdb;
-
- if ( wpcf7_table_exists() )
- return; // Exists already
-
- $table_name = wpcf7_table_name();
-
- $charset_collate = '';
- if ( $wpdb->has_cap( 'collation' ) ) {
- if ( ! empty( $wpdb->charset ) )
- $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
- if ( ! empty( $wpdb->collate ) )
- $charset_collate .= " COLLATE $wpdb->collate";
- }
-
- $wpdb->query( "CREATE TABLE IF NOT EXISTS $table_name (
- cf7_unit_id bigint(20) unsigned NOT NULL auto_increment,
- title varchar(200) NOT NULL default '',
- form text NOT NULL,
- mail text NOT NULL,
- mail_2 text NOT NULL,
- messages text NOT NULL,
- additional_settings text NOT NULL,
- PRIMARY KEY (cf7_unit_id)) $charset_collate;" );
-
- if ( ! wpcf7_table_exists() )
- return false; // Failed to create
-
- $legacy_data = get_option( 'wpcf7' );
- if ( is_array( $legacy_data ) ) {
- foreach ( $legacy_data['contact_forms'] as $key => $value ) {
- $wpdb->insert( $table_name, array(
- 'cf7_unit_id' => $key,
- 'title' => $value['title'],
- 'form' => maybe_serialize( $value['form'] ),
- 'mail' => maybe_serialize( $value['mail'] ),
- 'mail_2' => maybe_serialize( $value['mail_2'] ),
- 'messages' => maybe_serialize( $value['messages'] ),
- 'additional_settings' => maybe_serialize( $value['additional_settings'] )
- ), array( '%d', '%s', '%s', '%s', '%s', '%s', '%s' ) );
- }
-
- // delete_option( 'wpcf7' ); // Comment out for downgrading case for a while
- } else {
- wpcf7_load_plugin_textdomain();
-
- $wpdb->insert( $table_name, array(
- 'title' => __( 'Contact form', 'wpcf7' ) . ' 1',
- 'form' => maybe_serialize( wpcf7_default_form_template() ),
- 'mail' => maybe_serialize( wpcf7_default_mail_template() ),
- 'mail_2' => maybe_serialize ( wpcf7_default_mail_2_template() ),
- 'messages' => maybe_serialize( wpcf7_default_messages_template() ) ) );
- }
-}
-
-add_action( 'activate_' . WPCF7_PLUGIN_BASENAME, 'wpcf7_install' );
-
-/* Misc */
-
-function wpcf7_admin_url( $file, $query = array() ) {
- $file = trim( $file, ' /' );
- if ( 'admin/' != substr( $file, 0, 6 ) )
- $file = 'admin/' . $file;
-
- $path = 'admin.php';
- $path .= '?page=' . WPCF7_PLUGIN_NAME . '/' . $file;
-
- if ( $query = build_query( $query ) )
- $path .= '&' . $query;
-
- $url = admin_url( $path );
-
- return $url;
-}
-
-function wpcf7_plugin_action_links( $links, $file ) {
- if ( $file != WPCF7_PLUGIN_BASENAME )
- return $links;
-
- $url = wpcf7_admin_url( 'admin.php' );
-
- $settings_link = '<a href="' . $url . '">' . esc_html( __( 'Settings', 'wpcf7' ) ) . '</a>';
-
- array_unshift( $links, $settings_link );
-
- return $links;
-}
-
-add_filter( 'plugin_action_links', 'wpcf7_plugin_action_links', 10, 2 );
-
-function wpcf7_donation_link() {
- if ( ! WPCF7_SHOW_DONATION_LINK )
- return;
-
- if ( 'new' == $_GET['contactform'] || ! empty($_GET['message']) )
- return;
-
- $num = mt_rand(0, 99);
- if ($num >= 10) // 90%
- return;
-
- $texts = array(
- __( "Contact Form 7 needs your support. Please donate today.", 'wpcf7' ),
- __( "Is this plugin useful for you? If you like it, please help the developer.", 'wpcf7' ),
- __( "Your contribution is needed for making this plugin better.", 'wpcf7' ),
- __( "Developing a plugin and providing user support is really hard work. Please help.", 'wpcf7' ) );
-
- $text = $texts[array_rand( $texts )];
-
-?>
-<div class="donation">
-<p><a href="http://www.pledgie.com/campaigns/3117">
-<img alt="Click here to lend your support to: Support Contact Form 7 and make a donation at www.pledgie.com !" src="http://www.pledgie.com/campaigns/3117.png?skin_name=chrome" border="0" width="149" height="37" /></a>
-<em><?php echo esc_html( $text ); ?></em>
-</p>
-</div>
-<?php
-}
-
+<?php
+
+function wpcf7_admin_has_edit_cap() {
+ return current_user_can( WPCF8_ADMIN_READ_WRITE_CAPABILITY );
+}
+
+function wpcf7_admin_add_pages() {
+
+ if ( isset( $_POST['wpcf7-save'] ) && wpcf7_admin_has_edit_cap() ) {
+ $id = $_POST['wpcf7-id'];
+ check_admin_referer( 'wpcf7-save_' . $id );
+
+ if ( ! $contact_form = wpcf7_contact_form( $id ) ) {
+ $contact_form = new WPCF8_ContactForm();
+ $contact_form->initial = true;
+ }
+
+ $title = trim( $_POST['wpcf7-title'] );
+ $form = trim( $_POST['wpcf7-form'] );
+ $mail = array(
+ 'subject' => trim( $_POST['wpcf7-mail-subject'] ),
+ 'sender' => trim( $_POST['wpcf7-mail-sender'] ),
+ 'body' => trim( $_POST['wpcf7-mail-body'] ),
+ 'recipient' => trim( $_POST['wpcf7-mail-recipient'] ),
+ 'additional_headers' => trim( $_POST['wpcf7-mail-additional-headers'] ),
+ 'attachments' => trim( $_POST['wpcf7-mail-attachments'] ),
+ 'use_html' => ( 1 == $_POST['wpcf7-mail-use-html'] ) ? true : false
+ );
+ $mail_2 = array(
+ 'active' => ( 1 == $_POST['wpcf7-mail-2-active'] ) ? true : false,
+ 'subject' => trim( $_POST['wpcf7-mail-2-subject'] ),
+ 'sender' => trim( $_POST['wpcf7-mail-2-sender'] ),
+ 'body' => trim( $_POST['wpcf7-mail-2-body'] ),
+ 'recipient' => trim( $_POST['wpcf7-mail-2-recipient'] ),
+ 'additional_headers' => trim( $_POST['wpcf7-mail-2-additional-headers'] ),
+ 'attachments' => trim( $_POST['wpcf7-mail-2-attachments'] ),
+ 'use_html' => ( 1 == $_POST['wpcf7-mail-2-use-html'] ) ? true : false
+ );
+ $messages = array(
+ 'mail_sent_ok' => trim( $_POST['wpcf7-message-mail-sent-ok'] ),
+ 'mail_sent_ng' => trim( $_POST['wpcf7-message-mail-sent-ng'] ),
+ 'akismet_says_spam' => trim( $_POST['wpcf7-message-akismet-says-spam'] ),
+ 'validation_error' => trim( $_POST['wpcf7-message-validation-error'] ),
+ 'accept_terms' => trim( $_POST['wpcf7-message-accept-terms'] ),
+ 'invalid_email' => trim( $_POST['wpcf7-message-invalid-email'] ),
+ 'invalid_required' => trim( $_POST['wpcf7-message-invalid-required'] ),
+ 'quiz_answer_not_correct' => trim( $_POST['wpcf7-message-quiz-answer-not-correct'] ),
+ 'captcha_not_match' => trim( $_POST['wpcf7-message-captcha-not-match'] ),
+ 'upload_failed' => trim( $_POST['wpcf7-message-upload-failed'] ),
+ 'upload_file_type_invalid' => trim( $_POST['wpcf7-message-upload-file-type-invalid'] ),
+ 'upload_file_too_large' => trim( $_POST['wpcf7-message-upload-file-too-large'] )
+ );
+ $additional_settings = trim( $_POST['wpcf7-additional-settings'] );
+
+ $query = array();
+ $query['message'] = ( $contact_form->initial ) ? 'created' : 'saved';
+
+ $contact_form->title = $title;
+ $contact_form->form = $form;
+ $contact_form->mail = $mail;
+ $contact_form->mail_2 = $mail_2;
+ $contact_form->messages = $messages;
+ $contact_form->additional_settings = $additional_settings;
+
+ $contact_form->save();
+
+ $query['contactform'] = $contact_form->id;
+ $redirect_to = wpcf7_admin_url( 'admin.php', $query );
+ wp_redirect( $redirect_to );
+ exit();
+ } elseif ( isset( $_POST['wpcf7-copy'] ) && wpcf7_admin_has_edit_cap() ) {
+ $id = $_POST['wpcf7-id'];
+ check_admin_referer( 'wpcf7-copy_' . $id );
+
+ $query = array();
+
+ if ( $contact_form = wpcf7_contact_form( $id ) ) {
+ $new_contact_form = $contact_form->copy();
+ $new_contact_form->save();
+
+ $query['contactform'] = $new_contact_form->id;
+ $query['message'] = 'created';
+ } else {
+ $query['contactform'] = $contact_form->id;
+ }
+
+ $redirect_to = wpcf7_admin_url( 'admin.php', $query );
+ wp_redirect( $redirect_to );
+ exit();
+ } elseif ( isset( $_POST['wpcf7-delete'] ) && wpcf7_admin_has_edit_cap() ) {
+ $id = $_POST['wpcf7-id'];
+ check_admin_referer( 'wpcf7-delete_' . $id );
+
+ if ( $contact_form = wpcf7_contact_form( $id ) )
+ $contact_form->delete();
+
+ $redirect_to = wpcf7_admin_url( 'admin.php', array( 'message' => 'deleted' ) );
+ wp_redirect( $redirect_to );
+ exit();
+ } elseif ( isset( $_GET['wpcf7-create-table'] ) ) {
+ check_admin_referer( 'wpcf7-create-table' );
+
+ $query = array();
+
+ if ( ! wpcf7_table_exists() && current_user_can( 'activate_plugins' ) ) {
+ wpcf7_install();
+ if ( wpcf7_table_exists() ) {
+ $query['message'] = 'table_created';
+ } else {
+ $query['message'] = 'table_not_created';
+ }
+ }
+
+ wp_redirect( wpcf7_admin_url( 'admin.php', $query ) );
+ exit();
+ }
+
+ add_menu_page( __( 'Contact Form 7', 'wpcf7' ), __( 'Contact', 'wpcf7' ),
+ WPCF8_ADMIN_READ_CAPABILITY, __FILE__, 'wpcf7_admin_management_page' );
+
+ add_submenu_page( __FILE__, __( 'Edit Contact Forms', 'wpcf7' ), __( 'Edit', 'wpcf7' ),
+ WPCF8_ADMIN_READ_CAPABILITY, __FILE__, 'wpcf7_admin_management_page' );
+}
+
+add_action( 'admin_menu', 'wpcf7_admin_add_pages' );
+
+function wpcf7_admin_head() {
+ global $plugin_page;
+
+ if ( isset( $plugin_page ) && $plugin_page == plugin_basename( __FILE__ ) ) {
+
+ $admin_stylesheet_url = wpcf7_plugin_url( 'admin/admin-stylesheet.css' );
+ echo '<link rel="stylesheet" href="' . $admin_stylesheet_url . '" type="text/css" />';
+
+ if ( 'rtl' == get_bloginfo( 'text_direction' ) ) {
+ $admin_stylesheet_rtl_url = wpcf7_plugin_url( 'admin/admin-stylesheet-rtl.css' );
+ echo '<link rel="stylesheet" href="' . $admin_stylesheet_rtl_url . '" type="text/css" />';
+ }
+
+?>
+<script type="text/javascript">
+//<![CDATA[
+var _wpcf7 = {
+ captchaMod: <?php echo ( class_exists( 'ReallySimpleCaptcha' ) ) ? 'true' : 'false' ?>
+};
+//]]>
+</script>
+<?php
+ }
+}
+
+add_action( 'admin_head', 'wpcf7_admin_head' );
+
+function wpcf7_admin_load_js() {
+ global $pagenow;
+
+ if ( ! is_admin() )
+ return;
+
+ if ( 'admin.php' != $pagenow )
+ return;
+
+ if ( false === strpos( $_GET['page'], 'contact-form-7' ) )
+ return;
+
+ wp_enqueue_script( 'wpcf7-admin', wpcf7_plugin_url( 'admin/wpcf7-admin.js' ), array('jquery'), WPCF8_VERSION, true );
+ wp_localize_script( 'wpcf7-admin', '_wpcf7L10n', array(
+ 'optional' => __( 'optional', 'wpcf7' ),
+ 'generateTag' => __( 'Generate Tag', 'wpcf7' ),
+ 'textField' => __( 'Text field', 'wpcf7' ),
+ 'emailField' => __( 'Email field', 'wpcf7' ),
+ 'textArea' => __( 'Text area', 'wpcf7' ),
+ 'menu' => __( 'Drop-down menu', 'wpcf7' ),
+ 'checkboxes' => __( 'Checkboxes', 'wpcf7' ),
+ 'radioButtons' => __( 'Radio buttons', 'wpcf7' ),
+ 'acceptance' => __( 'Acceptance', 'wpcf7' ),
+ 'isAcceptanceDefaultOn' => __( "Make this checkbox checked by default?", 'wpcf7' ),
+ 'isAcceptanceInvert' => __( "Make this checkbox work inversely?", 'wpcf7' ),
+ 'isAcceptanceInvertMeans' => __( "* That means visitor who accepts the term unchecks it.", 'wpcf7' ),
+ 'captcha' => __( 'CAPTCHA', 'wpcf7' ),
+ 'quiz' => __( 'Quiz', 'wpcf7' ),
+ 'quizzes' => __( 'Quizzes', 'wpcf7' ),
+ 'quizFormatDesc' => __( "* quiz|answer (e.g. 1+1=?|2)", 'wpcf7' ),
+ 'fileUpload' => __( 'File upload', 'wpcf7' ),
+ 'bytes' => __( 'bytes', 'wpcf7' ),
+ 'submit' => __( 'Submit button', 'wpcf7' ),
+ 'tagName' => __( 'Name', 'wpcf7' ),
+ 'isRequiredField' => __( 'Required field?', 'wpcf7' ),
+ 'allowsMultipleSelections' => __( 'Allow multiple selections?', 'wpcf7' ),
+ 'insertFirstBlankOption' => __( 'Insert a blank item as the first option?', 'wpcf7' ),
+ 'makeCheckboxesExclusive' => __( 'Make checkboxes exclusive?', 'wpcf7' ),
+ 'menuChoices' => __( 'Choices', 'wpcf7' ),
+ 'label' => __( 'Label', 'wpcf7' ),
+ 'defaultValue' => __( 'Default value', 'wpcf7' ),
+ 'akismet' => __( 'Akismet', 'wpcf7' ),
+ 'akismetAuthor' => __( "This field requires author's name", 'wpcf7' ),
+ 'akismetAuthorUrl' => __( "This field requires author's URL", 'wpcf7' ),
+ 'akismetAuthorEmail' => __( "This field requires author's email address", 'wpcf7' ),
+ 'generatedTag' => __( "Copy this code and paste it into the form left.", 'wpcf7' ),
+ 'fgColor' => __( "Foreground color", 'wpcf7' ),
+ 'bgColor' => __( "Background color", 'wpcf7' ),
+ 'imageSize' => __( "Image size", 'wpcf7' ),
+ 'imageSizeSmall' => __( "Small", 'wpcf7' ),
+ 'imageSizeMedium' => __( "Medium", 'wpcf7' ),
+ 'imageSizeLarge' => __( "Large", 'wpcf7' ),
+ 'imageSettings' => __( "Image settings", 'wpcf7' ),
+ 'inputFieldSettings' => __( "Input field settings", 'wpcf7' ),
+ 'tagForImage' => __( "For image", 'wpcf7' ),
+ 'tagForInputField' => __( "For input field", 'wpcf7' ),
+ 'oneChoicePerLine' => __( "* One choice per line.", 'wpcf7' ),
+ 'show' => __( "Show", 'wpcf7' ),
+ 'hide' => __( "Hide", 'wpcf7' ),
+ 'fileSizeLimit' => __( "File size limit", 'wpcf7' ),
+ 'acceptableFileTypes' => __( "Acceptable file types", 'wpcf7' ),
+ 'needReallySimpleCaptcha' => __( "Note: To use CAPTCHA, you need Really Simple CAPTCHA plugin installed.", 'wpcf7' )
+ ) );
+}
+
+add_action( 'wp_print_scripts', 'wpcf7_admin_load_js' );
+
+function wpcf7_admin_management_page() {
+ global $wp_version;
+
+ switch ( $_GET['message'] ) {
+ case 'created':
+ $updated_message = __( "Contact form created.", 'wpcf7' );
+ break;
+ case 'saved':
+ $updated_message = __( "Contact form saved.", 'wpcf7' );
+ break;
+ case 'deleted':
+ $updated_message = __( "Contact form deleted.", 'wpcf7' );
+ break;
+ case 'table_created':
+ $updated_message = __( "Database table created.", 'wpcf7' );
+ break;
+ case 'table_not_created':
+ $updated_message = __( "Failed to create database table.", 'wpcf7' );
+ break;
+ }
+
+ $contact_forms = wpcf7_contact_forms();
+
+ $id = $_POST['wpcf7-id'];
+
+ if ( 'new' == $_GET['contactform'] ) {
+ $unsaved = true;
+ $current = -1;
+ $cf = wpcf7_contact_form_default_pack();
+ } elseif ( $cf = wpcf7_contact_form( $_GET['contactform'] ) ) {
+ $current = (int) $_GET['contactform'];
+ } else {
+ $first = reset( $contact_forms ); // Returns first item
+ $current = $first->id;
+ $cf = wpcf7_contact_form( $current );
+ }
+
+ require_once WPCF8_PLUGIN_DIR . '/admin/admin-panel.php';
+}
+
+/* Install and default settings */
+
+function wpcf7_install() {
+ global $wpdb;
+
+ if ( wpcf7_table_exists() )
+ return; // Exists already
+
+ $table_name = wpcf7_table_name();
+
+ $charset_collate = '';
+ if ( $wpdb->has_cap( 'collation' ) ) {
+ if ( ! empty( $wpdb->charset ) )
+ $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
+ if ( ! empty( $wpdb->collate ) )
+ $charset_collate .= " COLLATE $wpdb->collate";
+ }
+