Wordpress:development:Gebruik plugin

Beschrijving

Het gebruik van een plugin in een Page Template.

Handleiding

1 Neem het volgende op in het PHP bestand van de plugin

add_action('xxx','yyy',www,zzz);
  • xxx = Naam van de hook
  • yyy = Naam van de aan te roepen functie
  • www = Prioriteit. Standaard 10
  • zzz = Aantal mee te geven parameters

2 Neem op in de Page Template (PHP bestand in het theme)

<?php do_action('xxx',yyy,yyy); ?>
  • xxx = Naam van de hook
  • yyy = Parameters

3 Zorg dat de plugin is geactiveerd

Externe Links

  • Function Reference/do action (English)
  • Wpseek (English)
  • An Introduction to WordPress Action Hooks (English)