They say you learn something new every day.

I haven’t done this for a while now, but I was thinking about where to store some useful nuggets I’ve come across while learning WordPress and it occured to me that that is exactly what this is for.

In WordPress, there’s a button at the bottom of articles that, if you’re logged in, gives you quick access to edit the article. It uses this function:

edit_post_link()

It’s all very, but what if you want to change what it says?

Turns out, it’s easy enough:

edit_post_link(‘New text’)

I’m impressed by how good the WordPress documentation is actually – especially since a lot of the code is horrible old php.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: