├── .browserslistrc ├── .distignore ├── .github └── workflows │ └── main.yml ├── .gitignore ├── .postcssrc.js ├── .stylelintrc.js ├── 404.php ├── LICENSE ├── README.md ├── archive.php ├── comments.php ├── composer.json ├── composer.lock ├── editor-style.css ├── fonts ├── Inter-VariableFont_slnt,wght.woff2 ├── LICENSE.txt └── MonaspaceArgon-Regular.woff ├── footer.php ├── functions.php ├── header.php ├── home.php ├── images └── mystery-person.png ├── inc ├── class-writemore-comment-walker.php ├── comments.php ├── content-aggregator-block.php ├── navigation.php ├── og.php ├── output.php ├── queries.php ├── template-functions.php └── theme-setup.php ├── index.php ├── package-lock.json ├── package.json ├── phpcs.xml ├── phpstan.neon.dist ├── rtl.css ├── screenshot.png ├── search.php ├── singular.php ├── style.css ├── template-parts ├── author-bio.php └── content │ ├── card-like.php │ ├── card-page.php │ ├── card-post.php │ └── card-shortnote.php └── templates └── webmention-comment-form.php /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 1 Android versions 3 | last 1 ChromeAndroid versions 4 | last 2 Chrome versions 5 | last 2 Firefox versions 6 | last 2 Safari versions 7 | last 2 iOS versions 8 | last 2 Edge versions 9 | last 2 Opera versions 10 | -------------------------------------------------------------------------------- /.distignore: -------------------------------------------------------------------------------- 1 | .distignore 2 | .git 3 | .github 4 | .gitignore 5 | .postcssrc.js 6 | .stylelintrc 7 | composer.json 8 | composer.lock 9 | package-lock.json 10 | package.json 11 | phpcs.xml 12 | phpstan.neon.dist 13 | vendor/ 14 | node_modules 15 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ develop ] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Deploy to Server 16 | uses: easingthemes/ssh-deploy@v2.0.7 17 | env: 18 | SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }} 19 | ARGS: "-rltgoDzvO --exclude=.git --exclude=.gitignore --exclude=.github --exclude=node_modules --exclude=vendor --delete" 20 | SOURCE: "./" 21 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 22 | REMOTE_USER: ${{ secrets.REMOTE_USER }} 23 | TARGET: ${{ secrets.REMOTE_TARGET }} 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | vendor 3 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | module.exports = require( '@happyprime/postcss-config') 2 | -------------------------------------------------------------------------------- /.stylelintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = require( '@happyprime/stylelint-config' ); 2 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 11 |

Page not found.

12 | 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | Everyone is permitted to copy and distribute verbatim copies 16 | of this license document, but changing it is not allowed. 17 | 18 | Preamble 19 | 20 | The licenses for most software are designed to take away your 21 | freedom to share and change it. By contrast, the GNU General Public 22 | License is intended to guarantee your freedom to share and change free 23 | software--to make sure the software is free for all its users. This 24 | General Public License applies to most of the Free Software 25 | Foundation's software and to any other program whose authors commit to 26 | using it. (Some other Free Software Foundation software is covered by 27 | the GNU Lesser General Public License instead.) You can apply it to 28 | your programs, too. 29 | 30 | When we speak of free software, we are referring to freedom, not 31 | price. Our General Public Licenses are designed to make sure that you 32 | have the freedom to distribute copies of free software (and charge for 33 | this service if you wish), that you receive source code or can get it 34 | if you want it, that you can change the software or use pieces of it 35 | in new free programs; and that you know you can do these things. 36 | 37 | To protect your rights, we need to make restrictions that forbid 38 | anyone to deny you these rights or to ask you to surrender the rights. 39 | These restrictions translate to certain responsibilities for you if you 40 | distribute copies of the software, or if you modify it. 41 | 42 | For example, if you distribute copies of such a program, whether 43 | gratis or for a fee, you must give the recipients all the rights that 44 | you have. You must make sure that they, too, receive or can get the 45 | source code. And you must show them these terms so they know their 46 | rights. 47 | 48 | We protect your rights with two steps: (1) copyright the software, and 49 | (2) offer you this license which gives you legal permission to copy, 50 | distribute and/or modify the software. 51 | 52 | Also, for each author's protection and ours, we want to make certain 53 | that everyone understands that there is no warranty for this free 54 | software. If the software is modified by someone else and passed on, we 55 | want its recipients to know that what they have is not the original, so 56 | that any problems introduced by others will not reflect on the original 57 | authors' reputations. 58 | 59 | Finally, any free program is threatened constantly by software 60 | patents. We wish to avoid the danger that redistributors of a free 61 | program will individually obtain patent licenses, in effect making the 62 | program proprietary. To prevent this, we have made it clear that any 63 | patent must be licensed for everyone's free use or not licensed at all. 64 | 65 | The precise terms and conditions for copying, distribution and 66 | modification follow. 67 | 68 | GNU GENERAL PUBLIC LICENSE 69 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 70 | 71 | 0. This License applies to any program or other work which contains 72 | a notice placed by the copyright holder saying it may be distributed 73 | under the terms of this General Public License. The "Program", below, 74 | refers to any such program or work, and a "work based on the Program" 75 | means either the Program or any derivative work under copyright law: 76 | that is to say, a work containing the Program or a portion of it, 77 | either verbatim or with modifications and/or translated into another 78 | language. (Hereinafter, translation is included without limitation in 79 | the term "modification".) Each licensee is addressed as "you". 80 | 81 | Activities other than copying, distribution and modification are not 82 | covered by this License; they are outside its scope. The act of 83 | running the Program is not restricted, and the output from the Program 84 | is covered only if its contents constitute a work based on the 85 | Program (independent of having been made by running the Program). 86 | Whether that is true depends on what the Program does. 87 | 88 | 1. You may copy and distribute verbatim copies of the Program's 89 | source code as you receive it, in any medium, provided that you 90 | conspicuously and appropriately publish on each copy an appropriate 91 | copyright notice and disclaimer of warranty; keep intact all the 92 | notices that refer to this License and to the absence of any warranty; 93 | and give any other recipients of the Program a copy of this License 94 | along with the Program. 95 | 96 | You may charge a fee for the physical act of transferring a copy, and 97 | you may at your option offer warranty protection in exchange for a fee. 98 | 99 | 2. You may modify your copy or copies of the Program or any portion 100 | of it, thus forming a work based on the Program, and copy and 101 | distribute such modifications or work under the terms of Section 1 102 | above, provided that you also meet all of these conditions: 103 | 104 | a) You must cause the modified files to carry prominent notices 105 | stating that you changed the files and the date of any change. 106 | 107 | b) You must cause any work that you distribute or publish, that in 108 | whole or in part contains or is derived from the Program or any 109 | part thereof, to be licensed as a whole at no charge to all third 110 | parties under the terms of this License. 111 | 112 | c) If the modified program normally reads commands interactively 113 | when run, you must cause it, when started running for such 114 | interactive use in the most ordinary way, to print or display an 115 | announcement including an appropriate copyright notice and a 116 | notice that there is no warranty (or else, saying that you provide 117 | a warranty) and that users may redistribute the program under 118 | these conditions, and telling the user how to view a copy of this 119 | License. (Exception: if the Program itself is interactive but 120 | does not normally print such an announcement, your work based on 121 | the Program is not required to print an announcement.) 122 | 123 | These requirements apply to the modified work as a whole. If 124 | identifiable sections of that work are not derived from the Program, 125 | and can be reasonably considered independent and separate works in 126 | themselves, then this License, and its terms, do not apply to those 127 | sections when you distribute them as separate works. But when you 128 | distribute the same sections as part of a whole which is a work based 129 | on the Program, the distribution of the whole must be on the terms of 130 | this License, whose permissions for other licensees extend to the 131 | entire whole, and thus to each and every part regardless of who wrote it. 132 | 133 | Thus, it is not the intent of this section to claim rights or contest 134 | your rights to work written entirely by you; rather, the intent is to 135 | exercise the right to control the distribution of derivative or 136 | collective works based on the Program. 137 | 138 | In addition, mere aggregation of another work not based on the Program 139 | with the Program (or with a work based on the Program) on a volume of 140 | a storage or distribution medium does not bring the other work under 141 | the scope of this License. 142 | 143 | 3. You may copy and distribute the Program (or a work based on it, 144 | under Section 2) in object code or executable form under the terms of 145 | Sections 1 and 2 above provided that you also do one of the following: 146 | 147 | a) Accompany it with the complete corresponding machine-readable 148 | source code, which must be distributed under the terms of Sections 149 | 1 and 2 above on a medium customarily used for software interchange; or, 150 | 151 | b) Accompany it with a written offer, valid for at least three 152 | years, to give any third party, for a charge no more than your 153 | cost of physically performing source distribution, a complete 154 | machine-readable copy of the corresponding source code, to be 155 | distributed under the terms of Sections 1 and 2 above on a medium 156 | customarily used for software interchange; or, 157 | 158 | c) Accompany it with the information you received as to the offer 159 | to distribute corresponding source code. (This alternative is 160 | allowed only for noncommercial distribution and only if you 161 | received the program in object code or executable form with such 162 | an offer, in accord with Subsection b above.) 163 | 164 | The source code for a work means the preferred form of the work for 165 | making modifications to it. For an executable work, complete source 166 | code means all the source code for all modules it contains, plus any 167 | associated interface definition files, plus the scripts used to 168 | control compilation and installation of the executable. However, as a 169 | special exception, the source code distributed need not include 170 | anything that is normally distributed (in either source or binary 171 | form) with the major components (compiler, kernel, and so on) of the 172 | operating system on which the executable runs, unless that component 173 | itself accompanies the executable. 174 | 175 | If distribution of executable or object code is made by offering 176 | access to copy from a designated place, then offering equivalent 177 | access to copy the source code from the same place counts as 178 | distribution of the source code, even though third parties are not 179 | compelled to copy the source along with the object code. 180 | 181 | 4. You may not copy, modify, sublicense, or distribute the Program 182 | except as expressly provided under this License. Any attempt 183 | otherwise to copy, modify, sublicense or distribute the Program is 184 | void, and will automatically terminate your rights under this License. 185 | However, parties who have received copies, or rights, from you under 186 | this License will not have their licenses terminated so long as such 187 | parties remain in full compliance. 188 | 189 | 5. You are not required to accept this License, since you have not 190 | signed it. However, nothing else grants you permission to modify or 191 | distribute the Program or its derivative works. These actions are 192 | prohibited by law if you do not accept this License. Therefore, by 193 | modifying or distributing the Program (or any work based on the 194 | Program), you indicate your acceptance of this License to do so, and 195 | all its terms and conditions for copying, distributing or modifying 196 | the Program or works based on it. 197 | 198 | 6. Each time you redistribute the Program (or any work based on the 199 | Program), the recipient automatically receives a license from the 200 | original licensor to copy, distribute or modify the Program subject to 201 | these terms and conditions. You may not impose any further 202 | restrictions on the recipients' exercise of the rights granted herein. 203 | You are not responsible for enforcing compliance by third parties to 204 | this License. 205 | 206 | 7. If, as a consequence of a court judgment or allegation of patent 207 | infringement or for any other reason (not limited to patent issues), 208 | conditions are imposed on you (whether by court order, agreement or 209 | otherwise) that contradict the conditions of this License, they do not 210 | excuse you from the conditions of this License. If you cannot 211 | distribute so as to satisfy simultaneously your obligations under this 212 | License and any other pertinent obligations, then as a consequence you 213 | may not distribute the Program at all. For example, if a patent 214 | license would not permit royalty-free redistribution of the Program by 215 | all those who receive copies directly or indirectly through you, then 216 | the only way you could satisfy both it and this License would be to 217 | refrain entirely from distribution of the Program. 218 | 219 | If any portion of this section is held invalid or unenforceable under 220 | any particular circumstance, the balance of the section is intended to 221 | apply and the section as a whole is intended to apply in other 222 | circumstances. 223 | 224 | It is not the purpose of this section to induce you to infringe any 225 | patents or other property right claims or to contest validity of any 226 | such claims; this section has the sole purpose of protecting the 227 | integrity of the free software distribution system, which is 228 | implemented by public license practices. Many people have made 229 | generous contributions to the wide range of software distributed 230 | through that system in reliance on consistent application of that 231 | system; it is up to the author/donor to decide if he or she is willing 232 | to distribute software through any other system and a licensee cannot 233 | impose that choice. 234 | 235 | This section is intended to make thoroughly clear what is believed to 236 | be a consequence of the rest of this License. 237 | 238 | 8. If the distribution and/or use of the Program is restricted in 239 | certain countries either by patents or by copyrighted interfaces, the 240 | original copyright holder who places the Program under this License 241 | may add an explicit geographical distribution limitation excluding 242 | those countries, so that distribution is permitted only in or among 243 | countries not thus excluded. In such case, this License incorporates 244 | the limitation as if written in the body of this License. 245 | 246 | 9. The Free Software Foundation may publish revised and/or new versions 247 | of the General Public License from time to time. Such new versions will 248 | be similar in spirit to the present version, but may differ in detail to 249 | address new problems or concerns. 250 | 251 | Each version is given a distinguishing version number. If the Program 252 | specifies a version number of this License which applies to it and "any 253 | later version", you have the option of following the terms and conditions 254 | either of that version or of any later version published by the Free 255 | Software Foundation. If the Program does not specify a version number of 256 | this License, you may choose any version ever published by the Free Software 257 | Foundation. 258 | 259 | 10. If you wish to incorporate parts of the Program into other free 260 | programs whose distribution conditions are different, write to the author 261 | to ask for permission. For software which is copyrighted by the Free 262 | Software Foundation, write to the Free Software Foundation; we sometimes 263 | make exceptions for this. Our decision will be guided by the two goals 264 | of preserving the free status of all derivatives of our free software and 265 | of promoting the sharing and reuse of software generally. 266 | 267 | NO WARRANTY 268 | 269 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 270 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 271 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 272 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 273 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 274 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 275 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 276 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 277 | REPAIR OR CORRECTION. 278 | 279 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 280 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 281 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 282 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 283 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 284 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 285 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 286 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 287 | POSSIBILITY OF SUCH DAMAGES. 288 | 289 | END OF TERMS AND CONDITIONS 290 | 291 | How to Apply These Terms to Your New Programs 292 | 293 | If you develop a new program, and you want it to be of the greatest 294 | possible use to the public, the best way to achieve this is to make it 295 | free software which everyone can redistribute and change under these terms. 296 | 297 | To do so, attach the following notices to the program. It is safest 298 | to attach them to the start of each source file to most effectively 299 | convey the exclusion of warranty; and each file should have at least 300 | the "copyright" line and a pointer to where the full notice is found. 301 | 302 | {description} 303 | Copyright (C) {year} {fullname} 304 | 305 | This program is free software; you can redistribute it and/or modify 306 | it under the terms of the GNU General Public License as published by 307 | the Free Software Foundation; either version 2 of the License, or 308 | (at your option) any later version. 309 | 310 | This program is distributed in the hope that it will be useful, 311 | but WITHOUT ANY WARRANTY; without even the implied warranty of 312 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 313 | GNU General Public License for more details. 314 | 315 | You should have received a copy of the GNU General Public License along 316 | with this program; if not, write to the Free Software Foundation, Inc., 317 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 318 | 319 | Also add information on how to contact you by electronic and paper mail. 320 | 321 | If the program is interactive, make it output a short notice like this 322 | when it starts in an interactive mode: 323 | 324 | Gnomovision version 69, Copyright (C) year name of author 325 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 326 | This is free software, and you are welcome to redistribute it 327 | under certain conditions; type `show c' for details. 328 | 329 | The hypothetical commands `show w' and `show c' should show the appropriate 330 | parts of the General Public License. Of course, the commands you use may 331 | be called something other than `show w' and `show c'; they could even be 332 | mouse-clicks or menu items--whatever suits your program. 333 | 334 | You should also get your employer (if you work as a programmer) or your 335 | school, if any, to sign a "copyright disclaimer" for the program, if 336 | necessary. Here is a sample; alter the names: 337 | 338 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 339 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 340 | 341 | {signature of Ty Coon}, 1 April 1989 342 | Ty Coon, President of Vice 343 | 344 | This General Public License does not permit incorporating your program into 345 | proprietary programs. If your program is a subroutine library, you may 346 | consider it more useful to permit linking proprietary applications with the 347 | library. If this is what you want to do, use the GNU Lesser General 348 | Public License instead of this License. 349 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # writemore 2 | 3 | This is a WordPress theme. 4 | 5 | ## Views 6 | 7 | * `/blog/` - Standard posts archive, uses `home.php`. 8 | * `/2022/01/` - Date based archive, uses `archive.php`. 9 | * `/2023/01/01/post-title` - Single post, uses `singular.php`. 10 | * `/notes/abcdefghijklmnop` - Single note, uses `singular.php`. 11 | * `/likes/a1b2c3d4e5f6g7h8i9j0` - Single like, uses `singular.php`. 12 | * `/about/` - Page, uses `singular.php`. 13 | * `/notes/` - Note archives, uses `archive.php`. 14 | * `/likes/` - Like archives, uses `archive.php`. 15 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 |
26 |

