Skip to content

Instantly share code, notes, and snippets.

View jnijstad's full-sized avatar

Jeffrey Nijstad jnijstad

View GitHub Profile
@jnijstad
jnijstad / reorder-fields.php
Created August 10, 2016 11:47
Re-order the default fields in WordPress comment_form()
<?php
function review_fields($fields){
settype($fields, "array"); //somehow the $fields is originally a weird array-like string
// the empty strings will be replaced at the array merge
$order = array(
"author" => '',
"email" => '',
"url" => '',
"comment" => '',
@jnijstad
jnijstad / array.php
Last active August 1, 2016 07:38
Country dialing code select drop menu (added more keys to array so we could use the same data to generate basic country select as well).
<?php
$countries = array();
$countries[] = array(
"name" => "Abkhazia",
"code" => "995",
"ISO3166-2" => "GE",
"ISO3166-3" => "GEO",
);
$countries[] = array(