fork download
  1. <?php
  2.  
  3. // your code goes here
  4.  
  5. /* CSV custom - NomEnfant */
  6. add_filter( 'frm_csv_columns', 'change_nom_enfant_column_name', 10, 2 );
  7. function change_nom_enfant_column_name( $headings, $form_id ) {
  8. if ( $form_id == 10 ) {
  9. $nom_enfant_field_id = 253; // Replace 253 with the ID of the "Nom de l'enfant" field
  10. $headings[ $nom_enfant_field_id ] = 'NomEnfant';
  11. }
  12. return $headings;
  13. }
  14.  
  15.  
  16. /* CSV custom - PrenomEnfant */
  17. add_filter( 'frm_csv_columns', 'change_prenom_enfant_column_name', 10, 2 );
  18. function change_prenom_enfant_column_name( $headings, $form_id ) {
  19. if ( $form_id == 10 ) {
  20. $prenom_enfant_field_id = 254; // Replace 254 with the ID of the "Prénom de l'enfant" field
  21. $headings[ $prenom_enfant_field_id ] = 'PrenomEnfant';
  22. }
  23. return $headings;
  24. }
  25.  
  26.  
  27. /* CSV custom - DDN */
  28. add_filter( 'frm_csv_columns', 'change_ddn_column_name', 10, 2 );
  29. function change_ddn_column_name( $headings, $form_id ) {
  30. if ( $form_id == 10 ) {
  31. $ddn_field_id = 135; // Replace 135 with the ID of the "Date de naissance" field
  32. $headings[ $ddn_field_id ] = 'DDN';
  33. }
  34. return $headings;
  35. }
  36.  
  37.  
  38. /* CSV custom - Sejour
  39. add_filter( 'frm_csv_columns', 'change_sejour_enfant_column_name', 10, 2 );
  40. function change_sejour_enfant_column_name( $headings, $form_id ) {
  41.   if ( $form_id == 10 ) {
  42.   $sejour_enfant_field_id = 208; // Replace 208 with the ID of the "Sejour" field
  43.   $headings[ $sejour_enfant_field_id ] = 'SejourEnfant';
  44.   }
  45.   return $headings;
  46. }*/
  47. /* CSV custom - Sejour enfant */
  48. add_filter( 'frm_csv_columns', 'change_sejour_column_name_enfant', 10, 2 );
  49. function change_sejour_column_name_enfant( $headings, $form_id ) {
  50. if ( $form_id == 10 ) {
  51. $sejour_field_id = 208; // Replace 208 with the ID of the "Sejour" field
  52. $headings[ $sejour_field_id ] = 'Sejour';
  53. }
  54. return $headings;
  55. }
  56.  
  57.  
  58. /* CSV custom - Commentaire */
  59. add_filter( 'frm_csv_columns', 'change_commentaire_column_name', 10, 2 );
  60. function change_commentaire_column_name( $headings, $form_id ) {
  61. if ( $form_id == 10 ) {
  62. $commentaire_field_id = 137; // Replace 137 with the ID of the "Commentaire" field
  63. $headings[ $commentaire_field_id ] = 'Commentaire';
  64. }
  65. return $headings;
  66. }
  67.  
  68.  
  69. /* CSV custom - Venu */
  70. add_filter( 'frm_csv_columns', 'change_venu_column_name', 10, 2 );
  71. function change_venu_column_name( $headings, $form_id ) {
  72. if ( $form_id == 10 ) {
  73. $venu_field_id = 138; // Remplacez 138 par l'ID du champ "Venu"
  74. $headings[ $venu_field_id ] = 'Venu'; // Remplacez "Venu" par le nom de colonne souhaité
  75. }
  76. return $headings;
  77. }
  78.  
  79.  
  80. /* CSV custom - FamilleVenu */
  81. add_filter( 'frm_csv_columns', 'change_famille_column_name', 10, 2 );
  82. function change_famille_column_name( $headings, $form_id ) {
  83. if ( $form_id == 10 ) {
  84. $famille_field_id = 140; // Replace 140 with the ID of the "FamilleVenu" field
  85. $headings[ $famille_field_id ] = 'FamilleVenu';
  86. }
  87. return $headings;
  88. }
  89.  
  90.  
  91. /* CSV custom - FamilleRevenir */
  92. add_filter( 'frm_csv_columns', 'change_famille_revenir_column_name', 10, 2 );
  93. function change_famille_revenir_column_name( $headings, $form_id ) {
  94. if ( $form_id == 10 ) {
  95. $famille_revenir_field_id = 141; // Replace 141 with the ID of the "Veut-il revenir dans la même famille ?" field
  96. $headings[ $famille_revenir_field_id ] = 'FamilleRevenir';
  97. }
  98. return $headings;
  99. }
  100.  
  101.  
  102. /* CSV custom - Copain */
  103. add_filter( 'frm_csv_columns', 'change_copain_column_name', 10, 2 );
  104. function change_copain_column_name( $headings, $form_id ) {
  105. if ( $form_id == 10 ) {
  106. $copain_field_id = 142; // Replace 142 with the ID of the "Copain" field
  107. $headings[ $copain_field_id ] = 'Copain';
  108. }
  109. return $headings;
  110. }
  111.  
  112.  
  113. /* CSV custom - CopainNom */
  114. add_filter( 'frm_csv_columns', 'change_copain_nom_column_name', 10, 2 );
  115. function change_copain_nom_column_name( $headings, $form_id ) {
  116. if ( $form_id == 10 ) {
  117. $copain_nom_field_id = 255; // Replace 255 with the ID of the "Nom de l'enfant qu'il connaît" field
  118. $headings[ $copain_nom_field_id ] = 'CopainNom';
  119. }
  120. return $headings;
  121. }
  122.  
  123.  
  124. /* CSV custom - CopainPrenom */
  125. add_filter( 'frm_csv_columns', 'change_copainprenom_column_name', 10, 2 );
  126. function change_copainprenom_column_name( $headings, $form_id ) {
  127. if ( $form_id == 10 ) {
  128. $copainprenom_field_id = 256; // Replace 256 with the ID of the "Prénom de l'enfant qu'il connaît" field
  129. $headings[ $copainprenom_field_id ] = 'CopainPrenom';
  130. }
  131. return $headings;
  132. }
  133.  
  134.  
  135.  
  136.  
Runtime error #stdin #stdout #stderr 0.03s 25668KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Fatal error:  Uncaught Error: Call to undefined function add_filter() in /home/4R5vbf/prog.php:6
Stack trace:
#0 {main}
  thrown in /home/4R5vbf/prog.php on line 6