• Hi to all.

    Now I want to delete themes with code.

    I can’t find any hook or function in the API to do this.

    Anyone knows how can I remove themes with code?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Oscar Abad Folgueira

    (@oabadfol)

    Hi again.

    I just found the “delete_theme()” function.

    Now, I need to get all inactive themes and delete all.

    The function get_themes() give me all themes but I need only the unactivated themes.

    Someone?

    Regards.

    Is there a reason you can’t do this from the dashboard?
    If so, do you have FTP access? If you know the names of the themes you need to remove you can just delete their folders.

    Thread Starter Oscar Abad Folgueira

    (@oabadfol)

    Hi, Lessa W.

    No, I’m writing a plugin to do some initial tasks and this is one of them.

    Regards.

    Thread Starter Oscar Abad Folgueira

    (@oabadfol)

    Well, I found the solution.

    The solution is to use the object of wp_get_theme() and the ‘TextDomain’ property.

    Bye.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove theme with code’ is closed to new replies.