This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This adds an option to send order notes email manually via order actions drop-down. | |
*/ | |
/** | |
* Filter to add a new menu to the dropdown | |
* | |
* @param array $actions | |
* @return array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "\n" . '-=-=-=-=-=BEFORE LOOP-=-=-=-=-=-=' . "\n". "\n"; | |
$a = array('product name' => 'gasoline', 'quantity' => 2); | |
$b = array('product name' => 'oil', 'quantity' => 3); | |
$order1 = array($a,$b); | |
$c = array('product name' => 'bottle', 'quantity' => 2); | |
$d = array('product name' => 'gasoline', 'quantity' => 3); | |
$e = array('product name' => 'lighter', 'quantity' => 1); | |
$order2 = array($c,$d,$e); | |
$f = array('quantity' => 13, 'product name' => 'mask'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$data = array(/* multi-dimensional */); | |
$result = iterate($data); | |
function iterate(array $array) | |
{ | |
$result = array(); | |
foreach($array as $item) { | |
if(is_array($item)) { | |
$result[] = iterate($item); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = array('product name' => 'gasoline', 'quantity' => 2); | |
$b = array('product name' => 'oil', 'quantity' => 3); | |
$order1 = array($a,$b); | |
$c = array('product name' => 'bottle', 'quantity' => 2); | |
$d = array('product name' => 'gasoline', 'quantity' => 3); | |
$e = array('product name' => 'lighter', 'quantity' => 1); | |
$order2 = array($c,$d,$e); | |
$f = array('quantity' => 13, 'product name' => 'mask'); | |
$g = array('product name' => 'oil', 'quantity' => 7); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table.wp-list-table tr.updated { animation: highlight 3s ease 2; } | |
@keyframes highlight { | |
0% { background-color: inherit; } | |
50% { background-color: #d1fa88; } | |
100% { background-color: inherit; } | |
} |