ACF (Advanced Custom FIelds) is an amazing plugin, but its add-ons seem to be not updated often -some documentation has 2 year-old errors/outdates, and one of its programmers answered me once “people would freakout with often updates”- so here is a missing feature: the capability to expand/collapse all FC fields at once.

Just put the code below in your functions.php and it will add a header above every flexible-content metabox, with a “Collapse/Expand All” checkbox.

/* Adds a "Collapse/Espand All" checkbox above every flexible-content metabox */
/* Tested on ACF Pro 5.2.8 */

/* ------------------ Adds Checkbox to Post Editor ----------------- */
/* Written by Sergio Zambrano */
function render_before_fc( $field ) {

echo '<div class="collapse_all postbox">
<h3 class="hndle"><span><input type="checkbox" onchange=";"> Expand/Collapse All</span></h3>

add_filter( 'acf/render_field/type=flexible_content', 'render_before_fc', 9, 1 );

/* ------------------ Adds Javascript to Header ----------------- */

function acf_postedit_js() {

echo "<script type=\"text/javascript\">
function togle_collapse_fc() {

if(this.checked) {
jQuery(this).closest('.acf-field-flexible-content').find('.values > .layout').removeAttr('data-toggle','closed').find('.acf-table').show();
} else {
jQuery(this).closest('.acf-field-flexible-content').find('.values > .layout').attr('data-toggle','closed').find('.acf-table').hide();

add_action('acf/input/admin_head', 'acf_postedit_js');

I upgraded my MacBookPro 17in to 8GB with a good brand Memory (CompUSA. The ones compatible with Macs are always good brands) and it worked fine for more than a year, and through two OS upgrades (Snow Leopard and Mavericks).

Since then, every time I upgrade the OS, the computer fails to wake up from sleep mode, making me lose all the OS isn’t designed to recover.
Something that seemed a little glitch, started showing a pattern.

Sure enough, you search the problem in these pages and you will arrive to the “your memory is not good” explanations.
Now I’m narrowing it down to… (more…)

I saw a post in StackOverflow, and the solutions were not regex… and my beautiful mind saw a pattern there :)
…or rather the input string was almost the same than the output.

Here’s a tool to convert tab-indented text (without parentheses or commas, or apostrophes, of course)

If you are interested, here is the code, which you can play with at

$L = 4;//Max level +1 deep you estimate there is (to prevent unnessesary passes)
$raw =
Product 1
Product 1 Images
Image 1
Image 2
Image 3
Product 2
Product 2 Images
Image 1
Product 3 Images
Image 1
Where to Buy
Best Buy
Gran Tia
Bal Harbor
About Us
Meet the Team
Contact Us';

function tab_text_to_array ($raw, $L) {

$raw = preg_replace("/^(\\t*)([^\\t\\n]*)\\n?/m" , "\t$1'$2' => array(\n" , $raw );

for( ; $L > 0 ; $L-- ) {

for( $i=0; $i<3 ;$i++ ) {
$preL = $L-1;
$s = array( "^(\\t{{$L}})([^\\t\\),]*)(?=\\n\\t{{$L}}')", "^(\\t{{$L}})([^\\t\\),]*)(?=\\n(\\t{0,{$preL}})')", "^(\\t{{$L}})(\\),)(?=\\n(\\t{{$preL}})[^\t])" );
$r = array( "$1$2)," , "$1$2)\n" . str_repeat("\t",$preL) . ")," , "$1),\n$3)," );
$raw = preg_replace( "/$s[$i]/m" , $r[$i], $raw );
echo '<pre>' . $raw . '</pre><br/><hr/><br/>';
//echo $raw;
return 'array('. $raw . '))';

echo '<pre>' . tab_text_to_array ($raw, $L) . '</pre>';



After hurting my eyes and wasting my time by watching videos of some dude moving squares around on the screen, back and forth, over an over, because they suck at [drawing tool name here]… here’s my golden spiral (more precise than fibonacci’s)

After years of inventing my semantic seo-friendly rating stars system, I realized one of the most impressive rating stars systems out there were having loved because they just SHOW THEM BIG, as any other end-user website choice: Today an image covering the screen with a button in the middle is “a good design”, and flies all go feast with them.

So here is my revamped version of my Rating stars, using no images, scripts, divs, canvas or nothing else other than css and fonts.

Responsive Rating

3.5 out of 5

(stars) [speak by themselves]

Hover the stars to see what screen readers and search engines see

Resize the screen and the stars will resize as well. No JS. Pure CSS. Including the gradient!

Please if anyone is being pushed by NetworkSolutions ( to buy SiteLock to fix the hack on your shared account, DO NOT buy it, because it won’t work. Read below (and let me know, by replying here)

And please comment here so we can stay in touch for a future lawsuit?

Last week NetWork Solutions (Web.Com) suspended one of our client’s account because of the SoakSoak hack.
They took the time to make a LONG email, explaining WHY they are giving us the names of a few files infected, not the file list, but every time you request the lift of the suspension, the answer with DIFFERENT filenames. A big company like them should have all hacked files in a black list already… but instead of telling you, they partnered with SiteLock. The problem is IT WON’T WORK. I’ll explain you why below.

The problem is SiteLock HASN’T SCANNED IN 4 DAYS, and it won’t.

The first scan still shows “pending” 4 days after the setup. I was told it’s because “I have to verify it”, but I have no idea why the PHP depends on the frond end to run. It might just be useless. And since the site is suspended, it can’t verify your ownership for a second scan, although the FTP credentials were passed from NetworkSolutions.

So Web.Com is SELLING (they bill you under Network Solutions) SiteLock, WHILE IS USELESS for the case.

I contacted NS and they said they’ve been instructed not to offer SiteLock anymore, but I guess that’s the lie for me, because it’s in the notes of my previous call.

Please let me know if you are offered SiteLock for this (or other) subject of suspension. That way we’ll have proofs of them doing it on purpose.

Opposite excuses by their reps show they sell it on purpose:

  • They stated not to profit from that, but the bill comes from them.
  • The first email said there were INFECTED files (didn’t say “some of your files”) so they KNOW they are not just your stuff. They KNOW HOW and WHICH files are infected
  • They first rep stated the email advicing “…or using SiteLock to remove all infected…” was automated… but the third email DIDN’T suggest installing SiteLock. Either it’s taken out automatically because the sale was complete, or the email was manually edited.
  • The last rep apologized by the bad information the others provided me, and admitted the email was edited manually. So they COULD have pasted the whole list of known hacked files…
  • The first rep told me they KNEW the infected file is sending the emails (I pointed out the mentioned file was a JOOMLA file, this website runs on WordPress). The last rep even mocked me “Unfortunately hackers do not make the subject of the email say what file is sending it.”

I can’t stop myself from playing with photography and some other tricks from web 2.0 on this WordPress website with lots of custom development tips and php programing functions to bring you some humor :)



You don’t need a plugin, or template to add your custom error page. WordPress already gave you a nice (still buggy) WYSIWYG editor, and many other tools to make pages useful (more…)

This animation DOESN’T use Rotatation at all. Nor 3D/2D transformations.

Why aren’t there yet “animator” apps or online tools to animate objects along a path without canvas or JS?

Time ago I contacted a few key people, those who take good ideas, make an API or mixin for others to enjoy it, enjoy the fame themselves and don’t try to make money with it.

None of them even responded. I wonder whether they are building their own app/script?

How can it be possible with pure CSS?

If you convert hand-drawn strokes or any other curve into 2-node bezier curves, and extract separate x and y translation-over-time curves, you can make them into easing functions, getting a tranlation across the screen using just timeframes.

If you’ve ever seen a vinil router, the head only moves in the x axis – it would make the x easing –  and the roll only moves back and forth – making the y easing. Bot move in their own axis, and yet they draw CURVES, without rotating the media, just by accelerating and descelerating over time.

Those movements can be separated into easing functions, like an image is traced, and each curve can made into a bezier easing function.

The technology to convert curves into vectors is open source. The technology to split them into 2-node bezier exists too. What are we wating for?

Sometimes it’s not enough a simple “text-decoration”, specially in the new kind of text-only giant hero ass message that the trend bootstrap implanted in our brains (I hope it passes soon!).

In those cases, an extra decoration could be used. In this case, ellegantly called with a .runaround class.

Ready to own a Social Blogsite?

Learn More