Skip to content

Instantly share code, notes, and snippets.

Rick Marcoevich

View GitHub Profile
@Marcoevich
Marcoevich / execphp.php
Created Jul 6, 2018
Removing create_function from WordPress PHP Widget
View execphp.php
function phpcodewidget_register_widgets() {
register_widget( 'PHP_Code_Widget' );
}
add_action('widgets_init', 'phpcodewidget_register_widgets' );
View ru-custom-children.php
$calculateAge = DateTime::createFromFormat('d/m/Y', $birthdate, $tz);
if($calculateAge) {
$age = $calculateAge->diff(new DateTime('now', $tz))->y;
}
You can’t perform that action at this time.