插件目录

变更集1576865


忽略:
时间戳:
2017年1月17日下午10:48:23(7年(之前)
作者:
尼古拉·巴瓦罗
消息:

1.0.8
修复了标记拖动时的url更新
删除了不推荐使用的函数

位置:
控制表-7的位置模块
文件夹:
添加了16个
4已编辑

图例:

未修改
补充
远离的
  • contact-form-7/trunk/Readme.txt的位置模块

    1513661兰特 1576865兰特  
    44标签:联系人,表单,联系人表单,位置,模块,geogode,gmap,地图,地理编码器
    55至少需要:4.3
    6 测试最多:4。6.1
    7 稳定标签:1.0。7
     6测试最多:4。7.1
     7稳定标签:1.0。8
    88许可证:GPLv2或更高版本
    99许可证URI:http://www.gnu.org/licenses/gpl-2.0.html
     
    3535
    3636==变更日志==
     37
     38= 1.0.8 =
     39*修复了地图标记更新时的URL更新
     40*删除了不推荐使用的函数
    3741
    3842= 1.0.7 =
  • location-module-for-contact-form-7/trunk/cf7-location-modele.php位置模块

    1513658兰特 1576865兰特  
    44*插件URI:http://wordpress.org/extend/plugins/cf7-location-module(位置模块)/
    55*描述:位置模块(Lite)是一个Contact Form 7插件扩展,允许用户搜索其位置、调整并发送。
    6 *版本:1.0。7
     6*版本:1.0。8
    77*作者:尼古拉·巴瓦罗
    88*作者URI:https://www.nicolabavaro.it网站
     
    7878
    7979/**
    80 *位置和位置的模块初始化*
    81 */
     80 *位置和位置的模块初始化*
     81 */
    8282如果(!function_exists('cf7_location_module_init')){
    8383
    8484add_action('wpcf7_init','cf7_location_module_init');
    8585函数cf7_location_module_init(){
     86
     87if(函数存在('wpcf7_add_form_tag')){
     88/*短代码处理程序*/
     89wpcf7_add_form_tag(“位置”,“cf7_location_module_shortcode_handler”,true);
     90wpcf7_add_form_tag('location*','cf7_location_module_shortcode_handler',true);
     91回报;
     92        }
     93
    8694if(函数存在('wpcf7_add_shortcode')){
    8795/*短代码处理程序*/
     
    93101
    94102/**
    95 *位置短代码
    96 */
     103 *位置短代码
     104 */
    97105if(!function_exists('cf7_location_module_shortcode_handler')){
    98106功能cf7_location_module_shortcode_handler($tag){
    99107
    100 $tag=新WPCF7_短代码($tag);
     108如果(WPCF7_VERSION>=“4.6”){
     109$tag=新WPCF7_FormTag($tag);
     110}其他{
     111$tag=新WPCF7_短代码($tag);
     112        }
    101113
    102114if(空($tag->name))
     
    173185*CF7位置模块验证过滤器
    174186 * http://contactform7.com/2015/03/28/custom-validation/
    175 */
     187 */
    176188如果(!function_exists('cf7_location_module_validation_filter')){
    177189
     
    180192功能cf7_location_module_validation_filter($result,$tag){
    181193
    182 $tag=新WPCF7_短代码($tag);
     194//向后补偿
     195如果(WPCF7_VERSION>=“4.6”){
     196$tag=新WPCF7_FormTag($tag);
     197}其他{
     198$tag=新WPCF7_短代码($tag);
     199        }
    183200
    184201$type=$tag->type;
     
    211228
    212229/**
    213 *CF7位置模块标签生成器
    214 */
     230 *CF7位置模块标签生成器
     231 */
    215232add_action('wpcf7_admin_init','cf7_location_module_tag_generator',45);
    216233
     
    235252}
    236253
    237    /**
    238     *将所有字段选项添加到“邮件”选项卡的合并标记中
    239     *@自2.0起
    240     *@param数组$mailtags
    241     *@return邮件标签
    242     */
     254/**
     255 *将所有字段选项添加到“邮件”选项卡的合并标记中
     256 *@自2.0起
     257 *@param数组$mailtags
     258 *@return邮件标签
     259 */
    243260函数cf7_location_module_tag($mailtags=array()){
    244261
  • 位置-模块-用于控制-表格-7/trunk/js/cf7-位置-模块.js

    1513658兰特 1576865兰特  
    22*联系人表格7的位置模块(LITE)
     *
    4 *@版本1.0。7
     4*@版本1.0。8
    55 */
    66
     
    9090jQuery('#cf7-location-lat').val(e.latLng.lat());
    9191jQuery('#cf7-location-lng').val(e.latLng.lng());
     92//我构建url
     93//示例:http://maps.google.com/maps?z=12&q=loc:38.9419+-78.3020
     94//url='http://maps.google.com/maps?z=12&q=loc:';
     95//url+=e.latLng.lat();
     96//url+=“+”;
     97//url+=e.latLng.lng();
     98jQuery('#cf7-location-url').val('http://maps.google.com/maps?z=12&q=loc:'+e.latLng.lat()+'+'+e.lateLng.lng());
    9299                            }
    93100                        });
  • 位置-模块-用于控制-表格-7/trunk/js/cf7-位置-模块.min.js

    1513658兰特 1576865兰特  
    22*联系人表格7的位置模块(LITE)
     *
    4 *@版本1.0。7
     4*@版本1.0。8
    55 */
    66
    7 var ui_reload=function(){var a=jQuery(“.wpcf7”).outerWidth(),b=j查询(“#geocode-link”).out宽度(),c=j查询+“px”),a=a-b-5,jQuery(“#cf7-geocode-address”).css(“宽度”,a)},映射;jQuery(window).load(function(){ui_reload()}),jQuery(document).ready(function(a){if(jQuery(“#cf7位置图”).length){var b=CF7LM.fredit,c=CF7LM.defing,d=CF7LM.def_zoom,e=CF7LM.def_err_msg;map=新的GMap({div:“#cf7位置图”,滚动轮:!1,mapTypeControl:!1,streetViewControl:!1,lat:b,lng:c,zoom:d}),jQuery(“#geocode link”).点击(函数){GMaps.geocode({address:jQuery(“#cf7-geocode-address”).val(),回调:函数(a,b){if(“OK”==b){var c=a[0].geometry.location;map.setCenter(c.lat()、c.lng())),jQueryhttp://maps.google.com/maps?z=12&q=loc:“,url+=c.lat(),url+=”+“,url+=c.lng(),jQuery(”#cf7 location url“).val(url),map.removeMarkers(),map.addMarker({lat:c.lat(),lng:c.lng(),可拖动:!0,dragend:函数(a){jQuery(”#cf7 location lat“).val(a.latLng.lat()),jQuery(”#cf7 location lng“).val(a.latLng.lng()}}),map.setZoom(16)}else alert(e)}}};
     7var ui_reload=function(){var a=jQuery(“.wpcf7”).outerWidth(),b=j查询(“#geocode-link”).out宽度(),c=j查询+“px”),a=a-b-5,jQuery(“#cf7-geocode-address”).css(“宽度”,a)},映射;jQuery(window).load(function(){ui_reload()}),jQuery(document).ready(function(a){if(jQuery(“#cf7位置图”).length){var b=CF7LM.fredit,c=CF7LM.defing,d=CF7LM.def_zoom,e=CF7LM.def_err_msg;map=新的GMap({div:“#cf7位置图”,滚动轮:!1,mapTypeControl:!1,streetViewControl:!1,lat:b,lng:c,zoom:d}),jQuery(“#geocode link”).点击(函数){GMaps.geocode({address:jQuery(“#cf7-geocode-address”).val(),回调:函数(a,b){if(“OK”==b){var c=a[0].geometry.location;map.setCenter(c.lat()、c.lng())),jQueryhttp://maps.google.com/maps?z=12&q=loc:“,url+=c.lat(),url++”+“,url+=c.lng(),jQuery(”#cf7-location-url“).val(url),map.removeMarkers(),map.addMarker({lat:c.lat url“).val(”http://maps.google.com/maps?z=12&q=loc:“+a.latLng.lat()+”+“+a.latLng.lng()}}),map.setZoom(16)}else alert(e)}}};
注:请参见TracChangeset(跟踪变更集)获取有关使用变更集查看器的帮助。