Integrate LESS in JBST WordPress Theme

The WP LESS plugin offers a good opportunity to integrate LESS in your WordPress theme. How does this fit JBST? First i try to set the requirements.

JBST is based on Twitter’s Bootstrap, so we will have the option to update Twitter’s Bootstrap without changing any custom setting or extensions. JBST WordPress Theme can be use in two ways. In the first place someone can use JBST direct. In this case the website will be styled by using the build in customizer.
In the second option a child theme will be create. Customizing and styling will be done with the use of filters and hooks.
Updating of Twitter’s Bootstrap should be possible in both cases.
To find a suitable strategy i read Twitter Bootstrap Customization Best Practices. The solution of @sam seems to fit on the first sight. From How can I customize Twitter Bootstrap’s CSS using LESSCSS variables? i could construct a file structure.

Basically theme should compile customization.less which include Bootstrap. By default it always includes the bundled Bootstrap version. Compromise here will be the hard code path to Bootstrap’s LESS files:

@import ../../jamedobootstrapstarttheme/less/bootstrap.less
//custom Less code here

After this other CSS of JBST should also have to migrate to LESS. I will define a master and an custom file for this task too. So the final directory structure will look like:

/assets/bootstrap/less/*
/assets/jbst/less/*
/assets/less/boostrapcustomization.less
/assets/less/jbstcustomization.less

The plugin mentioned above should enqueue boostrapcustomization.less and jbstcustomization.less from the child theme folder if exists in the case of child theming or from the JBST parent theme in all other cases. Core files will always be imported from the parent theme. Updating Bootstrap won’t effect customizations.

So far the theoretical part. What did we find in practical? The first issue we found. The plugin didn’t support Twitter’s Bootstrap > 3.0.0. I fixed this by create a fork of the plugin which replies on less.php instead of LESSPHP. If your are interested you can download this code here.

Second issue was JBST doesn’t use the original Bootstrap files. Different versions of navbar.less are compiled and include based of the grid and navbar breakpoint (grid-float-breakpoint) settings in the customizer. To fix this we should save the customizer setting direct in some .less file (overriding bootstrap/variables.less).

Third JBST provides a custom CSS editor, this editor should be replace by a LESS editor.

The information in this blog will be used to migrate JBST to LESS. First steps are made already.

WordPress Development: Properly load your Javascript and set dependency

Theme and Plugin developers should wp_enqueue_script() to load the Javascript sources used in their code. Why should you enqueue? In the first place you should prevent conflict between your scripts. Secondly you should only load the resources you need per page. Load the right scripts only will reduce your load time.

WordPress offers a list of bundled resources like jQuery. So you don’t have to load jQuery every time, but you will have to set the dependency of jQuery of the sources you add.

Enqueueing you scripts proper will also help other theme and plugin developers. When two plugin need the same Javascript library you will load it only once. You will have to realize this in not guaranteed and documented well. If two plugins for example need some plugins of Twitter’s Bootstrap there will be no rules to describe the source already loaded. A solution can be both plugins depends on a third plugin which loads the resources. This kind of dependency is outside the scope of this blog post.

Although the reasons for proper loading seems clear many plugins and themes haven’t enqueued all their code.

Why do developers skip wp_enqueue_script()?

The main reason i found was the use of dynamic variables. Enqueued scripts load before the theme or plugin functions have been parsed in many situations. For example you will set the width of an element by javascript where the width will be user defined. The easiest but wrong solution will be to write it direct to source. Write javascript to source and for example make use of jQuery’s document ready will create a dependency of jQuery.

Solutions to use dynamic variables with wp_enqueue_script:

The first solution will be to write your code in native javascript not dependent of any library.
The second, and preferred solution in my opinion, is to (mis)use the wp_localize_script() function. wp_localize_script() localizes a script, but only if script has already been added. Can also be used to include arbitrary Javascript data in a page. The latest can be used to set your dynamic variables. Also read: Use wp_localize_script, It Is Awesome
Some example:

/** set parameters for display **/

$options = array();
$options[‘color’] = get_option( ‘color’, ‘blue’ );

wp_register_script( ‘color_display’, plugin_dir_url( __FILE__).’display_color.js’, array( ‘jquery’ ), ‘20131108’ );
wp_enqueue_script( ‘color_display’ );
wp_localize_script(‘color_display’, ‘color_display_options’,$options)

With display_color.js:

