Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hook to catch edits to blog names?

  • Avatar of Lemmy
    Lemmy
    Participant

    @lemmyc

    Hi, does anyone know if there’s a hook I can use to catch users’ edits to blog names? I need to filter the blog names for disallowed words.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of Lemmy
    Lemmy
    Participant

    @lemmyc

    I tried update_options_blogname, and the hook fires, but the value passed to my function seems to be the old content of the blogname field, rather than the new one. I could call update_option(‘blogname’, newvalue) from within my function, but that would probably lead to a recursive loop of death.
    Any ideas?

    Avatar of Paul Gibbs
    Paul Gibbs
    Keymaster

    @djpaul

    Look at BuddyPress’ bp_blogs_update_option_blogname() function for an example of how to do it.

    Avatar of Lemmy
    Lemmy
    Participant

    @lemmyc

    Thanks, i had tried something like that but forgot to specify the number of attributes in the add_action entry. Seems to be working OK now.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.