bbMenu 1.1 programming problem (advanced!)
-
Hi,
I am currently upgrading my bbMenu plugin. You can now edit the titles en safe them to you db. The problem is, the last part I can’t get the saving to work.
In the JS file I have now:
var url = 'edit.php';This file (edit.php) is called when someone renames the menu item and has the following code:
<?php
$id = $_POST['id'];
$content = $_POST['content'];
echo stripslashes(htmlentities($content)); ?>Now I don’t want to have an external file so I copy past this code into my bbmenu.php and changed the var url in the JS file too:
var url = '../my-plugins/bbmenu.php';So it now calls the bbmenu.php but this gives some errors, cause it will reload the plugin file:
Fatal error: Call to undefined function add_action() in /bbpress/my-plugins/bbmenu.phpon line 30How to solve this?
If this aint possible what do I need to add to edit.php so it also safes the stuff to the db?
Hope you guys can help me out
You must be logged in to reply to this topic.