PluginProbe
Database for Contact Form 7 / trunk
Database for Contact Form 7 vtrunk
trunk 3.0.6 3.0.7 3.0.8 3.0.9
cf7-database / admin / unique-id.php

unique-id.php in Database for Contact Form 7 trunk, at admin/unique-id.php

28 lines 874 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit( 'Direct\'s not allowed' );
4 }
5
6 add_filter( 'cf7d_entry_value', 'filter_cf7d_entry_value', 10, 3 );
7 if ( ! function_exists( 'filter_cf7d_entry_value' ) ) {
8 function filter_cf7d_entry_value( $value, $name ) {
9 $value = preg_replace( "/\r?\n|\r/", '', $value );
10 return $value;
11 }
12 }
13 add_filter( 'cf7d_ad_before_printing_data', 'filter_cf7d_ad_before_printing_data', 10, 2 );
14 if ( ! function_exists( 'filter_cf7d_ad_before_printing_data' ) ) {
15 function filter_cf7d_ad_before_printing_data( $data, $fid ) {
16 foreach ( $data as $k => $v ) {
17 $data[ $k ]['data_id'] = $k;
18 }
19 return $data;
20 }
21 }
22 add_filter( 'cf7d_admin_fields', 'filter_cf7d_admin_fields', 10, 2 );
23 if ( ! function_exists( 'filter_cf7d_admin_fields' ) ) {
24 function filter_cf7d_admin_fields( $fields, $fid ) {
25 return array( 'data_id' => 'ID' ) + $fields;
26 }
27 }
28