forked from eileenmcnaughton/civicrm_developer
-
Notifications
You must be signed in to change notification settings - Fork 4
/
showallthehooks.wp.php
2099 lines (1992 loc) · 79.2 KB
/
showallthehooks.wp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* @file
* This file is generated automatically. It contains example implementations of
* all core CiviCRM hooks in WordPress. You can edit it to enable additional
* debug on any hook.
*
* To regenerate, see README.md or https://github.com/fuzionnz/contrib.showallthehooks
*/
/**
* This hook is called when composing the ACL where clause to restrict
* visibility of contacts to the logged in user
*
* @param int $type
* The type of permission needed.
* @param int $contactID
* The contactID for whom the check is made.
* @param string $tableName
* The tableName which is being permissioned.
* @param array $allGroups
* The set of all the objects for the above table.
* @param array $currentGroups
* The set of objects that are currently permissioned for this contact.
*
* @return null
* the return value is ignored
*/
function wp_callback_for_civicrm_aclGroup($type, $contactID, $tableName, &$allGroups, &$currentGroups) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_aclGroup', 'wp_callback_for_civicrm_aclGroup', 10, 5);
/**
* This hook is called when composing the ACL where clause to restrict
* visibility of contacts to the logged in user
*
* @param int $type
* The type of permission needed.
* @param array $tables
* (reference ) add the tables that are needed for the select clause.
* @param array $whereTables
* (reference ) add the tables that are needed for the where clause.
* @param int $contactID
* The contactID for whom the check is made.
* @param string $where
* The currrent where clause.
*
* @return null
* the return value is ignored
*/
function wp_callback_for_civicrm_aclWhereClause($type, &$tables, &$whereTables, &$contactID, &$where) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_aclWhereClause', 'wp_callback_for_civicrm_aclWhereClause', 10, 5);
/**
* This hook is called when API permissions are checked (cf. civicrm_api3_api_check_permission()
* in api/v3/utils.php and _civicrm_api3_permissions() in CRM/Core/DAO/permissions.php).
*
* @param string $entity
* The API entity (like contact).
* @param string $action
* The API action (like get).
* @param array &$params the API parameters
* @param array &$permissions the associative permissions array (probably to be altered by this hook)
*
* @return mixed
*/
function wp_callback_for_civicrm_alterAPIPermissions($entity, $action, &$params, &$permissions) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterAPIPermissions', 'wp_callback_for_civicrm_alterAPIPermissions', 10, 4);
/**
* This hook is invoked when building a CiviCRM name badge.
*
* @param string $labelName
* String referencing name of badge format.
* @param object $label
* Reference to the label object.
* @param array $format
* Array of format data.
* @param array $participant
* Array of participant values.
*
* @return null
* the return value is ignored
*/
function wp_callback_for_civicrm_alterBadge($labelName, &$label, &$format, &$participant) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterBadge', 'wp_callback_for_civicrm_alterBadge', 10, 4);
/**
* This hook is called before encoding data in barcode.
*
* @param array $data
* Associated array of values available for encoding.
* @param string $type
* Type of barcode, classic barcode or QRcode.
* @param string $context
* Where this hooks is invoked.
*
* @return mixed
*/
function wp_callback_for_civicrm_alterBarcode(&$data, $type, $context) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterBarcode', 'wp_callback_for_civicrm_alterBarcode', 10, 3);
/**
* This hook is called when membership status is being calculated.
*
* @param array $membershipStatus
* Membership status details as determined - alter if required.
* @param array $arguments
* Arguments passed in to calculate date.
* - 'start_date'
* - 'end_date'
* - 'status_date'
* - 'join_date'
* - 'exclude_is_admin'
* - 'membership_type_id'
* @param array $membership
* Membership details from the calling function.
*
* @return mixed
*/
function wp_callback_for_civicrm_alterCalculatedMembershipStatus(&$membershipStatus, $arguments, $membership) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterCalculatedMembershipStatus', 'wp_callback_for_civicrm_alterCalculatedMembershipStatus', 10, 3);
/**
* This hooks allows alteration of generated page content.
*
* @param $content
* Previously generated content.
* @param $context
* Context of content - page or form.
* @param $tplName
* The file name of the tpl.
* @param $object
* A reference to the page or form object.
*
* @return mixed
*/
function wp_callback_for_civicrm_alterContent(&$content, $context, $tplName, &$object) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterContent', 'wp_callback_for_civicrm_alterContent', 10, 4);
/**
* This hook is called to alter Deferred revenue item values just before they are
* inserted in civicrm_financial_trxn table
*
* @param array $deferredRevenues
*
* @param array $contributionDetails
*
* @param bool $update
*
* @param string $context
*
* @return mixed
*/
function wp_callback_for_civicrm_alterDeferredRevenueItems(&$deferredRevenues, $contributionDetails, $update, $context) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterDeferredRevenueItems', 'wp_callback_for_civicrm_alterDeferredRevenueItems', 10, 4);
/**
* Issue CRM-14276
* Add a hook for altering the display name
*
* hook_civicrm_contact_get_displayname(&$display_name, $objContact)
*
* @param string $displayName
* @param int $contactId
* @param object $dao
* The contact object.
*
* @return mixed
*/
function wp_callback_for_civicrm_alterDisplayName(&$displayName, $contactId, $dao) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterDisplayName', 'wp_callback_for_civicrm_alterDisplayName', 10, 3);
/**
* This hook allows modification of the data calculated for merging locations.
*
* @param array $blocksDAO
* Array of location DAO to be saved. These are arrays in 2 keys 'update' & 'delete'.
* @param int $mainId
* Contact_id of the contact that survives the merge.
* @param int $otherId
* Contact_id of the contact that will be absorbed and deleted.
* @param array $migrationInfo
* Calculated migration info, informational only.
*
* @return mixed
*/
function wp_callback_for_civicrm_alterLocationMergeData(&$blocksDAO, $mainId, $otherId, $migrationInfo) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterLocationMergeData', 'wp_callback_for_civicrm_alterLocationMergeData', 10, 4);
/**
* This hook allows changes to the spec of which tables to log.
*
* @param array $logTableSpec
*
* @return mixed
*/
function wp_callback_for_civicrm_alterLogTables(&$logTableSpec) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterLogTables', 'wp_callback_for_civicrm_alterLogTables', 10, 1);
/**
* Deprecated: Misnamed version of alterMailer(). Remove post-4.7.x.
* Modify or replace the Mailer object used for outgoing mail.
*
* @param object $mailer
* The default mailer produced by normal configuration; a PEAR "Mail" class (like those returned by Mail::factory)
* @param string $driver
* The type of the default mailer (eg "smtp", "sendmail", "mock", "CRM_Mailing_BAO_Spool")
* @param array $params
* The default mailer config options
*
* @return mixed
* @see Mail::factory
* @deprecated
*/
function wp_callback_for_civicrm_alterMail(&$mailer, $driver, $params) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterMail', 'wp_callback_for_civicrm_alterMail', 10, 3);
/**
* This hook is called after getting the content of the mail and before tokenizing it.
*
* @param array $content
* Array fields include: html, text, subject
*
* @return mixed
*/
function wp_callback_for_civicrm_alterMailContent(&$content) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterMailContent', 'wp_callback_for_civicrm_alterMailContent', 10, 1);
/**
* This hook is called when an email is about to be sent by CiviCRM.
*
* @param array $params
* Array fields include: groupName, from, toName, toEmail, subject, cc, bcc, text, html,
* returnPath, replyTo, headers, attachments (array)
* @param string $context
* The context in which the hook is being invoked, eg 'civimail'.
*
* @return mixed
*/
function wp_callback_for_civicrm_alterMailParams(&$params, $context) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterMailParams', 'wp_callback_for_civicrm_alterMailParams', 10, 2);
/**
* Modify or replace the Mailer object used for outgoing mail.
*
* @param object $mailer
* The default mailer produced by normal configuration; a PEAR "Mail" class (like those returned by Mail::factory)
* @param string $driver
* The type of the default mailer (eg "smtp", "sendmail", "mock", "CRM_Mailing_BAO_Spool")
* @param array $params
* The default mailer config options
*
* @return mixed
* @see Mail::factory
*/
function wp_callback_for_civicrm_alterMailer(&$mailer, $driver, $params) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterMailer', 'wp_callback_for_civicrm_alterMailer', 10, 3);
/**
* Hook definition for altering the generation of Mailing Labels.
*
* @param array $args
* An array of the args in the order defined for the tcpdf multiCell api call.
* with the variable names below converted into string keys (ie $w become 'w'
* as the first key for $args)
* float $w Width of cells. If 0, they extend up to the right margin of the page.
* float $h Cell minimum height. The cell extends automatically if needed.
* string $txt String to print
* mixed $border Indicates if borders must be drawn around the cell block. The value can
* be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or
* a string containing some or all of the following characters (in any order):
* <ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul>
* string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string:
* left align</li><li>C: center</li><li>R: right align</li><li>J: justification
* (default value when $ishtml=false)</li></ul>
* int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
* int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0:
* to the right</li><li>1: to the beginning of the next line [DEFAULT]</li><li>2: below</li></ul>
* float $x x position in user units
* float $y y position in user units
* boolean $reseth if true reset the last cell height (default true).
* int $stretch stretch character mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if
* necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if
* necessary</li><li>4 = forced character spacing</li></ul>
* boolean $ishtml set to true if $txt is HTML content (default = false).
* boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width.
* float $maxh maximum height. It should be >= $h and less then remaining space to the bottom of the page,
* or 0 for disable this feature. This feature works only when $ishtml=false.
*
* @return mixed
*/
function wp_callback_for_civicrm_alterMailingLabelParams(&$args) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterMailingLabelParams', 'wp_callback_for_civicrm_alterMailingLabelParams', 10, 1);
/**
* (Experimental) This hook is called when build the menu table.
*
* @param array $items
* List of records to include in menu table.
* @return null
* the return value is ignored
*/
function wp_callback_for_civicrm_alterMenu(&$items) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterMenu', 'wp_callback_for_civicrm_alterMenu', 10, 1);
/**
* Hook definition for altering payment parameters before talking to a payment processor back end.
*
* Definition will look like this:
*
* function hook_civicrm_alterPaymentProcessorParams(
* $paymentObj,
* &$rawParams,
* &$cookedParams
* );
*
* @param CRM_Core_Payment $paymentObj
* Instance of payment class of the payment processor invoked (e.g., 'CRM_Core_Payment_Dummy')
* See discussion in CRM-16224 as to whether $paymentObj should be passed by reference.
* @param array &$rawParams
* array of params as passed to to the processor
* @param array &$cookedParams
* params after the processor code has translated them into its own key/value pairs
*
* @return mixed
* This return is not really intended to be used.
*/
function wp_callback_for_civicrm_alterPaymentProcessorParams($paymentObj, &$rawParams, &$cookedParams) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterPaymentProcessorParams', 'wp_callback_for_civicrm_alterPaymentProcessorParams', 10, 3);
/**
* @param $varType
* @param $var
* @param $object
*
* @return mixed
*/
function wp_callback_for_civicrm_alterReportVar($varType, &$var, &$object) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterReportVar', 'wp_callback_for_civicrm_alterReportVar', 10, 3);
/**
* This hook is called when Settings specifications are loaded.
*
* @param array $settingsFolders
* List of paths from which to derive metadata
*
* @return mixed
*/
function wp_callback_for_civicrm_alterSettingsFolders(&$settingsFolders) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterSettingsFolders', 'wp_callback_for_civicrm_alterSettingsFolders', 10, 1);
/**
* This hook is called when Settings have been loaded from the xml
* It is an opportunity for hooks to alter the data
*
* @param array $settingsMetaData
* Settings Metadata.
* @param int $domainID
* @param mixed $profile
*
* @return mixed
*/
function wp_callback_for_civicrm_alterSettingsMetaData(&$settingsMetaData, $domainID, $profile) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterSettingsMetaData', 'wp_callback_for_civicrm_alterSettingsMetaData', 10, 3);
/**
* This hooks allows alteration of the tpl file used to generate content. It differs from the
* altercontent hook as the content has already been rendered through the tpl at that point
*
* @param $formName
* Previously generated content.
* @param $form
* Reference to the form object.
* @param $context
* Context of content - page or form.
* @param $tplName
* Reference the file name of the tpl.
*
* @return mixed
*/
function wp_callback_for_civicrm_alterTemplateFile($formName, &$form, $context, &$tplName) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_alterTemplateFile', 'wp_callback_for_civicrm_alterTemplateFile', 10, 4);
/**
* EXPERIMENTAL: This hook allows one to register additional Angular modules
*
* @param array $angularModules
* List of modules.
* @return null
* the return value is ignored
*
* @code
* function mymod_civicrm_angularModules(&$angularModules) {
* $angularModules['myAngularModule'] = array(
* 'ext' => 'org.example.mymod',
* 'js' => array('js/myAngularModule.js'),
* );
* $angularModules['myBigAngularModule'] = array(
* 'ext' => 'org.example.mymod',
* 'js' => array('js/part1.js', 'js/part2.js'),
* 'css' => array('css/myAngularModule.css'),
* 'partials' => array('partials/myBigAngularModule'),
* );
* }
* @endcode
*/
function wp_callback_for_civicrm_angularModules(&$angularModules) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_angularModules', 'wp_callback_for_civicrm_angularModules', 10, 1);
/**
* This hook is called before running an api call.
*
* @param API_Wrapper[] $wrappers
* (see CRM_Utils_API_ReloadOption as an example)
* @param mixed $apiRequest
*
* @return null
* The return value is ignored
*/
function wp_callback_for_civicrm_apiWrappers(&$wrappers, $apiRequest) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_apiWrappers', 'wp_callback_for_civicrm_apiWrappers', 10, 2);
/**
* This hook is called when the entries of the CSV Batch export are mapped.
*
* @param array $results
* @param array $items
*
* @return mixed
*/
function wp_callback_for_civicrm_batchItems(&$results, &$items) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_batchItems', 'wp_callback_for_civicrm_batchItems', 10, 2);
/**
* This hook is called when a query string of the CSV Batch export is generated.
*
* @param string $query
*
* @return mixed
*/
function wp_callback_for_civicrm_batchQuery(&$query) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_batchQuery', 'wp_callback_for_civicrm_batchQuery', 10, 1);
/**
* This hook is called when building the amount structure for a Contribution or Event Page.
*
* @param int $pageType
* Is this a contribution or event page.
* @param CRM_Core_Form $form
* Reference to the form object.
* @param array $amount
* The amount structure to be displayed.
*
* @return null
*/
function wp_callback_for_civicrm_buildAmount($pageType, &$form, &$amount) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_buildAmount', 'wp_callback_for_civicrm_buildAmount', 10, 3);
/**
* This hook is invoked when building a CiviCRM form. This hook should also
* be used to set the default values of a form element
*
* @param string $formName
* The name of the form.
* @param CRM_Core_Form $form
* Reference to the form object.
*
* @return null
* the return value is ignored
*/
function wp_callback_for_civicrm_buildForm($formName, &$form) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_buildForm', 'wp_callback_for_civicrm_buildForm', 10, 2);
/**
* This hook is called while preparing a profile form.
*
* @param string $profileName
* @return mixed
*/
function wp_callback_for_civicrm_buildProfile($profileName) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_buildProfile', 'wp_callback_for_civicrm_buildProfile', 10, 1);
/**
* This hook is called when building the state list for a particular country.
*
* @param array $countryID
* The country id whose states are being selected.
* @param $states
*
* @return null
*/
function wp_callback_for_civicrm_buildStateProvinceForCountry($countryID, &$states) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_buildStateProvinceForCountry', 'wp_callback_for_civicrm_buildStateProvinceForCountry', 10, 2);
/**
* This hook is called when uf groups are being built for a module.
*
* @param string $moduleName
* Module name.
* @param array $ufGroups
* Array of ufgroups for a module.
*
* @return null
*/
function wp_callback_for_civicrm_buildUFGroupsForModule($moduleName, &$ufGroups) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_buildUFGroupsForModule', 'wp_callback_for_civicrm_buildUFGroupsForModule', 10, 2);
/**
* This hook fires whenever a record in a case changes.
*
* @param \Civi\CCase\Analyzer $analyzer
* A bundle of data about the case (such as the case and activity records).
*/
function wp_callback_for_civicrm_caseChange($analyzer) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_caseChange', 'wp_callback_for_civicrm_caseChange', 10, 1);
/**
* This hook is called when rendering the Manage Case screen.
*
* @param int $caseID
* The case ID.
*
* @return array
* Array of data to be displayed, where the key is a unique id to be used for styling (div id's)
* and the value is an array with keys 'label' and 'value' specifying label/value pairs
*/
function wp_callback_for_civicrm_caseSummary($caseID) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_caseSummary', 'wp_callback_for_civicrm_caseSummary', 10, 1);
/**
* This hook is called when locating CiviCase types.
*
* @param array $caseTypes
*
* @return mixed
*/
function wp_callback_for_civicrm_caseTypes(&$caseTypes) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_caseTypes', 'wp_callback_for_civicrm_caseTypes', 10, 1);
/**
* Check system status.
*
* @param array $messages
* Array<CRM_Utils_Check_Message>. A list of messages regarding system status.
* @return mixed
*/
function wp_callback_for_civicrm_check(&$messages) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_check', 'wp_callback_for_civicrm_check', 10, 1);
/**
* This hook is called soon after the CRM_Core_Config object has ben initialized.
* You can use this hook to modify the config object and hence behavior of CiviCRM dynamically.
*
* @param CRM_Core_Config|array $config
* The config object
*
* @return mixed
*/
function wp_callback_for_civicrm_config(&$config) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_config', 'wp_callback_for_civicrm_config', 10, 1);
/**
* Use this hook to populate the list of contacts returned by Contact Reference custom fields.
* By default, Contact Reference fields will search on and return all CiviCRM contacts.
* If you want to limit the contacts returned to a specific group, or some other criteria
* - you can override that behavior by providing a SQL query that returns some subset of your contacts.
* The hook is called when the query is executed to get the list of contacts to display.
*
* @param mixed $query
* - the query that will be executed (input and output parameter);.
* It's important to realize that the ACL clause is built prior to this hook being fired,
* so your query will ignore any ACL rules that may be defined.
* Your query must return two columns:
* the contact 'data' to display in the autocomplete dropdown (usually contact.sort_name - aliased as 'data')
* the contact IDs
* @param string $queryText
* The name string to execute the query against (this is the value being typed in by the user).
* @param string $context
* The context in which this ajax call is being made (for example: 'customfield', 'caseview').
* @param int $id
* The id of the object for which the call is being made.
* For custom fields, it will be the custom field id
*
* @return mixed
*/
function wp_callback_for_civicrm_contactListQuery(&$query, $queryText, $context, $id) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_contactListQuery', 'wp_callback_for_civicrm_contactListQuery', 10, 4);
/**
* Modify the CiviCRM container - add new services, parameters, extensions, etc.
*
* @code
* use Symfony\Component\Config\Resource\FileResource;
* use Symfony\Component\DependencyInjection\Definition;
*
* function mymodule_civicrm_container($container) {
* $container->addResource(new FileResource(__FILE__));
* $container->setDefinition('mysvc', new Definition('My\Class', array()));
* }
* @endcode
*
* Tip: The container configuration will be compiled/cached. The default cache
* behavior is aggressive. When you first implement the hook, be sure to
* flush the cache. Additionally, you should relax caching during development.
* In `civicrm.settings.php`, set define('CIVICRM_CONTAINER_CACHE', 'auto').
*
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
* @see http://symfony.com/doc/current/components/dependency_injection/index.html
*/
function wp_callback_for_civicrm_container($container) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_container', 'wp_callback_for_civicrm_container', 10, 1);
/**
* This hook is called after a copy of an object has been made. The current objects are
* Event, Contribution Page and UFGroup
*
* @param string $objectName
* Name of the object.
* @param object $object
* Reference to the copy.
*
* @return null
*/
function wp_callback_for_civicrm_copy($objectName, &$object) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_copy', 'wp_callback_for_civicrm_copy', 10, 2);
/**
* This hook is called when core resources are being loaded
*
* @see CRM_Core_Resources::coreResourceList
*
* @param array $list
* @param string $region
*/
function wp_callback_for_civicrm_coreResourceList(&$list, $region) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_coreResourceList', 'wp_callback_for_civicrm_coreResourceList', 10, 2);
/**
* This hook is called before running pending cron jobs.
*
* @param CRM_Core_JobManager $jobManager
*
* @return null
* The return value is ignored.
*/
function wp_callback_for_civicrm_cron($jobManager) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_cron', 'wp_callback_for_civicrm_cron', 10, 1);
/**
* Generate a default CRUD URL for an entity.
*
* @param array $spec
* With keys:.
* - action: int, eg CRM_Core_Action::VIEW or CRM_Core_Action::UPDATE
* - entity_table: string
* - entity_id: int
* @param CRM_Core_DAO $bao
* @param array $link
* To define the link, add these keys to $link:.
* - title: string
* - path: string
* - query: array
* - url: string (used in lieu of "path"/"query")
* Note: if making "url" CRM_Utils_System::url(), set $htmlize=false
* @return mixed
*/
function wp_callback_for_civicrm_crudLink($spec, $bao, &$link) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_crudLink', 'wp_callback_for_civicrm_crudLink', 10, 3);
/**
* This hook is called after a db write on a custom table.
*
* @param string $op
* The type of operation being performed.
* @param string $groupID
* The custom group ID.
* @param object $entityID
* The entityID of the row in the custom table.
* @param array $params
* The parameters that were sent into the calling function.
*
* @return null
* the return value is ignored
*/
function wp_callback_for_civicrm_custom($op, $groupID, $entityID, &$params) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_custom', 'wp_callback_for_civicrm_custom', 10, 4);
/**
* This hook is called when CiviCRM needs to edit/display a custom field with options
*
* @deprecated in favor of hook_civicrm_fieldOptions
*
* @param int $customFieldID
* The custom field ID.
* @param array $options
* The current set of options for that custom field.
* You can add/remove existing options.
* Important: This array may contain meta-data about the field that is needed elsewhere, so it is important
* to be careful to not overwrite the array.
* Only add/edit/remove the specific field options you intend to affect.
* @param bool $detailedFormat
* If true, the options are in an ID => array ( 'id' => ID, 'label' => label, 'value' => value ) format
* @param array $selectAttributes
* Contain select attribute(s) if any.
*
* @return mixed
*/
function wp_callback_for_civicrm_customFieldOptions($customFieldID, &$options, $detailedFormat, $selectAttributes = '') {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_customFieldOptions', 'wp_callback_for_civicrm_customFieldOptions', 10, 4);
/**
* This hook is called when rendering the dashboard (q=civicrm/dashboard)
*
* @param int $contactID
* The contactID for whom the dashboard is being rendered.
* @param int $contentPlacement
* (output parameter) where should the hook content be displayed.
* relative to the activity list
*
* @return string
* the html snippet to include in the dashboard
*/
function wp_callback_for_civicrm_dashboard($contactID, &$contentPlacement) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_dashboard', 'wp_callback_for_civicrm_dashboard', 10, 2);
/**
* This hook is called while viewing contact dashboard.
*
* @param array $availableDashlets
* List of dashlets; each is formatted per api/v3/Dashboard
* @param array $defaultDashlets
* List of dashlets; each is formatted per api/v3/DashboardContact
*
* @return mixed
*/
function wp_callback_for_civicrm_dashboard_defaults($availableDashlets, &$defaultDashlets) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_dashboard_defaults', 'wp_callback_for_civicrm_dashboard_defaults', 10, 2);
/**
* This hook is called when a module-extension is disabled.
* Each module will receive hook_civicrm_disable during its own disablement (but not during the
* disablement of unrelated modules).
*/
function wp_callback_for_civicrm_disable() {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}
add_action('civicrm_disable', 'wp_callback_for_civicrm_disable', 10, 0);
/**
* This hook allows modification of the queries constructed from dupe rules.
*
* @param string $obj
* Object of rulegroup class.
* @param string $type
* Type of queries e.g table / threshold.
* @param array $query
* Set of queries.
*
* @return mixed
*/
function wp_callback_for_civicrm_dupeQuery($obj, $type, &$query) {
$args = get_defined_vars();
$function = preg_replace('/wp_callback_for/', 'hook', __FUNCTION__);
_showallthehooks_debug($function, 'wordpress');
// _showallthehooks_debug_func_args($function, $args);
}