Instalar o apk no device android para testes
adb install -r platforms/android/build/outputs/apk/android-debug.apk
Abre o log do dispositivo android
adb logcat
Lista os adb divices rodando
<?php | |
add_action('rest_api_init', function () { | |
register_rest_route( 'contact/v1', 'send', [ | |
'methods' => 'POST', | |
'callback' => 'api_send_contact_form' | |
]); | |
}); | |
function api_send_contact_form( $request ) { |
<?php | |
function sendWithPhpMailer($subject, $body, $reply) { | |
require(ABSPATH . WPINC . '/class-phpmailer.php'); | |
require(ABSPATH . WPINC . '/class-smtp.php'); | |
// date_default_timezone_set( 'America/Sao_Paulo' ); | |
$blogname = wp_strip_all_tags( trim( get_option( 'blogname' ) ) ); | |
$smtpHost = wp_strip_all_tags( trim( get_option( 'smtp_host' ) ) ); |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) { /* Styles */ } | |
/* Smartphones (landscape) ----------- */ | |
@media only screen and (min-width: 321px) { /* Styles */ } | |
/* Smartphones (portrait) ----------- */ | |
@media only screen and (max-width: 320px) { /* Styles */ } | |
/* iPads (portrait and landscape) ----------- */ |
# https://editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
I hereby claim:
To claim this, I am signing this object:
let _lsTotal = 0; | |
let _xLen; | |
let _x; | |
for (_x in localStorage) { | |
if (!localStorage.hasOwnProperty(_x)) { | |
continue; | |
} | |
_xLen = ((localStorage[_x].length + _x.length) * 2); | |
_lsTotal += _xLen; |
<?php | |
function get_custom_post_meta_cb($object, $field_name, $request) { | |
return get_post_meta( $object['id'], $field_name, true ); | |
} | |
function get_custom_post_meta_cb_the_content($object, $field_name, $request) { | |
return apply_filters( 'the_content', get_post_meta( $object['id'], $field_name, true ) ); | |
} |
<?php | |
function theme_metabox_per_page() { | |
global $pagenow; | |
if ( $pagenow == 'post.php' ) { | |
$page_id = ( $_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['post_ID'] ) ? $_POST['post_ID'] : $_GET['post']; | |
if ( $page_id ) { | |
$page_slug = get_post_field( 'post_name', $page_id ); |
const timeout = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
const sleep = async (fn, ...args) => { | |
await timeout(3000); | |
return fn(...args); | |
}; |