-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,114 +1,69 @@ | ||
=== Plugin Name === | ||
Contributors: (this should be a list of wordpress.org userid's) | ||
=== Contact Form 7 Polylang Module === | ||
Contributors: aurovrata | ||
Donate link: http://syllogic.in | ||
Tags: comments, spam | ||
Tags: polylang, contact form 7, mulstisite, contact form 7 extension, contact form 7 module, multilingual contact form 7 | ||
Requires at least: 3.0.1 | ||
Tested up to: 3.4 | ||
Stable tag: 4.3 | ||
Tested up to: 4.4.1 | ||
Stable tag: 1.0 | ||
License: GPLv2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
Here is a short description of the plugin. This should be no more than 150 characters. No markup here. | ||
This plugin allows multilingual contact form 7 management using the polylang plugin. | ||
|
||
== Description == | ||
This plugin allows multilingual contact form 7 management using the polylang plugin. Both Polylang and Contact Form 7 need to be installed prior to installing this plugin. Works with miltisite installations too. | ||
|
||
This is the long description. No limit, and you can use Markdown (as well as in the following sections). | ||
|
||
For backwards compatibility, if this section is missing, the full length of the short description will be used, and | ||
Markdown parsed. | ||
|
||
A few notes about the sections above: | ||
|
||
* "Contributors" is a comma separated list of wp.org/wp-plugins.org usernames | ||
* "Tags" is a comma separated list of tags that apply to the plugin | ||
* "Requires at least" is the lowest version that the plugin will work on | ||
* "Tested up to" is the highest version that you've *successfully used to test the plugin*. Note that it might work on | ||
higher versions... this is just the highest one you've verified. | ||
* Stable tag should indicate the Subversion "tag" of the latest stable version, or "trunk," if you use `/trunk/` for | ||
stable. | ||
|
||
Note that the `readme.txt` of the stable tag is the one that is considered the defining one for the plugin, so | ||
if the `/trunk/readme.txt` file says that the stable tag is `4.3`, then it is `/tags/4.3/readme.txt` that'll be used | ||
for displaying information about the plugin. In this situation, the only thing considered from the trunk `readme.txt` | ||
is the stable tag pointer. Thus, if you develop in trunk, you can update the trunk `readme.txt` to reflect changes in | ||
your in-development version, without having that information incorrectly disclosed about the current stable version | ||
that lacks those changes -- as long as the trunk's `readme.txt` points to the correct stable tag. | ||
|
||
If no stable tag is provided, it is assumed that trunk is stable, but you should specify "trunk" if that's where | ||
you put the stable version, in order to eliminate any doubt. | ||
|
||
== Installation == | ||
|
||
This section describes how to install the plugin and get it working. | ||
1. Download and install the PolyLang plugin, and Contact Form 7 plugins. Activate both plugins. | ||
2. Download and install the Contact Form 7 Polylang module plugin and activate it. | ||
3. Activate the plugin through the 'Plugins' menu in WordPress | ||
4. Once activated, open the Polylang settings page, Settings->Languages in your admin dashboard. | ||
5. Select the Settings tab and open the section 'Custom Post Types and Taxonomie', ensure that Contact Form checkbox is selected, and save your settings. | ||
6. If you already have Contact Forms created, Polylang settings page should notify you that there are some content that needs to be assigned to the default language. Click on the link, this will assign all your current contact forms to the default language you have selected in your Polylang settings. | ||
7. Now open the Contact Form table list and you should see the polylang language columns added to your form table. You can edit forms and change their language assignment, as well as associate translated forms. | ||
8. The form table list does not display the language content properly, this is due to a restriction in the CF7 code. There is a small change that can be done to the code to enable this, and you can follow my instructions in the section **CF7 Code Modification** below if you wish. It should not stop you from using the plugin, you will just be missing the table language columns content and links. | ||
|
||
e.g. | ||
== Frequently Asked Questions == | ||
|
||
1. Upload `cf7-polylang.php` to the `/wp-content/plugins/` directory | ||
1. Activate the plugin through the 'Plugins' menu in WordPress | ||
1. Place `<?php do_action('plugin_name_hook'); ?>` in your templates | ||
= My new forms are not translated in my language = | ||
|
||
== Frequently Asked Questions == | ||
If you found that you installed the plugin correctly and are able to manage your forms using the polylang language columns, then it is likely that the language your have selected does not have a translation for the Contact Form 7. You can visit the following [translation project page](https://translate.wordpress.org/projects/wp-plugins/contact-form-7) to see the status of the translation CF7 for your language. | ||
|
||
= A question that someone might have = | ||
= Contact Form 7 is translated in my language, but does not load = | ||
|
||
An answer to that question. | ||
If you have checked the above linked page and are able to find your language, then you can download your language translation pack manually. It is possible that there is mismatch between the local code used by Polylang and that assigned to your language pack. | ||
Open the translation page for your specific language (click on the language row in this [table](https://translate.wordpress.org/projects/wp-plugins/contact-form-7)). | ||
Scroll to the bottom of the page and selected the Export format from the 2nd dropdown to 'Machine Object .mo', then click the Export link. This will download a zip flie. Extract the content of this file in the `plugins/contact-form-7/language/` folder. Rename file name so that the local of the file matches the local of your language as defined by Polylang. When you create a new form in your language you will find the polylang locale code in the url attributes of your browser address bar. So if your locale is tk_TK, and you have dowloaded and extracted a file called contact-form-7-tk.mo, rename it to contact-form-7-tk_TK.mo. This will ensure the correct file is picked. | ||
|
||
= What about foo bar? = | ||
= My forms are only partially translated = | ||
|
||
Answer to foo bar dilemma. | ||
This is because the translation in your language have not be completed. You can help the community by completing the translation [online](https://translate.wordpress.org/projects/wp-plugins/contact-form-7). You will need to sign up for an account if you haven't got one already and login. You can also complete the translation on your computer by following the above procedure to download the current status of your language translation. Insread of the 'Machine Obect .mo' format, select the 'Portable Object .po' format. Extract the file from the zip archive your download and edit the file using the [PoEdit(or)](https://poedit.net/). You can then save your translation in the 'Machine Object format' and follow the remaining instructions above to make sure your new translation file is picked up by the plugin. | ||
|
||
== Screenshots == | ||
|
||
1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from | ||
the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets | ||
directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png` | ||
(or jpg, jpeg, gif). | ||
2. This is the second screen shot | ||
1. Contact form table list with Polylang language columns. | ||
2. Creating a new translation form, with polylang language metabox options. | ||
3. There is a bug in the integration which fails to pick the fact that language options have been saved. So even after click the 'Save' button you will see the familiar alert window popup, you can safely ignore the message. | ||
|
||
== Changelog == | ||
|
||
= 1.0 = | ||
* A change since the previous version. | ||
* Another change. | ||
|
||
= 0.5 = | ||
* List versions from most recent at top to oldest at bottom. | ||
|
||
== Upgrade Notice == | ||
|
||
= 1.0 = | ||
Upgrade notices describe the reason a user should upgrade. No more than 300 characters. | ||
|
||
= 0.5 = | ||
This version fixes a security related bug. Upgrade immediately. | ||
|
||
== Arbitrary section == | ||
|
||
You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated | ||
plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or | ||
"installation." Arbitrary sections will be shown below the built-in sections outlined above. | ||
|
||
== A brief Markdown Example == | ||
|
||
Ordered list: | ||
|
||
1. Some feature | ||
1. Another feature | ||
1. Something else about the plugin | ||
|
||
Unordered list: | ||
* first verions | ||
|
||
* something | ||
* something else | ||
* third thing | ||
|
||
Here's a link to [WordPress](http://wordpress.org/ "Your favorite software") and one to [Markdown's Syntax Documentation][markdown syntax]. | ||
Titles are optional, naturally. | ||
== CF7 Code Modification == | ||
|
||
[markdown syntax]: http://daringfireball.net/projects/markdown/syntax | ||
"Markdown is what the parser uses to process much of the readme file" | ||
As of this writing, Contact Form 7 plugin does not provide any hook mechanism to add additional columsn to the form table list. This is due to the fact that the form plugin was coded at a time when Wordpress offered very little such flexibility. To enable the language coulmns in the CF7 table list, a small change needs to be done in the code, the file `admin/includes/class-contact-forms-list-table.php` in the plugin folder has the following function on line 88, | ||
`function column_default( $item, $column_name ) { | ||
return ''; | ||
}` | ||
this need to be changed to, | ||
`function column_default( $item, $column_name ) { | ||
return apply_filters( "manage_cf7_custom_column", $column_name, $item->id() ); | ||
} | ||
` | ||
if you want the language columns to be filled in. I have [requested the author](https://wordpress.org/support/topic/request-for-new-filter-for-extending-cf7-admin-dashboard-table) of the plugin to include the modification in his next release, so I hope this will not be required in the future. | ||
|
||
Markdown uses email style notation for blockquotes and I've been told: | ||
> Asterisks for *emphasis*. Double it up for **strong**. | ||
|
||
`<?php code(); // goes in backticks ?>` |