label ); ?>

27 | 28 |

29 | 30 |

Follow via RSS

31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 'View older ' . strtolower( $writemore_post_type->labels->name ), 42 | 'next_text' => 'View newer ' . strtolower( $writemore_post_type->labels->name ), 43 | ) 44 | ); 45 | 46 | get_template_part( 'template-parts/author-bio' ); 47 | ?> 48 | 49 | 50 |

This page exists, but how did it happen?

51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 22 | 23 |
24 | 25 | 29 |

Responses and reactions

30 | 31 | get_the_ID(), 36 | 'status' => 'approve', 37 | 'fields' => 'ids', 38 | ) 39 | ); 40 | 41 | $typed_comments = array( 42 | 'reply' => array(), 43 | 'bookmark' => array(), 44 | 'like' => array(), 45 | 'mention' => array(), 46 | 'other' => array(), 47 | ); 48 | 49 | $skip_actions = array( 50 | 'repost', 51 | 'tag', 52 | 'rsvp:yes', 53 | 'rsvp:no', 54 | 'rsvp:maybe', 55 | 'rsvp:interested', 56 | 'invited', 57 | 'listen', 58 | 'read', 59 | 'watch', 60 | 'follow', 61 | ); 62 | 63 | foreach ( $comments as $comment_id ) { 64 | $type = get_comment_meta( $comment_id, 'semantic_linkbacks_type', true ); 65 | 66 | if ( '' === $type ) { 67 | $type = 'reply'; 68 | } 69 | 70 | // Mirror "favorite" to the "like" type. 71 | if ( 'favorite' === $type ) { 72 | $type = 'like'; 73 | } 74 | 75 | // Skip the actions that aren't handled. 76 | if ( in_array( $type, $skip_actions, true ) ) { 77 | continue; 78 | } 79 | 80 | $typed_comments[ $type ][] = $comment_id; 81 | } 82 | 83 | if ( 0 < count( $typed_comments['like'] ) ) : 84 | 85 | ?> 86 | 87 | 88 |

Likes

89 | 114 | 115 | 116 |
117 | 118 | 119 | 120 | 121 | comment_author ); ?> 122 | liked this on 123 | 124 | 125 | 126 | 127 |
128 | 129 | 135 | 136 |

Bookmarks

137 | 154 | 155 | 156 |
157 | 158 | 159 | 160 | 161 | comment_author ); ?> 162 | bookmarked this on 163 | 164 | 165 | 166 | 167 |
168 | 169 | 175 | 176 |

Mentions

177 | 192 | 193 |
194 | 195 | 196 | 197 | 198 | comment_author ); ?> 199 | mentioned this on 200 | 201 | 202 | 203 | 204 |
205 | 211 | 212 |

Replies

213 | 214 | $typed_comments['reply'], 220 | ) 221 | ); 222 | 223 | wp_list_comments( 224 | array( 225 | 'avatar_size' => 60, 226 | 'walker' => new Writemore_Comment_Walker(), 227 | 'style' => '', 228 | 'format' => 'html5', 229 | ), 230 | $comments 231 | ); 232 | endif; 233 | 234 | // If comments are closed and there are comments, let's leave a little note, shall we? 235 | if ( ! comments_open() ) { 236 | ?> 237 |

