├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── acf ├── developer-settings.json ├── image-meta.json ├── proxy-settings.json └── site-options.json ├── blocks ├── README.md └── credit │ ├── block.css │ └── block.php ├── css ├── admin.css └── login.css ├── favicon.png ├── footer.php ├── functions.php ├── functions ├── acf-functions.php ├── class-cookiemanager.php ├── class-cookiemanagersettings.php ├── deprecated.php ├── developer-role.php ├── gutenberg-functions.php ├── plugin-manifest.php ├── proxy.php ├── svg.php ├── theme-config.php ├── widgets.php └── wp-functions.php ├── header.php ├── images └── logo-funkhaus.svg ├── index.php ├── js └── admin.js ├── libs └── class-tgm-plugin-activation.php ├── phpcs.xml.dist ├── screenshot.png └── style.css /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | phpcs.xml 5 | 6 | # file system junk 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 4, 3 | "semi": false, 4 | "singleQuote": true, 5 | "useTabs": false 6 | } 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fuxt-backend 2 | 3 | A low-code/no-code theme that turns WordPress into a true GraphQL powered Headless CMS. Optimized for the [fuxt frontend boilerplate](https://github.com/funkhaus/fuxt). 4 | 5 | Built by [Funkhaus](http://funkhaus.us/). 6 | 7 | ## Install 8 | 9 | 1. Where are you hosting WordPress? We recommend [Flywheel](https://share.getf.ly/n02x5z). 10 | 1. Install theme 11 | 1. Install required plugins (as prompted) 12 | 1. If you want to use ACF, there are some default fields we recommend, you can find the file to import from the theme directory `/acf/` or [here](https://github.com/funkhaus/fuxt-backend/tree/master/acf). 13 | 1. Re-save Permalinks 14 | 1. If using ACF, it is strongly recommended to import the ACF fields in the `.json` file from `/acf/` directory. 15 | 16 | ## Setting up WordPress Coding Standards in VS Code 17 | 18 | 1. Install [PHP CodeSniffer (PHPCS)](https://github.com/squizlabs/PHP_CodeSniffer#installation) 19 | ``` 20 | composer global require "squizlabs/php_codesniffer=*" 21 | ``` 22 | PHPCS is a development tool that detects violations of coding standard and automatically corrects them. Do note that PHP 5.4 or greater is required. 23 | 2. Download [WPCS](https://github.com/WordPress/WordPress-Coding-Standards) 24 | ``` 25 | git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git wpcs 26 | ``` 27 | `cd` to your desired directory and run the above command in your terminal. This will download WPCS into a folder called `wpcs`. 28 | 3. Add WPCS to PHPCS 29 | ``` 30 | /path/to/composer/vendor/bin/phpcs --config-set installed_paths /path/to/WPCS, /path/to/another-standards 31 | ``` 32 | Now that we have WPCS and PHPCS in our system, we can run the above command and the latter know where our coding standard is located. 33 | 34 | If you are getting the `command not found: phpcs message`, ensure that your path to PHPCS is correct. Since we installed it globally, the path should be something like `/users/your_user_name/.composer/vendor/bin/phpcs` 35 | 36 | Also, do note that the `installed_paths` command overwrites any previously set installed_paths. If you have existing coding standards, please remember to include their paths together with whatever coding standards you are adding separated by a comma. 37 | 4. Check to ensure WPCS is added. 38 | ``` 39 | /path/to/composer/vendor/bin/phpcs -i 40 | ``` 41 | If WPCS is added correctly, we should see the following output: 42 | ``` 43 | The installed coding standards are PEAR, Zend, PSR2, MySource, Squiz, PSR1, PSR12, WordPress, WordPress-Extra, WordPress-Docs and WordPress-Core 44 | ``` 45 | 5. Configureing VSCode 46 | 1. Install **phpcs** and **phpcbf** extensions in VSCode. 47 | The **phpcs** extension enables linting for all PHP files in our editor while **phpcbf** will try to beautify and fix our code according to the chosen coding standard. 48 | 2. Configure **settings.json** 49 | Once those two are installed, open up the editor settings under **Code > Preferences > Settings**. Toggle to the JSON view and add the following values: 50 | Save the settings.json and restart VSCode. 51 | ``` 52 | "phpcs.enable": true, 53 | "phpcs.executablePath": "/path/to/composer/vendor/bin/phpcs", 54 | "phpcs.standard": "WordPress" 55 | "phpcbf.enable": true, 56 | "phpcbf.documentFormattingProvider": true, 57 | "phpcbf.onsave": true, 58 | "phpcbf.executablePath": "/path/to/composer/vendor/bin/phpcbf", 59 | "phpcbf.standard": "WordPress", 60 | ``` 61 | 6. Test! 62 | If everything is configured correctly, VSCode should start linting your PHP. Since we configured `phpcbf.onsave: true`, VSCode should auto fix some issues when we save the file. 63 | Or we can format the file manually by `right click > Format Document`. 64 | 7. Additional resources for VSCode + PHPCS + WPCS configuration 65 | https://www.edmundcwm.com/setting-up-wordpress-coding-standards-in-vs-code/ 66 | https://github.com/tommcfarlin/phpcs-wpcs-vscode 67 | 68 | 69 | ## More 70 | 71 | Please see the documentation for [Fuxt](https://github.com/funkhaus/fuxt) to better understand what this theme can do! 72 | 73 | ## TODO 74 | 75 | - Document the plugins that get auto-installed 76 | -------------------------------------------------------------------------------- /acf/developer-settings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "group_5cae81a34f41b", 4 | "title": "Developer Settings", 5 | "fields": [ 6 | { 7 | "key": "field_5cae81f90d654", 8 | "label": "Prevent non-developer deletion", 9 | "name": "prevent_deletion", 10 | "type": "true_false", 11 | "instructions": "This prevents this page from being deleted by a non-developer user. It also locks the slug from being changed.", 12 | "required": 0, 13 | "conditional_logic": 0, 14 | "wrapper": { 15 | "width": "", 16 | "class": "", 17 | "id": "" 18 | }, 19 | "show_in_graphql": 1, 20 | "message": "", 21 | "default_value": 0, 22 | "ui": 1, 23 | "ui_on_text": "", 24 | "ui_off_text": "" 25 | } 26 | ], 27 | "location": [ 28 | [ 29 | { 30 | "param": "post_type", 31 | "operator": "==", 32 | "value": "page" 33 | }, 34 | { 35 | "param": "current_user_role", 36 | "operator": "==", 37 | "value": "developer" 38 | } 39 | ] 40 | ], 41 | "menu_order": 10, 42 | "position": "normal", 43 | "style": "default", 44 | "label_placement": "top", 45 | "instruction_placement": "field", 46 | "hide_on_screen": "", 47 | "active": true, 48 | "description": "", 49 | "show_in_rest": 0, 50 | "show_in_graphql": 0, 51 | "graphql_field_name": "acfDeveloperSettings", 52 | "map_graphql_types_from_location_rules": 0, 53 | "graphql_types": "" 54 | } 55 | ] 56 | -------------------------------------------------------------------------------- /acf/image-meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "group_5cccac8d93cd4", 3 | "title": "Image Meta", 4 | "fields": [ 5 | { 6 | "key": "field_5cccac9d781a1", 7 | "label": "Video URL", 8 | "name": "video_url", 9 | "type": "url", 10 | "instructions": "", 11 | "required": 0, 12 | "conditional_logic": 0, 13 | "wrapper": { 14 | "width": "", 15 | "class": "", 16 | "id": "" 17 | }, 18 | "show_in_graphql": 1, 19 | "default_value": "", 20 | "placeholder": "" 21 | }, 22 | { 23 | "key": "field_5cccacb8781a2", 24 | "label": "Primary Color", 25 | "name": "primary_color", 26 | "type": "color_picker", 27 | "instructions": "", 28 | "required": 0, 29 | "conditional_logic": 0, 30 | "wrapper": { 31 | "width": "", 32 | "class": "", 33 | "id": "" 34 | }, 35 | "show_in_graphql": 1, 36 | "default_value": "" 37 | }, 38 | { 39 | "key": "field_5d8eabc56cc17", 40 | "label": "Focal Point X", 41 | "name": "focal_point_x", 42 | "type": "number", 43 | "instructions": "Horizontal coordinate", 44 | "required": 0, 45 | "conditional_logic": 0, 46 | "wrapper": { 47 | "width": "", 48 | "class": "focal-point", 49 | "id": "focal-point-x" 50 | }, 51 | "show_in_graphql": 1, 52 | "default_value": "", 53 | "placeholder": "", 54 | "prepend": "%", 55 | "append": "", 56 | "min": 0, 57 | "max": 100, 58 | "step": "" 59 | }, 60 | { 61 | "key": "field_5d8eac216cc19", 62 | "label": "Focal Point Y", 63 | "name": "focal_point_y", 64 | "type": "number", 65 | "instructions": "Vertical coordinate", 66 | "required": 0, 67 | "conditional_logic": 0, 68 | "wrapper": { 69 | "width": "", 70 | "class": "focal-point", 71 | "id": "focal-point-y" 72 | }, 73 | "show_in_graphql": 1, 74 | "default_value": "", 75 | "placeholder": "", 76 | "prepend": "%", 77 | "append": "", 78 | "min": 0, 79 | "max": 100, 80 | "step": "" 81 | }, 82 | { 83 | "key": "field_609539db9248d", 84 | "label": "Blurhash", 85 | "name": "blurhash", 86 | "type": "text", 87 | "instructions": "", 88 | "required": 0, 89 | "conditional_logic": 0, 90 | "wrapper": { 91 | "width": "", 92 | "class": "", 93 | "id": "" 94 | }, 95 | "show_in_graphql": 1, 96 | "default_value": "", 97 | "placeholder": "", 98 | "prepend": "", 99 | "append": "", 100 | "maxlength": "" 101 | } 102 | ], 103 | "location": [ 104 | [ 105 | { 106 | "param": "attachment", 107 | "operator": "==", 108 | "value": "image" 109 | } 110 | ] 111 | ], 112 | "menu_order": 0, 113 | "position": "normal", 114 | "style": "default", 115 | "label_placement": "top", 116 | "instruction_placement": "label", 117 | "hide_on_screen": "", 118 | "active": true, 119 | "description": "", 120 | "show_in_graphql": 1, 121 | "graphql_field_name": "imageMeta" 122 | } 123 | -------------------------------------------------------------------------------- /acf/proxy-settings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "group_6466cc3ca925a", 4 | "title": "Proxy Settings", 5 | "fields": [ 6 | { 7 | "key": "field_6466cc3df4887", 8 | "label": "Providers", 9 | "name": "providers", 10 | "aria-label": "", 11 | "type": "repeater", 12 | "instructions": "Enter details for the services you wish to proxy.", 13 | "required": 0, 14 | "conditional_logic": 0, 15 | "wrapper": { 16 | "width": "", 17 | "class": "", 18 | "id": "" 19 | }, 20 | "show_in_graphql": 1, 21 | "layout": "row", 22 | "pagination": 0, 23 | "min": 0, 24 | "max": 0, 25 | "collapsed": "", 26 | "button_label": "Add Provider", 27 | "rows_per_page": 20, 28 | "sub_fields": [ 29 | { 30 | "key": "field_6466cc64f4888", 31 | "label": "Name", 32 | "name": "name", 33 | "aria-label": "", 34 | "type": "text", 35 | "instructions": "The name of the provider. Used in frontend code for reference.", 36 | "required": 0, 37 | "conditional_logic": 0, 38 | "wrapper": { 39 | "width": "", 40 | "class": "", 41 | "id": "" 42 | }, 43 | "show_in_graphql": 1, 44 | "default_value": "", 45 | "maxlength": "", 46 | "placeholder": "", 47 | "prepend": "", 48 | "append": "", 49 | "parent_repeater": "field_6466cc3df4887" 50 | }, 51 | { 52 | "key": "field_6466cc6af4889", 53 | "label": "Base URL", 54 | "name": "base_url", 55 | "aria-label": "", 56 | "type": "url", 57 | "instructions": "The base URL of the API you are trying to proxy. Tip: leave off the trailing slash.", 58 | "required": 0, 59 | "conditional_logic": 0, 60 | "wrapper": { 61 | "width": "", 62 | "class": "", 63 | "id": "" 64 | }, 65 | "show_in_graphql": 1, 66 | "default_value": "", 67 | "placeholder": "", 68 | "parent_repeater": "field_6466cc3df4887" 69 | }, 70 | { 71 | "key": "field_6466cc74f488a", 72 | "label": "Authorization header", 73 | "name": "authorization_header", 74 | "aria-label": "", 75 | "type": "text", 76 | "instructions": "The HTTP Authorization header to add to the request. Often this will be of the format `Bearer xxxxxxxxx`", 77 | "required": 0, 78 | "conditional_logic": 0, 79 | "wrapper": { 80 | "width": "", 81 | "class": "", 82 | "id": "" 83 | }, 84 | "show_in_graphql": 1, 85 | "default_value": "", 86 | "maxlength": "", 87 | "placeholder": "", 88 | "prepend": "", 89 | "append": "", 90 | "parent_repeater": "field_6466cc3df4887" 91 | } 92 | ] 93 | }, 94 | { 95 | "key": "field_6466ccb3f488b", 96 | "label": "Domain restricted", 97 | "name": "domain_restricted", 98 | "aria-label": "", 99 | "type": "true_false", 100 | "instructions": "When true, only frontend requests from the Site and WordPress URLs will be allowed. When false, requests from all domains will be allowed. This is a security issue, so only have this false during when testing from localhost.", 101 | "required": 0, 102 | "conditional_logic": 0, 103 | "wrapper": { 104 | "width": "", 105 | "class": "", 106 | "id": "" 107 | }, 108 | "show_in_graphql": 1, 109 | "message": "Restrict access to the Site Address and WordPress Address", 110 | "default_value": 1, 111 | "ui_on_text": "", 112 | "ui_off_text": "", 113 | "ui": 1 114 | } 115 | ], 116 | "location": [ 117 | [ 118 | { 119 | "param": "options_page", 120 | "operator": "==", 121 | "value": "proxy-settings" 122 | } 123 | ] 124 | ], 125 | "menu_order": 0, 126 | "position": "normal", 127 | "style": "default", 128 | "label_placement": "top", 129 | "instruction_placement": "label", 130 | "hide_on_screen": "", 131 | "active": true, 132 | "description": "", 133 | "show_in_rest": 0, 134 | "show_in_graphql": 0, 135 | "graphql_field_name": "proxySettings", 136 | "map_graphql_types_from_location_rules": 0, 137 | "graphql_types": "" 138 | } 139 | ] -------------------------------------------------------------------------------- /acf/site-options.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "group_5e4da96a17fe9", 4 | "title": "Site Options", 5 | "fields": [ 6 | { 7 | "key": "field_5e4dbc3d5b0a8", 8 | "label": "Google Analytics", 9 | "name": "google_analytics", 10 | "type": "repeater", 11 | "instructions": "Enter Google Analytics tracking codes. Uses the gtag.js tracking method.", 12 | "required": 0, 13 | "conditional_logic": 0, 14 | "wrapper": { 15 | "width": "", 16 | "class": "", 17 | "id": "" 18 | }, 19 | "show_in_graphql": 1, 20 | "collapsed": "", 21 | "min": 0, 22 | "max": 0, 23 | "layout": "table", 24 | "button_label": "Add Tracking Code", 25 | "sub_fields": [ 26 | { 27 | "key": "field_5e4dbc465b0a9", 28 | "label": "Code", 29 | "name": "code", 30 | "type": "text", 31 | "instructions": "", 32 | "required": 0, 33 | "conditional_logic": 0, 34 | "wrapper": { 35 | "width": "", 36 | "class": "", 37 | "id": "" 38 | }, 39 | "show_in_graphql": 1, 40 | "default_value": "", 41 | "placeholder": "UA-12345678-1", 42 | "prepend": "", 43 | "append": "", 44 | "maxlength": "" 45 | } 46 | ] 47 | }, 48 | { 49 | "key": "field_5e4da982da90c", 50 | "label": "Social media", 51 | "name": "social_media", 52 | "type": "repeater", 53 | "instructions": "", 54 | "required": 0, 55 | "conditional_logic": 0, 56 | "wrapper": { 57 | "width": "", 58 | "class": "", 59 | "id": "" 60 | }, 61 | "show_in_graphql": 1, 62 | "collapsed": "", 63 | "min": 0, 64 | "max": 0, 65 | "layout": "table", 66 | "button_label": "Add Social Media", 67 | "sub_fields": [ 68 | { 69 | "key": "field_5e4daaed308b6", 70 | "label": "Platform", 71 | "name": "platform", 72 | "type": "text", 73 | "instructions": "", 74 | "required": 0, 75 | "conditional_logic": 0, 76 | "wrapper": { 77 | "width": "", 78 | "class": "", 79 | "id": "" 80 | }, 81 | "show_in_graphql": 1, 82 | "default_value": "", 83 | "placeholder": "Instagram", 84 | "prepend": "", 85 | "append": "", 86 | "maxlength": "" 87 | }, 88 | { 89 | "key": "field_5e4dc3ebb6ba8", 90 | "label": "Url", 91 | "name": "url", 92 | "type": "url", 93 | "instructions": "", 94 | "required": 0, 95 | "conditional_logic": 0, 96 | "wrapper": { 97 | "width": "", 98 | "class": "", 99 | "id": "" 100 | }, 101 | "show_in_graphql": 1, 102 | "default_value": "", 103 | "placeholder": "https://www.instagram.com/funkhaus/" 104 | } 105 | ] 106 | }, 107 | { 108 | "key": "field_622ab9158ac0d", 109 | "label": "Social shared image", 110 | "name": "social_shared_image", 111 | "type": "image", 112 | "instructions": "This image is used when people share the site on social media, unless a more relevant image is found. The ideal size for this image is 1200px wide by 630px high.", 113 | "required": 0, 114 | "conditional_logic": 0, 115 | "wrapper": { 116 | "width": "", 117 | "class": "", 118 | "id": "" 119 | }, 120 | "show_in_graphql": 1, 121 | "return_format": "id", 122 | "preview_size": "social-preview", 123 | "library": "all", 124 | "min_width": "", 125 | "min_height": "", 126 | "min_size": "", 127 | "max_width": "", 128 | "max_height": "", 129 | "max_size": "", 130 | "mime_types": "" 131 | } 132 | ], 133 | "location": [ 134 | [ 135 | { 136 | "param": "options_page", 137 | "operator": "==", 138 | "value": "site-options" 139 | } 140 | ] 141 | ], 142 | "menu_order": 0, 143 | "position": "normal", 144 | "style": "default", 145 | "label_placement": "top", 146 | "instruction_placement": "label", 147 | "hide_on_screen": "", 148 | "active": true, 149 | "description": "", 150 | "show_in_rest": 0, 151 | "show_in_graphql": 1, 152 | "graphql_field_name": "siteOptionsMeta", 153 | "map_graphql_types_from_location_rules": 0, 154 | "graphql_types": "" 155 | } 156 | ] 157 | -------------------------------------------------------------------------------- /blocks/README.md: -------------------------------------------------------------------------------- 1 | # ACF Custom Blocks 2 | 3 | https://www.advancedcustomfields.com/resources/blocks/ 4 | 5 | 1. Register Block in /blocks/register-blocks.php 6 | 1. Be sure to set a good icon. 7 | 8 | 1. Create ACF field group, set location as Form > Block. Be sure to select "Show in GraphQL". You don't need to se the GraphQL types manually. The default works. 9 | 1. Verify that new component is available in the editor (note you may need to clear site cache) 10 | 1. Create backend PHP template and styles 11 | 1. in /blocks/ dir add new dir for block (eg "/block/slideshow") 12 | 1. add template to `/block/slideshow/block.php` 13 | 1. add styles to `/block/slideshow/block.css` 14 | 1. Import Component to the WpContent.vue file for lazy loading 15 | 1. Build frontend Vue template in `/components/wp-block` 16 | -------------------------------------------------------------------------------- /blocks/credit/block.css: -------------------------------------------------------------------------------- 1 | .block-credit { 2 | 3 | } 4 | .block-credit .name { 5 | font-size: 20px; 6 | line-height: 1.25; 7 | margin: 15px 0; 8 | } 9 | .block-credit .title { 10 | margin-top: -0.5em; 11 | margin-bottom: 30px; 12 | } -------------------------------------------------------------------------------- /blocks/credit/block.php: -------------------------------------------------------------------------------- 1 | 17 |
18 | 19 | 20 |

