forked from claudionhangapc/wp-general-rest-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaterial-apoio
121 lines (70 loc) · 4.13 KB
/
material-apoio
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
https://github.com/dphiffer/wp-json-api
https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/
========================= teste ===================
https://aheadcreative.co.uk/articles/mocking-wp_http-in-wordpress-php-unit-tests/
https://infinum.com/handbook/wordpress/automated-testing-in-wordpress/basic-tests-using-phpunit/unit-testing
https://torquemag.io/2017/01/testing-api-endpoints/
=================
=========== autoload=============
https://www.treinaweb.com.br/blog/psr-4-a-recomendacao-de-autoload-do-php
composer dump-autoload -> commando para gerar o autoload
==============
============= debugar erro wordpress = =====================
https://wpml.org/forums/topic/plugin-not-activating/
Hello,
I would need to see the detail of the error. You can see how to enable debug logging here:
https://wpml.org/documentation/support/debugging-wpml/
Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);
Edit your wp-config.php file and add these lines, just before it says 'stop editing here':
ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . 'https://cdn.wpml.org/error_log.txt');
This will create an error_log.txt file in your site's root directory. Please send me its contents.
===============================================================================
How to call a class method as a callback function in wordpress custom endpoint?
https://stackoverflow.com/questions/55720528/how-to-call-a-class-method-as-a-callback-function-in-wordpress-custom-endpoint
If the hook is called within the class if-self and yout callback method is defined there:
add_action( 'rest_api_init', function () {
register_rest_route( 't2mchat/v2', '/get_curr_user_lang', array(
'methods' => 'GET',
'callback' => array($this,'get_user_lang')
));
});
If from different class:
add_action( 'rest_api_init', function () {
register_rest_route( 't2mchat/v2', '/get_curr_user_lang', array(
'methods' => 'GET',
'callback' => array(new className,'get_user_lang')
));
});
If this solution is not working, a bit more details of your problem will help in defining.
=====================================
schema
https://bloggingwizard.com/wordpress-rest-api/
==============================================
padrão de criacao de api do wordpress
https://developer.wordpress.org/rest-api/extending-the-rest-api/controller-classes/#extending-internal-classes
===================================
C:\xampp\htdocs\wordpress-claudio\wp-content\plugins\woocommerce\includes\rest-api\Controllers\Version1\class-wc-rest-product-reviews-v1-controller.php
=============== Schemma =======================
https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/
=============== rest_pre_dispatch =================
https://github.com/Tmeister/wp-api-jwt-auth/issues/53
============= rest api pagination ===============
https://rickandmortyapi.com/documentation/#get-all-characters
https://www.myprogrammingtutorials.com/create-pagination-with-php-and-mysql.html
https://stackoverflow.com/questions/50304975/wp-query-pagination
============== notificações =================
https://tonisucic.medium.com/pitfalls-to-avoid-when-implementing-push-notifications-784965f078ab
https://www.sentinelstand.com/article/device-group-management-with-firebase-cloud-messaging
https://tonisucic.medium.com/pitfalls-to-avoid-when-implementing-push-notifications-784965f078ab
https://www.linkedin.com/pulse/guide-notification-system-design-chris-collinge/
https://www.linkedin.com/pulse/guide-notification-system-design-chris-collinge/
https://www.youtube.com/watch?v=-5wpm-gesOY
=============== obter permissoes ============
https://wordpress.stackexchange.com/questions/1665/getting-a-list-of-currently-available-roles-on-a-wordpress-site
====================rest api design ============
https://medium.com/geekculture/why-you-shouldnt-use-booleans-in-rest-apis-2747b187876c
============== notificacoes =============
https://medium.com/geekculture/first-class-push-notifications-for-expo-apps-4bd7bbb9a01a