jQuery(document).ready(function($) {
$('colored').css('background-color',color_display_options.color);
};

Defer loading plugin

Recent i wrote a plugin for Defer loading. This plugin requires scripts are enqueued proper. Testing this i found many issues with different

plugins:

Migrate your (former) Skematik theme framework to Twitter’s Bootstrap 3: Instructions for theme developers

At Jamedo Websites we work with the Skematik Theme(work) to build responsive websites. Unfortunately the website was down for a while and Skematik use Twitters Bootstrap 2 only. Cause we need a new version of Skematik i start to migrate it to TB3. You will find this new version on: https://github.com/bassjobsen/jamedo-bootstrap-start-theme.

To use the theme work to build your own child theme use the instruction below:

  1. download from: https://github.com/bassjobsen/jamedo-bootstrap-start-theme/archive/master.zip
  2. copy the content of this .zip to the folder skematik in the wp-content/themes folder (the zip file creates the folder “https://github.com/bassjobsen/jamedo-bootstrap-start-theme/archive/master.zip” you have to rename this to “skematik” )
  3. (search and) replace all “span*” classes in your theme files with “col-lg-*”, see also: http://stackoverflow.com/a/17890898/1596547
  4.  fix all other points (general issues should be send by email to bass@w3masters.nl or send as a pull request to https://github.com/bassjobsen/jamedo-bootstrap-start-theme )

Basic setup for your child themes:

Read: http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme. So basically create style.css in your child theme folder. Start this file with: @import url("../skematik/style.css");

Learn more about Bootstrap 3

Bootstrap 3 don’t have a separate responsive CSS file any more.

From now Twitter’s Bootstrap defines three grids: Tiny grid for Phones (<480px), Small grid for Tablets (<768px) and the Medium-large grid for Desktops (>768px). The row class prefixes for these grid are “.col-”, “.col-sm-” and “.col-lg-”. The Medium-large grid will stack below 768 pixels screen width. So does the Small grid below 480 pixels and the tiny grid never stacks.

For this reason the “span*” classes in your theme files are replaced with “col-lg-*” in step 3 above. With “col-lg-*” the grid become horizontal above a screen width of 992px (desktop). Below this screen width elements will stack. To start the stacking at 767px use the “col-sm-*” prefixes instead of “.col-lg-”. Read Twitter Bootstrap 3 breakpoints and grid for more information.

Read Bootstrap your (designer’s) mind  also and ask your designer to deliver different designs for screen widths (from low to high). This will help you to choose the right grid settings.

For other changes read: Migrate your templates from Twitter Bootstrap 2.x to Twitter Bootstrap 3 and http://bootply.com/bootstrap-3-migration-guide.

You will find the official documentation of Twitter’s Bootstrap 3 now on: http://getbootstrap.com/.

Upgrading to Woocommerce 2

At the request of Jamedo Websites I upgrade the webshop of webvrouw to Woocommerce 2 last week. The upgrade broke my styles on the first sight. After taking a look to the css-files i found Woocommerce functions should be wrap with a woocommerce class now.

Be sure to wrap <?php woocommerce_content(); ?> in a <div class="woocommerce"></div> tag in your theme.

This new css gives also problems when using star-rating and the woocommerce-lightbox. See: Star rating bug.

ShareYourCart integration

After the upgrade the ShareYourCart settings were lost. Also ShareYourCart gives a warning on the checkout page.
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'ShareYourCartWooCommerceEx' does not have a method 'showCheckoutButton' in

Update: After updating ShareYourCart to the latest version (1.11.7) the problem with the check-out page is solved. ShareYourCart isn’t a integrated part of Woocommerce any more. ShareYourCart works like any other plugin now.

Integrate Trustpilot’s Automatische Feedback Service With Woocommerce

Try the WooCommerce Trustpilot Plugin now. This plugin sends the Trustpilot’s BCC email after order processing or completing.

Trustpilot is an open, community-based platform for sharing real reviews of shopping experiences online. You can use Trustpilot with your web shop. To ask customs for reviews Trustpilot sends e-mails. When you open a account you get a unique (secret) e-mail-address to send your order information to. Trustpilot’s software scans this e-mails for the e-mail-address of customer and your orderID. Trustpilot use this information to ask your customers for reviews.

With Automatische Feedback Service e-mails are send directly after the order. You can do this by sending a Bcc (blind carbon copy) of your confirmation e-mail to your unique Trustpilot e-mail-address. Woocommerce has no setting to send such Bcc message by default. To send you blind copy you have to change the code of Woocommerce.

Find the file /wp-content/plugins/woocommerce/classes/class-wc-email.php on your webserver first. Trustpilot ask you to send your order conformation e-mail. Woocommerce also sends an order complete message. I use the order complete message to send the blind copy. In the file mentioned before look up the customer_completed_order function. If you prefer to send the blind copy with the confirmation use the customer_processing_order function.

customer_completed_order contain the line:
$headers = apply_filters('woocommerce_email_headers', '', 'customer_processing_order', $order);

Add the following line of code after this line (replace xxxx@trustpilotservice.com with your own unique e-mailaddress):
$headers .= 'Bcc: xxxx@trustpilotservice.com'."\r\n";

That’s all. Remember this solution isn’t a hook for Woocommerce so you have to repeat this steps when you update your Woocommerce plugin every time.

Update for Woocommerce 2 In Woocommerce 2 the structure of the mail class has been changed. To send your Bcc message to Trustpilot you have to add the email address to /wp-content/plugins/woocommerce/classes/emails/class-wc-email-customer-completed-order.php or wc-email-processing-order.php if you like. The function trigger calls $this->send() change the fifth parameter from $this->get_headers() to this->get_headers().'Bcc: xxxx@trustpilotservice.com'."\r\n".

WordPress upgrade naar versie 3.5

WordPress 3.5 is al weer een tijdje uit. Tijd om een aantal sites te upgraden. Hier en daar hoorde ik wel wat geluiden dat de overstap voor problemen zorgde. Na een aantal sites gedaan te hebben ben ik zelf echter nog geen grote problemen tegen gekomen.
Eigenlijk kun je vooral problemen verwachten als je website / blog werkt met een verouderd theme. Verouderde plugins kunnen natuurlijk ook voor problemen zorgen. Deze afhankelijkheid maakt dat je zelf niet altijd meer in de hand hebt of je nog succesvol kunt updaten / upgraden.
Kies je bij de opzet van een website voor een free of premium theme, kijk dan altijd of je kunt verwachten dat het theme indien nodig een update krijgt. Ook voor plugins geldt dat natuurlijk. WordPress.org geeft per plugin aan wanneer de laatste update was.
Gebruik je een plugin die al lang niet meer geupdate is, ga dan eens na wat de reden daarvan is. Zijn er bijvoorbeeld inmiddels betere alternatieven? Is de techniek achterhaalt? Etc.
De websites die ik ondertussen geupgrade heb, hadden o.a. de volgende plugins: Woocommerce, SEO door @Yoast, Addthis.com, Disqus Comment System en W3 Total Cache. Zoveel mogelijk dezelfde en ‘bewezen’ plugins gebruiken voorkomt dus problemen.
@chrissmit maakte een handige lijst van plugins: Basic WordPress plugins: The Basics. Zo’n lijst is een goede start als je gaat beginnen aan een nieuwe wordpress site of je oude website eens wilt opschonen.

Andere tips voor het upgraden; maak altijd een backups. Het beste is een volledige backup van zowel je files als de database.

Originele tekst in wordpress plugin aanpassen

Gisteren vroeg @KarinBron op twitter: “I want to change the “succesfully added to cart” string in #WooCommerce #WordPress, of course outside the core files #dtv“. In eerste instantie begreep ik de vraag niet helemaal. Ik dacht dat het ging om het aanpassen van de vertaling. Waar het om ging: In een plugin is een Engelstalige string (tekst) opgenomen. Deze string wordt netjes vertaald via de mee geleverde language files van de plugin. Als gebruiker van de plugin zou je hier misschien liever een andere tekst zien. De snelste oplossing lijkt dus de language files aan te passen. Verondersteld dat de originele taal van de plugin Engels is, dan kan in languages/en_US.po een “vertaling” worden toegevoegd. Je vertaald dan dus de ongewenste Engelse tekst, naar de gewenste Engelse tekst. Dat kun je herhalen voor alle talen. Nadeel in dit geval is dus dat je de originele vertaalbestanden aanpast. Dat moet je elke keer doen als de plugin geupdate is.

Er moet dus een andere oplossing gezocht worden. Ik zal het hier uit leggen voor het specifieke geval waarover de vraag ging. De plugin waar het om gaat is Woocommerce. Deze plugin heeft een bestand woocommerce-functions.php, daarin komt de functie woocommerce_add_to_cart_message()voor. In die functie staat de volgende regel:


$message = sprintf('%s %s', get_permalink(woocommerce_get_page_id('cart')), __('View Cart →', 'woocommerce'), __('Product successfully added to your cart.', 'woocommerce') );

Het gaat om de tekst “Product successfully added to your cart.”, die tekst willen we aanpassen. Van de betreffende functie kunnen we geen ‘hook’ maken. Een oplossing hiervoor vond ik op remove/add filter to WordPress Function fil….

De output van de functie kan ik dus aanpassen in functions.php van mijn theme. Aan functions.php voeg ik dan dus toe:


function my_filer_function( $message )
{
// Here you should modify $message as you want, and then return it.
$replace = 'Thanks, Product successfully added to your cart.';
$message = preg_replace('/(.*<\/a> )(.*)/',"$1".$replace,$message);
return $message;
}
// Then add the function to that filter hook and prioritize it last
add_filter( 'woocommerce_add_to_cart_message', 'my_filer_function', 999);

De tekst “Product successfully added to your cart.” wordt dus vervangen door de tekst “Thanks, Product successfully added to your cart.”. Op de website heb ik getest of dit ook gebeurd. Dat werkt inderdaad prima. Er is nog een klein probleempje. De tekst wordt namelijk niet meer vertaald als ik de website in een andere taal bekijk.

In de bovenstaande code vervang ik de replace daarom door:

$replace = __('Thanks, Product successfully added to your cart.','your_domain');

De vertaling wordt in dit geval afgehandeld door de language files uit het ‘your_domain’ domein. Dit is onderdeel van mijn theme, omdat ik in functions.php ook heb opgenomen:
//Load the theme translation files
load_theme_textdomain( 'your_domain', TEMPLATEPATH.'/languages' );

Om de nieuwe tekst ook vertaald te krijgen naar bijvoorbeeld het Nederlands, voeg ik deze toe aan “TEMPLATEPATH.’/languages/nl_NL.po'”, daarin zet ik nu:

#: wp_webvrouw5/functions.php:119
msgid "Thanks, Product successfully added to your cart."
msgstr "Bedankt, het product is aan je winkelmandje toegevoegd."

De string is nu vertaald. Alle aanpassingen zijn gemaakt binnen mijn theme en ik kan de plugin dus blijven updaten.
Mocht bij een update van de plugin de structuur (html output) van woocommerce_add_to_cart_message worden aangepast dan zou het kunnen dat de replace niet meer werkt.

Wij wil zien dat het ook echt werkt kan kijken naar: NCFS Knuffelapen. Na het klikken op kopen, zie je de nieuwe tekst in het Nederlands. Nu de aap nog even afrekenen, daarmee steun je het goede doel!

Standaardisering van WordPress theme ontwikkeling

Jamedo Websites ontwikkelt voor haar klanten websites in WordPress. Ook biedt Jamedo Websites webdesigners de mogelijkheid om hun ontwerpen, white labelled te laten uitvoeren en beheren. WordPress wordt hier ingezet als content management systeem. Voor de opmaak van een website met WordPress wordt gebruik gemaakt van een zgn. theme. Een theme is gescheiden van de rest van de code. Er is echter geen stricte scheiding tussen code en design. Ook in een theme kan PHP worden gebruikt. Qua beveiliging vormt dit laatste een extra risico.

De gekozen opzet van WordPress maakt het mogelijk themes onafhankelijk te ontwikkelen. Binnen een bestaande WordPress installatie kan zonder verdere wijziging van content of functionaliteit een andere theme worden gebruikt. In de praktijk ondersteunen niet alle themes dezelfde functies en kunnen bij het wisselen toch functionaliteiten verloren gaan.

Voor haar klanten ontwikkelt Jamedo Websites op basis van het gewenst ontwerp dus ook steeds een uniek theme. Om een theme te ontwikkelen worden steeds een aantal stappen doorlopen. Deze stappen zijn steeds hetzelfde. De verschillende stappen kunnen door verschillende mensen worden uitgevoerd. Door het proces te standaardiseren, kunnen designers, slicers en programmeurs beter samenwerken. Tevens wordt de gebruikte code van de theme herbruikbaar, wat in de eerste plaats de kosten drukt en in de tweede plaats zorgt dat het werk makkelijker over te dragen is.

Aan mij de opdracht om een voorstel te doen voor deze standaardisering

Het proces

De meeste websites beginnen met een interaction design. Op basis van het interaction design levert een ontwerper een ontwerp voor de website. Ontwerpen worden in 90% van de gevallen aangeleverd in Photoshop (.psd) bestanden. De volgende stap is basing / slicing. In deze stap wordt het ontwerp omgezet naar geldige html-code. Jamedo Websites levert al haar projecten responsive op. Dit wil zeggen dat de website werkt op een PC, tablet en mobiele telefoon, zonder verlies van functionaliteit. Vanwege de responsiviteit wordt de html-code opgeleverd in html5 met css3. Op basis van de geleverde html-code wordt vervolgens een WordPress theme gemaakt. Deze stappen worden uitgevoerd door verschillende mensen. Per stap kan nu gekeken worden volgens welke standaards gewerkt kan worden en hoe deze stappen het beste op elkaar kunnen worden aangesloten.

Basiselementen
Voor de eerste twee stappen, het interactie design en het websiteontwerp heb ik in kaart gebracht welke onderdelen voor elke website ontworpen moeten worden. Dat zijn de volgende onderdelen:

  • voorpagina
    • twitterfeed
  • subpagina met tekst (full)
    • social media buttons
  • pagina met twee kolommen
  • pagina met drie kolommen
  • contactformulier
  • reactieformulier / reacties
  • form elementen; textarea, radio buttons, checkboxes, select boxes, buttons
  • tekst elementen; h1 t/m h9 headers, strong, emphasized, paragraaf, quote, code

Uiteraard hebben alle pagina’s een header, footer en een content deel. Naast de basiselementen levert de designer ook een klantspecifiek ontwerp op, wat per definitie niet alle basiselementen hoeft te bevatten.

Standaardisering van de html- en css-code

Ook voor responsive design zijn er inmiddels diverse frameworks die direct kunnen worden ingezet als basis. Enkele voorbeelden zijn Gumby Framework en Yaml. De laatste tijd is op dit gebied ook de Twitter Bootstrap CSS framework sterk in opkomst. De keuze voor een vast framework en grid, zal ook de interactie- en webdesigner helpen. Het Grid vormt dan immers ook de basis voor het ontwerp.

Het ontwikkelen van het theme

De juiste manier om themes te ontwikkelen is het creëren van een zgn. child theme op basis van je basis of parent theme. Dit stelt je in staat de basisfuncties te updaten zonder dat je eigen code overschreven wordt. Zoals ik eerder al aangaf, heeft het opnemen van PHP code in de themes risico’s. Een goed opgezet theme structuur zorgt ervoor dat je code uptodate blijft en eventuele security problemen doeltreffend kunnen worden opgelost. Lees ook: Blogging Pitfalls: Why You Should Update Your Themes (and Use Child Themes)

Eindconclusie

Mijn advies aan Jamedo Websites is een css framework te kiezen en op basis daarvan een parent theme te ontwikkelen. In plaats daarvan zou eventueel ook een bestaand parent theme gekozen kunnen worden. Goede kandidaten lijken dan XXtreme theme (op basis van yaml) of WordPress Bootstrap (op basis van Twitter Bootstrap). De juiste keuze wordt gemaakt in overleg met de verschillende ontwikkelaars en designers. Mijn persoonlijke voorkeur gaat uit naar de Twitter Bootstrap. WordPress Bootstrap is op zijn beurt weer afhankelijk van het Bones theme framework. Om een te grote afhankelijkheid te voorkomen lijkt het daarom tevens verstandig het basis theme zelf te ontwikkelen en onderhouden.

Bij een keuze voor Twitter Bootstrap kan nog gekeken worden naar WordPress Twitter Bootstrap CSS. Deze plugin kan helpen reeds ontwikkelde projecten sneller naar de standaard te brengen.

Ondanks de standaardisering blijft het belangrijk hierin flexibel te blijven. Het gehele proces dient continu geëvalueerd en verbeterd te worden. Zo is het belangrijk bijvoorbeeld de eerder genoemde basislijst van elementen, actueel te houden. Blijkt achteraf voor een klant iets te missen, kijk dan of het niet bij de basiselementen hoort en andersom wordt er nooit een twitterfeed gevraagd schrap deze dan.

Spammers, bots en alle andere ongewenste gasten

Voor de website jongerenchat.nl heb ik onlangs Buddypress geïnstalleerd. Buddypress is een plugin die je helpt het het opbouwen en onderhouden van een online community. Buddypress verving voor deze website de profielensoftware van opensourcecms.eu. Deze profielensoftware wordt nog wel gebruikt op KinderChat. Beide chatsites gebruiken nu ook de chatsoftware van 123flashchat.com, dat was eerder CometChat. 123flashchat.com ondersteunt, in tegenstelling van wat de naam doet vermoeden, tegenwoordig ook html5.

Buddypress heeft veel opties en dat maakt het opbouwen van een community gemakkelijker. Het is software die veel gebruikt wordt, of eigenlijk is het natuurlijk WordPress dat veel gebruikt wordt. Het veelvuldig gebruik heeft zeker met het vrij beschikbaar zijn van de source ook nadelen. Na de installatie ontstond een ware stroom van ‘fake’ gebruikers.

Deze ongewenste registraties wil ik natuurlijk zo veel mogelijk voorkomen. Best Practices for Preventing BuddyPress Spam User Registrations geeft een mooie opsomming van de mogelijkheden hiervoor.
Het eerste wat ik aangepakt heb is het installeren van een Captcha. Binnen WordPress zijn diverse plugins beschikbaar die dit kunnen regelen. Niet alle Captcha zijn gratis, dat hoeft ook niet. Belangrijkste vond ik de gebruikersvriendelijkheid. Een voor de hand liggende optie leek bijvoorbeeld de BuddyPress reCAPTCHA plugin.
Deze plugin gebruikt de Google reCAPTCHA Service. Bijna iedereen kent deze Captcha-methode ondertussen, wat een belangrijk pluspunt had kunnen zijn. Persoonlijk vind ik deze Captcha’s eigenlijk altijd te ingewikkeld, en ik ben toch echt een mens. Er zijn altijd wel een paar letters die ik moeilijk kan lezen bovendien is de tekst die je moet intypen altijd vrij lang, voor ik begin met typen heb ik meestal al verschillende keren gerefreshed. Ik typ pas als ik alle lettters denk te herkennen en dan nog vaak heb ik het fout.

De Sweet Captcha plugin leek mij een leuk alternatief, niet te ingewikkeld en niet vervelend om uit te voeren. Na installatie bleek deze plugin echter niet te werken. De afbeeldingen werden niet getoond. Bovendien zorgen een andere bug er voor dat de captach ook bij het inlogformulier kwam te staan terwijl ik dit in de instellingen toch anders had ik ingesteld.
Het niet werken van de plugin gaf mij ook nog een ander probleem. Want om weer in te kunnen loggen in het WordPress dashboard moest ik nu ook zelf een captcha opgeven, ik had uitgelogd om het registeren te kunnen testen. Gezien er geen afbeelding was, kon ik dus niet meer inloggen.

Via Quickly Disable or Enable All WordPress Plugins via the Database kon ik achterhalen hoe ik de plugin via de database kon uitschakelen.
De string die in de database wordt opgeslagen onder active_plugins (tabel wp_options) ziet er ongeveer als volgt uit:

a:3:{i:0;s:13:"AddMySite.php";i:1;s:19:"akismet/akismet.php";i:2;s:23:"all_in_one_seo_pack.php"}

a:3 (een array) geeft het aantal plugins aan. i (int) is de index, die start bij 0. Na de index volgt de naam van de plugin, voorafgegaan door s:{getal}, waarbij s staat voor string en het getal aangeeft hoeveel letters de naam van de plugin telt. Naam is misschien niet helemaal juist gezegd, feitelijk is het een bestandsnaam van een php-file die bij de plugin behoort.
Om een plugin uit te schakelen, verwijder je de index en de string allebei. Zou ik bijvoorbeeld in het bovenstaande voorbeeld Akismet willen uitschakelen, dan verwijder ik het stukje i:1;s:19:"akismet/akismet.php";
Alle indeces na de verwijdering moeten hernummerd worden, ook de lengte van de array moet worden aangepast. Na het uitschakkelen van Akismet staat in het veld dus nog:

a:2:{i:0;s:13:"AddMySite.php";i:1;s:23:"all_in_one_seo_pack.php"}

Uiteindelijk is het dan de SI CAPTCHA Anti-Spam plugin geworden. Blijft jammer van die Sweet Captcha plugin, misschien later nog eens bekijken. Nu eerst maar eens zien hoe effectief SI CAPTCHA Anti-Spam is in het tegenhouden van al die spammers, bots en alle andere ongewenste gasten.