21 | 22 |

23 | 24 | 25 | 26 |

27 | 28 |

29 | 30 | 31 | 32 |

33 | Empty credit block 34 |

35 | 36 | 37 |
38 | -------------------------------------------------------------------------------- /css/admin.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Style Admin Dashboard 3 | */ 4 | 5 | /* 6 | * Logo Icon 7 | */ 8 | #wpwrap #wpadminbar #wp-admin-bar-wp-logo > .ab-item { 9 | background-image: url(../favicon.png); 10 | background-position: center center; 11 | background-repeat: no-repeat; 12 | background-size: 26px auto; 13 | background-color: #ffffff; 14 | } 15 | #wpwrap #wpadminbar #wp-admin-bar-wp-logo > .ab-item span { 16 | visibility: hidden; 17 | } 18 | 19 | /* 20 | * Hide admin functions 21 | */ 22 | body:not(.is-developer) #toplevel_page_edit-post_type-acf-field-group { 23 | display: none; 24 | } 25 | body.post-php.is-developer-locked:not(.is-developer) #edit-slug-buttons { 26 | display: none; 27 | } 28 | body:not(.is-developer) #toplevel_page_wp-openapi, 29 | body:not(.is-developer) #adminmenu #toplevel_page_proxy-settings { 30 | display: none; 31 | } 32 | 33 | /* Turn off preview links */ 34 | body.post-new-php.no-slug #preview-action, 35 | body.post-php.no-slug #preview-action { 36 | display: none; 37 | } 38 | #wpbody-content a.np-view-button[href*='/?'] { 39 | display: none; 40 | } 41 | 42 | #menu-comments { 43 | display: none; 44 | } 45 | -------------------------------------------------------------------------------- /css/login.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Style login page 3 | */ 4 | 5 | /* 6 | * Globals 7 | */ 8 | :root { 9 | /* Body */ 10 | --body-bg-color: #fff; 11 | 12 | --text-color: #000; 13 | --text-color-hover: #000; 14 | 15 | /* Form */ 16 | --form-bg-color: #fff; 17 | --form-border-color: #fff; 18 | 19 | /* Input fields */ 20 | --input-bg-color: #fff; 21 | --input-text-color: #000; 22 | --input-border-color: #000; 23 | 24 | /* Submit button */ 25 | --button-bg-color: #ffffff; 26 | --button-bg-color-hover: #000; 27 | 28 | --button-text-color: #000; 29 | --button-text-color-hover: #ffffff; 30 | 31 | --button-border-color: #000; 32 | --button-border-color-hover: #000; 33 | } 34 | html { 35 | background: var(--body-bg-color); 36 | } 37 | body.login { 38 | font-size: 14px; 39 | background: var(--body-bg-color); 40 | line-height: 1.4; 41 | padding: 0; 42 | margin: 0; 43 | border: none; 44 | width: 100%; 45 | } 46 | a { 47 | outline: none; 48 | } 49 | 50 | /* 51 | * Login Banner Image 52 | */ 53 | #login h1 a { 54 | background-image: url(../images/logo.svg); 55 | background-position: center center; 56 | margin: 0; 57 | background-size: auto; 58 | width: auto; 59 | } 60 | 61 | /* 62 | * Login Form 63 | */ 64 | #loginform { 65 | box-shadow: none; 66 | background: var(--form-bg-color); 67 | border-color: var(--form-border-color); 68 | } 69 | #loginform label { 70 | color: var(--text-color); 71 | } 72 | #loginform input[type='text'], 73 | #loginform input[type='password'] { 74 | background: var(--input-bg-color); 75 | border: 1px solid var(--input-border-color); 76 | font-family: inherit; 77 | padding: 5px 8px; 78 | box-sizing: border-box; 79 | color: var(--input-text-color); 80 | } 81 | #loginform input[type='checkbox'], 82 | #loginform input[type='radio'] { 83 | vertical-align: baseline; 84 | } 85 | 86 | /* 87 | * Login Submit Button 88 | */ 89 | #wp-submit { 90 | background: var(--button-bg-color); 91 | color: var(--button-text-color); 92 | border: none; 93 | text-shadow: none; 94 | box-shadow: none; 95 | text-transform: uppercase; 96 | border: 2px solid var(--button-border-color); 97 | height: initial; 98 | padding-top: 2px; 99 | transition: all 0.4s; 100 | } 101 | #wp-submit:hover, 102 | #wp-submit:focus { 103 | background: var(--button-bg-color-hover); 104 | color: var(--button-text-color-hover); 105 | border: 2px solid var(--button-border-color-hover); 106 | } 107 | 108 | /* 109 | * "Lost password" link 110 | */ 111 | #nav { 112 | text-shadow: none; 113 | } 114 | .login #nav a { 115 | text-decoration: none; 116 | padding: 0 1px; 117 | text-shadow: none; 118 | color: var(--text-color); 119 | text-decoration: underline; 120 | } 121 | .login #nav a:hover, 122 | .login #nav a:focus { 123 | color: var(--text-color-hover) !important; 124 | font-weight: normal; 125 | text-shadow: none; 126 | } 127 | 128 | /* 129 | * "Back to blog" link header 130 | */ 131 | #backtoblog { 132 | display: none; 133 | } 134 | 135 | /* 136 | * Error messages 137 | */ 138 | .login .message, 139 | .login #login_error { 140 | background-color: var(--body-bg-color); 141 | color: var(--text-color); 142 | } 143 | .login #login_error a { 144 | color: var(--text-color); 145 | } 146 | .login #login_error a:hover, 147 | .login #login_error a:focus { 148 | color: var(--text-color-hover); 149 | } 150 | -------------------------------------------------------------------------------- /favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funkhaus/fuxt-backend/7309b3565948708b0bca9da849f26f1b87c99424/favicon.png -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | get( 'Version' ) ); 9 | 10 | /** 11 | * Load all modules. 12 | */ 13 | require_once get_template_directory() . '/functions/wp-functions.php'; 14 | require_once get_template_directory() . '/functions/theme-config.php'; 15 | require_once get_template_directory() . '/functions/gutenberg-functions.php'; 16 | require_once get_template_directory() . '/functions/acf-functions.php'; 17 | require_once get_template_directory() . '/functions/class-cookiemanager.php'; 18 | require_once get_template_directory() . '/functions/class-cookiemanagersettings.php'; 19 | require_once get_template_directory() . '/functions/plugin-manifest.php'; 20 | require_once get_template_directory() . '/functions/developer-role.php'; 21 | require_once get_template_directory() . '/functions/widgets.php'; 22 | require_once get_template_directory() . '/functions/svg.php'; 23 | require_once get_template_directory() . '/functions/proxy.php'; -------------------------------------------------------------------------------- /functions/acf-functions.php: -------------------------------------------------------------------------------- 1 | post_is_tree, array( $this, 'tree_location_rules_values' ), 10, 2 ); 81 | add_filter( 'acf/location/rule_values/' . $this->page_is_tree, array( $this, 'tree_location_rules_values' ), 10, 2 ); 82 | 83 | add_filter( 'acf/location/rule_match/' . $this->post_is_tree, array( $this, 'tree_location_rule_match' ), 10, 3 ); 84 | add_filter( 'acf/location/rule_match/' . $this->page_is_tree, array( $this, 'tree_location_rule_match' ), 10, 3 ); 85 | 86 | // Adds custom location rule types for post and page has children. 87 | add_filter( 'acf/location/rule_values/' . $this->post_has_child, array( $this, 'has_child_location_rules_values' ), 10, 2 ); 88 | add_filter( 'acf/location/rule_values/' . $this->page_has_child, array( $this, 'has_child_location_rules_values' ), 10, 2 ); 89 | 90 | add_filter( 'acf/location/rule_match/' . $this->post_has_child, array( $this, 'has_child_location_rule_match' ), 10, 3 ); 91 | add_filter( 'acf/location/rule_match/' . $this->page_has_child, array( $this, 'has_child_location_rule_match' ), 10, 3 ); 92 | 93 | // Adds custom location rule types. 94 | add_filter( 'acf/location/rule_values', array( $this, 'cpt_location_rule_values' ), 10, 2 ); 95 | add_filter( 'acf/location/rule_match', array( $this, 'cpt_location_rule_match' ), 10, 4 ); 96 | 97 | add_filter( 'acf/fields/relationship/result', array( $this, 'acf_fields_relationship_result' ), 10, 2 ); 98 | 99 | add_filter( 'acf/location/rule_values/page_parent', array( $this, 'page_location_rule_values_no_parent' ), 10, 2 ); 100 | add_filter( 'acf/location/rule_match/page_parent', array( $this, 'page_location_rule_match_no_parent' ), 4, 3 ); 101 | 102 | add_filter( 'acf/post_type/registration_args', array( $this, 'enable_graphql_for_cpts' ), 10, 2 ); 103 | add_filter( 'acf/taxonomy/registration_args', array( $this, 'enable_graphql_for_taxonomies' ), 10, 2 ); 104 | 105 | add_filter( 'acf/post_type/additional_settings_tabs', array( $this, 'add_graphql_settings_tab' ) ); 106 | add_filter( 'acf/taxonomy/additional_settings_tabs', array( $this, 'add_graphql_settings_tab' ) ); 107 | 108 | add_action( 'acf/post_type/render_settings_tab/graphql', array( $this, 'add_graphql_acf_toggle_cpt' ), 10, 1 ); 109 | add_action( 'acf/taxonomy/render_settings_tab/graphql', array( $this, 'add_graphql_acf_toggle_taxonomy' ), 10, 1 ); 110 | } 111 | 112 | /** 113 | * Add custom site options panel. 114 | * 115 | * @return void 116 | */ 117 | public function add_options() { 118 | if ( $this->has_field_group( 'Site Options' ) && function_exists( 'acf_add_options_page' ) ) : 119 | acf_add_options_page( 120 | array( 121 | 'page_title' => 'Site Options', 122 | 'menu_title' => 'Site Options', 123 | 'menu_slug' => 'site-options', 124 | 'capability' => 'edit_posts', 125 | 'redirect' => false, 126 | 'show_in_graphql' => true, 127 | 'position' => '60.1', 128 | ) 129 | ); 130 | endif; 131 | 132 | if ( $this->has_field_group( 'Proxy Settings' ) && function_exists( 'acf_add_options_page' ) ) : 133 | acf_add_options_page( 134 | array( 135 | 'page_title' => 'Proxy Settings', 136 | 'menu_title' => 'Proxy Settings', 137 | 'menu_slug' => 'proxy-settings', 138 | 'capability' => 'activate_plugins', 139 | 'redirect' => false, 140 | 'show_in_graphql' => false, 141 | 'icon_url' => 'dashicons-privacy', 142 | 'position' => '80.1' 143 | ) 144 | ); 145 | endif; 146 | } 147 | 148 | /** 149 | * Check if acf group exists by title. 150 | * 151 | * @param string $title Group title. 152 | * 153 | * @return bool Returns true if exists 154 | */ 155 | private function has_field_group( $title ) { 156 | $posts = get_posts( 157 | array( 158 | 'post_type' => 'acf-field-group', 159 | 'title' => $title, 160 | ) 161 | ); 162 | 163 | return ! empty( $posts ); 164 | } 165 | 166 | /** 167 | * This adds the options on the right . 249 | * You can add more options for top level pages to test agaisnt here. 250 | * 251 | * @param array $values Rule values. 252 | * @param array $rule Rule. 253 | * 254 | * @return array 255 | */ 256 | public function has_child_location_rules_values( $values, $rule ) { 257 | return 'Has Children'; 258 | } 259 | 260 | /** 261 | * Custom ACF rule match. 262 | * 263 | * @param bool $result The match result. 264 | * @param array $rule The location rule. 265 | * @param array $screen The screen args. 266 | * 267 | * @return array 268 | */ 269 | public function has_child_location_rule_match( $result, $rule, $screen ) { 270 | 271 | $post_id = $this->get_current_post_id(); 272 | if ( is_null( $post_id ) ) { 273 | return $result; 274 | } 275 | 276 | $post_type = get_post_type( $post_id ); 277 | 278 | // Current and selected vars. 279 | $children = get_children( 280 | array( 281 | 'post_parent' => $post_id, 282 | 'post_type' => $post_type, 283 | ) 284 | ); 285 | 286 | switch ( $rule['operator'] ) { 287 | case '==': 288 | $result = ! empty( $children ); 289 | break; 290 | case '!=': 291 | $result = empty( $children ); 292 | break; 293 | } 294 | 295 | return $result; 296 | } 297 | 298 | /** 299 | * Custom ACF filter rules. 300 | * This adds the label to the first . 332 | * 333 | * @param array $values Rule values. 334 | * @param array $rule Rule. 335 | * 336 | * @return array 337 | */ 338 | public function cpt_location_rule_values( $values, $rule ) { 339 | $rule_arr = $this->parse_key( $rule['param'] ); 340 | if ( $rule_arr && in_array( $rule_arr['cpt_name'], array_column( $this->get_cpt_array(), 'name' ) ) ) { 341 | $choices = array( 342 | 0 => 'No Parent', 343 | ); 344 | 345 | // Get grouped posts. 346 | $groups = acf_get_grouped_posts( 347 | array( 348 | 'post_type' => array( $rule_arr['cpt_name'] ), 349 | ) 350 | ); 351 | 352 | // Get first group. 353 | $posts = reset( $groups ); 354 | 355 | // Append to choices. 356 | if ( $posts ) { 357 | foreach ( $posts as $post ) { 358 | $choices[ $post->ID ] = acf_get_post_title( $post ); 359 | } 360 | } 361 | return $choices; 362 | } 363 | return $values; 364 | } 365 | 366 | /** 367 | * Custom ACF rule match. 368 | * 369 | * @param bool $result The match result. 370 | * @param array $rule The location rule. 371 | * @param array $screen The screen args. 372 | * @param array $field_group The field group array. 373 | * 374 | * @return array 375 | */ 376 | public function cpt_location_rule_match( $result, $rule, $screen, $field_group ) { 377 | 378 | // Abort if no post ID. 379 | $post_id = $this->get_current_post_id(); 380 | if ( is_null( $post_id ) ) { 381 | return $result; 382 | } 383 | 384 | $post_type = get_post_type( $post_id ); 385 | 386 | $rule_arr = $this->parse_key( $rule['param'] ); 387 | 388 | if ( $rule_arr && $rule_arr['cpt_name'] === $post_type ) { 389 | switch ( $rule_arr['surfix'] ) { 390 | case $this->surfix_parent: 391 | $parent = get_post_parent( $post_id ); 392 | if ( $parent ) { 393 | return $parent->ID == $rule['value']; 394 | } else { 395 | return empty( $rule['value'] ); 396 | } 397 | case $this->surfix_tree: 398 | $ancestors = get_ancestors( $post_id, $post_type, 'post_type' ); 399 | $ancestor_id = $rule['value']; 400 | $in_tree = ( $ancestor_id == $post_id ) || in_array( $ancestor_id, $ancestors ); 401 | 402 | switch ( $rule['operator'] ) { 403 | case '==': 404 | return $in_tree; 405 | case '!=': 406 | return ! $in_tree; 407 | } 408 | return false; 409 | } 410 | } 411 | return $result; 412 | } 413 | 414 | /** 415 | * Get all custom post types excluding registered by ACF ones. 416 | * 417 | * @return array Custom post types array. 418 | * array( 'name' => String, 'label' => String, 'rules' => array() ) 419 | */ 420 | private function get_cpt_array() { 421 | // Caching the query for a better performance. 422 | if ( is_null( $this->cpt_array ) ) { 423 | $cpt_arr = get_post_types( 424 | array( 425 | '_builtin' => false, // Custom post types only. 426 | 'hierarchical' => true, // Hierarchical ones only. 427 | 'public' => true, // Exclude CPTs by ACF because those are private ones. 428 | ), 429 | 'objects' 430 | ); 431 | 432 | $this->cpt_array = array(); 433 | foreach ( $cpt_arr as $cpt ) { 434 | $this->cpt_array[] = array( 435 | 'name' => $cpt->name, 436 | 'label' => $cpt->label, 437 | 'rules' => array( 438 | 'parent' => array( 439 | 'key' => $this->get_key_parent( $cpt->name ), 440 | 'label' => $cpt->label . ' Parent', 441 | ), 442 | 'tree' => array( 443 | 'key' => $this->get_key_tree( $cpt->name ), 444 | 'label' => $cpt->label . ' belongs to tree', 445 | ), 446 | ), 447 | ); 448 | } 449 | } 450 | return $this->cpt_array; 451 | } 452 | 453 | /** 454 | * Get CPT Parent rule key name. 455 | * 456 | * @param string $cpt_name Custom post type name. 457 | * 458 | * @return string 459 | */ 460 | private function get_key_parent( $cpt_name ) { 461 | return $this->prefix . '_' . $cpt_name . '_' . $this->surfix_parent; 462 | } 463 | 464 | /** 465 | * Get CPT Is Tree rule key name. 466 | * 467 | * @param string $cpt_name Custom post type name. 468 | * 469 | * @return string 470 | */ 471 | private function get_key_tree( $cpt_name ) { 472 | return $this->prefix . '_' . $cpt_name . '_' . $this->surfix_tree; 473 | } 474 | 475 | /** 476 | * Check if key is for custom location rule by comparing key. 477 | * 478 | * @param string $key String to check if custom key. 479 | * 480 | * @return bool false|array [cpt_name, surfix] 481 | */ 482 | private function parse_key( $key ) { 483 | $arr = explode( '_', $key ); 484 | 485 | // Validate key value. 486 | if ( count( $arr ) < 3 || $arr[0] !== $this->prefix ) { 487 | return false; 488 | } 489 | 490 | // remove prefix. 491 | array_shift( $arr ); 492 | 493 | $surfix = array_pop( $arr ); 494 | $cpt_name = join( '_', $arr ); 495 | return array( 496 | 'cpt_name' => $cpt_name, 497 | 'surfix' => $surfix, 498 | ); 499 | } 500 | 501 | /** 502 | * Adds a hover state to Relationship selectors that shows the URI. 503 | * 504 | * @param string $text The text displayed for this post (the post title). 505 | * @param WP_Post $post The Relationship. 506 | * @return string 507 | */ 508 | public function acf_fields_relationship_result( $text, $post ) { 509 | $uri = get_page_uri( $post ); 510 | return '' . $text . ''; 511 | } 512 | 513 | /** 514 | * Get current post id in admin panel. Returns null if it's not a post page. 515 | * 516 | * @return int|null 517 | */ 518 | private function get_current_post_id() { 519 | global $pagenow; 520 | if ( $pagenow !== 'post.php' ) { 521 | return null; 522 | } 523 | 524 | global $post; 525 | return $post->ID; 526 | } 527 | 528 | /** 529 | * Add no parent option to page location rule. 530 | * 531 | * @param array $values Rule values. 532 | * @param array $rule Rule. 533 | * 534 | * @return array 535 | */ 536 | public function page_location_rule_values_no_parent( $values, $rule ) { 537 | $values[ PHP_INT_MAX ] = 'No Parent'; 538 | return $values; 539 | } 540 | 541 | /** 542 | * No-parent page location rule match. 543 | * 544 | * @param bool $result The match result. 545 | * @param array $rule The location rule. 546 | * @param array $screen The screen args. 547 | * 548 | * @return array 549 | */ 550 | public function page_location_rule_match_no_parent( $result, $rule, $screen ) { 551 | if ( $rule['value'] != PHP_INT_MAX ) { 552 | return $result; 553 | } 554 | 555 | if ( isset( $screen['post_id'] ) ) { 556 | $post = get_post( $screen['post_id'] ); 557 | if ( $post->post_type != 'page' ) { 558 | return false; 559 | } 560 | $page_parent = $post ? $post->post_parent : false; 561 | 562 | return empty( $page_parent ); 563 | } 564 | } 565 | 566 | /** 567 | * Enable GraphQL by default for CPTs registered with ACF. 568 | * 569 | * @param array $args Arrays to filter. 570 | * @param array $post The main ACF post type settings array. 571 | */ 572 | public function enable_graphql_for_cpts( $args, $post ) { 573 | $args['show_in_graphql'] = ! empty( $post['show_in_graphql'] ); 574 | if ( $args['show_in_graphql'] ) { 575 | $args['graphql_single_name'] = empty( $post['graphql_single_name'] ) ? $post['post_type'] : $post['graphql_single_name']; 576 | $args['graphql_plural_name'] = empty( $post['graphql_plural_name'] ) ? $post['post_type'] . 's' : $post['graphql_plural_name']; 577 | } 578 | 579 | return $args; 580 | } 581 | 582 | /** 583 | * Enable GraphQL by default for custom taxonomies registered with ACF. 584 | * 585 | * @param array $args Arrays to filter. 586 | * @param array $post The main ACF taxonomy settings array. 587 | */ 588 | public function enable_graphql_for_taxonomies( $args, $post ) { 589 | $args['show_in_graphql'] = ! empty( $post['show_in_graphql'] ); 590 | if ( $args['show_in_graphql'] ) { 591 | $args['graphql_single_name'] = empty( $post['graphql_single_name'] ) ? $post['taxonomy'] : $post['graphql_single_name']; 592 | $args['graphql_plural_name'] = empty( $post['graphql_plural_name'] ) ? $post['taxonomy'] . 's' : $post['graphql_plural_name']; 593 | } 594 | 595 | return $args; 596 | } 597 | 598 | /** 599 | * Adds graphql settings tab to acf setting. 600 | * 601 | * @param array $additional_tabs Tabs array. 602 | * @return array 603 | */ 604 | public function add_graphql_settings_tab( $additional_tabs ) { 605 | $additional_tabs['graphql'] = __( 'GraphQL', 'fuxt' ); 606 | return $additional_tabs; 607 | } 608 | 609 | 610 | /** 611 | * Adds Show in GraphQL toggle to ACF post type creation panel. 612 | * 613 | * @param array $acf_post_type Post type array data. 614 | */ 615 | public function add_graphql_acf_toggle_cpt( $acf_post_type ) { 616 | acf_render_field_wrap( 617 | array( 618 | 'type' => 'true_false', 619 | 'name' => 'show_in_graphql', 620 | 'key' => 'show_in_graphql', 621 | 'prefix' => 'acf_post_type', 622 | 'value' => empty( $acf_post_type['show_in_graphql'] ) ? 0 : $acf_post_type['show_in_graphql'], 623 | 'label' => __( 'Show In GraphQL API', 'fuxt' ), 624 | 'instructions' => __( 'Exposes this post type in the GraphQL API.', 'fuxt' ), 625 | 'default' => 0, 626 | 'ui' => true, 627 | ), 628 | 'div' 629 | ); 630 | 631 | acf_render_field_wrap( 632 | array( 633 | 'type' => 'text', 634 | 'name' => 'graphql_single_name', 635 | 'prefix' => 'acf_post_type', 636 | 'value' => isset( $acf_post_type['graphql_single_name'] ) ? $acf_post_type['graphql_single_name'] : '', 637 | 'label' => __( 'Single Name', 'fuxt' ), 638 | 'instructions' => __( 'GraphQL Single Name.', 'fuxt' ), 639 | 'defalult' => $acf_post_type['post_type'], 640 | 'placeholder' => $acf_post_type['post_type'], 641 | 'conditions' => array( 642 | 'field' => 'show_in_graphql', 643 | 'operator' => '==', 644 | 'value' => '1', 645 | ), 646 | ), 647 | 'div', 648 | 'field' 649 | ); 650 | 651 | acf_render_field_wrap( 652 | array( 653 | 'type' => 'text', 654 | 'name' => 'graphql_plural_name', 655 | 'prefix' => 'acf_post_type', 656 | 'value' => isset( $acf_post_type['graphql_plural_name'] ) ? $acf_post_type['graphql_plural_name'] : '', 657 | 'label' => __( 'Plural Name', 'fuxt' ), 658 | 'instructions' => __( 'GraphQL Plural Name.', 'fuxt' ), 659 | 'defalult' => $acf_post_type['post_type'] . 's', 660 | 'placeholder' => $acf_post_type['post_type'] . 's', 661 | 'conditions' => array( 662 | 'field' => 'show_in_graphql', 663 | 'operator' => '==', 664 | 'value' => '1', 665 | ), 666 | ), 667 | 'div', 668 | 'field' 669 | ); 670 | } 671 | 672 | /** 673 | * Adds Show in GraphQL toggle to ACF post type creation panel. 674 | * 675 | * @param array $acf_taxonomy Taxonomy array data. 676 | */ 677 | public function add_graphql_acf_toggle_taxonomy( $acf_taxonomy ) { 678 | acf_render_field_wrap( 679 | array( 680 | 'type' => 'true_false', 681 | 'name' => 'show_in_graphql', 682 | 'key' => 'show_in_graphql', 683 | 'prefix' => 'acf_taxonomy', 684 | 'value' => empty( $acf_taxonomy['show_in_graphql'] ) ? 0 : $acf_taxonomy['show_in_graphql'], 685 | 'label' => __( 'Show In GraphQL API', 'fuxt' ), 686 | 'instructions' => __( 'Exposes this taxonomy in the GraphQL API.', 'fuxt' ), 687 | 'default' => 0, 688 | 'ui' => true, 689 | ), 690 | 'div' 691 | ); 692 | 693 | acf_render_field_wrap( 694 | array( 695 | 'type' => 'text', 696 | 'name' => 'graphql_single_name', 697 | 'prefix' => 'acf_taxonomy', 698 | 'value' => isset( $acf_taxonomy['graphql_single_name'] ) ? $acf_taxonomy['graphql_single_name'] : '', 699 | 'label' => __( 'Single Name', 'fuxt' ), 700 | 'instructions' => __( 'GraphQL Single Name.', 'fuxt' ), 701 | 'defalult' => $acf_taxonomy['taxonomy'], 702 | 'placeholder' => $acf_taxonomy['taxonomy'], 703 | 'conditions' => array( 704 | 'field' => 'show_in_graphql', 705 | 'operator' => '==', 706 | 'value' => '1', 707 | ), 708 | ), 709 | 'div', 710 | 'field' 711 | ); 712 | 713 | acf_render_field_wrap( 714 | array( 715 | 'type' => 'text', 716 | 'name' => 'graphql_plural_name', 717 | 'prefix' => 'acf_taxonomy', 718 | 'value' => isset( $acf_taxonomy['graphql_plural_name'] ) ? $acf_taxonomy['graphql_plural_name'] : '', 719 | 'label' => __( 'Plural Name', 'fuxt' ), 720 | 'instructions' => __( 'GraphQL Plural Name.', 'fuxt' ), 721 | 'defalult' => $acf_taxonomy['taxonomy'] . 's', 722 | 'placeholder' => $acf_taxonomy['taxonomy'] . 's', 723 | 'conditions' => array( 724 | 'field' => 'show_in_graphql', 725 | 'operator' => '==', 726 | 'value' => '1', 727 | ), 728 | ), 729 | 'div', 730 | 'field' 731 | ); 732 | } 733 | } 734 | 735 | new Acf(); 736 | -------------------------------------------------------------------------------- /functions/class-cookiemanager.php: -------------------------------------------------------------------------------- 1 | secure = is_ssl(); 40 | $this->secure_logged_in_cookie = $this->secure && 'https' === wp_parse_url( get_option( 'home' ), PHP_URL_SCHEME ); 41 | $this->send_auth_cookies = true; 42 | 43 | add_filter( 'secure_auth_cookie', array( $this, 'secure_auth_cookie' ), PHP_INT_MAX, 1 ); 44 | add_filter( 'secure_logged_in_cookie', array( $this, 'secure_logged_in_cookie' ), PHP_INT_MAX, 1 ); 45 | add_action( 'set_auth_cookie', array( $this, 'set_auth_cookie' ), 10, 6 ); 46 | add_action( 'set_logged_in_cookie', array( $this, 'set_logged_in_cookie' ), 10, 6 ); 47 | add_filter( 'send_auth_cookies', array( $this, 'send_auth_cookies' ) ); 48 | 49 | add_action( 'clear_auth_cookie', array( $this, 'clear_auth_cookie' ) ); 50 | } 51 | 52 | /** 53 | * Init secure with site secure value. 54 | * 55 | * @param bool $secure Whether the cookie should only be sent over HTTPS. 56 | * 57 | * @return bool 58 | */ 59 | public function secure_auth_cookie( $secure ) { 60 | $this->secure = $secure; 61 | 62 | return $secure; 63 | } 64 | 65 | /** 66 | * Init $secure_logged_in_cookie with site secure value. 67 | * 68 | * @param bool $secure_logged_in_cookie Whether the logged in cookie should only be sent over HTTPS. 69 | * 70 | * @return bool 71 | */ 72 | public function secure_logged_in_cookie( $secure_logged_in_cookie ) { 73 | $this->secure_logged_in_cookie = $secure_logged_in_cookie; 74 | 75 | return $secure_logged_in_cookie; 76 | } 77 | 78 | /** 79 | * Set auth cookie. 80 | * Fires immediately before the authentication cookie is set. 81 | * 82 | * @param string $auth_cookie Authentication cookie value. 83 | * @param int $expire The time the login grace period expires as a UNIX timestamp. 84 | * Default is 12 hours past the cookie's expiration time. 85 | * @param int $expiration The time when the authentication cookie expires as a UNIX timestamp. 86 | * Default is 14 days from now. 87 | * @param int $user_id User ID. 88 | * @param string $scheme Authentication scheme. Values include 'auth' or 'secure_auth'. 89 | * @param string $token User's session token to use for this cookie. 90 | * 91 | * @return void 92 | */ 93 | public function set_auth_cookie( $auth_cookie, $expire, $expiration, $user_id, $scheme, $token ) { 94 | 95 | $same_site = CookieManagerSettings::get_samesite(); 96 | $cookie_domain = CookieManagerSettings::get_domain(); 97 | 98 | $auth_cookie_name = $this->secure ? SECURE_AUTH_COOKIE : AUTH_COOKIE; 99 | 100 | if ( version_compare( PHP_VERSION, '7.3.0' ) >= 0 ) { 101 | setcookie( 102 | $auth_cookie_name, 103 | $auth_cookie, 104 | array( 105 | 'expires' => $expire, 106 | 'path' => PLUGINS_COOKIE_PATH, 107 | 'domain' => $cookie_domain, 108 | 'secure' => $this->secure, 109 | 'httponly' => true, 110 | 'samesite' => $same_site, 111 | ) 112 | ); 113 | 114 | setcookie( 115 | $auth_cookie_name, 116 | $auth_cookie, 117 | array( 118 | 'expires' => $expire, 119 | 'path' => ADMIN_COOKIE_PATH, 120 | 'domain' => $cookie_domain, 121 | 'secure' => $this->secure, 122 | 'httponly' => true, 123 | 'samesite' => $same_site, 124 | ) 125 | ); 126 | } else { 127 | setcookie( $auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, $cookie_domain, $this->secure, true ); 128 | setcookie( $auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, $cookie_domain, $this->secure, true ); 129 | } 130 | } 131 | 132 | /** 133 | * Set logged in cookie. 134 | * Fires immediately before the logged-in authentication cookie is set. 135 | * 136 | * @param string $logged_in_cookie The logged-in cookie value. 137 | * @param int $expire The time the login grace period expires as a UNIX timestamp. 138 | * Default is 12 hours past the cookie's expiration time. 139 | * @param int $expiration The time when the logged-in authentication cookie expires as a UNIX timestamp. 140 | * Default is 14 days from now. 141 | * @param int $user_id User ID. 142 | * @param string $scheme Authentication scheme. Default 'logged_in'. 143 | * @param string $token User's session token to use for this cookie. 144 | */ 145 | public function set_logged_in_cookie( $logged_in_cookie, $expire, $expiration, $user_id, $scheme, $token ) { 146 | 147 | $same_site = CookieManagerSettings::get_samesite(); 148 | $cookie_domain = CookieManagerSettings::get_domain(); 149 | 150 | if ( version_compare( PHP_VERSION, '7.3.0' ) >= 0 ) { 151 | setcookie( 152 | LOGGED_IN_COOKIE, 153 | $logged_in_cookie, 154 | array( 155 | 'expires' => $expire, 156 | 'path' => COOKIEPATH, 157 | 'domain' => $cookie_domain, 158 | 'secure' => $this->secure_logged_in_cookie, 159 | 'httponly' => true, 160 | 'samesite' => $same_site, 161 | ) 162 | ); 163 | 164 | if ( COOKIEPATH != SITECOOKIEPATH ) { 165 | setcookie( 166 | LOGGED_IN_COOKIE, 167 | $logged_in_cookie, 168 | array( 169 | 'expires' => $expire, 170 | 'path' => SITECOOKIEPATH, 171 | 'domain' => $cookie_domain, 172 | 'secure' => $this->secure_logged_in_cookie, 173 | 'httponly' => true, 174 | 'samesite' => $same_site, 175 | ) 176 | ); 177 | } 178 | } else { 179 | setcookie( LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, $cookie_domain, $this->secure_logged_in_cookie, true ); 180 | if ( COOKIEPATH != SITECOOKIEPATH ) { 181 | setcookie( LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, $cookie_domain, $this->secure_logged_in_cookie, true ); 182 | } 183 | } 184 | 185 | // Set to don't send auth cookie again. 186 | $this->send_auth_cookies = false; 187 | } 188 | 189 | /** 190 | * Disable default auth cookie function on login. 191 | * 192 | * @param bool $send True. 193 | */ 194 | public function send_auth_cookies( $send ) { 195 | return $this->send_auth_cookies; 196 | } 197 | 198 | /** 199 | * Clear auth cookie. 200 | * 201 | * @param string $cookie_domain Cookie domain. 202 | */ 203 | public function clear_auth_cookie( $cookie_domain = '' ) { 204 | $this->send_auth_cookies = false; 205 | 206 | if ( $cookie_domain === '' ) { 207 | $cookie_domain = CookieManagerSettings::get_domain(); 208 | } 209 | 210 | $time = time() - YEAR_IN_SECONDS; 211 | 212 | setcookie( AUTH_COOKIE, ' ', $time, ADMIN_COOKIE_PATH, $cookie_domain ); 213 | setcookie( SECURE_AUTH_COOKIE, ' ', $time, ADMIN_COOKIE_PATH, $cookie_domain ); 214 | setcookie( AUTH_COOKIE, ' ', $time, PLUGINS_COOKIE_PATH, $cookie_domain ); 215 | setcookie( SECURE_AUTH_COOKIE, ' ', $time, PLUGINS_COOKIE_PATH, $cookie_domain ); 216 | setcookie( LOGGED_IN_COOKIE, ' ', $time, COOKIEPATH, $cookie_domain ); 217 | setcookie( LOGGED_IN_COOKIE, ' ', $time, SITECOOKIEPATH, $cookie_domain ); 218 | } 219 | 220 | } 221 | 222 | ( new CookieManager() )->init(); 223 | -------------------------------------------------------------------------------- /functions/class-cookiemanagersettings.php: -------------------------------------------------------------------------------- 1 | 'string', 43 | 'group' => 'general', 44 | 'description' => 'Authentication Cookie SameSite parameter', 45 | 'sanitize_callback' => array( $this, 'sanitize_value' ), 46 | 'show_in_rest' => false, 47 | ) 48 | ); 49 | 50 | // add Field. 51 | add_settings_field( 52 | self::SETTING_FIELD_ID, 53 | 'Authentication Cookie SameSite parameter', 54 | array( $this, 'setting_samesite_callback_function' ), 55 | 'general', 56 | 'default', 57 | array( 58 | 'id' => self::SETTING_FIELD_ID, 59 | 'option_name' => self::SETTING_SAMESITE, 60 | ) 61 | ); 62 | 63 | register_setting( 64 | 'general', 65 | self::SETTING_DOMAIN, 66 | array( 67 | 'type' => 'boolean', 68 | 'group' => 'general', 69 | 'description' => 'Authentication Cookie Domain', 70 | 'show_in_rest' => false, 71 | ) 72 | ); 73 | 74 | // add Field. 75 | add_settings_field( 76 | 'fuxt_cookie_domain-id', 77 | 'Authentication Cookie Domain', 78 | array( $this, 'setting_domain_callback_function' ), 79 | 'general', 80 | 'default', 81 | array( 82 | 'id' => 'fuxt_cookie_domain-id', 83 | 'option_name' => self::SETTING_DOMAIN, 84 | ) 85 | ); 86 | 87 | } 88 | 89 | /** 90 | * Clear old domain cookie and set new domain cookie on cookie setting change. 91 | * 92 | * @param string $old_value Old value. 93 | */ 94 | public function remove_old_domain_cookies( $old_value ) { 95 | $user_id = get_current_user_id(); 96 | $secure = is_ssl(); 97 | 98 | // Clear old domain cookie. 99 | if ( empty( $old_value ) ) { 100 | $old_value = COOKIE_DOMAIN; 101 | } 102 | 103 | do_action( 'clear_auth_cookie', $old_value ); 104 | 105 | // Set new domain cookie. 106 | wp_set_auth_cookie( $user_id, false, $secure ); 107 | } 108 | 109 | /** 110 | * When previous samesite value is Strict, domain was overrided by COOKIE_DOMAIN. 111 | * So need to reset cookie with correct domain value. 112 | * 113 | * @param string $old_same_site Old samesite value. 114 | * @param string $new_same_site New samesite value. 115 | */ 116 | public function same_site_updated( $old_same_site, $new_same_site ) { 117 | $domain = get_option( self::SETTING_DOMAIN, COOKIE_DOMAIN ); 118 | 119 | if ( 'Strict' === $old_same_site && $domain != COOKIE_DOMAIN ) { 120 | $this->remove_old_domain_cookies( COOKIE_DOMAIN ); 121 | } 122 | 123 | if ( 'Strict' === $new_same_site ) { 124 | $this->remove_old_domain_cookies( $domain ); 125 | } 126 | } 127 | 128 | /** 129 | * Sanitizes SameSite value. 130 | * 131 | * @param string $val Value to sanitize. 132 | * 133 | * @return string 134 | */ 135 | public function sanitize_value( $val ) { 136 | 137 | $valid_values = $this->get_valid_values(); 138 | 139 | if ( in_array( $val, $valid_values, true ) ) { 140 | // Do not allow "None" for Non-SSL site. 141 | if ( ! is_ssl() && 'None' === $val ) { 142 | return 'Lax'; 143 | } 144 | 145 | return $val; 146 | } else { 147 | return 'Lax'; // default one. 148 | } 149 | } 150 | 151 | /** 152 | * Renders Selector for our SameSite option field. 153 | * 154 | * @param array $val Data to render. 155 | */ 156 | public function setting_samesite_callback_function( $val ) { 157 | $id = $val['id']; 158 | $option_name = $val['option_name']; 159 | $option_value = get_option( $option_name ); 160 | $valid_values = $this->get_valid_values(); 161 | ?> 162 | 166 | 167 |

