Ist die letzte Funktion im PHP oben!?
Beiträge von SebastianK
-
-
Ne leider nicht. dann hätte ich das ganze wahrscheinlich schon aufgedeckt. Also grob sieht das Plugin so aus
PHP
Alles anzeigen// init the plugin add_action('init', 'spRapidInit'); add_action('activate_'.plugin_basename(__FILE__), 'spRapidInstall'); // init the plugin function spRapidInit(){ spMainClass::setLanguage('spRapid'); // Create a master category and its sub-pages add_action('admin_menu', 'spRapidMenu'); // Add entry to config file add_option('spRapid','', 'spRapid settings'); // add javascript add_action('wp_head', 'spRapidHeader'); // install the plugin #require_once(dirname(__FILE__).'/lib/install.php'); } function spRapidInstall(){ echo 'im installer'; die(); }hab ich eventuell nen Fehler bei der Reihenfolge? aber da irgendwas zu ändern, hat auch leider nichts gebracht.
-
Moin alle zusammen,
ich bin grad dabei ein Plugin zu schreiben und möchte bei Aktivierung eine SQL Tabelle erstellen. Soweit so gut.Sobald ich den Part
hinzufüge, kommt der error
Code[size=8]Fatal error: Cannot redeclare sprapidinit() (previously declared in D:\xampp\htdocs\wordpress\wp-content\plugins\spRapid\spRapid.php:29) in D:\xampp\htdocs\wordpress\wp-content\plugins\spRapid\spRapid.php on line [I]43[/I][/SIZE]Es scheint, die activate Funktion bindet das Plugin doppelt ein. Denn die Funktion gibt es mit 100%iger Sicherheit nur einmal.
Gibt es Referenzfälle, wo so etwas schon vorgekommen ist?
Vielen Dank schonmal für eure Hilfe.