Version Description
Download this release
Release Info
Developer | bestwebsoft |
Plugin | Contact Form by BestWebSoft |
Version | 2011.05.28 |
Comparing to | |
See all releases |
Code changes from version 2011.2.02 to 2011.05.28
- contact_form.php +19 -75
- images/icon_16.png +0 -0
- images/icon_16_c.png +0 -0
- images/icon_36.png +0 -0
- readme.txt +1 -20
- screenshot-2.jpg +0 -0
contact_form.php
CHANGED
@@ -1,10 +1,14 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
/*
|
3 |
Plugin Name: Contact Form Plugin
|
4 |
Plugin URI: http://bestwebsoft.com/plugin/
|
5 |
Description: Plugin for portfolio.
|
6 |
Author: BestWebSoft
|
7 |
-
Version:
|
8 |
Author URI: http://bestwebsoft.com/
|
9 |
License: GPLv2 or later
|
10 |
*/
|
@@ -25,54 +29,10 @@ License: GPLv2 or later
|
|
25 |
*/
|
26 |
wp_enqueue_style( 'cntctfrmStylesheet', WP_PLUGIN_URL .'/contact-form-plugin/contact_form_style.css' );
|
27 |
|
28 |
-
if( ! function_exists( 'bws_plugin_header' ) ) {
|
29 |
-
function bws_plugin_header() {
|
30 |
-
global $post_type;
|
31 |
-
?>
|
32 |
-
<style>
|
33 |
-
#adminmenu #toplevel_page_my_new_menu div.wp-menu-image
|
34 |
-
{
|
35 |
-
background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/contact-form-plugin/images/icon_16.png") no-repeat scroll center center transparent;
|
36 |
-
}
|
37 |
-
#adminmenu #toplevel_page_my_new_menu:hover div.wp-menu-image,#adminmenu #toplevel_page_my_new_menu.wp-has-current-submenu div.wp-menu-image
|
38 |
-
{
|
39 |
-
background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/contact-form-plugin/images/icon_16_c.png") no-repeat scroll center center transparent;
|
40 |
-
}
|
41 |
-
.wrap #icon-options-general.icon32-bws
|
42 |
-
{
|
43 |
-
background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/contact-form-plugin/images/icon_36.png") no-repeat scroll left top transparent;
|
44 |
-
}
|
45 |
-
</style>
|
46 |
-
<?php
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
add_action('admin_head', 'bws_plugin_header');
|
51 |
-
|
52 |
-
if( ! function_exists( 'bws_add_menu_render' ) ) {
|
53 |
-
function bws_add_menu_render() {
|
54 |
-
global $title;
|
55 |
-
?>
|
56 |
-
<div class="wrap">
|
57 |
-
<div class="icon32 icon32-bws" id="icon-options-general"></div>
|
58 |
-
<h2><?php echo $title;?></h2>
|
59 |
-
<p><a href="http://wordpress.org/extend/plugins/captcha/">Captcha</a></p>
|
60 |
-
<p><a href="http://wordpress.org/extend/plugins/contact-form-plugin/">Contact Form</a></p>
|
61 |
-
<p><a href="http://wordpress.org/extend/plugins/facebook-button-plugin/">Facebook Like Button Plugin</a></p>
|
62 |
-
<p><a href="http://wordpress.org/extend/plugins/twitter-plugin/">Twitter Plugin</a></p>
|
63 |
-
<p><a href="http://wordpress.org/extend/plugins/portfolio/">Portfolio</a></p>
|
64 |
-
<span style="color: rgb(136, 136, 136); font-size: 10px;">If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site <a href="http://bestwebsoft.com/contact/">http://bestwebsoft.com/contact/</a></span>
|
65 |
-
</div>
|
66 |
-
<?php
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
// Add option page in admin menu
|
71 |
if( ! function_exists( 'cntctfrm_admin_menu' ) ) {
|
72 |
function cntctfrm_admin_menu() {
|
73 |
-
|
74 |
-
add_menu_page(__('BWS Plugins'), __('BWS Plugins'), 'edit_themes', 'my_new_menu', 'bws_add_menu_render', " ", 90);
|
75 |
-
add_submenu_page('my_new_menu', 'Contact Form Options', 'Contact Form', 'edit_themes', "contact_form.php", 'cntctfrm_settings_page');
|
76 |
|
77 |
//call register settings function
|
78 |
add_action( 'admin_init', 'cntctfrm_settings' );
|
@@ -121,7 +81,7 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
121 |
}
|
122 |
}
|
123 |
else {
|
124 |
-
if( $cntctfrm_options_submit['cntctfrm_custom_email'] != "" && preg_match( "/^(?:[a-z0-9]+(?:[-_\.]?[a-z0-9]+)?@[a-z0-9]+(
|
125 |
update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
|
126 |
$message = "Options saved.";
|
127 |
}
|
@@ -133,12 +93,12 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
|
|
133 |
// Display form on the setting page
|
134 |
?>
|
135 |
<div class="wrap">
|
136 |
-
<div class="icon32
|
137 |
<h2>Contact Form Options</h2>
|
138 |
<div class="updated fade" <?php if( ! isset( $_REQUEST['cntctfrm_form_submit'] ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
|
139 |
<div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
|
140 |
-
<form method="post" action="
|
141 |
-
<span style="margin-bottom:15px;">
|
142 |
<p>If you would like to add a Contact Form to your website, just copy and put this shortcode onto your post or page: [contact_form]</p>
|
143 |
If information in the below fields are empty then the message will be send to an address which was specified during registration.
|
144 |
</span>
|
@@ -273,7 +233,7 @@ if( ! function_exists( 'cntctfrm_check_form' ) ) {
|
|
273 |
// Check information wich was input in fields
|
274 |
if( "" != $_REQUEST['cntctfrm_contact_name'] )
|
275 |
unset( $error_message['error_name'] );
|
276 |
-
if( "" != $_REQUEST['cntctfrm_contact_emai'] && preg_match( "/^(?:[a-z0-9]+(?:[-_\.]?[a-z0-9]+)?@[a-z0-9]+(
|
277 |
unset( $error_message['error_email'] );
|
278 |
if( "" != $_REQUEST['cntctfrm_contact_subject'] )
|
279 |
unset( $error_message['error_subject'] );
|
@@ -349,34 +309,18 @@ if( ! function_exists( 'cntctfrm_send_mail' ) ) {
|
|
349 |
}
|
350 |
}
|
351 |
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
$settings_link = '<a href="admin.php?page=contact_form.php">' . __('Settings', 'cntctfrm_plugin') . '</a>';
|
359 |
-
array_unshift( $links, $settings_link );
|
360 |
}
|
361 |
-
|
362 |
-
} // end function cntctfrm_plugin_action_links
|
363 |
-
|
364 |
-
function cntctfrm_register_plugin_links($links, $file) {
|
365 |
-
$base = plugin_basename(__FILE__);
|
366 |
-
if ($file == $base) {
|
367 |
-
$links[] = '<a href="admin.php?page=contact_form.php">' . __('Settings','cntctfrm_plugin') . '</a>';
|
368 |
-
$links[] = '<a href="http://wordpress.org/extend/plugins/contact-form-plugin/faq/" target="_blank">' . __('FAQ','cntctfrm_plugin') . '</a>';
|
369 |
-
$links[] = '<a href="Mailto:plugin@bestwebsoft.com">' . __('Support','cntctfrm_plugin') . '</a>';
|
370 |
}
|
371 |
-
return $links;
|
372 |
}
|
373 |
|
374 |
-
|
375 |
-
add_filter( 'plugin_action_links', 'cntctfrm_plugin_action_links',10,2);
|
376 |
-
|
377 |
-
//Additional links on the plugin page
|
378 |
-
add_filter( 'plugin_row_meta', 'cntctfrm_register_plugin_links',10,2);
|
379 |
-
|
380 |
add_shortcode( 'contact_form', 'cntctfrm_display_form' );
|
381 |
add_action( 'admin_menu', 'cntctfrm_admin_menu' );
|
382 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* @package Contact Form Plugin
|
4 |
+
* @version 1
|
5 |
+
*/
|
6 |
/*
|
7 |
Plugin Name: Contact Form Plugin
|
8 |
Plugin URI: http://bestwebsoft.com/plugin/
|
9 |
Description: Plugin for portfolio.
|
10 |
Author: BestWebSoft
|
11 |
+
Version: 1.02
|
12 |
Author URI: http://bestwebsoft.com/
|
13 |
License: GPLv2 or later
|
14 |
*/
|
29 |
*/
|
30 |
wp_enqueue_style( 'cntctfrmStylesheet', WP_PLUGIN_URL .'/contact-form-plugin/contact_form_style.css' );
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
// Add option page in admin menu
|
33 |
if( ! function_exists( 'cntctfrm_admin_menu' ) ) {
|
34 |
function cntctfrm_admin_menu() {
|
35 |
+
add_options_page( "Contact Form Options", "Contact Form", 'manage_options', __FILE__, 'cntctfrm_settings_page' );
|
|
|
|
|
36 |
|
37 |
//call register settings function
|
38 |
add_action( 'admin_init', 'cntctfrm_settings' );
|
81 |
}
|
82 |
}
|
83 |
else {
|
84 |
+
if( $cntctfrm_options_submit['cntctfrm_custom_email'] != "" && preg_match( "/^(?:[a-z0-9]+(?:[-_\.]?[a-z0-9]+)?@[a-z0-9]+(?:\.?[a-z0-9]+)?\.[a-z]{2,5})$/i", trim( $cntctfrm_options_submit['cntctfrm_custom_email'] ) ) ) {
|
85 |
update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
|
86 |
$message = "Options saved.";
|
87 |
}
|
93 |
// Display form on the setting page
|
94 |
?>
|
95 |
<div class="wrap">
|
96 |
+
<div class="icon32" id="icon-options-general"><br></div>
|
97 |
<h2>Contact Form Options</h2>
|
98 |
<div class="updated fade" <?php if( ! isset( $_REQUEST['cntctfrm_form_submit'] ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
|
99 |
<div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
|
100 |
+
<form method="post" action="options-general.php?page=contact-form-plugin/contact_form.php">
|
101 |
+
<span style="border-bottom:1px dashed;margin-bottom:15px;">
|
102 |
<p>If you would like to add a Contact Form to your website, just copy and put this shortcode onto your post or page: [contact_form]</p>
|
103 |
If information in the below fields are empty then the message will be send to an address which was specified during registration.
|
104 |
</span>
|
233 |
// Check information wich was input in fields
|
234 |
if( "" != $_REQUEST['cntctfrm_contact_name'] )
|
235 |
unset( $error_message['error_name'] );
|
236 |
+
if( "" != $_REQUEST['cntctfrm_contact_emai'] && preg_match( "/^(?:[a-z0-9]+(?:[-_\.]?[a-z0-9]+)?@[a-z0-9]+(?:\.?[a-z0-9]+)?\.[a-z]{2,5})$/i", trim( $_REQUEST['cntctfrm_contact_emai'] ) ) )
|
237 |
unset( $error_message['error_email'] );
|
238 |
if( "" != $_REQUEST['cntctfrm_contact_subject'] )
|
239 |
unset( $error_message['error_subject'] );
|
309 |
}
|
310 |
}
|
311 |
|
312 |
+
// Add the link on setting page in the plugin activation page
|
313 |
+
if( ! function_exists( contact_settings ) ) {
|
314 |
+
function contact_settings( $links, $file ) {
|
315 |
+
$base = plugin_basename( __FILE__ );
|
316 |
+
if ( $file == $base ) {
|
317 |
+
$links[] = '<a href="options-general.php?page=contact-form-plugin/contact_form.php">' . __( 'Settings', 'Settings' ) . '</a>';
|
|
|
|
|
318 |
}
|
319 |
+
return $links;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
}
|
|
|
321 |
}
|
322 |
|
323 |
+
add_filter( 'plugin_row_meta', 'contact_settings', 10, 2 );
|
|
|
|
|
|
|
|
|
|
|
324 |
add_shortcode( 'contact_form', 'cntctfrm_display_form' );
|
325 |
add_action( 'admin_menu', 'cntctfrm_admin_menu' );
|
326 |
|
images/icon_16.png
DELETED
Binary file
|
images/icon_16_c.png
DELETED
Binary file
|
images/icon_36.png
DELETED
Binary file
|
readme.txt
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
=== Contact Form ===
|
2 |
Contributors: bestwebsoft
|
3 |
-
Contributors: bestwebsoft
|
4 |
Donate link: http://bestwebsoft.com/
|
5 |
Tags: Contact Form, text, contact, form, contacts, contakt form, request, contact me, feedback form, feedback, contact button, contact form plugin, contacts form plugin
|
6 |
Requires at least: 2.9
|
7 |
Tested up to: 3.1.3
|
8 |
-
Stable tag: 2011.
|
9 |
|
10 |
Add Contact Form to your WordPress website.
|
11 |
|
@@ -47,15 +46,6 @@ Contact Form allows you to add a feedback form easilly and simply to a post or a
|
|
47 |
|
48 |
== Changelog ==
|
49 |
|
50 |
-
= 2.02 =
|
51 |
-
*The bug of the setting page link is fixed in this version. Please upgrade the plugin immediately. Thank you
|
52 |
-
|
53 |
-
= 2.01 =
|
54 |
-
*Usability at the settings page of plugin was improved.
|
55 |
-
|
56 |
-
= 1.03 =
|
57 |
-
*Contact form email adress bug is fixed.
|
58 |
-
|
59 |
= 1.02 =
|
60 |
*Display "thanks" message bug is fixed. Radio buttons automatic switching added (for settings page) after setting mouse cursor (clicking) into a text field.
|
61 |
|
@@ -67,15 +57,6 @@ Contact Form allows you to add a feedback form easilly and simply to a post or a
|
|
67 |
|
68 |
== Upgrade Notice ==
|
69 |
|
70 |
-
= 2.02 =
|
71 |
-
The bug of the setting page link is fixed in this version. Please upgrade the plugin immediately. Thank you
|
72 |
-
|
73 |
-
= 2.01 =
|
74 |
-
Usability at the settings page of plugin was improved.
|
75 |
-
|
76 |
-
= 1.03 =
|
77 |
-
Contact form email adress bug is fixed. Upgrade immediately.
|
78 |
-
|
79 |
= 1.02 =
|
80 |
Display "thanks" message bug is fixed. Radio buttons automatic switching added (for settings page) after setting mouse cursor (clicking) into a text field. Upgrade immediately.
|
81 |
|
1 |
=== Contact Form ===
|
2 |
Contributors: bestwebsoft
|
|
|
3 |
Donate link: http://bestwebsoft.com/
|
4 |
Tags: Contact Form, text, contact, form, contacts, contakt form, request, contact me, feedback form, feedback, contact button, contact form plugin, contacts form plugin
|
5 |
Requires at least: 2.9
|
6 |
Tested up to: 3.1.3
|
7 |
+
Stable tag: 2011.05.28
|
8 |
|
9 |
Add Contact Form to your WordPress website.
|
10 |
|
46 |
|
47 |
== Changelog ==
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
= 1.02 =
|
50 |
*Display "thanks" message bug is fixed. Radio buttons automatic switching added (for settings page) after setting mouse cursor (clicking) into a text field.
|
51 |
|
57 |
|
58 |
== Upgrade Notice ==
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
= 1.02 =
|
61 |
Display "thanks" message bug is fixed. Radio buttons automatic switching added (for settings page) after setting mouse cursor (clicking) into a text field. Upgrade immediately.
|
62 |
|
screenshot-2.jpg
CHANGED
Binary file
|