168 | Warning: Upgrade to PHP 7.3.0 or above to be able to set SameSite Authentication Cookie,
169 | Current PHP version is:
170 | Otherwise setting will not be applied.
171 |

172 | 173 | 174 |

175 | Authentication Cookie SameSite parameter, Use: 176 |

    177 |
  • None: if you need to display wp-admin in iframe on other site. You can use this value for HTTPS site only.
  • 178 |
  • Strict: to allow cookie being used only on same site domain
  • 179 |
  • Lax: to allow usage on subdomains as well (default is Lax)
  • 180 |
181 |

182 | 183 | 197 | 198 |
199 | 200 |
201 | 209 |
210 | 211 |

212 | If SameSite parameter is Strict, this setting is ignored and Default Cookie Domain is used by Default. 213 |

214 |
215 | 216 | = 2 ) { 243 | $wildcard_str = '.' . $domain_parts[ $count - 1 ]; 244 | for ( $i = $count - 2; $i >= 0; $i -- ) { 245 | $wildcard_str = '.' . $domain_parts[ $i ] . $wildcard_str; 246 | array_unshift( $wildcard_arr, $wildcard_str ); 247 | } 248 | } 249 | 250 | array_unshift( $wildcard_arr, COOKIE_DOMAIN ); 251 | 252 | return $wildcard_arr; 253 | } 254 | 255 | /** 256 | * Get samesite setting value. 257 | * 258 | * @param string $default Default value. 259 | * @return string // one of Lax|Strict|None. 260 | */ 261 | public static function get_samesite( $default = '' ) { 262 | return get_option( self::SETTING_SAMESITE, $default ); 263 | } 264 | 265 | /** 266 | * Get domain setting value. 267 | * 268 | * @return string Domain string value. 269 | */ 270 | public static function get_domain() { 271 | $domain = get_option( self::SETTING_DOMAIN, COOKIE_DOMAIN ); 272 | $whildcards = self::get_domain_wildcards(); 273 | if ( empty( $domain ) || 'Strict' === self::get_samesite() || ! in_array( $domain, $whildcards ) ) { 274 | $domain = COOKIE_DOMAIN; 275 | } 276 | 277 | return $domain; 278 | } 279 | 280 | } 281 | 282 | ( new CookieManagerSettings() )->init(); 283 | -------------------------------------------------------------------------------- /functions/deprecated.php: -------------------------------------------------------------------------------- 1 | add_cap( 'read_private_posts' ); 17 | $role->add_cap( 'read_private_pages' ); 18 | } 19 | //add_action( 'switch_theme', 'add_theme_caps' ); 20 | 21 | 22 | /** 23 | * Register custom ACF blocks 24 | * SEE https://www.advancedcustomfields.com/resources/blocks/ 25 | * SEE https://www.advancedcustomfields.com/resources/acf_register_block_type/ 26 | */ 27 | function fuxt_custom_blocks() { 28 | 29 | // Abort early if custom blocks not supported (not ACF Pro). 30 | if ( ! function_exists( 'acf_register_block_type' ) ) { 31 | return; 32 | } 33 | 34 | // Credit block. 35 | acf_register_block_type( 36 | array( 37 | 'name' => 'credit', 38 | 'title' => 'Credit', 39 | 'description' => 'A custom credit block.', 40 | 'category' => 'text', 41 | 'keywords' => array( 'text', 'credit' ), 42 | 'icon' => 'editor-textcolor', 43 | 'render_template' => get_template_directory() . '/blocks/credit/block.php', 44 | 'enqueue_style' => get_template_directory_uri() . '/blocks/credit/block.css', 45 | ) 46 | ); 47 | 48 | } 49 | //add_action( 'acf/init', 'fuxt_custom_blocks' ); -------------------------------------------------------------------------------- /functions/developer-role.php: -------------------------------------------------------------------------------- 1 | get_role( 'administrator' ); 16 | 17 | add_role( 'developer', __( 'Developer', 'fuxt' ), $admin_role->capabilities ); 18 | 19 | // Set initial user to Developer 20 | $user = new WP_User( 1 ); 21 | $user->set_role( 'developer' ); 22 | $user->add_role( 'administrator' ); 23 | } 24 | add_action( 'after_switch_theme', 'custom_add_developer_role' ); 25 | 26 | /** 27 | * Prevent non-dev from deleting locked pages/posts. 28 | * 29 | * @param int $target_post Post ID. 30 | */ 31 | function check_custom_post_lock( $target_post ) { 32 | $target_post = get_post( $target_post ); 33 | 34 | // Abort if just trashing a revision 35 | if ( wp_is_post_revision( $target_post ) ) { 36 | return; 37 | } 38 | 39 | if ( ! is_user_developer() && $target_post->prevent_deletion ) { 40 | echo 'Only a user with the Developer role can delete this page.

