Thursday, 27 August 2020

wpdb Wordpress Table - Update Column Value

 <?php

/*

Template Name: Update Column

*/

?>

<?php

global $wpdb;

$pokemon = $current_user->ID;

$status = 'capture';

$checkPokedex = true;


if ($checkPokedex = true){

  $wpdb->update( 'wp_semak', array( 'peranan' => $status), array( 'pemilik' => $pokemon ), array( '%s' ) );

echo 'Gotta Catch em All';

} else {

echo 'Full Party';

}

?>


ref: https://gist.github.com/benbalter/1607991

Translate manually Wordpress

 add_filter( 'gettext', function( $translated, $original, $domain ) {     // Senarai penggantian (case-insensitive)     $map = array...