71 Commits

Author SHA1 Message Date
Tetrakern
4b7a1333eb Remove Storygraph API transient caching
This needs a better solution, because with so many people using the theme for community archives, this runs danger of becoming detrimental to performance rather than help.
2024-10-12 20:36:42 +02:00
Tetrakern
8bec510209 Apply content filters to Storypath API content node 2024-08-30 16:44:59 +02:00
Tetrakern
9c816df834 Replace array utility with Elvis operator
Same result, easier to read, less overhead.
2024-05-14 22:59:02 +02:00
Tetrakern
d0e58753fe Fix and improve storygraph API story node
The protected attribute checked whether a password exists AND the correct cookie as well, which could technically yield the wrong result. Also accounted for people misusing stories as chapters.
2024-04-30 13:06:26 +02:00
Tetrakern
c3bc1980ea Use story redirect in API 2024-04-14 23:11:47 +02:00
Tetrakern
5df5bc696f Rename files for clarity, move some functions
Bringing order to the mess, one commit at a time.
2024-04-13 16:54:33 +02:00
Tetrakern
fc7fc2ac2e Update safe title helper parameters
Added the $context parameter and $args, which now also covers $no_filters which hopefully nobody has used yet lol
2024-03-01 12:39:42 +01:00
Tetrakern
f39a259516 Spring cleaning
Renamed and reordered things for more clarity and efficiency.
2024-01-29 17:08:19 +01:00
Tetrakern
365496c807 Remove problematic commit message
Revert revert!
2024-01-26 17:47:24 +01:00
Tetrakern
e00787589d Revert "Unify since version number format"
This reverts commit 8c4b44e41db8454af65ce4a909e0cb12db8828f8.
2024-01-26 17:45:53 +01:00
Tetrakern
8c4b44e41d Unify @since version number format
Yes, it bothered me.
2024-01-26 15:51:11 +01:00
Tetrakern
36aff1f54a Add fictioneer_get_word_count helper 2023-11-30 17:10:19 +01:00
Tetrakern
b65e8ccea1 Replace fictioneer_get_field with get_post_meta
This wrapper made sense at some point in the past, now it was just unnecessary overhead.
2023-11-30 16:03:53 +01:00
Tetrakern
c8b142367c Improve co-author handling 2023-11-30 12:56:16 +01:00
Tetrakern
6ebe8cb016 Type check for co-author array in API 2023-11-30 11:10:54 +01:00
Tetrakern
e0176eac59 Use fictioneer_get_field everwhere
I might actually remove it later on because it does not safe space anyway, but at least it is consistent for now.
2023-11-30 10:58:45 +01:00
Tetrakern
dacde9c2cb Remove unnecessary constants
Auto-loaded anyway.
2023-11-24 12:05:32 +01:00
Tetrakern
d229ea9a82 Code formatting 2023-11-12 00:23:10 +01:00
Tetrakern
15eb144b48 Cleanup 2023-08-28 10:43:04 +02:00
Tetrakern
662e78bf5b Start using REST API; story comments
At least for everything that cannot use the fast AJAX, which is still superior.
2023-08-21 21:32:52 +02:00
Tetrakern
6ede5b4da1 Rename function 2023-08-21 00:57:56 +02:00
Tetrakern
37ba9480d4 Clean up some more comments 2023-08-20 01:12:49 +02:00
Tetrakern
a55c4e1ce5 Rename function 2023-08-17 03:20:27 +02:00
Tetrakern
bed9852de1 New query safety function for empty post__in
This was causing untold issues...
2023-08-17 01:10:00 +02:00
Tetrakern
cbb5c061bf Improve performance of ePUB converter 2023-08-08 13:24:43 +02:00
Tetrakern
5a1fc93bca Use even more update_post_author_caches 2023-08-05 18:46:40 +02:00
Tetrakern
ac507476cf Optionize comment count refresh for story data
This is an expensive query and hardly needed, but better leave it on by default for legacy reasons.
2023-08-05 18:31:39 +02:00
Tetrakern
50c0cd10aa Small performance fixed 2023-08-03 13:18:57 +02:00
Tetrakern
3d7c290a3e Better use of constants
Should have done that from the start.
2023-05-11 16:22:43 +02:00
Tetrakern
69669ea92d Reduce database calls, add option to skip them
Apparently, get_bloginfo() is not cached, so calling it over and over again negatively impacts performance. Child themes can now make use of four new constants to skip these calls entirely.
2023-05-11 11:37:40 +02:00
Tetrakern
2928312199 Use found_posts instead of wp_count_posts()
Duh.
2023-02-20 10:10:11 +01:00
Tetrakern
922cba0581 Fix API page type 2023-02-19 16:33:19 +01:00
Tetrakern
a3040420c0 Fix chapter count in API 2023-02-19 16:27:46 +01:00
Tetrakern
7ce7fb6cf6 Convert story count to integer 2023-02-19 16:14:54 +01:00
Tetrakern
73dbc9b37e Convert word count to integer 2023-02-19 16:05:49 +01:00
Tetrakern
240622496e Fix story count in storygraph API 2023-02-19 15:56:09 +01:00
Tetrakern
442434cd5f Add lastModifiedStory node to storygraph
Makes it easier to find the last modified story in the collection.
2023-02-18 13:53:35 +01:00
Tetrakern
268edbdd1a Remove superfluous node from storygraph
I believe the images node not being present is enough indication.
2023-02-18 13:47:48 +01:00
Tetrakern
f10c220a68 Remove cached node from storygraph
This only referred to Transient caching. If another type of caching is used, this value would have been wrong.
2023-02-18 13:31:13 +01:00
Tetrakern
a505890c05 Account for missing author in Storygraph
This shouldn't happen but one never knows.
2023-02-18 12:14:04 +01:00
Tetrakern
988b9d5f18 Fix separate chapter storygraph node 2023-02-18 02:00:07 +01:00
Tetrakern
7170f03333 Add transient caching for storygraph API 2023-02-18 01:44:05 +01:00
Tetrakern
bccfca92a4 Add constant to remove chapters from /stories 2023-02-18 01:14:48 +01:00
Tetrakern
f48ca2bf3e Constant to turn off API images 2023-02-18 01:01:10 +01:00
Tetrakern
f4ebe61b38 Add theme option for storygraph API 2023-02-18 00:56:08 +01:00
Tetrakern
2f0bfc1885 Update _api.php 2023-02-18 00:37:53 +01:00
Tetrakern
a4ac274425 Update _api.php 2023-02-17 22:38:37 +01:00
Tetrakern
8568efa8c2 Description and rendered content 2023-02-17 20:03:52 +01:00
Tetrakern
534473a8a7 Update _api.php 2023-02-17 15:24:24 +01:00
Tetrakern
b75022fd8b Optimize query 2023-02-17 10:02:51 +01:00