'; 41 | echo 'Back'; 42 | exit; 43 | } 44 | } 45 | add_action( 'wp_trash_post', 'check_custom_post_lock', 10, 1 ); 46 | add_action( 'before_delete_post', 'check_custom_post_lock', 10, 1 ); 47 | 48 | /** 49 | * Conditional to test if current user is a developer. 50 | * 51 | * @return bool True if developer or false. 52 | */ 53 | function is_user_developer() { 54 | $roles = wp_get_current_user()->roles; 55 | return in_array( 'developer', $roles ); 56 | } 57 | 58 | /** 59 | * Makes sure Developer role can sort Nested Pages automatically. 60 | */ 61 | function give_developer_ordering_permissions() { 62 | 63 | if ( is_plugin_active( 'wp-nested-pages/nestedpages.php' ) ) { 64 | 65 | $allowed_to_sort = get_option( 'nestedpages_allowsorting' ); 66 | 67 | if ( ! $allowed_to_sort ) { 68 | $allowed_to_sort = array(); 69 | } 70 | 71 | if ( ! in_array( 'developer', $allowed_to_sort ) ) { 72 | $allowed_to_sort[] = 'developer'; 73 | update_option( 'nestedpages_allowsorting', $allowed_to_sort ); 74 | } 75 | } 76 | 77 | } 78 | add_action( 'admin_init', 'give_developer_ordering_permissions', 1 ); 79 | 80 | /** 81 | * Add 'is-developer' class to WP admin pages if we're a developer. 82 | * 83 | * @param string $classes Space-separated list of CSS classes. 84 | * @return string 85 | */ 86 | function add_developer_admin_body_class( $classes ) { 87 | global $post; 88 | 89 | if ( is_user_developer() ) { 90 | $classes .= ' is-developer'; 91 | } 92 | if ( ! empty( $post->prevent_deletion ) ) { 93 | $classes .= ' is-developer-locked'; 94 | } 95 | if ( empty( $post->post_name ) ) { 96 | $classes .= ' no-slug'; 97 | } 98 | return $classes; 99 | } 100 | add_filter( 'admin_body_class', 'add_developer_admin_body_class' ); 101 | -------------------------------------------------------------------------------- /functions/gutenberg-functions.php: -------------------------------------------------------------------------------- 1 | 'fuxt', // Unique ID for hashing notices for multiple instances of TGMPA. 19 | 'default_path' => '', // Default absolute path to bundled plugins. 20 | 'menu' => 'tgmpa-install-plugins', // Menu slug. 21 | 'parent_slug' => 'themes.php', // Parent menu slug. 22 | 'capability' => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used. 23 | 'has_notices' => true, // Show admin notices or not. 24 | 'dismissable' => true, // If false, a user cannot dismiss the nag message. 25 | 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 26 | 'is_automatic' => true, // Automatically activate plugins after installation or not. 27 | 'message' => '', // Message to output right before the plugins table. 28 | ); 29 | 30 | $plugins = array( 31 | array( 32 | 'name' => 'Advanced Custom Fields Pro', 33 | 'slug' => 'advanced-custom-fields-pro', 34 | 'external_url' => 'https://www.advancedcustomfields.com/pro/', 35 | 'required' => false, 36 | ), 37 | array( 38 | 'name' => 'Auto SEO', 39 | 'slug' => 'funkhaus-auto-seo', 40 | 'source' => 'https://github.com/funkhaus/funkhaus-auto-seo/archive/main.zip', 41 | 'required' => false, 42 | ), 43 | array( 44 | 'name' => 'Nested Pages', 45 | 'slug' => 'wp-nested-pages', 46 | 'required' => false, 47 | ), 48 | array( 49 | 'name' => 'Netlify Deploy', 50 | 'slug' => 'funkhaus-netlify-deploy', 51 | 'source' => 'https://github.com/funkhaus/netlify-deploy/archive/main.zip', 52 | 'version' => '1.0', 53 | 'required' => false, 54 | ), 55 | array( 56 | 'name' => 'WP OpenAPI', 57 | 'slug' => 'wp-openapi', 58 | 'required' => false, 59 | ), 60 | array( 61 | 'name' => 'fuxt-api', 62 | 'slug' => 'funkhaus-fuxt-api', 63 | 'source' => 'https://github.com/funkhaus/fuxt-api/archive/main.zip', 64 | 'version' => '1.0', 65 | 'required' => true, 66 | ), 67 | ); 68 | 69 | tgmpa( $plugins, $config ); 70 | } 71 | add_action( 'tgmpa_register', 'fuxt_register_required_plugins' ); 72 | -------------------------------------------------------------------------------- /functions/proxy.php: -------------------------------------------------------------------------------- 1 | "POST, GET, DELETE, PATCH, PUT", 17 | "callback" => "fuxt_proxy_do_request", 18 | "permission_callback" => "fuxt_proxy_check_permission", 19 | ], 20 | ]); 21 | 22 | // Change headers to allow the custom headers we need 23 | add_filter( 24 | "rest_pre_serve_request", 25 | "fuxt_proxy_add_custom_cors_headers", 26 | 20, 27 | 4 28 | ); 29 | } 30 | add_action("rest_api_init", "fuxt_proxy_init"); 31 | 32 | /* 33 | * Check's that the request matches allowed Origin and Provider name is in ACF repeater field 34 | * Returns true || WP_Error 35 | */ 36 | function fuxt_proxy_check_permission($request) 37 | { 38 | // Security is be on, so check that Origin is on whitelist 39 | $domain_restricted = get_field("domain_restricted", "option"); 40 | if ( 41 | $domain_restricted && 42 | !fuxt_proxy_request_from_allowed_origin($request) 43 | ) { 44 | return new WP_Error( 45 | "permission", 46 | "Your origin is not allowed to make this Proxy request" 47 | ); 48 | } 49 | 50 | // Passed Origin checks, now check requested asked for an approved Provider 51 | $proxy_name = $request->get_header("Fuxt-Proxy-Name"); 52 | $provider = fuxt_proxy_get_provider("name", $proxy_name); 53 | 54 | // Allow if Provider is found 55 | if ($proxy_name && $provider) { 56 | return true; 57 | } 58 | 59 | return new WP_Error("permission", "Your requested Proxy Name is invalid"); 60 | } 61 | 62 | /* 63 | * Forwards request to allowed API, adds in Bearer token from ACF Proxy Settings field group 64 | * Returns WP_REST_Response || WP_Error 65 | */ 66 | function fuxt_proxy_do_request($request) 67 | { 68 | // Get bearer token from ACF field, include in request below 69 | $proxy_name = $request->get_header("Fuxt-Proxy-Name"); 70 | $proxy_endpoint = $request->get_header("Fuxt-Proxy-Endpoint"); 71 | $provider = fuxt_proxy_get_provider("name", $proxy_name); 72 | 73 | // Get any found tokens from ACF, build out full request URL 74 | $auth_header = $provider["authorization_header"] ?? ""; 75 | $url = $provider["base_url"] . $proxy_endpoint; 76 | 77 | // Encode the body to JSON if supplied 78 | $body = $request->get_json_params(); 79 | if ($body && is_array($body)) { 80 | $body = json_encode($body); 81 | } 82 | 83 | // Setup HTTP Request, pass through as much settings as we can 84 | $args = [ 85 | "headers" => [ 86 | "Authorization" => $auth_header, 87 | "Content-Type" => $request->get_header("Content-Type"), 88 | ], 89 | "method" => $request->get_method(), 90 | "body" => $body ?? "", 91 | ]; 92 | 93 | // Send remote request! Go Proxy Go! 94 | $response = wp_remote_request($url, $args); 95 | 96 | // Retrieve information from the $response 97 | $response_code = wp_remote_retrieve_response_code($response); 98 | $response_message = wp_remote_retrieve_response_message($response); 99 | $response_headers = wp_remote_retrieve_headers($response)->getAll(); 100 | $response_body = wp_remote_retrieve_body($response); 101 | 102 | // Check if response is JSON, if so then decode it so that when we send it later it's not double encoded 103 | if( fuxt_proxy_is_json($response_body) ) { 104 | $response_body = json_decode($response_body); 105 | } 106 | 107 | // Return data or error back to frontend 108 | if (!is_wp_error($response)) { 109 | $response = new WP_REST_Response($response_body, $response_code); 110 | 111 | // Add orginal response's headers 112 | foreach($response_headers as $key => $val) { 113 | $response->set_headers( array($key => $val) ); 114 | } 115 | 116 | // Make sure Flywheel doesn't cache this 117 | $response->set_headers( array("Cache-Control" => "no-cache, no-store, must-revalidate, max-age=0") ); 118 | return $response; 119 | } 120 | 121 | return new WP_Error($response_code, $response_message, $response_body); 122 | } 123 | 124 | /* 125 | * This customizes the CORS headers the server will accept, allowing use of our Proxy custom headers 126 | * Returns true || false 127 | */ 128 | function fuxt_proxy_add_custom_cors_headers($served, $result, $request, $server) 129 | { 130 | // Abort if not a request to the Proxy endpoint 131 | if ($request->get_route() !== "/fuxt/v1/proxy") { 132 | return $served; 133 | } 134 | 135 | // Now add our headers 136 | header( 137 | "Access-Control-Allow-Headers: Fuxt-Proxy-Name, Fuxt-Proxy-Endpoint, Content-Type, Authorization" 138 | ); 139 | 140 | return $served; 141 | } 142 | 143 | /* 144 | * Check that the request is from an allowed Origin. 145 | * Returns true || false 146 | */ 147 | function fuxt_proxy_request_from_allowed_origin($request) 148 | { 149 | $origin = get_http_origin(); 150 | 151 | // Start with site url as allowed origin. 152 | $allowed_origins = [site_url(), home_url()]; 153 | 154 | // Add fuxt home url to allowed origin. 155 | $fuxt_home_url = get_option("fuxt_home_url"); 156 | if ($fuxt_home_url) { 157 | $allowed_origins[] = $fuxt_home_url; 158 | } 159 | 160 | $allowed_origins = apply_filters("fuxt_allowed_origins", $allowed_origins); 161 | 162 | // Current request comes from an Origin that is allowed 163 | if (in_array($origin, $allowed_origins, true)) { 164 | return true; 165 | } 166 | 167 | return false; 168 | } 169 | 170 | /* 171 | * Return the Provider if found, or false. 172 | * Returns Array || false 173 | */ 174 | function fuxt_proxy_get_provider($search_key, $search_value) 175 | { 176 | $proxy_providers = get_field("providers", "option"); 177 | 178 | $columns = array_column($proxy_providers, $search_key); 179 | $found = array_search($search_value, $columns); 180 | 181 | // Return found Provider 182 | if (is_int($found)) { 183 | return $proxy_providers[$found]; 184 | } 185 | 186 | return false; 187 | } 188 | 189 | /* 190 | * Checks if a string is JSON 191 | * Returns Array || false 192 | */ 193 | function fuxt_proxy_is_json($str) { 194 | $json = json_decode($str); 195 | return $json && $str != $json; 196 | } -------------------------------------------------------------------------------- /functions/svg.php: -------------------------------------------------------------------------------- 1 | $filetype['ext'], 22 | 'type' => $filetype['type'], 23 | 'proper_filename' => $data['proper_filename'], 24 | ); 25 | } 26 | 27 | /** 28 | * Register and add settings field. 29 | */ 30 | function fuxt_add_settings_field() { 31 | register_setting( 32 | 'writing', 33 | 'svg_upload', 34 | ); 35 | 36 | add_settings_field( 37 | 'svg_upload', 38 | 'SVG Upload', 39 | 'fuxt_render_svg_upload_field', 40 | 'writing', 41 | ); 42 | } 43 | add_action( 'admin_init', 'fuxt_add_settings_field' ); 44 | 45 | /** 46 | * Callback function for SVG upload checkbox. 47 | */ 48 | function fuxt_render_svg_upload_field() { 49 | $value = get_option( 'svg_upload' ); 50 | ?> 51 | 52 | value="1" /> 53 | 54 | 55 | 13 | 14 |
15 | 16 |
17 | 18 | array( 27 | 28 | /** 29 | * Filters the primary link URL for the 'WordPress Events and News' dashboard widget. 30 | * 31 | * @param string $link The widget's primary link URL. 32 | */ 33 | 'link' => apply_filters( 'dashboard_primary_link', __( 'https://funkhaus.us/blog/', 'fuxt' ) ), 34 | 35 | /** 36 | * Filters the primary feed URL for the 'WordPress Events and News' dashboard widget. 37 | * 38 | * @param string $url The widget's primary feed URL. 39 | */ 40 | 'url' => apply_filters( 'dashboard_primary_feed', __( 'https://api.funkhaus.us/feed/', 'fuxt' ) ), 41 | 42 | /** 43 | * Filters the primary link title for the 'WordPress Events and News' dashboard widget. 44 | * 45 | * @param string $title Title attribute for the widget's primary link. 46 | */ 47 | 'title' => apply_filters( 'dashboard_primary_title', __( 'Funkhaus News', 'fuxt' ) ), 48 | 'items' => 5, 49 | 'show_summary' => 0, 50 | 'show_author' => 0, 51 | 'show_date' => 0, 52 | ), 53 | ); 54 | 55 | wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_primary_output', $feeds ); 56 | } 57 | 58 | /** 59 | * Add custom dashboard widget 60 | */ 61 | function fuxt_add_dashboard_widget() { 62 | // Unset default WordPress news widget. 63 | // Can't use remove_meta_box as it set false value instead of unset. 64 | global $wp_meta_boxes; 65 | unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] ); 66 | 67 | // Override default news block with custom one 68 | wp_add_dashboard_widget( 'dashboard_primary', __( 'Funkhaus News', 'fuxt' ), 'fuxt_dashboard_events_news' ); 69 | } 70 | add_action( 'wp_network_dashboard_setup', 'fuxt_add_dashboard_widget' ); 71 | add_action( 'wp_user_dashboard_setup', 'fuxt_add_dashboard_widget' ); 72 | add_action( 'wp_dashboard_setup', 'fuxt_add_dashboard_widget' ); 73 | 74 | /** 75 | * Override behavior of wp_ajax_dashboard_widgets. 76 | */ 77 | function fuxt_ajax_dashboard_widgets() { 78 | require_once ABSPATH . 'wp-admin/includes/dashboard.php'; 79 | 80 | // phpcs:ignore WordPress.Security.NonceVerification.Recommended 81 | if ( isset( $_GET['pagenow'] ) ) { 82 | // phpcs:ignore WordPress.Security.NonceVerification.Recommended 83 | $pagenow = $_GET['pagenow']; 84 | if ( in_array( $pagenow, array( 'dashboard-user', 'dashboard-network', 'dashboard' ) ) ) { 85 | set_current_screen( $pagenow ); 86 | } 87 | } 88 | 89 | // phpcs:ignore WordPress.Security.NonceVerification.Recommended 90 | if ( isset( $_GET['widget'] ) && $_GET['widget'] == 'dashboard_primary' ) { 91 | fuxt_dashboard_primary(); 92 | } 93 | wp_die(); 94 | } 95 | add_action( 'wp_ajax_dashboard-widgets', 'fuxt_ajax_dashboard_widgets', 1 ); 96 | 97 | /** 98 | * Remove site health widget from admin dashboard. 99 | */ 100 | function fuxt_remove_site_health_box() { 101 | remove_meta_box( 'dashboard_site_health', null, 'normal' ); 102 | } 103 | add_action( 'wp_user_dashboard_setup', 'fuxt_remove_site_health_box' ); 104 | add_action( 'wp_dashboard_setup', 'fuxt_remove_site_health_box' ); 105 | -------------------------------------------------------------------------------- /functions/wp-functions.php: -------------------------------------------------------------------------------- 1 | '; 105 | } 106 | add_action( 'admin_head', 'custom_site_favicon' ); 107 | add_action( 'login_head', 'custom_site_favicon' ); 108 | 109 | /** 110 | * Add post thumbnail into RSS feed. 111 | * 112 | * @param string $content Post content. 113 | * @return string 114 | */ 115 | function rss_post_thumbnail( $content ) { 116 | global $post; 117 | 118 | if ( has_post_thumbnail( $post->ID ) ) { 119 | $content = 120 | '

