WordPress.org

Plugin Directory

Changeset 1420649


Ignore:
Timestamp:
05/19/16 23:50:55 (19 months ago)
Author:
DaoByDesign
Message:

textdomain/localization updates.

Location:
contact-form-7-honeypot
Files:
9 added
2 edited

Legend:

Unmodified
Added
Removed
  • contact-form-7-honeypot/trunk/honeypot.php

    r1343423 r1420649  
    66Author: Nocean 
    77Author URI: http://www.nocean.ca 
    8 Version: 1.8 
     8Version: 1.9 
    99Text Domain: contact-form-7-honeypot 
    1010Domain Path: /languages 
     
    1313/*  Copyright 2015  Ryan McLaughlin  (email : hello@nocean.ca) 
    1414 
    15     This program is free software; you can redistribute it and/or modify 
    16     it under the terms of the GNU General Public License as published by 
    17     the Free Software Foundation; either version 2 of the License, or 
    18     (at your option) any later version. 
    19  
    20     This program is distributed in the hope that it will be useful, 
    21     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    22     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    23     GNU General Public License for more details. 
    24  
    25     You should have received a copy of the GNU General Public License 
    26     along with this program; if not, write to the Free Software 
    27     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     15    This program is free software; you can redistribute it and/or modify 
     16    it under the terms of the GNU General Public License as published by 
     17    the Free Software Foundation; either version 2 of the License, or 
     18    (at your option) any later version. 
     19 
     20    This program is distributed in the hope that it will be useful, 
     21    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     22    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     23    GNU General Public License for more details. 
     24 
     25    You should have received a copy of the GNU General Public License 
     26    along with this program; if not, write to the Free Software 
     27    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    2828 
    2929*/ 
     30 
     31/** 
     32* Load textdomain 
     33*/ 
     34add_action( 'plugins_loaded', 'wpcf7_honeypot_load_textdomain' ); 
     35function wpcf7_honeypot_load_textdomain() { 
     36    load_plugin_textdomain( 'contact-form-7-honeypot', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' ); 
     37} 
    3038 
    3139 
     
    3846add_action( 'admin_init', 'wpcf7_honeypot_has_parent_plugin' ); 
    3947function wpcf7_honeypot_has_parent_plugin() { 
    40     if ( is_admin() && current_user_can( 'activate_plugins' ) &&  !is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) { 
    41         add_action( 'admin_notices', 'wpcf7_honeypot_nocf7_notice' ); 
    42  
    43         deactivate_plugins( plugin_basename( __FILE__ ) );  
    44  
    45         if ( isset( $_GET['activate'] ) ) { 
    46             unset( $_GET['activate'] ); 
    47         } 
    48     } 
     48    if ( is_admin() && current_user_can( 'activate_plugins' ) &&  !is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) { 
     49        add_action( 'admin_notices', 'wpcf7_honeypot_nocf7_notice' ); 
     50 
     51        deactivate_plugins( plugin_basename( __FILE__ ) );  
     52 
     53        if ( isset( $_GET['activate'] ) ) { 
     54            unset( $_GET['activate'] ); 
     55        } 
     56    } 
    4957} 
    5058 
    5159function wpcf7_honeypot_nocf7_notice() { ?> 
    52     <div class="error"> 
    53         <p> 
    54             <?php printf( 
     60    <div class="error"> 
     61        <p> 
     62            <?php printf( 
    5563                __('%s must be installed and activated for the CF7 Honeypot plugin to work', 'contact-form-7-honeypot'), 
    5664                '<a href="'.admin_url('plugin-install.php?tab=search&s=contact+form+7').'">Contact Form 7</a>' 
    5765            ); ?> 
    5866        </p> 
    59     </div> 
    60     <?php 
     67    </div> 
     68    <?php 
    6169} 
    6270 
     
    147155    if (class_exists('WPCF7_TagGenerator')) { 
    148156        $tag_generator = WPCF7_TagGenerator::get_instance(); 
    149         $tag_generator->add( 'honeypot', __( 'Honeypot', 'contact-form-7' ), 'wpcf7_tg_pane_honeypot' ); 
     157        $tag_generator->add( 'honeypot', __( 'Honeypot', 'contact-form-7-honeypot' ), 'wpcf7_tg_pane_honeypot' ); 
    150158    } else if (function_exists('wpcf7_add_tag_generator')) { 
    151         wpcf7_add_tag_generator( 'honeypot', __( 'Honeypot', 'wpcf7' ), 'wpcf7-tg-pane-honeypot', 'wpcf7_tg_pane_honeypot' ); 
     159        wpcf7_add_tag_generator( 'honeypot', __( 'Honeypot', 'contact-form-7-honeypot' ),   'wpcf7-tg-pane-honeypot', 'wpcf7_tg_pane_honeypot' ); 
    152160    } 
    153161} 
     
    166174                    <tr> 
    167175                        <th scope="row"> 
    168                             <label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?></label> 
     176                            <label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'contact-form-7-honeypot' ) ); ?></label> 
    169177                        </th> 
    170178                        <td> 
     
    176184                    <tr> 
    177185                        <th scope="row"> 
    178                             <label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'ID (optional)', 'contact-form-7' ) ); ?></label> 
     186                            <label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'ID (optional)', 'contact-form-7-honeypot' ) ); ?></label> 
    179187                        </th> 
    180188                        <td> 
     
    185193                    <tr> 
    186194                        <th scope="row"> 
    187                             <label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class (optional)', 'contact-form-7' ) ); ?></label> 
     195                            <label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class (optional)', 'contact-form-7-honeypot' ) ); ?></label> 
    188196                        </th> 
    189197                        <td> 
     
    194202                    <tr> 
    195203                        <th scope="row"> 
    196                             <label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( 'Don\'t Use Accessibility Message (optional)', 'contact-form-7' ) ); ?></label> 
     204                            <label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( 'Don\'t Use Accessibility Message (optional)', 'contact-form-7-honeypot' ) ); ?></label> 
    197205                        </th> 
    198206                        <td> 
     
    210218 
    211219            <div class="submitbox"> 
    212                 <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>" /> 
     220                <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7-honeypot' ) ); ?>" /> 
    213221            </div> 
    214222 
     
    221229                    <tr> 
    222230                        <td> 
    223                             <?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /> 
     231                            <?php echo esc_html( __( 'Name', 'contact-form-7-honeypot' ) ); ?><br /> 
    224232                            <input type="text" name="name" class="tg-name oneline" /><br /> 
    225233                            <em><small><?php echo esc_html( __( 'For better security, change "honeypot" to something less bot-recognizable.', 'contact-form-7-honeypot' ) ); ?></small></em> 
     
    234242                    <tr> 
    235243                        <td> 
    236                             <?php echo esc_html( __( 'ID (optional)', 'contact-form-7' ) ); ?><br /> 
     244                            <?php echo esc_html( __( 'ID (optional)', 'contact-form-7-honeypot' ) ); ?><br /> 
    237245                            <input type="text" name="id" class="idvalue oneline option" /> 
    238246                        </td> 
    239247                        <td> 
    240                             <?php echo esc_html( __( 'Class (optional)', 'contact-form-7' ) ); ?><br /> 
     248                            <?php echo esc_html( __( 'Class (optional)', 'contact-form-7-honeypot' ) ); ?><br /> 
    241249                            <input type="text" name="class" class="classvalue oneline option" /> 
    242250                        </td> 
     
    244252                    <tr> 
    245253                        <td colspan="2"> 
    246                             <input type="checkbox" name="nomessage:true" id="nomessage" class="messagekillvalue option" /> <label for="nomessage"><?php echo esc_html( __( 'Don\'t Use Accessibility Message (optional)', 'contact-form-7' ) ); ?></label><br /> 
     254                            <input type="checkbox" name="nomessage:true" id="nomessage" class="messagekillvalue option" /> <label for="nomessage"><?php echo esc_html( __( 'Don\'t Use Accessibility Message (optional)', 'contact-form-7-honeypot' ) ); ?></label><br /> 
    247255                            <em><?php echo __('If checked, the accessibility message will not be generated. <strong>This is not recommended</strong>. If you\'re unsure, leave this unchecked.','contact-form-7-honeypot'); ?></em> 
    248256                        </td> 
  • contact-form-7-honeypot/trunk/readme.txt

    r1343444 r1420649  
    33Requires at least: 3.5 
    44Tested up to: 4.5 
    5 Stable tag: 1.8 
     5Stable tag: 1.9 
    66Contributors: DaoByDesign 
    77Donate link: http://www.nocean.ca/buy-us-a-coffee/ 
     
    6565 
    6666== Changelog == 
     67= 1.9 = 
     68Added i18n support, French language pack. Thx chris-kns 
     69 
    6770= 1.8 = 
    6871Added wpcf7_honeypot_accessibility_message and wpcf7_honeypot_container_css filters, i18n support. 
Note: See TracChangeset for help on using the changeset viewer.