Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hook to catch edits to blog names?


  • 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)

  • 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?

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


    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)
  • The topic ‘Hook to catch edits to blog names?’ is closed to new replies.
Skip to toolbar