
Author: Gary Garchar
nested loops
WP Array Search
<?php
/*
Plugin Name: MyWPArraySearch
Description: Lists elements of array as hot links searching wordpress.org.
Version: 0.0.1
Author: Gary Garchar
*/
add_shortcode( 'MyWPArraySearch', 'myTableFun' );
// [MyWPArraySearch nColumns=3]
function myTableFun( $atts ) {
$a = shortcode_atts(array('nColumns' => '3'), $atts);
$nColumns = $a['nColumns'];
$array = array(
"Accessability",
"Admin",
"Aesthetics",
"Anti-Spam",
"Archives",
"Backup",
"Blocks",
"Child-Themes",
"CMS",
"Comments",
"Contact-Form",
"Content-Analysis",
"Custom-Post-Types",
"Customizer",
"Development",
"eCommerce",
"Editor",
"Feedback",
"Filters",
"Flexbox",
"Forums",
"Frameworks",
"Galleries",
"Google",
"Gutenberg",
"Hooks",
"HTML5",
"i18n",
"Installation",
"Javascript",
"jQuery",
"Keywords",
"l10n",
"Mapping",
"Math",
"Media",
"Metadata",
"Mobile",
"Multisite",
"MySQL",
"Page-Builder",
"Permalinks",
"PHP",
"Plugins",
"Profit",
"REACT",
"Readability",
"Related-Posts",
"Responsiveness",
"REST",
"Reusable",
"Security",
"SEO",
"Shortcode",
"Sitemap",
"Spam",
"SSL",
"Support",
"Tags",
"Templates",
"Theme",
"Themes",
"Tools",
"UML",
"UX",
"Widgets",
"WordCamp",
"WP_Query",
"XML",
);
$h = "<table class='wp-block-table'>";
$h .= "<caption>WordPress Search</caption>";
$h .= "<tr>";
foreach ($array as $value) {
$newRow = (++$i % $nColumns) == 0;
$h .= '<td><a href="https://wordpress.org/search/';
$h .= $value;
$h .= '" target="_blank">';
$h .= $value;
$h .= "</a></td>";
if($newRow) $h .= "</tr><tr>";
}
$h .= "</tr>";
$h .= "</table>";
return $h;
}
/*
.author {display:none;}
.site-title {font-family: sans-serif; font-style:italic}
caption {text-align: center;}
caption {
background-color: green;
color: white;
text-align: right;
}
td { text-align: right; }
.wp-block-table tr:hover { background-color: #ddd;}
*/
Rysnc Backup Script

~/Desktop/bin/myRsync "Orange/Users/groggygarbad/Documents/databases2/" "TTD" "4GB-CARD"
#!/bin/sh
# DESTINATION USES SAME PATH AS SOURCE
# EXAMPLE: myRsync "Lemon/Users/GG5/Sites/" "ZapMap2" "Lexar"
# EXAMPLE: ~/Desktop/bin/myRsync "Orange/Users/groggygarbad/Documents/databases2/" "TTD" "4GB-CARD"
if [ $# -ne 3 ]; then
echo 1>&3 Error, Usage: $0 sourcePath theDirectory destVolume
exit 127
fi
theDate=`date '+%y%m%d%H%M%S'`
theIncr="/Volumes/$3/$1/$2-$theDate"
theProg="/Volumes/$3/$1/progress.txt"
#theProg="/Volumes/$3/progress.txt"
echo "~/bin/myRsync"
echo "----------------------------------------------------------------------------------------" > "$theProg"
echo; echo; echo "/Volumes/$1$2 -> $theDate" >> "$theProg"
rsync -ablPvz --backup-dir="$theIncr" --delete --progress "/Volumes/$1$2/" "/Volumes/$3/$1/$2" >> "$theProg"
echo "---------------------------------------------------------------------------------------" >> "$theProg"
cat "$theProg"
exit
Unordered List
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Example document</title>
</head>
<body>
<p>Example paragraph</p>
</body>
</html>
- Competition
- Delivery
- Pricing
- Service
- Productivity
- Labor
- Material
- Capital
- Control
- Resources
- Operations
- Competition
- Delivery
- Pricing
- Service
- Productivity
- Labor
- Material
- Capital
- Control
- Resources
- Operations
<ul><li>Competition<ul><li>Delivery</li><li>Pricing</li><li>Service</li></ul></li><li>Productivity<ul><li>Labor</li><li>Material</li><li>Capital</li></ul></li><li>Control<ul><li>Resources</li><li>Operations</li></ul></li></ul>