Plugin Directory

Changeset 1180709


Ignore:
Timestamp:
06/14/2015 07:23:04 PM (11 years ago)
Author:
fdoromo
Message:

tags/2.6

Location:
wp-mobile-edition
Files:
151 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • wp-mobile-edition/trunk/admin/class-admin.php

    r911953 r1180709  
    2626                 'p3_txt5'            => '',
    2727                 'p3_txt6'            => '',
     28                 'p3_txt7'            => 'Name',
     29                 'p3_txt8'            => 'Subject',
     30                 'p3_txt9'            => '',
     31                 'p3_txt10'           => '',
     32                 'p3_txt11'           => '',
     33                 'p3_txt12'           => 'Message',
    2834                 'p3_opl1'            => '',
    2935                 'p3_opl2'            => '', //Favicon
  • wp-mobile-edition/trunk/admin/class-process.php

    r914857 r1180709  
    100100               $settings['p3_txt6'] = stripslashes($_POST['p3_txt6']);
    101101            }
     102            if ( isset($_POST['p3_txt7']) ) {
     103               $settings['p3_txt7'] = stripslashes($_POST['p3_txt7']);
     104            }
     105            if ( isset($_POST['p3_txt8']) ) {
     106               $settings['p3_txt8'] = stripslashes($_POST['p3_txt8']);
     107            }
     108            if ( isset($_POST['p3_txt9']) ) {
     109               $settings['p3_txt9'] = stripslashes($_POST['p3_txt9']);
     110            }
     111            if ( isset($_POST['p3_txt10']) ) {
     112               $settings['p3_txt10'] = stripslashes($_POST['p3_txt10']);
     113            }
     114            if ( isset($_POST['p3_txt11']) ) {
     115               $settings['p3_txt11'] = stripslashes($_POST['p3_txt11']);
     116            }
     117            if ( isset($_POST['p3_txt12']) ) {
     118               $settings['p3_txt12'] = stripslashes($_POST['p3_txt12']);
     119            }
     120
    102121//----------textarea
    103122            if ( isset($_POST['p3_tex1']) ) {
  • wp-mobile-edition/trunk/admin/class-public.php

    r1178683 r1180709  
    11<?php
    22class WP_Mobile_Edition {
    3     const VERSION               = '2.5';  //
     3    const VERSION               = '2.6';  //
    44    const PHP_MIN               = '5.0';  //
    55    const WP_MIN                = '3.0';  //
  • wp-mobile-edition/trunk/admin/includes/mobile_themes/mTheme-Unus/page-fdx-contact.php

    r1178683 r1180709  
    11<?php
     2//If the form is submitted
    23if(isset($_POST['submitted'])) {
     4
    35        //Check to make sure that the name field is not empty
    46        if(trim($_POST['contactName']) === '') {
     
    1315            $emailError = true;
    1416            $hasError = true;
    15         } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) {
    16             $emailError = true;
     17 //     } else if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", trim($_POST['email']))) {
     18        } else if ( !is_email( trim($_POST['email']) ) ) {
     19            $emailError = true;
    1720            $hasError = true;
    1821        } else {
     
    3942            $assunto = trim($_POST['assunto']);
    4043        }
     44if ( fdx_option('p3_txt9') <> "" ) {
     45         $extrafield1 = trim($_POST['extraField1']);
     46} else {$extrafield1 = '';}
     47
     48if ( fdx_option('p3_txt10') <> "" ) {
     49         $extrafield2 = trim($_POST['extraField2']);
     50} else {$extrafield2 = '';}
     51
     52if ( fdx_option('p3_txt11') <> "" ) {
     53         $extrafield3 = trim($_POST['extraField3']);
     54} else {$extrafield3 = '';}
     55
     56$str = get_site_url();
     57$str = preg_replace('#^https?://#', '', $str);
    4158
    4259
    4360        //If there is no error, send the email
    4461        if(!isset($hasError)) {
    45 get_template_part('library/phpmailer/PHPMailerAutoload');
    46 $mail   = new PHPMailer();
    47 $mail->IsSendmail();
    48 // $mail->IsQmail();
    49 $email = trim($_POST['email']);
    50 $social = trim($_POST['social']);
    51 $body   = 'Name: '. $name . '<br />Email: ' . $email . '<p>Subject: ' . $assunto. '</p><p>Comment: '. $comments;
    52 $mail->SetFrom($email , $name);
    53 $mail->AddReplyTo($email, $name);
    54 $address = get_option('admin_email');
    55 $mail->AddAddress($address, "Fabrix");
    56 $mail->Subject    = "[WP Mobile Edition]~" .$assunto;
    57 $mail->MsgHTML($body);
    58 if(!$mail->Send()) {
    59   $emailSent = false;
    60 } else {
    61   $emailSent = true;
    62 }
     62            $emailTo = get_option('admin_email');
     63            $urlsend = $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
     64            $ip = $_SERVER['REMOTE_ADDR']; //ip
     65            $data = date('d/M/Y H:i:s'); //data
     66            $subject = '['.$str.']~' .$assunto;
     67            $body = "&rArr; $name <p>&rArr; $email </p><p>&rArr; $assunto </p><p>&rArr; $extrafield1</p><p>&rArr; $extrafield2</p><p>&rArr; $extrafield3</p><p>&rArr; $comments </p>-------------------------------------------<br /><small>IP: $ip | $data(gmt)<br /> $urlsend </small>";
     68            $headers = "MIME-Version: 1.0" . "\r\n";
     69            $headers .= "Content-type:text/html;charset=utf-8" . "\r\n";
     70            $headers .= 'From: '.$name.' <'.$email.'>' . "\r\n" . 'Reply-To: ' . $email . "\r\n";
    6371
     72            mail($emailTo, $subject, $body, $headers);
     73            $emailSent = true;
    6474        }
    6575
    66 
    67 
    6876}
    69 
    70           $assunto_email = "";
    71           if(isset($_GET['id'])) {
    72           $assunto_email = $_GET['id'];
    73           }
    74 //-----------------
    75 get_header(); ?>
     77?>
     78<?php get_header(); ?>
    7679<div class="fdx_topheading"><?php _e('Contact', 'wp-mobile-edition') ?></div>
    7780<div class="fdx_content" style="padding: 10px">
    78 <?php if(isset($emailSent) && $emailSent == true) { ?>
     81 <?php if(isset($emailSent) && $emailSent == true) { ?>
    7982
    8083    <div style="text-align: center">
     
    8386    </div>
    8487
    85 <?php } elseif(isset($emailSent) && $emailSent == false) { ?>
    86 <p><h2>PHPMailer Error: <a href="#"><?php  echo $mail->ErrorInfo;  ?></a>   </h2>   </p>
    8788<?php } else { ?>
    8889
     
    9394
    9495<div class="input-group">
    95 <span class="input-group-addon">&rarr;</span><input class="form-control" name="contactName" id="contactName" value="<?php if(isset($_POST['contactName'])) echo $_POST['contactName'];?>" type="text" <?php global $nameError; if($nameError != '') { ?>style="border: 1px solid #DD0000;"<?php } ?> placeholder="Name">
     96<span class="input-group-addon">&rarr;</span><input class="form-control" name="contactName" id="contactName" value="<?php if(isset($_POST['contactName'])) echo $_POST['contactName'];?>" type="text" <?php if(@$nameError != '') { ?>style="border: 1px solid #DD0000;"<?php } ?> placeholder="<?php if ( fdx_option('p3_txt7') <> "" ) { echo fdx_option('p3_txt7');}?>">
    9697</div>
    9798<br>
    9899<div class="input-group">
    99 <span class="input-group-addon">&rarr;</span><input class="form-control" name="email" id="email" value="<?php if(isset($_POST['email']))  echo $_POST['email'];?>" <?php global $emailError; if($emailError != '') { ?>style="border: 1px solid #DD0000;"<?php } ?> placeholder="E-mail">
     100<span class="input-group-addon">&rarr;</span><input class="form-control" name="email" id="email" value="<?php if(isset($_POST['email']))  echo $_POST['email'];?>" <?php if(@$emailError != '') { ?>style="border: 1px solid #DD0000;"<?php } ?> placeholder="E-mail">
    100101</div>
    101102
    102103<br>
    103104<div class="input-group">
    104 <span class="input-group-addon">&rarr;</span><input class="form-control" name="assunto" id="assunto" value="<?php if(isset($_POST['assunto'])) echo $_POST['assunto'];?><?php echo $assunto_email;?>" <?php global $assuntoError; if($assuntoError != '') { ?>style="border: 1px solid #DD0000;"<?php } ?> placeholder="Subject">
     105<span class="input-group-addon">&rarr;</span><input class="form-control" name="assunto" id="assunto" value="<?php if(isset($_POST['assunto'])) echo $_POST['assunto'];?>" <?php if(@$assuntoError != '') { ?>style="border: 1px solid #DD0000;"<?php } ?> placeholder="<?php if ( fdx_option('p3_txt8') <> "" ) { echo fdx_option('p3_txt8');}?>">
    105106</div>
    106107
     108<?php if ( fdx_option('p3_txt9') <> "" ) { ?>
    107109<br>
    108 <textarea name="comments" id="commentsText" class="form-control" rows="3" <?php global $commentError; if($commentError != '') { ?>style="border: 1px solid #DD0000;"<?php } ?> placeholder="Message"><?php if(isset($_POST['comments'])) { if(function_exists('stripslashes')) { echo stripslashes($_POST['comments']); } else { echo $_POST['comments']; } } ?></textarea>
     110<div class="input-group">
     111<span class="input-group-addon">&rarr;</span><input class="form-control" name="extraField1" id="extraField1" value="<?php if(isset($_POST['extraField1'])) echo $_POST['extraField1'];?>" type="text" placeholder="<?php echo fdx_option('p3_txt9'); ?>">
     112</div>
     113<?php }  ?>
     114
     115<?php if ( fdx_option('p3_txt10') <> "" ) { ?>
     116<br>
     117<div class="input-group">
     118<span class="input-group-addon">&rarr;</span><input class="form-control" name="extraField2" id="extraField2" value="<?php if(isset($_POST['extraField2'])) echo $_POST['extraField2'];?>" type="text" placeholder="<?php echo fdx_option('p3_txt10'); ?>">
     119</div>
     120<?php }  ?>
     121
     122
     123<?php if ( fdx_option('p3_txt11') <> "" ) { ?>
     124<br>
     125<div class="input-group">
     126<span class="input-group-addon">&rarr;</span><input class="form-control" name="extraField3" id="extraField3" value="<?php if(isset($_POST['extraField3'])) echo $_POST['extraField3'];?>" type="text" placeholder="<?php echo fdx_option('p3_txt11'); ?>">
     127</div>
     128<?php }  ?>
     129
     130
     131<br>
     132<textarea name="comments" id="commentsText" class="form-control" rows="3" <?php if(@$commentError != '') { ?>style="border: 1px solid #DD0000;"<?php } ?> placeholder="<?php if ( fdx_option('p3_txt12') <> "" ) { echo fdx_option('p3_txt12');}?>"><?php if(isset($_POST['comments'])) { if(function_exists('stripslashes')) { echo stripslashes($_POST['comments']); } else { echo $_POST['comments']; } } ?></textarea>
    109133<input type="hidden" name="submitted" id="submitted" value="true" />
    110134<div style="text-align: center; margin-top: 10px"><button type="submit" name="submit" id="submit" style="padding: 5px"><?php _e('Send message', 'wp-mobile-edition') ?></button></div>
  • wp-mobile-edition/trunk/admin/page-p3.php

    r914857 r1180709  
    132132
    133133<table style="width:100%;" class="widefat">
    134  <thead><tr><th><?php _e('Compatibility', 'wp-mobile-edition') ?></th> </tr></thead>
     134 <thead><tr><th><?php _e('Compatibility', $this->plugin_slug) ?></th> </tr></thead>
    135135<tbody><tr class="alternate"><td>
    136136<strong><?php _e('Remove these Shortcodes', $this->plugin_slug) ?> </strong><br>
     
    163163</tbody>
    164164</table>
     165
     166<!-- ##################################################### -->
     167<br>
     168<table style="width:100%;" class="widefat">
     169<thead><tr><th><?php _e('Contact Page', $this->plugin_slug); ?></th> </tr></thead>
     170<tbody><tr class="alternate">
     171<td colspan="2"><?php _e('Extra fields to Contact Form', $this->plugin_slug); ?>. <strong><?php _e('Leave blank to disable', $this->plugin_slug) ?></strong></td>  </tr>
     172<tr class="alternate">
     173<td>
     174<p><input id='p3_txt7' type='text' name='p3_txt7' value='<?php echo $settings['p3_txt7']; ?>' />  &larr;<?php _e('Required fields', $this->plugin_slug) ?> #1</p>
     175<p><input id='p3_txt8' type='text' name='p3_txt8' value='<?php echo $settings['p3_txt8']; ?>' />  &larr;<?php _e('Required fields', $this->plugin_slug) ?> #2</p>
     176<p><input id='p3_txt12' type='text' name='p3_txt12' value='<?php echo $settings['p3_txt12']; ?>' />  &larr;<?php _e('Required fields', $this->plugin_slug) ?> #3</p>
     177<p><input id='p3_txt9' type='text' name='p3_txt9' value='<?php echo $settings['p3_txt9']; ?>' />  &larr;<?php _e('Extra fields', $this->plugin_slug) ?> #1</p>
     178<p><input id='p3_txt10' type='text' name='p3_txt10' value='<?php echo $settings['p3_txt10']; ?>' />  &larr;<?php _e('Extra fields', $this->plugin_slug) ?> #2</p>
     179<p><input id='p3_txt11' type='text' name='p3_txt11' value='<?php echo $settings['p3_txt11']; ?>' />  &larr;<?php _e('Extra fields', $this->plugin_slug) ?> #3</p>
     180</td>
     181
     182</tr>
     183</tbody>
     184</table>
     185<!-- ##################################################### -->
     186
     187
     188
     189
     190
     191
     192
     193
    165194
    166195
  • wp-mobile-edition/trunk/readme.txt

    r1178683 r1180709  
    66Requires at least: 3.0
    77Tested up to: 4.2
    8 Stable tag: 2.5
     8Stable tag: 2.6
    99License: GPLv2 or later
    1010
     
    106106
    107107== Changelog ==
     108* 2.6
     109   * NEW FEATURE - Extra fields to Contact Form.
    108110
    109111* 2.5
     
    203205== Upgrade Notice ==
    204206
    205 = 2.5 =
     207= 2.6 =
    206208IMPORTANT: After upgrade, Deactivate and Activate the plugin to update the files of mobile theme.
    207209
  • wp-mobile-edition/trunk/wp-mobile-edition.php

    r1178683 r1180709  
    44 * Plugin URI: http://wordpress.org/extend/plugins/wp-mobile-edition
    55 * Description: Is a complete toolkit to mobilize your WordPress site. It has a mobile switcher and Mobile themes.
    6  * Version: 2.5
     6 * Version: 2.6
    77 * Author: Fabrix DoRoMo
    88 * Author URI: http://fabrix.net
Note: See TracChangeset for help on using the changeset viewer.