Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Using changedata-save
#1
Hi

Want to make small plugin so that when the user saves a new page I am able to call a function to grab the url of the newly made page.

Thought that changedata-save would be ideal but not sure I'm using it correctly. 

Any ideas how I would achieve this please
Reply
#2
If you don't want to interfere with the saving process use changedata-aftersave
Reply
#3
You can use global variable $url to get the page slug, then function find_url to obtain the full URL.

But it might be better to use hook changedata-aftersave and check global var $status just in case there was some problem when saving.
Reply
#4
(2018-09-21, 02:02:49)Carlos Wrote: You can use global variable $url to get the page slug, then function find_url to obtain the full URL.

But it might be better to use hook changedata-aftersave and check global var $status just in case there was some problem when saving.


Just tried the Global url and it works a real treat . . . . Thanks again, really appreciated
Reply




Users browsing this thread: 1 Guest(s)