' . 123 | get_the_post_thumbnail( $post->ID ) . 124 | '

' . 125 | $content; 126 | } 127 | 128 | return $content; 129 | } 130 | add_filter( 'the_excerpt_rss', 'rss_post_thumbnail' ); 131 | 132 | /** 133 | * Change the [...] that comes after excerpts. 134 | * 135 | * @param string $more Default more string. 136 | * @return string 137 | */ 138 | function custom_excerpt_ellipsis( $more ) { 139 | return '...'; 140 | } 141 | add_filter( 'excerpt_more', 'custom_excerpt_ellipsis' ); 142 | 143 | /** 144 | * Change the word length of auto excerpts. 145 | * 146 | * @param int $length Default length. 147 | * @return int 148 | */ 149 | function fuxt_custom_excerpt_length( $length ) { 150 | return 20; 151 | } 152 | add_filter( 'excerpt_length', 'fuxt_custom_excerpt_length', 99 ); 153 | 154 | /** 155 | * Prevent Google from indexing any PHP generated part of the API. 156 | */ 157 | function add_nofollow_header() { 158 | header( 'X-Robots-Tag: noindex, nofollow', true ); 159 | } 160 | add_action( 'send_headers', 'add_nofollow_header' ); 161 | 162 | /** 163 | * Add useful args to post/page preview URLs 164 | * 165 | * @param string $link URL used for the post preview. 166 | * @param \WP_Post $post Post object. 167 | * @return string 168 | */ 169 | function add_custom_preview_link( $link, $post ) { 170 | $args = array( 171 | 'id' => $post->ID, 172 | 'type' => get_post_type( $post ), 173 | 'status' => get_post_status( $post ), 174 | 'preview' => 'true', 175 | ); 176 | 177 | // Add slug and build path 178 | if ( $post->post_name ) { 179 | // Build out new Preview permalink 180 | if ( ! function_exists( 'get_sample_permalink' ) ) { 181 | require_once ABSPATH . 'wp-admin/includes/post.php'; 182 | } 183 | 184 | $link = get_sample_permalink( $post->ID )[0] ?? ''; 185 | $link = str_replace( 186 | array( '%postname%', '%pagename%' ), 187 | $post->post_name, 188 | $link 189 | ); 190 | 191 | $args['slug'] = $post->post_name; 192 | $args['uri'] = wp_make_link_relative( $link ); 193 | } 194 | 195 | return add_query_arg( $args, $link ); 196 | } 197 | add_filter( 'preview_post_link', 'add_custom_preview_link', 10, 2 ); 198 | 199 | /** 200 | * Includes preview link in post data for a response for Gutenberg preview link to work. 201 | * 202 | * @param \WP_REST_Response $response The response object. 203 | * @param \WP_Post $post Post object. 204 | * @return \WP_REST_Response 205 | */ 206 | function fuxt_preview_link_in_rest_response( $response, $post ) { 207 | if ( 'draft' === $post->post_status ) { 208 | $response->data['link'] = get_preview_post_link( $post ); 209 | } 210 | 211 | return $response; 212 | } 213 | 214 | /** 215 | * Add the custom preview link to posts, pages and all public custom post types 216 | */ 217 | function custom_filter_preview_links() { 218 | add_filter( 'rest_prepare_post', 'fuxt_preview_link_in_rest_response', 10, 2 ); 219 | add_filter( 'rest_prepare_page', 'fuxt_preview_link_in_rest_response', 10, 2 ); 220 | 221 | $args = array( 222 | 'public' => true, 223 | '_builtin' => false 224 | ); 225 | $post_types = get_post_types($args, 'names', 'and'); 226 | 227 | foreach($post_types as $post_type) { 228 | add_filter( 'rest_prepare_'.$post_type, 'fuxt_preview_link_in_rest_response', 10, 2 ); 229 | } 230 | } 231 | add_action( 'rest_api_init', 'custom_filter_preview_links'); 232 | 233 | /** 234 | * This function auto saves drafts posts, to force them to get a URL for previews to work. 235 | * See: https://wordpress.stackexchange.com/questions/218168/how-to-make-draft-posts-or-posts-in-review-accessible-via-full-url-slug 236 | * 237 | * @param int $post_id Post ID. 238 | * @param \WP_Post $post Post object. 239 | * @param bool $update Whether this is an existing post being updated. 240 | */ 241 | function auto_set_post_status( $post_id, $post, $update ) { 242 | if ( $post->post_status === 'draft' && ! $post->post_name ) { 243 | // Un-hook to prevent infinite loop 244 | remove_action( 'save_post', 'auto_set_post_status', 13, 3 ); 245 | 246 | if ( is_plugin_active( 'funkhaus-netlify-deploy/netlify-deploy.php' ) ) { 247 | remove_action( 'save_post', 'nd_debounce_deploy', 20, 1 ); 248 | } 249 | 250 | if ( is_plugin_active( 'funkhaus-cache-purge/cache-purge.php' ) ) { 251 | remove_action( 'save_post', 'cp_purge_cache', 20, 1 ); 252 | } 253 | 254 | // Set the post to publish so it gets the slug is saved to post_name 255 | wp_update_post( 256 | array( 257 | 'ID' => $post_id, 258 | 'post_status' => 'publish', 259 | 'post_date' => '', 260 | ) 261 | ); 262 | 263 | // Immediately put it back to draft status 264 | wp_update_post( 265 | array( 266 | 'ID' => $post_id, 267 | 'post_status' => 'draft', 268 | 'post_date' => '', 269 | ) 270 | ); 271 | 272 | // Re-hook save 273 | add_action( 'save_post', 'auto_set_post_status', 13, 3 ); 274 | 275 | if ( is_plugin_active( 'funkhaus-netlify-deploy/netlify-deploy.php' ) ) { 276 | add_action( 'save_post', 'nd_debounce_deploy', 20, 1 ); 277 | } 278 | 279 | if ( is_plugin_active( 'funkhaus-cache-purge/cache-purge.php' ) ) { 280 | add_action( 'save_post', 'cp_purge_cache', 20, 1 ); 281 | } 282 | } 283 | } 284 | add_action( 'save_post', 'auto_set_post_status', 13, 3 ); 285 | 286 | /** 287 | * Polyfill functions to not throw errors on ACF import 288 | */ 289 | function fuxt_polyfill_functions() { 290 | if ( ! function_exists( 'cp_purge_cache' ) ) { 291 | // phpcs:ignore 292 | function cp_purge_cache(){} 293 | } 294 | if ( ! function_exists( 'nd_debounce_deploy' ) ) { 295 | // phpcs:ignore 296 | function nd_debounce_deploy(){} 297 | } 298 | } 299 | add_action( 'wp_dashboard_setup', 'fuxt_polyfill_functions' ); 300 | 301 | /** 302 | * Set permlinks on theme activate 303 | * SEE https://github.com/wp-graphql/wp-graphql/issues/1612 304 | */ 305 | function set_custom_permalinks() { 306 | $current_setting = get_option( 'permalink_structure' ); 307 | 308 | // Abort if already saved to something else 309 | if ( $current_setting ) { 310 | return; 311 | } 312 | 313 | // Save permalinks to a custom setting, force create of rules file 314 | global $wp_rewrite; 315 | update_option( 'rewrite_rules', false ); 316 | $wp_rewrite->set_permalink_structure( '/news/p/%postname%/' ); 317 | $wp_rewrite->set_category_base( '/news/c/' ); 318 | $wp_rewrite->flush_rules( true ); 319 | } 320 | add_action( 'after_switch_theme', 'set_custom_permalinks' ); 321 | 322 | /** 323 | * Strip quotes from oEmbed title html attributes 324 | * 325 | * @param string $return The returned oEmbed HTML. 326 | * @param object $data A data object result from an oEmbed provider. 327 | * @param string $url The URL of the content to be embedded. 328 | * @return string 329 | */ 330 | function filter_oembed_attributes( $return, $data, $url ) { 331 | // Remove the title attribute, as often times it has a quote in it. 332 | $return = preg_replace( '/title="[\\s\\S]*?"/', '', $return ); 333 | 334 | // Strip quotes from title 335 | $title = str_replace( '"', '', $data->title || '' ); 336 | 337 | return str_replace( ' 2 | 3 | 5 | 18 | 19 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 10 | Enter the primary front end URL.