238 | 244 | 245 |
246 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jeremyfelt/writemore", 3 | "type": "wordpress-theme", 4 | "minimum-stability": "stable", 5 | "require-dev": { 6 | "dealerdirect/phpcodesniffer-composer-installer": "*", 7 | "phpcompatibility/phpcompatibility-wp": "*", 8 | "phpcompatibility/php-compatibility": "dev-develop as 9.99.9", 9 | "sirbrillig/phpcs-variable-analysis": "*", 10 | "squizlabs/php_codesniffer": "3.*", 11 | "wp-coding-standards/wpcs": "*", 12 | "phpstan/phpstan": "^1.10", 13 | "szepeviktor/phpstan-wordpress": "^1.3", 14 | "phpstan/extension-installer": "^1.3", 15 | "phpstan/phpstan-phpunit": "^1.3", 16 | "php-stubs/wordpress-tests-stubs": "^6.2" 17 | }, 18 | "scripts": { 19 | "phpcs": "vendor/bin/phpcs", 20 | "phpcbf": "vendor/bin/phpcbf", 21 | "phpstan": "vendor/bin/phpstan analyse --memory-limit=2048M" 22 | }, 23 | "config": { 24 | "allow-plugins": { 25 | "composer/installers": true, 26 | "dealerdirect/phpcodesniffer-composer-installer": true, 27 | "phpstan/extension-installer": true 28 | }, 29 | "platform": { 30 | "php": "8.0" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "3e6e2163b6552cae7b2ebd780fae5060", 8 | "packages": [], 9 | "packages-dev": [ 10 | { 11 | "name": "dealerdirect/phpcodesniffer-composer-installer", 12 | "version": "v1.0.0", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/PHPCSStandards/composer-installer.git", 16 | "reference": "4be43904336affa5c2f70744a348312336afd0da" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", 21 | "reference": "4be43904336affa5c2f70744a348312336afd0da", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "composer-plugin-api": "^1.0 || ^2.0", 26 | "php": ">=5.4", 27 | "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" 28 | }, 29 | "require-dev": { 30 | "composer/composer": "*", 31 | "ext-json": "*", 32 | "ext-zip": "*", 33 | "php-parallel-lint/php-parallel-lint": "^1.3.1", 34 | "phpcompatibility/php-compatibility": "^9.0", 35 | "yoast/phpunit-polyfills": "^1.0" 36 | }, 37 | "type": "composer-plugin", 38 | "extra": { 39 | "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" 40 | }, 41 | "autoload": { 42 | "psr-4": { 43 | "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" 44 | } 45 | }, 46 | "notification-url": "https://packagist.org/downloads/", 47 | "license": [ 48 | "MIT" 49 | ], 50 | "authors": [ 51 | { 52 | "name": "Franck Nijhof", 53 | "email": "franck.nijhof@dealerdirect.com", 54 | "homepage": "http://www.frenck.nl", 55 | "role": "Developer / IT Manager" 56 | }, 57 | { 58 | "name": "Contributors", 59 | "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" 60 | } 61 | ], 62 | "description": "PHP_CodeSniffer Standards Composer Installer Plugin", 63 | "homepage": "http://www.dealerdirect.com", 64 | "keywords": [ 65 | "PHPCodeSniffer", 66 | "PHP_CodeSniffer", 67 | "code quality", 68 | "codesniffer", 69 | "composer", 70 | "installer", 71 | "phpcbf", 72 | "phpcs", 73 | "plugin", 74 | "qa", 75 | "quality", 76 | "standard", 77 | "standards", 78 | "style guide", 79 | "stylecheck", 80 | "tests" 81 | ], 82 | "support": { 83 | "issues": "https://github.com/PHPCSStandards/composer-installer/issues", 84 | "source": "https://github.com/PHPCSStandards/composer-installer" 85 | }, 86 | "time": "2023-01-05T11:28:13+00:00" 87 | }, 88 | { 89 | "name": "php-stubs/wordpress-stubs", 90 | "version": "v6.8.1", 91 | "source": { 92 | "type": "git", 93 | "url": "https://github.com/php-stubs/wordpress-stubs.git", 94 | "reference": "92e444847d94f7c30f88c60004648f507688acd5" 95 | }, 96 | "dist": { 97 | "type": "zip", 98 | "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/92e444847d94f7c30f88c60004648f507688acd5", 99 | "reference": "92e444847d94f7c30f88c60004648f507688acd5", 100 | "shasum": "" 101 | }, 102 | "conflict": { 103 | "phpdocumentor/reflection-docblock": "5.6.1" 104 | }, 105 | "require-dev": { 106 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0", 107 | "nikic/php-parser": "^5.4", 108 | "php": "^7.4 || ^8.0", 109 | "php-stubs/generator": "^0.8.3", 110 | "phpdocumentor/reflection-docblock": "^5.4.1", 111 | "phpstan/phpstan": "^2.1", 112 | "phpunit/phpunit": "^9.5", 113 | "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.1.1", 114 | "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" 115 | }, 116 | "suggest": { 117 | "paragonie/sodium_compat": "Pure PHP implementation of libsodium", 118 | "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", 119 | "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" 120 | }, 121 | "type": "library", 122 | "notification-url": "https://packagist.org/downloads/", 123 | "license": [ 124 | "MIT" 125 | ], 126 | "description": "WordPress function and class declaration stubs for static analysis.", 127 | "homepage": "https://github.com/php-stubs/wordpress-stubs", 128 | "keywords": [ 129 | "PHPStan", 130 | "static analysis", 131 | "wordpress" 132 | ], 133 | "support": { 134 | "issues": "https://github.com/php-stubs/wordpress-stubs/issues", 135 | "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.8.1" 136 | }, 137 | "time": "2025-05-02T12:33:34+00:00" 138 | }, 139 | { 140 | "name": "php-stubs/wordpress-tests-stubs", 141 | "version": "v6.8.0", 142 | "source": { 143 | "type": "git", 144 | "url": "https://github.com/php-stubs/wordpress-tests-stubs.git", 145 | "reference": "95979e5c671c72350dde78b89e29afdd88c37140" 146 | }, 147 | "dist": { 148 | "type": "zip", 149 | "url": "https://api.github.com/repos/php-stubs/wordpress-tests-stubs/zipball/95979e5c671c72350dde78b89e29afdd88c37140", 150 | "reference": "95979e5c671c72350dde78b89e29afdd88c37140", 151 | "shasum": "" 152 | }, 153 | "require-dev": { 154 | "php": "^7.3 || ^8.0", 155 | "php-stubs/generator": "^0.8.0" 156 | }, 157 | "suggest": { 158 | "symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", 159 | "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" 160 | }, 161 | "type": "library", 162 | "notification-url": "https://packagist.org/downloads/", 163 | "license": [ 164 | "MIT" 165 | ], 166 | "description": "WordPress Tests function and class declaration stubs for static analysis.", 167 | "homepage": "https://github.com/php-stubs/wordpress-tests-stubs", 168 | "keywords": [ 169 | "PHPStan", 170 | "static analysis", 171 | "wordpress" 172 | ], 173 | "support": { 174 | "issues": "https://github.com/php-stubs/wordpress-tests-stubs/issues", 175 | "source": "https://github.com/php-stubs/wordpress-tests-stubs/tree/v6.8.0" 176 | }, 177 | "time": "2025-04-15T20:54:04+00:00" 178 | }, 179 | { 180 | "name": "phpcompatibility/php-compatibility", 181 | "version": "dev-develop", 182 | "source": { 183 | "type": "git", 184 | "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", 185 | "reference": "9013cd039fe5740953f9fdeebd19d901b80e26f2" 186 | }, 187 | "dist": { 188 | "type": "zip", 189 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9013cd039fe5740953f9fdeebd19d901b80e26f2", 190 | "reference": "9013cd039fe5740953f9fdeebd19d901b80e26f2", 191 | "shasum": "" 192 | }, 193 | "require": { 194 | "php": ">=5.4", 195 | "phpcsstandards/phpcsutils": "^1.0.12", 196 | "squizlabs/php_codesniffer": "^3.10.0" 197 | }, 198 | "replace": { 199 | "wimg/php-compatibility": "*" 200 | }, 201 | "require-dev": { 202 | "php-parallel-lint/php-console-highlighter": "^1.0.0", 203 | "php-parallel-lint/php-parallel-lint": "^1.4.0", 204 | "phpcsstandards/phpcsdevcs": "^1.1.3", 205 | "phpcsstandards/phpcsdevtools": "^1.2.0", 206 | "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4 || ^10.1.0", 207 | "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0" 208 | }, 209 | "suggest": { 210 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 211 | }, 212 | "default-branch": true, 213 | "type": "phpcodesniffer-standard", 214 | "extra": { 215 | "branch-alias": { 216 | "dev-master": "9.x-dev", 217 | "dev-develop": "10.x-dev" 218 | } 219 | }, 220 | "notification-url": "https://packagist.org/downloads/", 221 | "license": [ 222 | "LGPL-3.0-or-later" 223 | ], 224 | "authors": [ 225 | { 226 | "name": "Wim Godden", 227 | "homepage": "https://github.com/wimg", 228 | "role": "lead" 229 | }, 230 | { 231 | "name": "Juliette Reinders Folmer", 232 | "homepage": "https://github.com/jrfnl", 233 | "role": "lead" 234 | }, 235 | { 236 | "name": "Contributors", 237 | "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" 238 | } 239 | ], 240 | "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", 241 | "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", 242 | "keywords": [ 243 | "compatibility", 244 | "phpcs", 245 | "standards", 246 | "static analysis" 247 | ], 248 | "support": { 249 | "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", 250 | "security": "https://github.com/PHPCompatibility/PHPCompatibility/security/policy", 251 | "source": "https://github.com/PHPCompatibility/PHPCompatibility" 252 | }, 253 | "funding": [ 254 | { 255 | "url": "https://github.com/PHPCompatibility", 256 | "type": "github" 257 | }, 258 | { 259 | "url": "https://github.com/jrfnl", 260 | "type": "github" 261 | }, 262 | { 263 | "url": "https://opencollective.com/php_codesniffer", 264 | "type": "open_collective" 265 | }, 266 | { 267 | "url": "https://thanks.dev/u/gh/phpcompatibility", 268 | "type": "thanks_dev" 269 | } 270 | ], 271 | "time": "2025-01-20T20:06:48+00:00" 272 | }, 273 | { 274 | "name": "phpcompatibility/phpcompatibility-paragonie", 275 | "version": "1.3.3", 276 | "source": { 277 | "type": "git", 278 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", 279 | "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac" 280 | }, 281 | "dist": { 282 | "type": "zip", 283 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/293975b465e0e709b571cbf0c957c6c0a7b9a2ac", 284 | "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac", 285 | "shasum": "" 286 | }, 287 | "require": { 288 | "phpcompatibility/php-compatibility": "^9.0" 289 | }, 290 | "require-dev": { 291 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0", 292 | "paragonie/random_compat": "dev-master", 293 | "paragonie/sodium_compat": "dev-master" 294 | }, 295 | "suggest": { 296 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 297 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 298 | }, 299 | "type": "phpcodesniffer-standard", 300 | "notification-url": "https://packagist.org/downloads/", 301 | "license": [ 302 | "LGPL-3.0-or-later" 303 | ], 304 | "authors": [ 305 | { 306 | "name": "Wim Godden", 307 | "role": "lead" 308 | }, 309 | { 310 | "name": "Juliette Reinders Folmer", 311 | "role": "lead" 312 | } 313 | ], 314 | "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", 315 | "homepage": "http://phpcompatibility.com/", 316 | "keywords": [ 317 | "compatibility", 318 | "paragonie", 319 | "phpcs", 320 | "polyfill", 321 | "standards", 322 | "static analysis" 323 | ], 324 | "support": { 325 | "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", 326 | "security": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/security/policy", 327 | "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" 328 | }, 329 | "funding": [ 330 | { 331 | "url": "https://github.com/PHPCompatibility", 332 | "type": "github" 333 | }, 334 | { 335 | "url": "https://github.com/jrfnl", 336 | "type": "github" 337 | }, 338 | { 339 | "url": "https://opencollective.com/php_codesniffer", 340 | "type": "open_collective" 341 | } 342 | ], 343 | "time": "2024-04-24T21:30:46+00:00" 344 | }, 345 | { 346 | "name": "phpcompatibility/phpcompatibility-wp", 347 | "version": "2.1.7", 348 | "source": { 349 | "type": "git", 350 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", 351 | "reference": "5bfbbfbabb3df2b9a83e601de9153e4a7111962c" 352 | }, 353 | "dist": { 354 | "type": "zip", 355 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/5bfbbfbabb3df2b9a83e601de9153e4a7111962c", 356 | "reference": "5bfbbfbabb3df2b9a83e601de9153e4a7111962c", 357 | "shasum": "" 358 | }, 359 | "require": { 360 | "phpcompatibility/php-compatibility": "^9.0", 361 | "phpcompatibility/phpcompatibility-paragonie": "^1.0", 362 | "squizlabs/php_codesniffer": "^3.3" 363 | }, 364 | "require-dev": { 365 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0" 366 | }, 367 | "suggest": { 368 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 369 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 370 | }, 371 | "type": "phpcodesniffer-standard", 372 | "notification-url": "https://packagist.org/downloads/", 373 | "license": [ 374 | "LGPL-3.0-or-later" 375 | ], 376 | "authors": [ 377 | { 378 | "name": "Wim Godden", 379 | "role": "lead" 380 | }, 381 | { 382 | "name": "Juliette Reinders Folmer", 383 | "role": "lead" 384 | } 385 | ], 386 | "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", 387 | "homepage": "http://phpcompatibility.com/", 388 | "keywords": [ 389 | "compatibility", 390 | "phpcs", 391 | "standards", 392 | "static analysis", 393 | "wordpress" 394 | ], 395 | "support": { 396 | "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", 397 | "security": "https://github.com/PHPCompatibility/PHPCompatibilityWP/security/policy", 398 | "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" 399 | }, 400 | "funding": [ 401 | { 402 | "url": "https://github.com/PHPCompatibility", 403 | "type": "github" 404 | }, 405 | { 406 | "url": "https://github.com/jrfnl", 407 | "type": "github" 408 | }, 409 | { 410 | "url": "https://opencollective.com/php_codesniffer", 411 | "type": "open_collective" 412 | }, 413 | { 414 | "url": "https://thanks.dev/u/gh/phpcompatibility", 415 | "type": "thanks_dev" 416 | } 417 | ], 418 | "time": "2025-05-12T16:38:37+00:00" 419 | }, 420 | { 421 | "name": "phpcsstandards/phpcsextra", 422 | "version": "1.3.0", 423 | "source": { 424 | "type": "git", 425 | "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", 426 | "reference": "46d08eb86eec622b96c466adec3063adfed280dd" 427 | }, 428 | "dist": { 429 | "type": "zip", 430 | "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/46d08eb86eec622b96c466adec3063adfed280dd", 431 | "reference": "46d08eb86eec622b96c466adec3063adfed280dd", 432 | "shasum": "" 433 | }, 434 | "require": { 435 | "php": ">=5.4", 436 | "phpcsstandards/phpcsutils": "^1.0.9", 437 | "squizlabs/php_codesniffer": "^3.12.1" 438 | }, 439 | "require-dev": { 440 | "php-parallel-lint/php-console-highlighter": "^1.0", 441 | "php-parallel-lint/php-parallel-lint": "^1.3.2", 442 | "phpcsstandards/phpcsdevcs": "^1.1.6", 443 | "phpcsstandards/phpcsdevtools": "^1.2.1", 444 | "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" 445 | }, 446 | "type": "phpcodesniffer-standard", 447 | "extra": { 448 | "branch-alias": { 449 | "dev-stable": "1.x-dev", 450 | "dev-develop": "1.x-dev" 451 | } 452 | }, 453 | "notification-url": "https://packagist.org/downloads/", 454 | "license": [ 455 | "LGPL-3.0-or-later" 456 | ], 457 | "authors": [ 458 | { 459 | "name": "Juliette Reinders Folmer", 460 | "homepage": "https://github.com/jrfnl", 461 | "role": "lead" 462 | }, 463 | { 464 | "name": "Contributors", 465 | "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" 466 | } 467 | ], 468 | "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", 469 | "keywords": [ 470 | "PHP_CodeSniffer", 471 | "phpcbf", 472 | "phpcodesniffer-standard", 473 | "phpcs", 474 | "standards", 475 | "static analysis" 476 | ], 477 | "support": { 478 | "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", 479 | "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", 480 | "source": "https://github.com/PHPCSStandards/PHPCSExtra" 481 | }, 482 | "funding": [ 483 | { 484 | "url": "https://github.com/PHPCSStandards", 485 | "type": "github" 486 | }, 487 | { 488 | "url": "https://github.com/jrfnl", 489 | "type": "github" 490 | }, 491 | { 492 | "url": "https://opencollective.com/php_codesniffer", 493 | "type": "open_collective" 494 | }, 495 | { 496 | "url": "https://thanks.dev/u/gh/phpcsstandards", 497 | "type": "thanks_dev" 498 | } 499 | ], 500 | "time": "2025-04-20T23:35:32+00:00" 501 | }, 502 | { 503 | "name": "phpcsstandards/phpcsutils", 504 | "version": "1.0.12", 505 | "source": { 506 | "type": "git", 507 | "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", 508 | "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c" 509 | }, 510 | "dist": { 511 | "type": "zip", 512 | "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/87b233b00daf83fb70f40c9a28692be017ea7c6c", 513 | "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c", 514 | "shasum": "" 515 | }, 516 | "require": { 517 | "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", 518 | "php": ">=5.4", 519 | "squizlabs/php_codesniffer": "^3.10.0 || 4.0.x-dev@dev" 520 | }, 521 | "require-dev": { 522 | "ext-filter": "*", 523 | "php-parallel-lint/php-console-highlighter": "^1.0", 524 | "php-parallel-lint/php-parallel-lint": "^1.3.2", 525 | "phpcsstandards/phpcsdevcs": "^1.1.6", 526 | "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0" 527 | }, 528 | "type": "phpcodesniffer-standard", 529 | "extra": { 530 | "branch-alias": { 531 | "dev-stable": "1.x-dev", 532 | "dev-develop": "1.x-dev" 533 | } 534 | }, 535 | "autoload": { 536 | "classmap": [ 537 | "PHPCSUtils/" 538 | ] 539 | }, 540 | "notification-url": "https://packagist.org/downloads/", 541 | "license": [ 542 | "LGPL-3.0-or-later" 543 | ], 544 | "authors": [ 545 | { 546 | "name": "Juliette Reinders Folmer", 547 | "homepage": "https://github.com/jrfnl", 548 | "role": "lead" 549 | }, 550 | { 551 | "name": "Contributors", 552 | "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" 553 | } 554 | ], 555 | "description": "A suite of utility functions for use with PHP_CodeSniffer", 556 | "homepage": "https://phpcsutils.com/", 557 | "keywords": [ 558 | "PHP_CodeSniffer", 559 | "phpcbf", 560 | "phpcodesniffer-standard", 561 | "phpcs", 562 | "phpcs3", 563 | "standards", 564 | "static analysis", 565 | "tokens", 566 | "utility" 567 | ], 568 | "support": { 569 | "docs": "https://phpcsutils.com/", 570 | "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", 571 | "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", 572 | "source": "https://github.com/PHPCSStandards/PHPCSUtils" 573 | }, 574 | "funding": [ 575 | { 576 | "url": "https://github.com/PHPCSStandards", 577 | "type": "github" 578 | }, 579 | { 580 | "url": "https://github.com/jrfnl", 581 | "type": "github" 582 | }, 583 | { 584 | "url": "https://opencollective.com/php_codesniffer", 585 | "type": "open_collective" 586 | } 587 | ], 588 | "time": "2024-05-20T13:34:27+00:00" 589 | }, 590 | { 591 | "name": "phpstan/extension-installer", 592 | "version": "1.4.3", 593 | "source": { 594 | "type": "git", 595 | "url": "https://github.com/phpstan/extension-installer.git", 596 | "reference": "85e90b3942d06b2326fba0403ec24fe912372936" 597 | }, 598 | "dist": { 599 | "type": "zip", 600 | "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", 601 | "reference": "85e90b3942d06b2326fba0403ec24fe912372936", 602 | "shasum": "" 603 | }, 604 | "require": { 605 | "composer-plugin-api": "^2.0", 606 | "php": "^7.2 || ^8.0", 607 | "phpstan/phpstan": "^1.9.0 || ^2.0" 608 | }, 609 | "require-dev": { 610 | "composer/composer": "^2.0", 611 | "php-parallel-lint/php-parallel-lint": "^1.2.0", 612 | "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" 613 | }, 614 | "type": "composer-plugin", 615 | "extra": { 616 | "class": "PHPStan\\ExtensionInstaller\\Plugin" 617 | }, 618 | "autoload": { 619 | "psr-4": { 620 | "PHPStan\\ExtensionInstaller\\": "src/" 621 | } 622 | }, 623 | "notification-url": "https://packagist.org/downloads/", 624 | "license": [ 625 | "MIT" 626 | ], 627 | "description": "Composer plugin for automatic installation of PHPStan extensions", 628 | "keywords": [ 629 | "dev", 630 | "static analysis" 631 | ], 632 | "support": { 633 | "issues": "https://github.com/phpstan/extension-installer/issues", 634 | "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" 635 | }, 636 | "time": "2024-09-04T20:21:43+00:00" 637 | }, 638 | { 639 | "name": "phpstan/phpstan", 640 | "version": "1.12.27", 641 | "source": { 642 | "type": "git", 643 | "url": "https://github.com/phpstan/phpstan.git", 644 | "reference": "3a6e423c076ab39dfedc307e2ac627ef579db162" 645 | }, 646 | "dist": { 647 | "type": "zip", 648 | "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3a6e423c076ab39dfedc307e2ac627ef579db162", 649 | "reference": "3a6e423c076ab39dfedc307e2ac627ef579db162", 650 | "shasum": "" 651 | }, 652 | "require": { 653 | "php": "^7.2|^8.0" 654 | }, 655 | "conflict": { 656 | "phpstan/phpstan-shim": "*" 657 | }, 658 | "bin": [ 659 | "phpstan", 660 | "phpstan.phar" 661 | ], 662 | "type": "library", 663 | "autoload": { 664 | "files": [ 665 | "bootstrap.php" 666 | ] 667 | }, 668 | "notification-url": "https://packagist.org/downloads/", 669 | "license": [ 670 | "MIT" 671 | ], 672 | "description": "PHPStan - PHP Static Analysis Tool", 673 | "keywords": [ 674 | "dev", 675 | "static analysis" 676 | ], 677 | "support": { 678 | "docs": "https://phpstan.org/user-guide/getting-started", 679 | "forum": "https://github.com/phpstan/phpstan/discussions", 680 | "issues": "https://github.com/phpstan/phpstan/issues", 681 | "security": "https://github.com/phpstan/phpstan/security/policy", 682 | "source": "https://github.com/phpstan/phpstan-src" 683 | }, 684 | "funding": [ 685 | { 686 | "url": "https://github.com/ondrejmirtes", 687 | "type": "github" 688 | }, 689 | { 690 | "url": "https://github.com/phpstan", 691 | "type": "github" 692 | } 693 | ], 694 | "time": "2025-05-21T20:51:45+00:00" 695 | }, 696 | { 697 | "name": "phpstan/phpstan-phpunit", 698 | "version": "1.4.2", 699 | "source": { 700 | "type": "git", 701 | "url": "https://github.com/phpstan/phpstan-phpunit.git", 702 | "reference": "72a6721c9b64b3e4c9db55abbc38f790b318267e" 703 | }, 704 | "dist": { 705 | "type": "zip", 706 | "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/72a6721c9b64b3e4c9db55abbc38f790b318267e", 707 | "reference": "72a6721c9b64b3e4c9db55abbc38f790b318267e", 708 | "shasum": "" 709 | }, 710 | "require": { 711 | "php": "^7.2 || ^8.0", 712 | "phpstan/phpstan": "^1.12" 713 | }, 714 | "conflict": { 715 | "phpunit/phpunit": "<7.0" 716 | }, 717 | "require-dev": { 718 | "nikic/php-parser": "^4.13.0", 719 | "php-parallel-lint/php-parallel-lint": "^1.2", 720 | "phpstan/phpstan-strict-rules": "^1.5.1", 721 | "phpunit/phpunit": "^9.5" 722 | }, 723 | "type": "phpstan-extension", 724 | "extra": { 725 | "phpstan": { 726 | "includes": [ 727 | "extension.neon", 728 | "rules.neon" 729 | ] 730 | } 731 | }, 732 | "autoload": { 733 | "psr-4": { 734 | "PHPStan\\": "src/" 735 | } 736 | }, 737 | "notification-url": "https://packagist.org/downloads/", 738 | "license": [ 739 | "MIT" 740 | ], 741 | "description": "PHPUnit extensions and rules for PHPStan", 742 | "support": { 743 | "issues": "https://github.com/phpstan/phpstan-phpunit/issues", 744 | "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.4.2" 745 | }, 746 | "time": "2024-12-17T17:20:49+00:00" 747 | }, 748 | { 749 | "name": "sirbrillig/phpcs-variable-analysis", 750 | "version": "v2.12.0", 751 | "source": { 752 | "type": "git", 753 | "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", 754 | "reference": "4debf5383d9ade705e0a25121f16c3fecaf433a7" 755 | }, 756 | "dist": { 757 | "type": "zip", 758 | "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/4debf5383d9ade705e0a25121f16c3fecaf433a7", 759 | "reference": "4debf5383d9ade705e0a25121f16c3fecaf433a7", 760 | "shasum": "" 761 | }, 762 | "require": { 763 | "php": ">=5.4.0", 764 | "squizlabs/php_codesniffer": "^3.5.6" 765 | }, 766 | "require-dev": { 767 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0", 768 | "phpcsstandards/phpcsdevcs": "^1.1", 769 | "phpstan/phpstan": "^1.7", 770 | "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0 || ^10.5.32 || ^11.3.3", 771 | "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0" 772 | }, 773 | "type": "phpcodesniffer-standard", 774 | "autoload": { 775 | "psr-4": { 776 | "VariableAnalysis\\": "VariableAnalysis/" 777 | } 778 | }, 779 | "notification-url": "https://packagist.org/downloads/", 780 | "license": [ 781 | "BSD-2-Clause" 782 | ], 783 | "authors": [ 784 | { 785 | "name": "Sam Graham", 786 | "email": "php-codesniffer-variableanalysis@illusori.co.uk" 787 | }, 788 | { 789 | "name": "Payton Swick", 790 | "email": "payton@foolord.com" 791 | } 792 | ], 793 | "description": "A PHPCS sniff to detect problems with variables.", 794 | "keywords": [ 795 | "phpcs", 796 | "static analysis" 797 | ], 798 | "support": { 799 | "issues": "https://github.com/sirbrillig/phpcs-variable-analysis/issues", 800 | "source": "https://github.com/sirbrillig/phpcs-variable-analysis", 801 | "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" 802 | }, 803 | "time": "2025-03-17T16:17:38+00:00" 804 | }, 805 | { 806 | "name": "squizlabs/php_codesniffer", 807 | "version": "3.13.0", 808 | "source": { 809 | "type": "git", 810 | "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", 811 | "reference": "65ff2489553b83b4597e89c3b8b721487011d186" 812 | }, 813 | "dist": { 814 | "type": "zip", 815 | "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/65ff2489553b83b4597e89c3b8b721487011d186", 816 | "reference": "65ff2489553b83b4597e89c3b8b721487011d186", 817 | "shasum": "" 818 | }, 819 | "require": { 820 | "ext-simplexml": "*", 821 | "ext-tokenizer": "*", 822 | "ext-xmlwriter": "*", 823 | "php": ">=5.4.0" 824 | }, 825 | "require-dev": { 826 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" 827 | }, 828 | "bin": [ 829 | "bin/phpcbf", 830 | "bin/phpcs" 831 | ], 832 | "type": "library", 833 | "extra": { 834 | "branch-alias": { 835 | "dev-master": "3.x-dev" 836 | } 837 | }, 838 | "notification-url": "https://packagist.org/downloads/", 839 | "license": [ 840 | "BSD-3-Clause" 841 | ], 842 | "authors": [ 843 | { 844 | "name": "Greg Sherwood", 845 | "role": "Former lead" 846 | }, 847 | { 848 | "name": "Juliette Reinders Folmer", 849 | "role": "Current lead" 850 | }, 851 | { 852 | "name": "Contributors", 853 | "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" 854 | } 855 | ], 856 | "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", 857 | "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", 858 | "keywords": [ 859 | "phpcs", 860 | "standards", 861 | "static analysis" 862 | ], 863 | "support": { 864 | "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", 865 | "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", 866 | "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", 867 | "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" 868 | }, 869 | "funding": [ 870 | { 871 | "url": "https://github.com/PHPCSStandards", 872 | "type": "github" 873 | }, 874 | { 875 | "url": "https://github.com/jrfnl", 876 | "type": "github" 877 | }, 878 | { 879 | "url": "https://opencollective.com/php_codesniffer", 880 | "type": "open_collective" 881 | }, 882 | { 883 | "url": "https://thanks.dev/u/gh/phpcsstandards", 884 | "type": "thanks_dev" 885 | } 886 | ], 887 | "time": "2025-05-11T03:36:00+00:00" 888 | }, 889 | { 890 | "name": "symfony/polyfill-php73", 891 | "version": "v1.32.0", 892 | "source": { 893 | "type": "git", 894 | "url": "https://github.com/symfony/polyfill-php73.git", 895 | "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" 896 | }, 897 | "dist": { 898 | "type": "zip", 899 | "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", 900 | "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", 901 | "shasum": "" 902 | }, 903 | "require": { 904 | "php": ">=7.2" 905 | }, 906 | "type": "library", 907 | "extra": { 908 | "thanks": { 909 | "url": "https://github.com/symfony/polyfill", 910 | "name": "symfony/polyfill" 911 | } 912 | }, 913 | "autoload": { 914 | "files": [ 915 | "bootstrap.php" 916 | ], 917 | "psr-4": { 918 | "Symfony\\Polyfill\\Php73\\": "" 919 | }, 920 | "classmap": [ 921 | "Resources/stubs" 922 | ] 923 | }, 924 | "notification-url": "https://packagist.org/downloads/", 925 | "license": [ 926 | "MIT" 927 | ], 928 | "authors": [ 929 | { 930 | "name": "Nicolas Grekas", 931 | "email": "p@tchwork.com" 932 | }, 933 | { 934 | "name": "Symfony Community", 935 | "homepage": "https://symfony.com/contributors" 936 | } 937 | ], 938 | "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", 939 | "homepage": "https://symfony.com", 940 | "keywords": [ 941 | "compatibility", 942 | "polyfill", 943 | "portable", 944 | "shim" 945 | ], 946 | "support": { 947 | "source": "https://github.com/symfony/polyfill-php73/tree/v1.32.0" 948 | }, 949 | "funding": [ 950 | { 951 | "url": "https://symfony.com/sponsor", 952 | "type": "custom" 953 | }, 954 | { 955 | "url": "https://github.com/fabpot", 956 | "type": "github" 957 | }, 958 | { 959 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 960 | "type": "tidelift" 961 | } 962 | ], 963 | "time": "2024-09-09T11:45:10+00:00" 964 | }, 965 | { 966 | "name": "szepeviktor/phpstan-wordpress", 967 | "version": "v1.3.5", 968 | "source": { 969 | "type": "git", 970 | "url": "https://github.com/szepeviktor/phpstan-wordpress.git", 971 | "reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7" 972 | }, 973 | "dist": { 974 | "type": "zip", 975 | "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/7f8cfe992faa96b6a33bbd75c7bace98864161e7", 976 | "reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7", 977 | "shasum": "" 978 | }, 979 | "require": { 980 | "php": "^7.2 || ^8.0", 981 | "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", 982 | "phpstan/phpstan": "^1.10.31", 983 | "symfony/polyfill-php73": "^1.12.0" 984 | }, 985 | "require-dev": { 986 | "composer/composer": "^2.1.14", 987 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0", 988 | "php-parallel-lint/php-parallel-lint": "^1.1", 989 | "phpstan/phpstan-strict-rules": "^1.2", 990 | "phpunit/phpunit": "^8.0 || ^9.0", 991 | "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0", 992 | "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" 993 | }, 994 | "suggest": { 995 | "swissspidy/phpstan-no-private": "Detect usage of internal core functions, classes and methods" 996 | }, 997 | "type": "phpstan-extension", 998 | "extra": { 999 | "phpstan": { 1000 | "includes": [ 1001 | "extension.neon" 1002 | ] 1003 | } 1004 | }, 1005 | "autoload": { 1006 | "psr-4": { 1007 | "SzepeViktor\\PHPStan\\WordPress\\": "src/" 1008 | } 1009 | }, 1010 | "notification-url": "https://packagist.org/downloads/", 1011 | "license": [ 1012 | "MIT" 1013 | ], 1014 | "description": "WordPress extensions for PHPStan", 1015 | "keywords": [ 1016 | "PHPStan", 1017 | "code analyse", 1018 | "code analysis", 1019 | "static analysis", 1020 | "wordpress" 1021 | ], 1022 | "support": { 1023 | "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", 1024 | "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.5" 1025 | }, 1026 | "time": "2024-06-28T22:27:19+00:00" 1027 | }, 1028 | { 1029 | "name": "wp-coding-standards/wpcs", 1030 | "version": "3.1.0", 1031 | "source": { 1032 | "type": "git", 1033 | "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", 1034 | "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7" 1035 | }, 1036 | "dist": { 1037 | "type": "zip", 1038 | "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/9333efcbff231f10dfd9c56bb7b65818b4733ca7", 1039 | "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7", 1040 | "shasum": "" 1041 | }, 1042 | "require": { 1043 | "ext-filter": "*", 1044 | "ext-libxml": "*", 1045 | "ext-tokenizer": "*", 1046 | "ext-xmlreader": "*", 1047 | "php": ">=5.4", 1048 | "phpcsstandards/phpcsextra": "^1.2.1", 1049 | "phpcsstandards/phpcsutils": "^1.0.10", 1050 | "squizlabs/php_codesniffer": "^3.9.0" 1051 | }, 1052 | "require-dev": { 1053 | "php-parallel-lint/php-console-highlighter": "^1.0.0", 1054 | "php-parallel-lint/php-parallel-lint": "^1.3.2", 1055 | "phpcompatibility/php-compatibility": "^9.0", 1056 | "phpcsstandards/phpcsdevtools": "^1.2.0", 1057 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" 1058 | }, 1059 | "suggest": { 1060 | "ext-iconv": "For improved results", 1061 | "ext-mbstring": "For improved results" 1062 | }, 1063 | "type": "phpcodesniffer-standard", 1064 | "notification-url": "https://packagist.org/downloads/", 1065 | "license": [ 1066 | "MIT" 1067 | ], 1068 | "authors": [ 1069 | { 1070 | "name": "Contributors", 1071 | "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" 1072 | } 1073 | ], 1074 | "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", 1075 | "keywords": [ 1076 | "phpcs", 1077 | "standards", 1078 | "static analysis", 1079 | "wordpress" 1080 | ], 1081 | "support": { 1082 | "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", 1083 | "source": "https://github.com/WordPress/WordPress-Coding-Standards", 1084 | "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" 1085 | }, 1086 | "funding": [ 1087 | { 1088 | "url": "https://opencollective.com/php_codesniffer", 1089 | "type": "custom" 1090 | } 1091 | ], 1092 | "time": "2024-03-25T16:39:00+00:00" 1093 | } 1094 | ], 1095 | "aliases": [ 1096 | { 1097 | "package": "phpcompatibility/php-compatibility", 1098 | "version": "dev-develop", 1099 | "alias": "9.99.9", 1100 | "alias_normalized": "9.99.9.0" 1101 | } 1102 | ], 1103 | "minimum-stability": "stable", 1104 | "stability-flags": { 1105 | "phpcompatibility/php-compatibility": 20 1106 | }, 1107 | "prefer-stable": false, 1108 | "prefer-lowest": false, 1109 | "platform": {}, 1110 | "platform-dev": {}, 1111 | "platform-overrides": { 1112 | "php": "8.0" 1113 | }, 1114 | "plugin-api-version": "2.6.0" 1115 | } 1116 | -------------------------------------------------------------------------------- /editor-style.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Theme Name: Write More Things 3 | Theme URI: http://github.com/jeremyfelt/writemore 4 | Author: Jeremy Felt 5 | Author URI: https://jeremyfelt.com 6 | Description: A theme to encourage more writing. 7 | Version: 3.0.1 8 | License: GNU General Public License v2 or later 9 | License URI: LICENSE 10 | Text Domain: writemore 11 | 12 | This theme, like WordPress, is licensed under the GPL. 13 | Use it to make something cool, have fun, and share what 14 | you've learned with others. 15 | */ 16 | 17 | @font-face { 18 | font-family: inter; 19 | font-display: fallback; 20 | font-weight: 300 400 700 900; 21 | src: url(./fonts/Inter-VariableFont_slnt,wght.woff2) format("woff2"); 22 | } 23 | 24 | @font-face { 25 | font-family: monaspace; 26 | font-display: fallback; 27 | font-weight: 300; 28 | src: url(./fonts/MonaspaceArgon-Regular.woff) format("woff"); 29 | } 30 | 31 | :root { 32 | --sans-serif: inter, sans-serif; 33 | --monospace: monaspace, monospace; 34 | 35 | --font-size-small: 0.8rem; 36 | --font-size-base: 1rem; 37 | --font-size-default: 1.125rem; 38 | --font-size-content-heading: 1.5rem; 39 | 40 | --content-width: 640px; 41 | --content-width-wide: 1024px; 42 | 43 | --spacing-base: 1rem; 44 | --spacing-default: 3rem; 45 | --spacing-large: 6rem; 46 | 47 | --color-background: #fbfbfb; 48 | --color-foreground: #222; 49 | --color-faded: #666; 50 | --color-content-background: #f9f9f9; 51 | --color-code-background: #e3e3e3; 52 | --color-blockquote-background: #f2f7fb; 53 | --color-border-default: #ddd; 54 | --color-blockquote-border: #a6c2e7; 55 | --color-link: #2271b1; 56 | --color-context-reply: rgb(127, 255, 212); 57 | } 58 | 59 | @media (prefers-color-scheme: dark) { 60 | 61 | :root { 62 | --color-background: #222; 63 | --color-foreground: #f6f6f6; 64 | --color-faded: #a8a8a8; 65 | --color-content-background: #343434; 66 | --color-code-background: #434343; 67 | --color-blockquote-background: var(--color-background); 68 | --color-border-default: #888; 69 | --color-link: #00c2e1; 70 | } 71 | } 72 | 73 | @media screen and (max-width: 700px) { 74 | 75 | body { 76 | --content-width: 100%; 77 | --content-width-wide: 100%; 78 | } 79 | } 80 | 81 | html, 82 | body { 83 | height: 100%; 84 | } 85 | 86 | body { 87 | background: var(--color-background); 88 | color: var(--color-foreground); 89 | font-family: var(--sans-serif); 90 | line-height: 1.55; 91 | font-size: var(--font-size-default); 92 | margin: 0; 93 | } 94 | 95 | header { 96 | width: calc(100% - var(--spacing-default)); 97 | max-width: var(--content-width-wide); 98 | } 99 | 100 | section { 101 | max-width: var(--content-width); 102 | } 103 | 104 | header, 105 | section { 106 | margin: 0 auto; 107 | } 108 | 109 | main { 110 | max-width: calc(100% - var(--spacing-default)); 111 | min-height: calc(100vh - var(--spacing-large) - 2rem - 325px); 112 | margin-left: auto; 113 | margin-right: auto; 114 | } 115 | 116 | article { 117 | margin-top: var(--spacing-large); 118 | } 119 | 120 | section article { 121 | margin-top: var(--spacing-base); 122 | } 123 | 124 | main > header { 125 | height: 175px; 126 | text-align: right; 127 | } 128 | 129 | article header { 130 | width: 100%; 131 | position: relative; 132 | } 133 | 134 | a { 135 | color: var(--color-link); 136 | } 137 | 138 | main ~ footer a { 139 | color: var(--color-content-background); 140 | } 141 | 142 | article header a { 143 | color: var(--color-foreground); 144 | } 145 | 146 | a:hover { 147 | color: var(--color-foreground); 148 | } 149 | 150 | article header a:hover { 151 | color: var(--color-link); 152 | } 153 | 154 | article header h1 { 155 | margin-bottom: 0; 156 | border-top: 1px solid var(--color-border-default); 157 | padding-top: var(--spacing-base); 158 | } 159 | 160 | article footer { 161 | max-width: var(--content-width); 162 | margin: var(--spacing-default) auto 0; 163 | width: 100%; 164 | } 165 | 166 | footer > * { 167 | max-width: 100%; 168 | } 169 | 170 | nav ul { 171 | display: flex; 172 | flex-wrap: wrap; 173 | flex-direction: row; 174 | list-style: none; 175 | margin: var(--spacing-base) 0 0; 176 | padding: 0; 177 | } 178 | 179 | nav ul li { 180 | padding: 0; 181 | margin: 0 var(--spacing-base) 0 0; 182 | font-weight: 700; 183 | } 184 | 185 | h2 { 186 | font-size: var(--font-size-content-heading); 187 | margin-top: var(--spacing-default); 188 | margin-bottom: var(--spacing-base); 189 | font-weight: 900; 190 | } 191 | 192 | h3 { 193 | margin-top: var(--spacing-base); 194 | margin-bottom: var(--spacing-base); 195 | } 196 | 197 | pre, 198 | code { 199 | font-family: var(--monospace); 200 | font-size: 15px; 201 | background: var(--color-code-background); 202 | line-height: 1.4; 203 | padding: 0.25rem 0.25rem 0.15rem; 204 | } 205 | 206 | pre { 207 | background: var(--color-background); 208 | border-left: 6px solid var(--color-code-background); 209 | white-space: break-spaces; 210 | padding: var(--spacing-base) calc(var(--spacing-default) - 6px); 211 | margin: var(--spacing-default) 0; 212 | } 213 | 214 | cite { 215 | font-style: initial; 216 | font-weight: 600; 217 | } 218 | 219 | blockquote { 220 | font-size: 1rem; 221 | font-style: normal; 222 | background: var(--color-blockquote-background); 223 | border-left: 1.1rem solid var(--color-blockquote-border); 224 | border-radius: 5px; 225 | padding: var(--spacing-base) calc(var(--spacing-default) - 1.1rem) var(--spacing-base); 226 | margin: var(--spacing-default) 0; 227 | 228 | p { 229 | margin-bottom: 0; 230 | } 231 | 232 | p:first-of-type { 233 | margin-top: 0; 234 | } 235 | 236 | cite { 237 | display: inline-block; 238 | margin-top: var(--spacing-base); 239 | } 240 | } 241 | 242 | @media (prefers-color-scheme: dark) { 243 | 244 | blockquote { 245 | border: 2px solid var(--color-blockquote-border); 246 | border-left-width: 1.1rem; 247 | } 248 | } 249 | 250 | @media screen and (max-width: 700px) { 251 | 252 | blockquote { 253 | border-left-width: calc(var(--spacing-base) / 2); 254 | padding-left: var(--spacing-base); 255 | padding-right: var(--spacing-base); 256 | } 257 | } 258 | 259 | img { 260 | width: 100%; 261 | height: auto; 262 | } 263 | 264 | input[type="search"] { 265 | font-size: 1.5rem; 266 | padding: 0.5rem; 267 | font-weight: 300; 268 | line-height: 1; 269 | } 270 | 271 | button { 272 | padding: 0.875rem; 273 | font-size: var(--font-size-base); 274 | margin-left: 0.35rem; 275 | vertical-align: top; 276 | background: var(--color-foreground); 277 | color: var(--color-background); 278 | border: 1px solid var(--color-foreground); 279 | width: var(--spacing-large); 280 | } 281 | 282 | button:hover { 283 | background: var(--color-background); 284 | color: var(--color-foreground); 285 | } 286 | 287 | main ~ footer { 288 | height: 175px; 289 | width: 100%; 290 | display: flex; 291 | flex-direction: column; 292 | justify-content: end; 293 | margin: var(--spacing-default) auto 0; 294 | padding-top: var(--spacing-base); 295 | padding-bottom: var(--spacing-default); 296 | font-size: var(--font-size-base); 297 | background: var(--color-link); 298 | color: var(--color-content-background); 299 | } 300 | 301 | main ~ footer div { 302 | margin-bottom: var(--spacing-base); 303 | } 304 | 305 | .day, 306 | time { 307 | font-size: 0.9rem; 308 | } 309 | 310 | iframe { 311 | max-width: 100%; 312 | } 313 | 314 | .screen-reader-text { 315 | border: 0; 316 | clip: rect(1px, 1px, 1px, 1px); 317 | clip-path: inset(50%); 318 | height: 1px; 319 | margin: -1px; 320 | overflow: hidden; 321 | padding: 0; 322 | position: absolute !important; 323 | width: 1px; 324 | word-wrap: normal !important; 325 | } 326 | 327 | .skip-link.screen-reader-text:focus { 328 | background-color: var(--color-border-default); 329 | clip: auto !important; 330 | clip-path: none; 331 | color: var(--color-foreground); 332 | display: block; 333 | font-size: 1em; 334 | height: auto; 335 | left: 5px; 336 | line-height: normal; 337 | padding: 15px 23px 14px; 338 | -webkit-text-decoration: none; 339 | -webkit-text-decoration: none; 340 | text-decoration: none; 341 | top: 5px; 342 | width: auto; 343 | z-index: 100000; 344 | } 345 | 346 | .has-text-align-center { 347 | text-align: center; 348 | } 349 | 350 | .site-branding h1, 351 | .site-branding p { 352 | font-size: var(--font-size-content-heading); 353 | font-weight: 700; 354 | margin-top: var(--spacing-default); 355 | margin-bottom: var(--spacing-base); 356 | } 357 | 358 | .entry-content > * { 359 | max-width: var(--content-width); 360 | margin-left: auto; 361 | margin-right: auto; 362 | width: auto; 363 | } 364 | 365 | .entry-content > figure { 366 | margin-top: var(--spacing-default); 367 | margin-bottom: var(--spacing-default); 368 | } 369 | 370 | .entry-content .size-large { 371 | max-width: var(--content-width-wide); 372 | height: auto; 373 | } 374 | 375 | .wp-element-caption { 376 | font-style: italic; 377 | font-size: 0.9rem; 378 | } 379 | 380 | .wp-block-verse { 381 | font-style: italic; 382 | font-family: var(--sans-serif); 383 | } 384 | 385 | .published-wrapper { 386 | display: flex; 387 | flex-direction: column; 388 | width: 100%; 389 | max-width: var(--content-width-wide); 390 | margin: 0 auto; 391 | color: var(--color-foreground); 392 | } 393 | 394 | .author-bio { 395 | display: flex; 396 | width: var(--content-width); 397 | max-width: 100%; 398 | margin: var(--spacing-base) auto 0 auto; 399 | padding-top: var(--spacing-default); 400 | border-top: 1px solid var(--color-border-default); 401 | justify-content: space-evenly; 402 | } 403 | 404 | .author-bio img { 405 | width: 150px; 406 | height: 100%; 407 | } 408 | 409 | .author-bio-content { 410 | padding: 0 var(--spacing-base); 411 | flex-basis: fit-content; 412 | } 413 | 414 | .author-bio-content p { 415 | margin-top: 0; 416 | } 417 | 418 | .reaction { 419 | display: flex; 420 | } 421 | 422 | .reaction img { 423 | width: 64px; 424 | height: 64px; 425 | } 426 | 427 | .reaction span { 428 | padding-left: var(--spacing-base); 429 | width: 100%; 430 | } 431 | 432 | .comment { 433 | display: flex; 434 | flex-wrap: wrap; 435 | align-items: center; 436 | border: 1px solid var(--color-border-default); 437 | padding: var(--spacing-base); 438 | margin-top: var(--spacing-base); 439 | } 440 | 441 | .comment img { 442 | width: 64px; 443 | height: 64px; 444 | margin-right: var(--spacing-base); 445 | } 446 | 447 | .comment > span { 448 | display: flex; 449 | } 450 | 451 | .comment-content { 452 | width: 100%; 453 | } 454 | 455 | .reaction time, 456 | .comment time { 457 | font-size: var(--spacing-base); 458 | } 459 | 460 | .comment-respond { 461 | margin-top: var(--spacing-default); 462 | border-top: 1px solid var(--color-border-default); 463 | width: 100%; 464 | } 465 | 466 | .comment-form label { 467 | display: block; 468 | font-weight: 600; 469 | } 470 | 471 | .comment-form input, 472 | .comment-form textarea { 473 | font-size: var(--font-size-base); 474 | line-height: 1.5; 475 | padding: var(--spacing-base); 476 | font-family: var(--sans-serif); 477 | width: calc(100% - (var(--spacing-base) * 2)); 478 | } 479 | 480 | .comment-form input { 481 | padding: 0.5rem var(--spacing-base); 482 | } 483 | 484 | .comment-form .submit { 485 | margin: var(--spacing-base) 0; 486 | width: initial; 487 | background: var(--color-foreground); 488 | color: var(--color-background); 489 | border: 1px solid var(--color-foreground); 490 | padding-left: var(--spacing-default); 491 | padding-right: var(--spacing-default); 492 | cursor: pointer; 493 | } 494 | 495 | .comment-form .submit:hover { 496 | background: var(--color-background); 497 | color: var(--color-foreground); 498 | border: 1px solid var(--color-foreground); 499 | } 500 | 501 | .edit-link { 502 | margin-right: var(--spacing-base); 503 | } 504 | 505 | .multiple .published-wrapper { 506 | margin-bottom: 0; 507 | } 508 | 509 | .type-page > * { 510 | max-width: var(--content-width); 511 | margin-left: auto; 512 | margin-right: auto; 513 | } 514 | 515 | .type-page > section { 516 | max-width: var(--content-width-wide); 517 | } 518 | 519 | .multiple .type-like, 520 | .multiple .type-shortnote, 521 | .multiple article.type-post { 522 | display: grid; 523 | grid-template-columns: [date] calc((var(--content-width-wide) - var(--content-width))/2) [content] var(--content-width); 524 | grid-template-rows: [first] min-content [second] auto; 525 | width: var(--content-width-wide); 526 | margin-left: auto; 527 | margin-right: auto; 528 | } 529 | 530 | .multiple .type-like, 531 | .multiple .type-shortnote { 532 | grid-template-rows: [first] min-content; 533 | } 534 | 535 | .multiple .type-like { 536 | margin-top: var(--spacing-default); 537 | } 538 | 539 | .multiple .type-shortnote > header, 540 | .multiple .type-post > header { 541 | grid-column: content; 542 | grid-row: first; 543 | } 544 | 545 | .multiple .type-shortnote > header h1, 546 | .multiple .type-post > header h1 { 547 | margin-top: 0; 548 | border-top: 0; 549 | font-size: 1.4rem; 550 | padding-top: 0; 551 | align-self: start; 552 | } 553 | 554 | .multiple .type-like > p, 555 | .multiple .type-shortnote > p, 556 | .multiple .type-post > p { 557 | grid-column: date; 558 | grid-row: first; 559 | margin: 0; 560 | align-self: start; 561 | line-height: 2.2; 562 | } 563 | 564 | .multiple .type-like > p, 565 | .multiple .type-shortnote > p { 566 | line-height: 1.1; 567 | } 568 | 569 | .multiple .type-like > .entry-content, 570 | .multiple .type-shortnote > .entry-content, 571 | .multiple .type-post > .entry-content { 572 | grid-column: content; 573 | grid-row: second; 574 | justify-self: start; 575 | } 576 | 577 | .multiple .type-like > .entry-content, 578 | .multiple .type-shortnote > .entry-content { 579 | grid-row: first; 580 | } 581 | 582 | @media screen and (max-width: 1120px) { 583 | 584 | .multiple .type-like, 585 | .multiple .type-shortnote, 586 | .multiple article.type-post { 587 | display: flex; 588 | flex-direction: column; 589 | width: 100%; 590 | } 591 | 592 | .multiple .type-shortnote { 593 | margin-top: var(--spacing-large); 594 | } 595 | 596 | .multiple .type-like > .entry-content, 597 | .multiple .type-shortnote > .entry-content, 598 | .multiple article.post > .entry-content { 599 | margin-top: var(--spacing-base); 600 | } 601 | 602 | .multiple article.type-post > p { 603 | order: -1; 604 | } 605 | 606 | form input, 607 | form button { 608 | width: 100%; 609 | } 610 | 611 | form button { 612 | margin-top: var(--spacing-base); 613 | margin-left: 0; 614 | } 615 | } 616 | 617 | .site-footer section { 618 | max-width: calc(100% - var(--spacing-default)); 619 | margin-left: auto; 620 | margin-right: auto; 621 | text-align: center; 622 | } 623 | 624 | .site-footer section > * { 625 | max-width: var(--content-width); 626 | } 627 | 628 | .multiple .type-shortnote > .entry-content > * { 629 | margin-left: 0; 630 | margin-right: 0; 631 | } 632 | 633 | .multiple .type-like .entry-content > p { 634 | margin-top: 0; 635 | margin-bottom: 0; 636 | padding: 0; 637 | } 638 | 639 | .multiple .type-shortnote .entry-content > p:first-of-type { 640 | margin-top: 0; 641 | } 642 | 643 | .multiple .type-shortnote footer { 644 | width: var(--content-width-wide); 645 | border-top: 1px solid var(--color-border-default); 646 | margin-bottom: 0; 647 | } 648 | 649 | .shortnotes-reply-to { 650 | max-width: var(--content-width); 651 | margin: var(--spacing-base) auto var(--spacing-default); 652 | font-style: italic; 653 | } 654 | 655 | .multiple .type-shortnote .shortnotes-reply-to { 656 | padding-top: 0; 657 | margin-bottom: var(--spacing-default); 658 | } 659 | 660 | .type-like .more-likes ul, 661 | .type-shortnote .more-notes ul { 662 | padding-left: 0; 663 | margin: 0; 664 | } 665 | 666 | .type-post .other-weeks li, 667 | .type-like .more-likes li, 668 | .type-shortnote .more-notes li { 669 | list-style: none; 670 | margin-bottom: 0.5rem; 671 | font-size: var(--font-size-base); 672 | } 673 | 674 | .type-like > p time, 675 | .type-shortnote > p time, 676 | .multiple .type-post > p time { 677 | font-size: var(--font-size-small); 678 | line-height: 1.55; 679 | } 680 | 681 | .type-like .like-of-domain { 682 | font-size: var(--font-size-small); 683 | padding-left: 0.5rem; 684 | color: var(--color-faded); 685 | } 686 | 687 | .type-like .more-likes li time, 688 | .type-shortnote .more-notes li time { 689 | font-size: var(--font-size-base); 690 | } 691 | 692 | .more-likes, 693 | .more-notes { 694 | margin-top: var(--spacing-base); 695 | } 696 | 697 | .other-weeks { 698 | margin-top: var(--spacing-large); 699 | border-top: 1px solid var(--color-border-default); 700 | 701 | ~ .author-bio { 702 | border-top: 0; 703 | } 704 | } 705 | 706 | .more-likes h2, 707 | .more-notes h2 { 708 | margin-top: 0; 709 | border-top: 1px solid var(--color-border-default); 710 | padding-top: var(--spacing-base); 711 | } 712 | 713 | .wp-block-latest-posts .type-post, 714 | .weekly-preview { 715 | margin-bottom: var(--spacing-base); 716 | } 717 | 718 | .wp-block-latest-posts .type-shortnote:first-of-type { 719 | margin-top: var(--spacing-base); 720 | } 721 | 722 | ul.wp-block-latest-posts { 723 | padding-left: 0; 724 | list-style: none; 725 | } 726 | 727 | .posts-navigation { 728 | max-width: var(--content-width); 729 | margin: var(--spacing-large) auto var(--spacing-default); 730 | } 731 | -------------------------------------------------------------------------------- /fonts/Inter-VariableFont_slnt,wght.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyfelt/writemore/549993ed7d5990640f01674873c185ffcaed5af8/fonts/Inter-VariableFont_slnt,wght.woff2 -------------------------------------------------------------------------------- /fonts/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /fonts/MonaspaceArgon-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyfelt/writemore/549993ed7d5990640f01674873c185ffcaed5af8/fonts/MonaspaceArgon-Regular.woff -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 14 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | > 15 | 16 | 17 | 18 | 19 | 20 | 21 | > 22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 |

