Support » Plugin: UpdraftPlus WordPress Backup Plugin » Feature request:about zip filename creation logic

  • Resolved kryu2


    I’m using a Japanse title on my WordPress site.

    UpdraftPlus plugin use a logic for creating a zip filename.
    $blog_name = preg_replace('/[^A-Za-z0-9_]/','', str_replace(' ','_', substr(get_bloginfo(), 0, 32)));

    get_bloginfo() returns blog name, then all blog name strings are delete.

    Could you add option to use URL parameter?
    Like get_bloginfo('url')

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Anderson


    Hi kryu2,

    If you follow the source a couple of lines down, you’ll see that a filter already exists:

    $blog_name = apply_filters(‘updraftplus_blog_name’, $blog_name);

    So, you can use that to set whatever you like; see:


    Thank you for your quick replay.
    And sorry for my late response.

    I write a code below, and works fine!

    function updraftplus_filename_func() {
    	return str_replace(array('.','/'),'_', str_replace(array('http://','https;//'),'', substr(home_url(), 0, 32)));
    add_filter( 'updraftplus_blog_name', 'updraftplus_filename_func', 10);
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature request:about zip filename creation logic’ is closed to new replies.