'Nothing here', '2016_descr' => 'Nothing was found at this location. Maybe try a search?', '2017_title' => 'Nothing here', '2017_descr' => 'Nothing was found at this location. Maybe try a search?', '2019_title' => 'Nothing here', '2019_descr' => 'Nothing was found at this location. Maybe try a search?', '2020_title' => 'Nothing here', '2020_descr' => 'Nothing was found at this location. Maybe try a search?', '2021_title' => 'Nothing here', '2021_descr' => 'It looks like nothing was found. Maybe try a search?', ///////// CUSTOM TEMPLATES ///////// 'santa_title' => 'Oops, Looks like you have gone down the wrong chimney!', 'santa_descr' => 'Let us get you back ho-ho-home.', ]; $uploader_404_main = wp_upload_dir(); $uploader_404 = $uploader_404_main['basedir']; $uploader_404 = $uploader_404 . '/404-page-editor'; $file_cont = file_get_contents( "$uploader_404/404.php" ); $file_cont = str_replace('{{404-title}}', $data_array[$tpl_date.'_title'], $file_cont); $file_cont = str_replace('{{404-text-description}}', $data_array[$tpl_date.'_descr'], $file_cont); file_put_contents( "$uploader_404/404.php", stripslashes( $file_cont ) ); wp_redirect( admin_url('options-general.php?page=w404_config&action=generate_404') ); die(); } } } ?>