30 | 31 |

32 | 33 |
34 | 35 | 36 | 48 | 49 | 50 |
51 | 52 |
53 | -------------------------------------------------------------------------------- /home.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 |
16 |

label ); ?>

17 |

For things with titles.

18 |

Follow via RSS

19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 'View older ' . strtolower( $post_type->labels->name ), 30 | 'next_text' => 'View newer ' . strtolower( $post_type->labels->name ), 31 | ) 32 | ); 33 | ?> 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /images/mystery-person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyfelt/writemore/549993ed7d5990640f01674873c185ffcaed5af8/images/mystery-person.png -------------------------------------------------------------------------------- /inc/class-writemore-comment-walker.php: -------------------------------------------------------------------------------- 1 | comment_type || 'trackback' == $comment->comment_type ) && $args['short_ping'] ) { 36 | ob_start(); 37 | $this->ping( $comment, $depth, $args ); 38 | $output .= ob_get_clean(); 39 | } elseif ( 'html5' === $args['format'] ) { 40 | ob_start(); 41 | $this->html5_comment( $comment, $depth, $args ); 42 | $output .= ob_get_clean(); 43 | } else { 44 | ob_start(); 45 | $this->comment( $comment, $depth, $args ); 46 | $output .= ob_get_clean(); 47 | } 48 | } 49 | 50 | /** 51 | * Ends the element output, if needed. 52 | * 53 | * This was forked from WordPress 5.3.2. 54 | * 55 | * @since 1.1.0 56 | * @since WordPress 2.7.0 57 | * 58 | * @see Walker::end_el() 59 | * @see wp_list_comments() 60 | * 61 | * @param string $output Used to append additional content. Passed by reference. 62 | * @param WP_Comment $comment The current comment object. Default current comment. 63 | * @param int $depth Optional. Depth of the current comment. Default 0. 64 | * @param array $args Optional. An array of arguments. Default empty array. 65 | */ 66 | public function end_el( &$output, $comment, $depth = 0, $args = array() ) { 67 | if ( ! empty( $args['end-callback'] ) ) { 68 | ob_start(); 69 | call_user_func( $args['end-callback'], $comment, $args, $depth ); 70 | $output .= ob_get_clean(); 71 | return; 72 | } 73 | } 74 | 75 | /** 76 | * Outputs a comment in the HTML5 format. 77 | * 78 | * This was forked from WordPress 5.3.2. 79 | * 80 | * @since 1.1.0 81 | * @since WordPress 3.6.0 82 | * 83 | * @see wp_list_comments() 84 | * 85 | * @param WP_Comment $comment Comment to display. 86 | * @param int $depth Depth of the current comment. 87 | * @param array $args An array of arguments. 88 | */ 89 | protected function html5_comment( $comment, $depth, $args ) { 90 | $commenter = wp_get_current_commenter(); 91 | if ( $commenter['comment_author_email'] ) { 92 | $moderation_note = __( 'Your comment is awaiting moderation.' ); 93 | } else { 94 | $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.' ); 95 | } 96 | 97 | $url = get_comment_meta( (int) $comment->comment_ID, 'webmention_source_url', true ); 98 | 99 | if ( '' === $url ) { 100 | $url = $comment->comment_author_url; 101 | } 102 | 103 | $author_url = get_comment_meta( (int) $comment->comment_ID, 'semantic_linkbacks_author_url', true ); 104 | 105 | if ( '' === $author_url ) { 106 | $author_url = $url; 107 | } 108 | 109 | // An avatar URL is stored with a Webmention, even if an email is not provided. Look 110 | // there before trying to build an avatar based on a comment's email. 111 | $avatar = get_comment_meta( (int) $comment->comment_ID, 'avatar', true ); 112 | 113 | // If there is no stored avatar URL, use WordPress to make default assumptions. 114 | if ( '' === $avatar ) { 115 | $avatar = get_avatar_url( $comment ); 116 | } 117 | 118 | // And if there is still nothing, use the theme's mystery person. 119 | if ( '' === $avatar ) { 120 | $avatar = get_template_directory_uri() . '/images/mystery-person.png'; 121 | } 122 | 123 | ?> 124 |
has_children ? 'parent' : '', $comment ); ?>> 125 | 126 | 131 | 132 | 133 | comment_author ); ?> replied on  134 | ', 137 | esc_url( $url ), 138 | get_comment_time( 'c' ), 139 | sprintf( 140 | /* translators: 1: Comment date, 2: Comment time. */ 141 | __( '%1$s at %2$s' ), 142 | get_comment_date( 'F j, Y', $comment ), 143 | get_comment_time() 144 | ) 145 | ); 146 | 147 | // Use e-content because the comment content may not be plain text. 148 | ?> 149 | 150 | 151 | comment_approved ) : ?> 152 | 153 | 154 |
155 | tags. 159 | $comment_text = str_replace( "\n", "\n\n", get_comment_text( $comment, $args ) ); 160 | echo wpautop( $comment_text, false ); 161 | ?> 162 |
163 | ', '' ); 166 | 167 | comment_reply_link( 168 | array_merge( 169 | $args, 170 | array( 171 | 'add_below' => 'div-comment', 172 | 'depth' => $depth, 173 | 'max_depth' => $args['max_depth'], 174 | 'before' => '
', 175 | 'after' => '
', 176 | 'reply_text' => 'Reply', 177 | ) 178 | ) 179 | ); 180 | ?> 181 |
182 | comment_type ) ) ? 'comment' : $comment->comment_type; 43 | 44 | // Remove classes added by WordPress (using this exact code) to indicate authorship 45 | // of a comment. If I decide to highlight my comments as different, I'll add something in 46 | // this section at a later time. 47 | $user = $comment->user_id ? get_userdata( (int) $comment->user_id ) : false; 48 | if ( $user ) { 49 | $remove_classes[] = 'byuser'; 50 | $remove_classes[] = 'comment-author-' . sanitize_html_class( $user->user_nicename, $comment->user_id ); 51 | 52 | // For comment authors who are the author of the post 53 | $post = get_post( $post_id ); 54 | if ( $post ) { 55 | if ( $comment->user_id === $post->post_author ) { 56 | $remove_classes[] = 'bypostauthor'; 57 | } 58 | } 59 | } 60 | 61 | foreach ( $remove_classes as $class ) { 62 | $key = array_search( $class, $classes ); 63 | if ( false !== $key ) { 64 | unset( $classes[ $key ] ); 65 | } 66 | } 67 | 68 | // Re-add the classes that should always be there. 69 | $classes[] = 'comment'; // CSS selector. 70 | $classes[] = 'u-comment'; // Microformat property. 71 | 72 | $protocol = get_comment_meta( $comment_id, 'protocol', true ); 73 | 74 | // If the comment originated somewhere else, mark it as a citation. If it originated 75 | // on this site, mark it as an entry. 76 | if ( '' === $comment->comment_type && 'webmention' !== $protocol ) { 77 | $classes[] = 'h-entry'; 78 | } else { 79 | $classes[] = 'h-cite'; 80 | } 81 | 82 | return $classes; 83 | } 84 | -------------------------------------------------------------------------------- /inc/content-aggregator-block.php: -------------------------------------------------------------------------------- 1 | post_type ) { 25 | return $html; 26 | } 27 | 28 | if ( 1 !== count( $attributes['taxonomies'] ) ) { 29 | return $html; 30 | } 31 | 32 | if ( 'NOT IN' === $attributes['taxonomies'][0]['operator'] ) { 33 | return $html; 34 | } 35 | 36 | if ( 'category,categories' !== $attributes['taxonomies'][0]['slug'] ) { 37 | return $html; 38 | } 39 | 40 | $category = get_term( $attributes['taxonomies'][0]['terms'][0] ); 41 | 42 | if ( ! $category || ! in_array( $category->slug, array( 'a-weekly-note', 'book-notes' ), true ) ) { 43 | return $html; 44 | } 45 | 46 | ob_start(); 47 | ?> 48 |
  • 49 |
    52 | post_excerpt, ENT_QUOTES, get_option( 'blog_charset' ) ) ); ?> 53 | 54 |
  • 55 | 10 | %3$s 11 | '; 12 | 13 | return $template; 14 | } 15 | -------------------------------------------------------------------------------- /inc/og.php: -------------------------------------------------------------------------------- 1 | 29 | 30 | 41 | 42 | 43 | 47 | 48 | post_excerpt ) ) { 22 | echo wpautop( $post->post_excerpt ); 23 | return; 24 | } 25 | 26 | // If blocks are available, try that first. 27 | $blocks = parse_blocks( $post->post_content ); 28 | 29 | foreach ( $blocks as $block ) { 30 | if ( 'core/paragraph' === $block['blockName'] ) { 31 | echo render_block( $block ); 32 | return; 33 | } elseif ( 'core/image' === $block['blockName'] ) { 34 | echo render_block( $block ); 35 | return; 36 | } 37 | } 38 | 39 | echo wpautop( get_the_excerpt( $post ) ); 40 | } 41 | 42 | /** 43 | * Display the published date. 44 | * 45 | * @param string $version The version of the output to use. Microformat, full, or basic. 46 | * @return void 47 | */ 48 | function published( string $version = 'microformat' ): void { 49 | $now = new \DateTime(); 50 | $date = new \DateTime( get_the_time( 'c' ) ); 51 | 52 | // Include the year for items published in previous years. 53 | if ( $now->format( 'Y' ) === $date->format( 'Y' ) ) { 54 | $format = 'M j'; 55 | } else { 56 | $format = 'M j, Y '; 57 | } 58 | 59 | $post = get_post(); 60 | $content = strtolower( $post->post_content ); 61 | $weather = ''; 62 | if ( str_contains( $content, ' snow' ) ) { 63 | $weather .= '❄️'; 64 | } 65 | 66 | if ( str_contains( $content, ' rain' ) ) { 67 | $weather .= '🌧'; 68 | } 69 | 70 | if ( str_contains( $content, ' sunny' ) ) { 71 | $weather .= '☀️'; 72 | } 73 | 74 | // Determine if the date is morning, midday, afternoon, evening, or night 75 | $hour = $date->format( 'G' ); 76 | if ( $hour < 6 ) { 77 | $day_part = 'early morning'; 78 | } elseif ( $hour < 10 ) { 79 | $day_part = 'morning'; 80 | } elseif ( $hour < 12 ) { 81 | $day_part = 'late morning'; 82 | } elseif ( $hour < 16 ) { 83 | $day_part = 'afternoon'; 84 | } elseif ( $hour < 18 ) { 85 | $day_part = 'late afternoon'; 86 | } elseif ( $hour < 22 ) { 87 | $day_part = 'evening'; 88 | } else { 89 | $day_part = 'night'; 90 | } 91 | 92 | if ( 'full' === $version ) { 93 | ?> 94 |
    Published 95 | format( 'l' ) ); ?> 96 | 97 | getTimestamp() ); ?> 98 | 99 |
    100 | 104 | 105 | Published 106 | 107 | 111 |

    Published 112 | 113 |

    114 | get_results( 178 | $wpdb->prepare( 179 | "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status = 'publish' AND ID > %d ORDER BY ID ASC LIMIT 1", 180 | Note\get_slug(), 181 | get_the_ID() 182 | ) 183 | ); 184 | $next_note_ids = wp_list_pluck( $next_note_ids, 'ID' ); 185 | 186 | $prior_note_ids = $wpdb->get_results( 187 | $wpdb->prepare( 188 | "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status = 'publish' AND ID < %d ORDER BY ID DESC LIMIT 1", 189 | Note\get_slug(), 190 | get_the_ID() 191 | ) 192 | ); 193 | $prior_note_ids = wp_list_pluck( $prior_note_ids, 'ID' ); 194 | 195 | $recent_note_ids = $wpdb->get_results( 196 | $wpdb->prepare( 197 | "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status = 'publish' ORDER BY ID DESC LIMIT 1", 198 | Note\get_slug() 199 | ) 200 | ); 201 | $recent_note_ids = wp_list_pluck( $recent_note_ids, 'ID' ); 202 | 203 | $random_note_ids = $wpdb->get_results( 204 | $wpdb->prepare( 205 | "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status = 'publish' ORDER BY RAND() LIMIT 2", 206 | Note\get_slug() 207 | ) 208 | ); 209 | $random_note_ids = wp_list_pluck( $random_note_ids, 'ID' ); 210 | 211 | $other_note_ids = array_merge( $next_note_ids, $prior_note_ids, $recent_note_ids, $random_note_ids ); 212 | $other_note_ids = array_unique( $other_note_ids ); 213 | $other_note_ids = array_diff( $other_note_ids, [ get_the_ID() ] ); 214 | 215 | $other_notes = new \WP_Query( 216 | [ 217 | 'post_type' => Note\get_slug(), 218 | 'post__in' => $other_note_ids, 219 | 'update_post_meta_cache' => false, 220 | 'update_post_term_cache' => false, 221 | ] 222 | ); 223 | 224 | if ( $other_notes->have_posts() ) { 225 | ?> 226 |

    Other notes

    227 | 237 | get_results( 251 | $wpdb->prepare( 252 | "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status = 'publish' AND ID > %d ORDER BY ID ASC LIMIT 1", 253 | 'like', 254 | get_the_ID() 255 | ) 256 | ); 257 | $next_like_ids = wp_list_pluck( $next_like_ids, 'ID' ); 258 | 259 | $prior_like_ids = $wpdb->get_results( 260 | $wpdb->prepare( 261 | "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status = 'publish' AND ID < %d ORDER BY ID DESC LIMIT 1", 262 | 'like', 263 | get_the_ID() 264 | ) 265 | ); 266 | $prior_like_ids = wp_list_pluck( $prior_like_ids, 'ID' ); 267 | 268 | $recent_like_ids = $wpdb->get_results( 269 | $wpdb->prepare( 270 | "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status = 'publish' ORDER BY ID DESC LIMIT 1", 271 | 'like' 272 | ) 273 | ); 274 | $recent_like_ids = wp_list_pluck( $recent_like_ids, 'ID' ); 275 | 276 | $random_like_ids = $wpdb->get_results( 277 | $wpdb->prepare( 278 | "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status = 'publish' ORDER BY RAND() LIMIT 2", 279 | 'like' 280 | ) 281 | ); 282 | $random_like_ids = wp_list_pluck( $random_like_ids, 'ID' ); 283 | 284 | $other_like_ids = array_merge( $next_like_ids, $prior_like_ids, $recent_like_ids, $random_like_ids ); 285 | $other_like_ids = array_unique( $other_like_ids ); 286 | $other_like_ids = array_diff( $other_like_ids, [ get_the_ID() ] ); 287 | 288 | $other_likes = new \WP_Query( 289 | [ 290 | 'post_type' => 'like', 291 | 'post__in' => $other_like_ids, 292 | 'update_post_meta_cache' => false, 293 | 'update_post_term_cache' => false, 294 | ] 295 | ); 296 | 297 | if ( $other_likes->have_posts() ) { 298 | ?> 299 |

    Other likes

    300 | 310 | 'post', 327 | 'posts_per_page' => 10, 328 | 'post__not_in' => [ get_the_ID() ], 329 | 'update_post_meta_cache' => false, 330 | 'update_post_term_cache' => false, 331 | 'date_query' => [ 332 | 'week' => $week, 333 | ], 334 | 'tax_query' => [ 335 | [ 336 | 'taxonomy' => 'post_tag', 337 | 'field' => 'slug', 338 | 'terms' => [ 'weeknotes' ], 339 | 'operator' => 'IN', 340 | ], 341 | ], 342 | ] 343 | ); 344 | 345 | if ( $posts->have_posts() ) { 346 | $weeks = []; 347 | 348 | while ( $posts->have_posts() ) { 349 | $posts->the_post(); 350 | 351 | $date = new \DateTime( get_the_time( 'c' ) ); 352 | 353 | $weeks[] = [ 354 | 'year' => $date->format( 'Y' ), 355 | 'link' => get_the_permalink(), 356 | ]; 357 | } 358 | 359 | $week_links = []; 360 | 361 | foreach ( $weeks as $week ) { 362 | $week_links[] = '' . esc_html( $week['year'] ) . ''; 363 | } 364 | 365 | if ( 1 === count( $week_links ) ) { 366 | ?> 367 |

    This week also appears in .

    368 | 371 |

    This week also appears in .

    372 | 376 |

    This week also appears in , and .

    377 | is_main_query() ) { 21 | return; 22 | } 23 | 24 | if ( $query->is_search() || $query->is_archive() || $query->is_home() ) { 25 | $query->set( 'posts_per_page', 25 ); 26 | } 27 | 28 | if ( $query->is_post_type_archive( 'like' ) ) { 29 | $query->set( 'posts_per_page', 50 ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /inc/template-functions.php: -------------------------------------------------------------------------------- 1 | '; 37 | } 38 | } 39 | 40 | /** 41 | * Mark articles up with the microformat class `h-entry` for an entry. 42 | */ 43 | function writemore_post_class() { 44 | $classes = array(); 45 | 46 | $classes[] = 'type-' . get_post_type(); 47 | $classes[] = 'h-entry'; 48 | 49 | if ( has_block( 'core/image' ) && 'shortnote' === get_post_type() ) { 50 | $classes[] = 'has-image'; 51 | } 52 | 53 | return $classes; 54 | } 55 | -------------------------------------------------------------------------------- /inc/theme-setup.php: -------------------------------------------------------------------------------- 1 | current ) { 24 | return array( 'current' ); 25 | } 26 | 27 | return array(); 28 | } 29 | 30 | function setup_theme_support() { 31 | // Add default RSS feed links to . 32 | add_theme_support( 'automatic-feed-links' ); 33 | 34 | // WordPress provides a tag. 35 | add_theme_support( 'title-tag' ); 36 | 37 | add_theme_support( 'align-wide' ); 38 | add_theme_support( 'post-thumbnails' ); 39 | 40 | // Use HTML5 markup for common core items. 41 | add_theme_support( 42 | 'html5', 43 | array( 44 | 'search-form', 45 | 'comment-form', 46 | 'comment-list', 47 | 'gallery', 48 | 'caption', 49 | 'style', 50 | 'script', 51 | ) 52 | ); 53 | 54 | register_nav_menus( 55 | array( 56 | 'header-menu' => __( 'Header Menu' ), 57 | ) 58 | ); 59 | 60 | register_sidebar( 61 | array( 62 | 'name' => __( 'Author Bio' ), 63 | 'id' => 'writemore-author-bio', 64 | 'description' => __( 'Widgets in this area will be shown in the author bio.' ), 65 | 'before_widget' => '', 66 | 'after_widget' => '', 67 | 'before_title' => '', 68 | 'after_title' => '', 69 | ) 70 | ); 71 | 72 | register_sidebar( 73 | array( 74 | 'name' => __( 'Footer' ), 75 | 'id' => 'writemore-footer', 76 | 'description' => __( 'Widgets in this area will be shown in the site footer.' ), 77 | 'before_widget' => '', 78 | 'after_widget' => '', 79 | 'before_title' => '', 80 | 'after_title' => '', 81 | ) 82 | ); 83 | 84 | // Clear the default editor styles, register support, and then enqueue our own. 85 | remove_editor_styles(); 86 | add_theme_support( 'editor-styles' ); 87 | add_editor_style( 'editor-style.css' ); 88 | } 89 | 90 | /** 91 | * Enqueue theme assets. 92 | */ 93 | function enqueue_assets() { 94 | 95 | wp_enqueue_style( 96 | 'writemore-style', 97 | get_stylesheet_uri(), 98 | array(), 99 | filemtime( get_stylesheet_directory() . '/style.css' ), 100 | ); 101 | } 102 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The default template file. 4 | * 5 | * I believe I've provided more specific views for the content on this site, so 6 | * this template should never actually be used. 7 | * 8 | * If it is, I'm confused! 9 | * 10 | * @package writemore 11 | */ 12 | 13 | get_header(); ?> 14 | 15 | Hi, how did this happen? 16 | 17 | <?php 18 | 19 | get_footer(); 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "writemore", 3 | "version": "3.0.1", 4 | "description": "A WordPress theme.", 5 | "devDependencies": { 6 | "@happyprime/postcss-config": "*", 7 | "@happyprime/stylelint-config": "*", 8 | "postcss-cli": "^11.0.1", 9 | "postcss-import": "^16.1.0", 10 | "postcss-preset-env": "^10.2.0" 11 | }, 12 | "scripts": { 13 | "build": "npm run build:theme", 14 | "build:theme": "npm run postcss:theme && npm run postcss:editor", 15 | "postcss:theme": "postcss -o style.css style.css", 16 | "postcss:editor": "postcss -o editor-style.css style.css", 17 | "lint": "npm run lint:styles", 18 | "lint:styles": "stylelint style.css" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "git+https://github.com/jeremyfelt/writemore.git" 23 | }, 24 | "author": "jeremyfelt", 25 | "license": "GPL-2.0-only", 26 | "bugs": { 27 | "url": "https://github.com/jeremyfelt/writemore/issues" 28 | }, 29 | "homepage": "https://github.com/jeremyfelt/writemore#readme" 30 | } 31 | -------------------------------------------------------------------------------- /phpcs.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0"?> 2 | <ruleset name="WordPress Coding Standards based custom ruleset for your plugin"> 3 | <!-- Start the scan here. --> 4 | <file>.</file> 5 | 6 | <exclude-pattern>/vendor/</exclude-pattern> 7 | <exclude-pattern>/node_modules/</exclude-pattern> 8 | <exclude-pattern>*.asset.php</exclude-pattern> 9 | 10 | <arg value="sp"/> <!-- Show sniff and progress --> 11 | <arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit --> 12 | <arg name="colors"/> 13 | <arg name="extensions" value="php"/><!-- Scan only PHP files. --> 14 | <arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. --> 15 | 16 | <!-- Rules: Check PHP version compatibility --> 17 | <!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions --> 18 | <config name="testVersion" value="7.4-"/> 19 | <!-- https://github.com/PHPCompatibility/PHPCompatibilityWP --> 20 | <rule ref="PHPCompatibilityWP"/> 21 | 22 | <!-- Rules: WordPress Coding Standards --> 23 | <!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards --> 24 | <!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties --> 25 | <config name="minimum_supported_wp_version" value="5.9"/> 26 | 27 | <rule ref="VariableAnalysis" /> 28 | <rule ref="WordPress-Extra"> 29 | <!-- WordPress should allow short array syntax. --> 30 | <exclude name="Universal.Arrays.DisallowShortArraySyntax.Found"/> 31 | 32 | <!-- @todo parse these --> 33 | <exclude name="Universal.Operators.StrictComparisons" /> 34 | <exclude name="WordPress.PHP.StrictInArray" /> 35 | <exclude name="WordPress.NamingConventions.PrefixAllGlobals" /> 36 | <exclude name="WordPress.Security" /> 37 | <exclude name="WordPress.WP.I18n" /> 38 | <exclude name="WordPress.WP.GlobalVariablesOverride" /> 39 | </rule> 40 | <!--<rule ref="WordPress-Docs" />--> 41 | <rule ref="WordPress.NamingConventions.PrefixAllGlobals"> 42 | <properties> 43 | <!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. --> 44 | <property name="prefixes" type="array" value="WriteMore"/> 45 | </properties> 46 | </rule> 47 | <rule ref="WordPress.WP.I18n"> 48 | <properties> 49 | <!-- Value: replace the text domain used. --> 50 | <property name="text_domain" type="array" value="writemore"/> 51 | </properties> 52 | </rule> 53 | <rule ref="WordPress.WhiteSpace.ControlStructureSpacing"> 54 | <properties> 55 | <property name="blank_line_check" value="true"/> 56 | </properties> 57 | </rule> 58 | </ruleset> 59 | -------------------------------------------------------------------------------- /phpstan.neon.dist: -------------------------------------------------------------------------------- 1 | parameters: 2 | level: 5 3 | paths: 4 | - ./ 5 | scanFiles: 6 | - %rootDir%/../../php-stubs/wordpress-stubs/wordpress-stubs.php 7 | - %rootDir%/../../php-stubs/wordpress-tests-stubs/wordpress-tests-stubs.php 8 | excludePaths: 9 | - vendor 10 | - node_modules 11 | ignoreErrors: 12 | -------------------------------------------------------------------------------- /rtl.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Write More Things 3 | 4 | Adding support for languages written in a Right To Left (RTL) direction is easy - 5 | it's just a matter of overwriting all the horizontal positioning attributes 6 | of your CSS stylesheet in a separate stylesheet file named rtl.css. 7 | 8 | https://codex.wordpress.org/Right-to-Left_Language_Support 9 | 10 | */ 11 | 12 | /* 13 | body { 14 | direction: rtl; 15 | unicode-bidi: embed; 16 | } 17 | */ 18 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyfelt/writemore/549993ed7d5990640f01674873c185ffcaed5af8/screenshot.png -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The template for displaying search pages. 4 | * 5 | * @package writemore 6 | */ 7 | 8 | get_header(); 9 | 10 | $writemore_description = 'Search results for ' . esc_html( get_search_query() ); 11 | $writemore_header = 'Search'; 12 | ?> 13 | <header> 14 | <h1><?php echo esc_html( $writemore_header ); ?></h1> 15 | <?php if ( ! empty( trim( $writemore_description ) ) ) : ?> 16 | <p><?php echo wp_kses_post( $writemore_description ); ?></p> 17 | <?php endif; ?> 18 | </header><!-- .page-header --> 19 | <?php if ( have_posts() ) : ?> 20 | 21 | <?php while ( have_posts() ) : ?> 22 | <?php the_post(); ?> 23 | <?php get_template_part( 'template-parts/content/card', get_post_type() ); ?> 24 | <?php endwhile; ?> 25 | 26 | <?php 27 | the_posts_navigation( 28 | array( 29 | 'prev_text' => 'View older content', 30 | 'next_text' => 'View newer content', 31 | ) 32 | ); 33 | 34 | ?> 35 | 36 | <?php else : ?> 37 | <article> 38 | <div class="entry-content"> 39 | <p>No search results found.</p> 40 | </div> 41 | </article> 42 | <?php endif; ?> 43 | 44 | <?php 45 | 46 | get_template_part( 'template-parts/author-bio' ); 47 | get_footer(); ?> 48 | -------------------------------------------------------------------------------- /singular.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The template for displaying all singular views. 4 | * 5 | * @package writemore 6 | */ 7 | 8 | get_header(); ?> 9 | 10 | <?php if ( is_home() && ! is_front_page() && ! empty( single_post_title( '', false ) ) ) : ?> 11 | <header class="page-header alignwide"> 12 | <h1 class="page-title"><?php single_post_title(); ?></h1> 13 | </header><!-- .page-header --> 14 | <?php endif; ?> 15 | 16 | <?php 17 | 18 | while ( have_posts() ) { 19 | the_post(); 20 | get_template_part( 'template-parts/content/card', get_post_type() ); 21 | } 22 | 23 | get_footer(); 24 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Theme Name: Write More Things 3 | Theme URI: http://github.com/jeremyfelt/writemore 4 | Author: Jeremy Felt 5 | Author URI: https://jeremyfelt.com 6 | Description: A theme to encourage more writing. 7 | Version: 3.0.1 8 | License: GNU General Public License v2 or later 9 | License URI: LICENSE 10 | Text Domain: writemore 11 | 12 | This theme, like WordPress, is licensed under the GPL. 13 | Use it to make something cool, have fun, and share what 14 | you've learned with others. 15 | */ 16 | 17 | @font-face { 18 | font-family: inter; 19 | font-display: fallback; 20 | font-weight: 300 400 700 900; 21 | src: url(./fonts/Inter-VariableFont_slnt,wght.woff2) format("woff2"); 22 | } 23 | 24 | @font-face { 25 | font-family: monaspace; 26 | font-display: fallback; 27 | font-weight: 300; 28 | src: url(./fonts/MonaspaceArgon-Regular.woff) format("woff"); 29 | } 30 | 31 | :root { 32 | --sans-serif: inter, sans-serif; 33 | --monospace: monaspace, monospace; 34 | 35 | --font-size-small: 0.8rem; 36 | --font-size-base: 1rem; 37 | --font-size-default: 1.125rem; 38 | --font-size-content-heading: 1.5rem; 39 | 40 | --content-width: 640px; 41 | --content-width-wide: 1024px; 42 | 43 | --spacing-base: 1rem; 44 | --spacing-default: 3rem; 45 | --spacing-large: 6rem; 46 | 47 | --color-background: #fbfbfb; 48 | --color-foreground: #222; 49 | --color-faded: #666; 50 | --color-content-background: #f9f9f9; 51 | --color-code-background: #e3e3e3; 52 | --color-blockquote-background: #f2f7fb; 53 | --color-border-default: #ddd; 54 | --color-blockquote-border: #a6c2e7; 55 | --color-link: #2271b1; 56 | --color-context-reply: rgb(127, 255, 212); 57 | } 58 | 59 | @media (prefers-color-scheme: dark) { 60 | 61 | :root { 62 | --color-background: #222; 63 | --color-foreground: #f6f6f6; 64 | --color-faded: #a8a8a8; 65 | --color-content-background: #343434; 66 | --color-code-background: #434343; 67 | --color-blockquote-background: var(--color-background); 68 | --color-border-default: #888; 69 | --color-link: #00c2e1; 70 | } 71 | } 72 | 73 | @media screen and (max-width: 700px) { 74 | 75 | body { 76 | --content-width: 100%; 77 | --content-width-wide: 100%; 78 | } 79 | } 80 | 81 | html, 82 | body { 83 | height: 100%; 84 | } 85 | 86 | body { 87 | background: var(--color-background); 88 | color: var(--color-foreground); 89 | font-family: var(--sans-serif); 90 | line-height: 1.55; 91 | font-size: var(--font-size-default); 92 | margin: 0; 93 | } 94 | 95 | header { 96 | width: calc(100% - var(--spacing-default)); 97 | max-width: var(--content-width-wide); 98 | } 99 | 100 | section { 101 | max-width: var(--content-width); 102 | } 103 | 104 | header, 105 | section { 106 | margin: 0 auto; 107 | } 108 | 109 | main { 110 | max-width: calc(100% - var(--spacing-default)); 111 | min-height: calc(100vh - var(--spacing-large) - 2rem - 325px); 112 | margin-left: auto; 113 | margin-right: auto; 114 | } 115 | 116 | article { 117 | margin-top: var(--spacing-large); 118 | } 119 | 120 | section article { 121 | margin-top: var(--spacing-base); 122 | } 123 | 124 | main > header { 125 | height: 175px; 126 | text-align: right; 127 | } 128 | 129 | article header { 130 | width: 100%; 131 | position: relative; 132 | } 133 | 134 | a { 135 | color: var(--color-link); 136 | } 137 | 138 | main ~ footer a { 139 | color: var(--color-content-background); 140 | } 141 | 142 | article header a { 143 | color: var(--color-foreground); 144 | } 145 | 146 | a:hover { 147 | color: var(--color-foreground); 148 | } 149 | 150 | article header a:hover { 151 | color: var(--color-link); 152 | } 153 | 154 | article header h1 { 155 | margin-bottom: 0; 156 | border-top: 1px solid var(--color-border-default); 157 | padding-top: var(--spacing-base); 158 | } 159 | 160 | article footer { 161 | max-width: var(--content-width); 162 | margin: var(--spacing-default) auto 0; 163 | width: 100%; 164 | } 165 | 166 | footer > * { 167 | max-width: 100%; 168 | } 169 | 170 | nav ul { 171 | display: flex; 172 | flex-wrap: wrap; 173 | flex-direction: row; 174 | list-style: none; 175 | margin: var(--spacing-base) 0 0; 176 | padding: 0; 177 | } 178 | 179 | nav ul li { 180 | padding: 0; 181 | margin: 0 var(--spacing-base) 0 0; 182 | font-weight: 700; 183 | } 184 | 185 | h2 { 186 | font-size: var(--font-size-content-heading); 187 | margin-top: var(--spacing-default); 188 | margin-bottom: var(--spacing-base); 189 | font-weight: 900; 190 | } 191 | 192 | h3 { 193 | margin-top: var(--spacing-base); 194 | margin-bottom: var(--spacing-base); 195 | } 196 | 197 | pre, 198 | code { 199 | font-family: var(--monospace); 200 | font-size: 15px; 201 | background: var(--color-code-background); 202 | line-height: 1.4; 203 | padding: 0.25rem 0.25rem 0.15rem; 204 | } 205 | 206 | pre { 207 | background: var(--color-background); 208 | border-left: 6px solid var(--color-code-background); 209 | white-space: break-spaces; 210 | padding: var(--spacing-base) calc(var(--spacing-default) - 6px); 211 | margin: var(--spacing-default) 0; 212 | } 213 | 214 | cite { 215 | font-style: initial; 216 | font-weight: 600; 217 | } 218 | 219 | blockquote { 220 | font-size: 1rem; 221 | font-style: normal; 222 | background: var(--color-blockquote-background); 223 | border-left: 1.1rem solid var(--color-blockquote-border); 224 | border-radius: 5px; 225 | padding: var(--spacing-base) calc(var(--spacing-default) - 1.1rem) var(--spacing-base); 226 | margin: var(--spacing-default) 0; 227 | 228 | p { 229 | margin-bottom: 0; 230 | } 231 | 232 | p:first-of-type { 233 | margin-top: 0; 234 | } 235 | 236 | cite { 237 | display: inline-block; 238 | margin-top: var(--spacing-base); 239 | } 240 | } 241 | 242 | @media (prefers-color-scheme: dark) { 243 | 244 | blockquote { 245 | border: 2px solid var(--color-blockquote-border); 246 | border-left-width: 1.1rem; 247 | } 248 | } 249 | 250 | @media screen and (max-width: 700px) { 251 | 252 | blockquote { 253 | border-left-width: calc(var(--spacing-base) / 2); 254 | padding-left: var(--spacing-base); 255 | padding-right: var(--spacing-base); 256 | } 257 | } 258 | 259 | img { 260 | width: 100%; 261 | height: auto; 262 | } 263 | 264 | input[type="search"] { 265 | font-size: 1.5rem; 266 | padding: 0.5rem; 267 | font-weight: 300; 268 | line-height: 1; 269 | } 270 | 271 | button { 272 | padding: 0.875rem; 273 | font-size: var(--font-size-base); 274 | margin-left: 0.35rem; 275 | vertical-align: top; 276 | background: var(--color-foreground); 277 | color: var(--color-background); 278 | border: 1px solid var(--color-foreground); 279 | width: var(--spacing-large); 280 | } 281 | 282 | button:hover { 283 | background: var(--color-background); 284 | color: var(--color-foreground); 285 | } 286 | 287 | main ~ footer { 288 | height: 175px; 289 | width: 100%; 290 | display: flex; 291 | flex-direction: column; 292 | justify-content: end; 293 | margin: var(--spacing-default) auto 0; 294 | padding-top: var(--spacing-base); 295 | padding-bottom: var(--spacing-default); 296 | font-size: var(--font-size-base); 297 | background: var(--color-link); 298 | color: var(--color-content-background); 299 | } 300 | 301 | main ~ footer div { 302 | margin-bottom: var(--spacing-base); 303 | } 304 | 305 | .day, 306 | time { 307 | font-size: 0.9rem; 308 | } 309 | 310 | iframe { 311 | max-width: 100%; 312 | } 313 | 314 | .screen-reader-text { 315 | border: 0; 316 | clip: rect(1px, 1px, 1px, 1px); 317 | clip-path: inset(50%); 318 | height: 1px; 319 | margin: -1px; 320 | overflow: hidden; 321 | padding: 0; 322 | position: absolute !important; 323 | width: 1px; 324 | word-wrap: normal !important; 325 | } 326 | 327 | .skip-link.screen-reader-text:focus { 328 | background-color: var(--color-border-default); 329 | clip: auto !important; 330 | clip-path: none; 331 | color: var(--color-foreground); 332 | display: block; 333 | font-size: 1em; 334 | height: auto; 335 | left: 5px; 336 | line-height: normal; 337 | padding: 15px 23px 14px; 338 | -webkit-text-decoration: none; 339 | text-decoration: none; 340 | top: 5px; 341 | width: auto; 342 | z-index: 100000; 343 | } 344 | 345 | .has-text-align-center { 346 | text-align: center; 347 | } 348 | 349 | .site-branding h1, 350 | .site-branding p { 351 | font-size: var(--font-size-content-heading); 352 | font-weight: 700; 353 | margin-top: var(--spacing-default); 354 | margin-bottom: var(--spacing-base); 355 | } 356 | 357 | .entry-content > * { 358 | max-width: var(--content-width); 359 | margin-left: auto; 360 | margin-right: auto; 361 | width: auto; 362 | } 363 | 364 | .entry-content > figure { 365 | margin-top: var(--spacing-default); 366 | margin-bottom: var(--spacing-default); 367 | } 368 | 369 | .entry-content .size-large { 370 | max-width: var(--content-width-wide); 371 | height: auto; 372 | } 373 | 374 | .wp-element-caption { 375 | font-style: italic; 376 | font-size: 0.9rem; 377 | } 378 | 379 | .wp-block-verse { 380 | font-style: italic; 381 | font-family: var(--sans-serif); 382 | } 383 | 384 | .published-wrapper { 385 | display: flex; 386 | flex-direction: column; 387 | width: 100%; 388 | max-width: var(--content-width-wide); 389 | margin: 0 auto; 390 | color: var(--color-foreground); 391 | } 392 | 393 | .author-bio { 394 | display: flex; 395 | width: var(--content-width); 396 | max-width: 100%; 397 | margin: var(--spacing-base) auto 0 auto; 398 | padding-top: var(--spacing-default); 399 | border-top: 1px solid var(--color-border-default); 400 | justify-content: space-evenly; 401 | } 402 | 403 | .author-bio img { 404 | width: 150px; 405 | height: 100%; 406 | } 407 | 408 | .author-bio-content { 409 | padding: 0 var(--spacing-base); 410 | flex-basis: fit-content; 411 | } 412 | 413 | .author-bio-content p { 414 | margin-top: 0; 415 | } 416 | 417 | .reaction { 418 | display: flex; 419 | } 420 | 421 | .reaction img { 422 | width: 64px; 423 | height: 64px; 424 | } 425 | 426 | .reaction span { 427 | padding-left: var(--spacing-base); 428 | width: 100%; 429 | } 430 | 431 | .comment { 432 | display: flex; 433 | flex-wrap: wrap; 434 | align-items: center; 435 | border: 1px solid var(--color-border-default); 436 | padding: var(--spacing-base); 437 | margin-top: var(--spacing-base); 438 | } 439 | 440 | .comment img { 441 | width: 64px; 442 | height: 64px; 443 | margin-right: var(--spacing-base); 444 | } 445 | 446 | .comment > span { 447 | display: flex; 448 | } 449 | 450 | .comment-content { 451 | width: 100%; 452 | } 453 | 454 | .reaction time, 455 | .comment time { 456 | font-size: var(--spacing-base); 457 | } 458 | 459 | .comment-respond { 460 | margin-top: var(--spacing-default); 461 | border-top: 1px solid var(--color-border-default); 462 | width: 100%; 463 | } 464 | 465 | .comment-form label { 466 | display: block; 467 | font-weight: 600; 468 | } 469 | 470 | .comment-form input, 471 | .comment-form textarea { 472 | font-size: var(--font-size-base); 473 | line-height: 1.5; 474 | padding: var(--spacing-base); 475 | font-family: var(--sans-serif); 476 | width: calc(100% - (var(--spacing-base) * 2)); 477 | } 478 | 479 | .comment-form input { 480 | padding: 0.5rem var(--spacing-base); 481 | } 482 | 483 | .comment-form .submit { 484 | margin: var(--spacing-base) 0; 485 | width: initial; 486 | background: var(--color-foreground); 487 | color: var(--color-background); 488 | border: 1px solid var(--color-foreground); 489 | padding-left: var(--spacing-default); 490 | padding-right: var(--spacing-default); 491 | cursor: pointer; 492 | } 493 | 494 | .comment-form .submit:hover { 495 | background: var(--color-background); 496 | color: var(--color-foreground); 497 | border: 1px solid var(--color-foreground); 498 | } 499 | 500 | .edit-link { 501 | margin-right: var(--spacing-base); 502 | } 503 | 504 | .multiple .published-wrapper { 505 | margin-bottom: 0; 506 | } 507 | 508 | .type-page > * { 509 | max-width: var(--content-width); 510 | margin-left: auto; 511 | margin-right: auto; 512 | } 513 | 514 | .type-page > section { 515 | max-width: var(--content-width-wide); 516 | } 517 | 518 | .multiple .type-like, 519 | .multiple .type-shortnote, 520 | .multiple article.type-post { 521 | display: grid; 522 | grid-template-columns: [date] calc((var(--content-width-wide) - var(--content-width))/2) [content] var(--content-width); 523 | grid-template-rows: [first] min-content [second] auto; 524 | width: var(--content-width-wide); 525 | margin-left: auto; 526 | margin-right: auto; 527 | } 528 | 529 | .multiple .type-like, 530 | .multiple .type-shortnote { 531 | grid-template-rows: [first] min-content; 532 | } 533 | 534 | .multiple .type-like { 535 | margin-top: var(--spacing-default); 536 | } 537 | 538 | .multiple .type-shortnote > header, 539 | .multiple .type-post > header { 540 | grid-column: content; 541 | grid-row: first; 542 | } 543 | 544 | .multiple .type-shortnote > header h1, 545 | .multiple .type-post > header h1 { 546 | margin-top: 0; 547 | border-top: 0; 548 | font-size: 1.4rem; 549 | padding-top: 0; 550 | align-self: start; 551 | } 552 | 553 | .multiple .type-like > p, 554 | .multiple .type-shortnote > p, 555 | .multiple .type-post > p { 556 | grid-column: date; 557 | grid-row: first; 558 | margin: 0; 559 | align-self: start; 560 | line-height: 2.2; 561 | } 562 | 563 | .multiple .type-like > p, 564 | .multiple .type-shortnote > p { 565 | line-height: 1.1; 566 | } 567 | 568 | .multiple .type-like > .entry-content, 569 | .multiple .type-shortnote > .entry-content, 570 | .multiple .type-post > .entry-content { 571 | grid-column: content; 572 | grid-row: second; 573 | justify-self: start; 574 | } 575 | 576 | .multiple .type-like > .entry-content, 577 | .multiple .type-shortnote > .entry-content { 578 | grid-row: first; 579 | } 580 | 581 | @media screen and (max-width: 1120px) { 582 | 583 | .multiple .type-like, 584 | .multiple .type-shortnote, 585 | .multiple article.type-post { 586 | display: flex; 587 | flex-direction: column; 588 | width: 100%; 589 | } 590 | 591 | .multiple .type-shortnote { 592 | margin-top: var(--spacing-large); 593 | } 594 | 595 | .multiple .type-like > .entry-content, 596 | .multiple .type-shortnote > .entry-content, 597 | .multiple article.post > .entry-content { 598 | margin-top: var(--spacing-base); 599 | } 600 | 601 | .multiple article.type-post > p { 602 | order: -1; 603 | } 604 | 605 | form input, 606 | form button { 607 | width: 100%; 608 | } 609 | 610 | form button { 611 | margin-top: var(--spacing-base); 612 | margin-left: 0; 613 | } 614 | } 615 | 616 | .site-footer section { 617 | max-width: calc(100% - var(--spacing-default)); 618 | margin-left: auto; 619 | margin-right: auto; 620 | text-align: center; 621 | } 622 | 623 | .site-footer section > * { 624 | max-width: var(--content-width); 625 | } 626 | 627 | .multiple .type-shortnote > .entry-content > * { 628 | margin-left: 0; 629 | margin-right: 0; 630 | } 631 | 632 | .multiple .type-like .entry-content > p { 633 | margin-top: 0; 634 | margin-bottom: 0; 635 | padding: 0; 636 | } 637 | 638 | .multiple .type-shortnote .entry-content > p:first-of-type { 639 | margin-top: 0; 640 | } 641 | 642 | .multiple .type-shortnote footer { 643 | width: var(--content-width-wide); 644 | border-top: 1px solid var(--color-border-default); 645 | margin-bottom: 0; 646 | } 647 | 648 | .shortnotes-reply-to { 649 | max-width: var(--content-width); 650 | margin: var(--spacing-base) auto var(--spacing-default); 651 | font-style: italic; 652 | } 653 | 654 | .multiple .type-shortnote .shortnotes-reply-to { 655 | padding-top: 0; 656 | margin-bottom: var(--spacing-default); 657 | } 658 | 659 | .type-like .more-likes ul, 660 | .type-shortnote .more-notes ul { 661 | padding-left: 0; 662 | margin: 0; 663 | } 664 | 665 | .type-post .other-weeks li, 666 | .type-like .more-likes li, 667 | .type-shortnote .more-notes li { 668 | list-style: none; 669 | margin-bottom: 0.5rem; 670 | font-size: var(--font-size-base); 671 | } 672 | 673 | .type-like > p time, 674 | .type-shortnote > p time, 675 | .multiple .type-post > p time { 676 | font-size: var(--font-size-small); 677 | line-height: 1.55; 678 | } 679 | 680 | .type-like .like-of-domain { 681 | font-size: var(--font-size-small); 682 | padding-left: 0.5rem; 683 | color: var(--color-faded); 684 | } 685 | 686 | .type-like .more-likes li time, 687 | .type-shortnote .more-notes li time { 688 | font-size: var(--font-size-base); 689 | } 690 | 691 | .more-likes, 692 | .more-notes { 693 | margin-top: var(--spacing-base); 694 | } 695 | 696 | .other-weeks { 697 | margin-top: var(--spacing-large); 698 | border-top: 1px solid var(--color-border-default); 699 | 700 | ~ .author-bio { 701 | border-top: 0; 702 | } 703 | } 704 | 705 | .more-likes h2, 706 | .more-notes h2 { 707 | margin-top: 0; 708 | border-top: 1px solid var(--color-border-default); 709 | padding-top: var(--spacing-base); 710 | } 711 | 712 | .wp-block-latest-posts .type-post, 713 | .weekly-preview { 714 | margin-bottom: var(--spacing-base); 715 | } 716 | 717 | .wp-block-latest-posts .type-shortnote:first-of-type { 718 | margin-top: var(--spacing-base); 719 | } 720 | 721 | ul.wp-block-latest-posts { 722 | padding-left: 0; 723 | list-style: none; 724 | } 725 | 726 | .posts-navigation { 727 | max-width: var(--content-width); 728 | margin: var(--spacing-large) auto var(--spacing-default); 729 | } 730 | -------------------------------------------------------------------------------- /template-parts/author-bio.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The template for displaying author info below posts. 4 | * 5 | * @package writemore 6 | */ 7 | 8 | ?> 9 | 10 | <div class="author-bio p-author h-card"> 11 | <?php 12 | echo get_avatar( 13 | get_the_author_meta( 'ID' ), 14 | 300, 15 | '', 16 | apply_filters( 'writemore_author_avatar_alt_text', '' ), 17 | array( 18 | 'class' => 'u-photo', 19 | ) 20 | ); 21 | 22 | if ( is_active_sidebar( 'writemore-author-bio' ) ) { 23 | ?> 24 | <div class="author-bio-content"> 25 | <?php dynamic_sidebar( 'writemore-author-bio' ); ?> 26 | </div> 27 | <?php 28 | } 29 | ?> 30 | </div> 31 | -------------------------------------------------------------------------------- /template-parts/content/card-like.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * Template part for displaying like content. 4 | * 5 | * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 6 | * 7 | * @package writemore 8 | */ 9 | 10 | use Writemore\Output; 11 | 12 | ?> 13 | 14 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 15 | <?php if ( is_singular( 'like' ) ) : ?> 16 | <header> 17 | <h1>Like</h1> 18 | </header> 19 | <?php endif; ?> 20 | 21 | <?php if ( ! is_singular( 'like' ) ) : ?> 22 | <?php Output\published(); ?> 23 | <?php endif; ?> 24 | 25 | <div class="entry-content e-content"> 26 | <?php the_content(); ?> 27 | </div> 28 | 29 | <?php if ( is_singular( 'like' ) ) : ?> 30 | <footer class="entry-footer"> 31 | <?php 32 | Output\published(); 33 | get_template_part( 'template-parts/author-bio' ); 34 | ?> 35 | </footer> 36 | <section class="more-likes"> 37 | <?php 38 | Output\other_likes(); 39 | echo '<p>Back to <a href="' . get_post_type_archive_link( 'like' ) . '">all likes</a>.</p>'; 40 | ?> 41 | </section> 42 | <?php endif; ?> 43 | <?php 44 | // If comments are open or there is at least one comment, load up the comment template. 45 | if ( is_singular( 'like' ) && ( comments_open() || get_comments_number() ) ) { 46 | comments_template(); // Outputs its own <section>. 47 | } 48 | ?> 49 | </article> 50 | -------------------------------------------------------------------------------- /template-parts/content/card-page.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * Template part for displaying page content. 4 | * 5 | * @package writemore 6 | */ 7 | 8 | ?> 9 | 10 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 | <?php 12 | if ( ! is_front_page() ) { 13 | ?> 14 | <header> 15 | <?php the_title( '<h1 class="p-name">', '</h1>' ); ?> 16 | <?php the_post_thumbnail(); ?> 17 | </header> 18 | <div class="entry-content e-content"> 19 | <?php the_content(); ?> 20 | </div><!-- .entry-content --> 21 | <?php 22 | } else { 23 | the_content(); 24 | } 25 | ?> 26 | 27 | <footer class="entry-footer"> 28 | <?php get_template_part( 'template-parts/author-bio' ); ?> 29 | </footer><!-- .entry-footer --> 30 | 31 | </article><!-- #post-<?php the_ID(); ?> --> 32 | -------------------------------------------------------------------------------- /template-parts/content/card-post.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * Template part for displaying posts 4 | * 5 | * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 6 | * 7 | * @package writemore 8 | */ 9 | 10 | use Writemore\Output; 11 | 12 | ?> 13 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 14 | 15 | <header> 16 | <?php 17 | if ( is_singular() ) { 18 | the_title( '<h1 class="p-name">', '</h1>' ); 19 | } else { 20 | the_title( '<h1><a href="' . get_the_permalink() . '" class="p-name">', '</a></h1>' ); 21 | } 22 | 23 | the_post_thumbnail(); 24 | ?> 25 | </header> 26 | 27 | <?php if ( ! is_singular( 'post' ) ) : ?> 28 | <?php Output\published(); ?> 29 | <?php else : ?> 30 | <?php Output\published( 'full' ); ?> 31 | <?php endif; ?> 32 | 33 | <div class="entry-content e-content"> 34 | <?php 35 | if ( ! is_singular( 'post' ) ) { 36 | Output\excerpt(); 37 | } else { 38 | the_content(); 39 | } 40 | ?> 41 | </div> 42 | 43 | <?php if ( is_singular( 'post' ) ) : ?> 44 | <footer class="entry-footer"> 45 | <?php 46 | Output\published(); 47 | 48 | if ( has_tag( 'weeknotes' ) ) { 49 | ?> 50 | <section class="other-weeks"> 51 | <?php Output\this_week_in(); ?> 52 | </section> 53 | <?php 54 | } 55 | 56 | get_template_part( 'template-parts/author-bio' ); 57 | ?> 58 | </footer> 59 | <?php 60 | // If comments are open or there is at least one comment, load up the comment template. 61 | if ( comments_open() || get_comments_number() ) { 62 | comments_template(); // Outputs its own <section>. 63 | } 64 | ?> 65 | <?php endif; ?> 66 | 67 | </article><!-- #post-<?php the_ID(); ?> --> 68 | -------------------------------------------------------------------------------- /template-parts/content/card-shortnote.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * Template part for displaying posts 4 | * 5 | * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 6 | * 7 | * @package writemore 8 | */ 9 | 10 | use Writemore\Output; 11 | use ShortNotes\PostType\Note; 12 | 13 | ?> 14 | 15 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 16 | 17 | <?php if ( is_singular( 'shortnote' ) ) : ?> 18 | <header> 19 | <h1>Note</h1> 20 | </header> 21 | <?php endif; ?> 22 | 23 | <?php if ( ! is_singular( 'shortnote' ) ) : ?> 24 | <?php Output\published(); ?> 25 | <?php endif; ?> 26 | 27 | <?php if ( function_exists( 'Note\reply_to_markup' ) ) : ?> 28 | <?php Note\reply_to_markup(); ?> 29 | <?php endif; ?> 30 | 31 | <div class="entry-content e-content"> 32 | <?php the_content(); ?> 33 | </div> 34 | 35 | <?php if ( is_singular( 'shortnote' ) ) : ?> 36 | <footer class="entry-footer"> 37 | <?php 38 | Output\published(); 39 | get_template_part( 'template-parts/author-bio' ); 40 | ?> 41 | </footer> 42 | <section class="more-notes"> 43 | <?php 44 | Output\other_notes(); 45 | echo '<p>Back to <a href="' . get_post_type_archive_link( 'shortnote' ) . '">all notes</a>.</p>'; 46 | ?> 47 | </section> 48 | <?php endif; ?> 49 | 50 | <?php 51 | // If comments are open or there is at least one comment, load up the comment template. 52 | if ( is_singular( 'shortnote' ) && ( comments_open() || get_comments_number() ) ) { 53 | comments_template(); // Outputs its own <section>. 54 | } 55 | ?> 56 | </article> 57 | -------------------------------------------------------------------------------- /templates/webmention-comment-form.php: -------------------------------------------------------------------------------- 1 | <form id="webmention-form" action="<?php echo get_webmention_endpoint(); ?>" method="post"> 2 | <p> 3 | <label for="webmention-source">If you've written a response on your own site, you can enter that post's URL to 4 | reply with a Webmention.</label> 5 | </p> 6 | <p> 7 | <input id="webmention-source" type="url" autocomplete="url" name="source" placeholder="<?php esc_attr_e( 'URL of your post', 'writemore' ); ?>" /> 8 | <input id="webmention-submit" type="submit" name="submit" value="<?php esc_attr_e( 'Send Webmention', 'writemore' ); ?>" /> 9 | </p> 10 | <input id="webmention-format" type="hidden" name="format" value="html" /> 11 | <input id="webmention-target" type="hidden" name="target" value="<?php the_permalink(); ?>" /> 12 | </form> 13 | <p>The only requirement for your mention to be recognized is a link to this post in your post's 14 | content. You can update or delete your post and then re-submit the URL in the form to update or remove your response from this page.</p> 15 | <p><a href="https://indieweb.org/Webmention">Learn more about Webmentions</a>.</p> 16 | --------------------------------------------------------------------------------