变更集1431148
时间戳: 2016年6月6日上午06:18:17 ( 8年 (之前) 地点: woocommerce-order-address-print/trunk公司 文件: -
3已编辑
图例:
未修改 补充 远离的
-
woocommerce-order-address-print/trunk/readme.txt 1431123卢比 1431148兰特 6 6 要求至少:3.5 7 7 测试达到:4.3 8 稳定标签:1。 4 8 稳定标签:1。 3.2 9 9 许可证:GPLv2或更高版本 10 10 许可证URI: http://www.gnu.org/licenses/gpl-2.0.html -
wooccommerce订单地址print/trunk/shiping_setting.php 193852兰特 1431148兰特 4 4 类WooCommerce_shipping_Address_Labels_Settings{ 5 5 公共函数__construct(){ 6 6 7 7 add_action(“admininit”,数组(&$this,“init_settings”);// 寄存器设置 8 9 10 } 11 12 13 14 8 9 10 } 11 12 13 14 15 15 /** 16 16 *将设置链接添加到插件页面 17 17 */ 18 19 公众 函数settings_page(){ 18 19 公众 静止的 函数settings_page(){ 20 20 ?> 21 21 <div class=“wrap”> 22 22 <div class=“icon32”id=“icon options general”><br/></div> 23 23 <h2><? php_e(“WooCommerce订单地址打印”,“woap”);?></ 氢气> 24 24 25 25 <div class=“wclabels-settings”> 26 26 <form method=“post”action=“options.php”> … … 46 46 <? php(电话) 47 47 } 48 48 49 49 /** 50 50 *用户设置。 51 51 */ 52 52 53 53 公共函数init_settings(){ 54 54 $option='shp_labels_template_settings'; 55 55 56 56 //在wp_options中创建选项。 57 57 if(false==get_option($option)){ 58 58 $this->default_settings($option); 59 59 } 60 60 61 61 //节。 62 62 添加设置节( … … 159 159 ) 160 160 ); */ 161 161 162 162 添加设置字段( 163 163 “show_qr”, … … 172 172 ) 173 173 ); 174 175 174 175 176 176 添加设置字段( 177 177 “ecc”, … … 191 191 ) 192 192 ); 193 193 194 194 添加设置字段( 195 195 '代码大小', … … 211 211 '8'=>__('8','woap'), 212 212 '9'=>__('9','woap'), 213 ‘10’=>__(‘10’,‘woap’), 214 215 213 ‘10’=>__(‘10’,‘woap’), 214 215 216 216 ), 217 217 ) 218 218 ); 219 220 219 220 221 221 222 222 添加设置字段( … … 322 322 ) 323 323 ); 324 325 324 325 326 326 添加设置字段( 327 327 '自定义样式', … … 378 378 } 379 379 } 380 380 381 381 /** 382 382 *文本元素回调。 … … 388 388 $id=$args['id']; 389 389 $size=isset($args['size'])$ args['size']:'25'; 390 390 391 391 $options=获取选项($menu); 392 392 393 393 if(isset($options[$id])){ 394 394 $current=$options[$id]; … … 396 396 $current=isset($args['default'])$ args['default']:''; 397 397 } 398 398 399 399 $html=sprintf('<input type=“text”id=“%1$s”name=“%2$s[%1$s]”value=“%3$s”size=“%4$s”/>',$id,$menu,$current,$size); 400 400 401 401 //显示选项说明。 402 402 if(isset($args['description'])){ 403 403 $html.= sprintf('<p class=“description”>%s</p>',$args['description']); 404 404 } 405 405 406 406 echo$html; 407 407 } … … 438 438 $current=isset($args['default'])$ args['default']:''; 439 439 } 440 440 441 441 //输出字段 442 442 printf('<input type=“text”id=“%1$s_%3$s”name=“%2$s[%1$s][%3$s]”value=“%4$s”size=“%5$s”/><br/>',$id,$menu,$name,$current,$size); 443 444 } 445 446 443 444 } 445 446 447 447 //显示选项说明。 448 448 if(isset($args['description'])){ 449 449 printf('<p class=“description”>%s</p>',$args['description']); 450 450 } 451 451 452 452 } 453 453 … … 458 458 $width=$args['width']; 459 459 $height=$args['height']; 460 460 461 461 $options=获取选项($menu); 462 462 463 463 if(isset($options[$id])){ 464 464 $current=$options[$id]; … … 466 466 $current=isset($args['default'])$ args['default']:''; 467 467 } 468 468 469 469 printf('<textarea id=“%1$s”name=“%2$s[%1$s]”cols=“%4$s”rows=“%5$s”/>%3$s</textarea>',$id,$menu,$current,$width,$height); 470 470 471 471 //显示选项说明。 472 472 if(isset($args['description'])){ … … 485 485 $menu=$args['menu']; 486 486 $id=$args['id']; 487 487 488 488 $options=获取选项($menu); 489 489 490 490 if(isset($options[$id])){ 491 491 $current=$options[$id]; … … 493 493 $current=isset($args['default'])$ args['default']:''; 494 494 } 495 495 496 496 printf('<select id=“%1$s”name=“%2$s[%1$s]”>',$id,$menu); 497 497 498 498 foreach($args['options']作为$key=>$label){ 499 499 printf('<option value=“%s”%s>%s</option>',$key,selected($current,$key,false),$label); 500 500 } 501 501 502 502 echo“</select>”; 503 503 … … 510 510 案例“text_element_callback”: 511 511 $this->text_element_callback($custom['args']); 512 断裂; 512 断裂; 513 513 案例“multiple_text_element_callback”: 514 514 $this->multiple_text_element_callback($custom['args']); 515 断裂; 515 断裂; 516 516 默认值: 517 517 断裂; 518 518 } 519 519 } 520 520 521 521 //显示选项说明。 522 522 if(isset($args['description'])){ … … 536 536 $menu=$args['menu']; 537 537 $id=$args['id']; 538 538 539 539 $options=获取选项($menu); 540 540 541 541 if(isset($options[$id])){ 542 542 $current=$options[$id]; … … 544 544 $current=isset($args['default'])$ args['default']:''; 545 545 } 546 546 547 547 printf('<input type=“checkbox”id=“%1$s”name=“%2$s[%1$s]”value=“1”%3$s/>',$id,$menu,checked(1,$current,false)); 548 548 549 549 //显示选项说明。 550 550 if(isset($args['description'])){ 551 551 printf('<p class=“description”>%s</p>',$args['description']); 552 552 } 553 553 554 554 } 555 555 … … 561 561 公共函数section_options_callback(){ 562 562 } 563 563 564 564 /** 565 565 *验证选项。 … … 572 572 //创建用于存储已验证选项的数组。 573 573 $output=数组(); 574 574 575 575 //循环访问每个传入选项。 576 576 foreach($input作为$key=>$value){ 577 577 578 578 //检查当前选项是否有值。 如果是这样,请处理它。 579 579 if(isset($input[$key])){ 580 580 581 581 //剥离所有HTML和PHP标记,并正确处理带引号的字符串。 582 582 if(is_array($input[$key]){ … … 590 590 } 591 591 } 592 592 593 593 //返回处理此操作筛选的任何其他函数的数组。 594 594 返回apply_filters('shp_labels_validate_input',$output,$input); … … 597 597 }//结束类 598 598 }//结束class_exists 599 600 601 -
woocommerce-order-address-print/trunk/shipping_address_print.php 1431145兰特 1431148兰特 418 418 $bulk_print_url=管理员url('admin-ajax.php'); 419 419 $sendback=add_query_arg(数组(“action”=>“bulk_shipping_print”,“id”=>join(“,”,数组($post_id)),$bulk_print_url); 420 $args=wp_parse_args(数组(“post”=>$post_id,“action”=> 编辑,'shippint_add_print'=>true,'total'=>$total, 'print_url'=>urlencode($sendback)),$args); 420 $args=wp_parse_args(数组(“post”=>$post_id,“action”=> “编辑”,“发货地址打印”=>true, “print_url”=>urlencode($sendback),$args); 421 421 $sendback=add_query_arg($args,''); 422 422