" 14 | ) 15 | }, 16 | showAttachmentIds: function() { 17 | // Show the attachment IDs on hover of attachment grid blocks 18 | jQuery(document).on( 19 | 'mouseenter', 20 | '.media-modal .attachment, .media-frame .attachment', 21 | function() { 22 | var id = jQuery(this).data('id') 23 | if (id) { 24 | jQuery(this).attr('title', 'Attachment ID: ' + id) 25 | } 26 | } 27 | ) 28 | }, 29 | shiftClickNestedPages: function() { 30 | // Enable shift-clicking on NestedPages admin lists 31 | var lastChecked = null 32 | jQuery('#wpbody-content').on( 33 | 'click', 34 | ".nestedpages .np-bulk-checkbox input[type='checkbox']", 35 | function(e) { 36 | // Abort if first click 37 | if (!lastChecked) { 38 | lastChecked = this 39 | return 40 | } 41 | 42 | // Handle shift clicking and auto selecting all following checkboxes 43 | var $chkboxes = jQuery( 44 | ".nestedpages .np-bulk-checkbox input[type='checkbox']" 45 | ) 46 | if (e.shiftKey) { 47 | var start = $chkboxes.index(this) 48 | var end = $chkboxes.index(lastChecked) 49 | $chkboxes 50 | .slice(Math.min(start, end), Math.max(start, end) + 1) 51 | .prop('checked', lastChecked.checked) 52 | } 53 | 54 | lastChecked = this; 55 | } 56 | ) 57 | }, 58 | removeUnusedBlocks: function() { 59 | // This functions removes some blocks from the Gutenberg editor. 60 | // SEE: https://wordpress.stackexchange.com/questions/379612/how-to-remove-the-core-embed-blocks-in-wordpress-5-6 61 | 62 | if (typeof wp.domReady == "undefined") { 63 | return; 64 | } 65 | 66 | wp.domReady(function() { 67 | let allowedEmbedBlocks = ['vimeo', 'youtube'] 68 | if (fuxtAdmin.isGutenbergActive()) 69 | wp.blocks 70 | .getBlockVariations('core/embed') 71 | .forEach(function(blockVariation) { 72 | if ( 73 | -1 === 74 | allowedEmbedBlocks.indexOf(blockVariation.name) 75 | ) { 76 | wp.blocks.unregisterBlockVariation( 77 | 'core/embed', 78 | blockVariation.name 79 | ) 80 | } 81 | }) 82 | }) 83 | }, 84 | isGutenbergActive: function() { 85 | return typeof wp !== 'undefined' && typeof wp.blocks !== 'undefined'; 86 | } 87 | } 88 | jQuery(document).ready(function() { 89 | fuxtAdmin.showAttachmentIds() 90 | fuxtAdmin.shiftClickNestedPages() 91 | fuxtAdmin.removeUnusedBlocks() 92 | }) 93 | jQuery(window).load(function() { 94 | if (jQuery('body').hasClass('options-general-php')) { 95 | fuxtAdmin.enabledHomeUrlEdit() 96 | } 97 | }) 98 | -------------------------------------------------------------------------------- /phpcs.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | A custom set of rules to check for Fuxt Backend project 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | */libs/* 26 | index.php 27 | 28 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funkhaus/fuxt-backend/7309b3565948708b0bca9da849f26f1b87c99424/screenshot.png -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: fuxt-backend 3 | Theme URI: http://funkhaus.us 4 | Description: A theme that turns WordPress into a true Headless CMS. Optimized for the fuxt frontend boilerplate and fuxt-api plugin. 5 | Author: Funkhaus 6 | Author URI: http://funkhaus.us 7 | Text Domain: fuxt 8 | Version: 4.0.0 9 | Year: 2024 10 | */ 11 | --------------------------------------------------------------------------------