├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── _config.yml ├── assets-repos ├── github-com │ ├── bse-banner.png │ └── bse-banner_old.png └── wordpress-org │ ├── banner-1544x500.png │ ├── banner-772x250.png │ ├── icon-128x128.png │ ├── icon-256x256.png │ ├── screenshot-1.png │ ├── screenshot-10.png │ ├── screenshot-2.png │ ├── screenshot-3.png │ ├── screenshot-4.png │ ├── screenshot-5.png │ ├── screenshot-6.png │ ├── screenshot-7.png │ ├── screenshot-8.png │ └── screenshot-9.png ├── assets ├── banner-1544x500.png ├── banner-772x250.png ├── css │ └── style.scss ├── icon-128x128.png ├── icon-256x256.png ├── icon.svg ├── images │ ├── bse-icon.png │ ├── bse-icon_old.png │ └── index.php └── index.php ├── builder-shortcode-extras.php ├── composer.json ├── includes ├── admin │ ├── admin-extras.php │ └── index.php ├── functions-conditionals.php ├── functions-global.php ├── index.php ├── integrations │ ├── astra.php │ ├── block-editor.php │ └── index.php ├── load-integrations.php └── shortcodes │ ├── content.php │ ├── elementor.php │ ├── genesis.php │ ├── index.php │ ├── info.php │ ├── integrations.php │ ├── post.php │ ├── user.php │ └── version.php ├── index.php └── languages ├── builder-shortcode-extras-de_DE.mo ├── builder-shortcode-extras-de_DE.po ├── builder-shortcode-extras-de_DE_formal.mo ├── builder-shortcode-extras-de_DE_formal.po ├── builder-shortcode-extras.pot └── index.php /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: deckerweb # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: daveshine # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: https://paypal.me/deckerweb # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Composer 2 | vendor/**/.git 3 | vendor/ 4 | composer.lock 5 | composer.phar 6 | 7 | # Grunt 8 | node_modules/ 9 | 10 | # macOS 11 | .DS_Store 12 | .idea/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 2018 David Decker 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Builder Shortcode Extras – WordPress Shortcodes Collection to Save You Time 2 | 3 | A collection of totally useful extra Shortcodes to make the life of Site Builders more easy. 4 | 5 | ![Builder Shortcode Extras plugin banner](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/refs/heads/master/assets/banner-1544x500.png) 6 | 7 | --- 8 | 9 | [Support Project](#support-the-project) | [Installation](#installation) | [Updates](#updates) | [Description](#description) | [FAQ](#frequently-asked-questions) | [Screenshots](#screenshots) | [Changelog](#changelog) | [Plugin Scope / Disclaimer](#plugin-scope--disclaimer) 10 | 11 | --- 12 | 13 | ## Support the Project 14 | 15 | If you find this project helpful, consider showing your support by buying me a coffee! Your contribution helps me keep developing and improving this plugin. 16 | 17 | Enjoying the plugin? Feel free to treat me to a cup of coffee ☕🙂 through the following options: 18 | 19 | - [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W81BNTZE) 20 | - [Buy me a coffee](https://buymeacoffee.com/daveshine) 21 | - [PayPal donation](https://paypal.me/deckerweb) 22 | - [Join my **newsletter** for DECKERWEB WordPress Plugins](https://eepurl.com/gbAUUn) 23 | 24 | --- 25 | 26 | ## Installation 27 | 28 | **Quick Install** 29 | 1. **Download ZIP:** [**builder-shortcode-extras.zip**](https://github.com/deckerweb/builder-shortcode-extras/releases/latest/download/builder-shortcode-extras.zip) 30 | 2. Upload via WordPress Plugins > Add New > Upload Plugin 31 | 3. There are no settings whatsover. Just start using the Shortcodes everywhere. 32 | 4. Now enjoy displaying special stuff without coding and saving some time ;-) 33 | 34 | 35 | ### Requirements 36 | 37 | * WordPress version 6.7 or higher 38 | * PHP version 7.4 or higher 39 | * MySQL version 5.6 or higher 40 | 41 | --- 42 | 43 | ## Updates 44 | 45 | 1) Alternative 1: Just download a new [ZIP file](https://github.com/deckerweb/builder-shortcode-extras/releases/latest/download/builder-shortcode-extras.zip) (see above), upload and override existing version. Done. 46 | 47 | 2) Alternative 2: Use the (free) [**_Git Updater_ plugin**](https://git-updater.com/) and get updates automatically. 48 | 49 | 3) Alternative 3: Upcoming! – In future I will built-in our own deckerweb updater. This is currently being worked on for my plugins. Stay tuned! 50 | 51 | --- 52 | 53 | ## Description 54 | 55 | A totally useful collection of helper Shortcodes to make your life as a Site Builder and non-coder way easier and save you time: Shortcodes for Last Updated Date/ Time, Post Counter, Versions, Post Info, Copyright and Footer Info, Users, Reusable Blocks (Gutenberg), Elementor Templates, Genesis Footer and even more. 56 | 57 | These are Shortcodes you don't get anywhere else. These are smart and really helpful - perfect for Non-Coder Designers, for Non Techies, for Site Builders. Those small parts and strings that make your life easier, now available as Shortcodes. Use them anywhere in WordPress: in Gutenberg Block Editor, in Classic Editor, Widgets, Post Types, Page Builders (Widgets, Elements...) and layout/ hook post types from various (Premium) Themes. 58 | 59 | **This is my personaly story, why this plugin here was born:** When building a site and for example you need the date when a post type item was last updated? You just need this value as a simple string to put in a page builder widget or somewhere else, right? So where do you find the code snippet for it? Or a plugin? And you need it now, easy and fast? 60 | I was there, I know exactly how it feels at 02.00 a.m. in the middle of night. So this Shortcode collection was born. Totally simple. No styles, no scripts. But included CSS classes so I can style it my own - or apply my own classes or those from my theme. And I can change the HTML wrapper tag. Problem solved. It only took 2 minutes: 1 minute of installing and activing this plugin, plus 1 minute of inserting the actual Shortcode. Problem solved. Now I can go to sleep. With peace of mind. And the presentation the next morning for my client will be a success. Oh yeah, I love it! ;-) 61 | 62 | 63 | ### ♥️ What the Plugin does? 64 | * Up to 30 useful helper Shortcodes 65 | * Optional: Shortcode for Reusable Blocks - for Gutenberg Block Editor - reuse them everyhwere 66 | * Optional: Shortcode for Elementor Templates - for Elementor free version! 67 | * Optional: Shortcode for complete Footer Creds/ Copyright of Genesis 3.1 or higher (just use without hooks everywhere you can insert a Shortcode!) 68 | * Totally user friendly! 69 | * Use in Gutenberg Block Editor - works fine in these Core Blocks: Shortcode, Paragraph, List, Heading and everywhere else! 70 | * Use in Classic Editor - Visual and Text/ HTML mode, as you were used to 71 | * Use in Widgets - Text/ HTML widget is automatically prepared for Shortcodes with this plugin here! 72 | * Use in Page Builders like *Elementor, Beaver Builder, SiteOrigin Page Builder, WPBakery Page Builder, Visual Composer Website Builder, Oxygen Builder, Brizy Page Builder, Thrive Architect* etc. 73 | * Use in Theme Pro versions with special layout post types: *Astra Custom Layouts, OceanWP Library, GeneratePress Elements, Page Builder Framework Sections, Customify Hooks, Suki Blocks, Hestia Hooks, Genesis Blox, Genesis Simple Hooks* 74 | * Optionally set a custom wrapper (`span`, `p`, `div`, `h`, or any other appropriate HTML5 element, like `article`, `section`, whatever) 75 | * Optionally set a custom CSS class for the wrapper to allow for even better custom styling 76 | * No frontend bloat: no scripts, no styles - nothing! :-) 77 | * Lightweight, efficient 78 | * Developer friendly: clean code, inline documentation, lots of filters available 79 | 80 | 81 | ### 🚀 Typical Use Cases of this Plugin 82 | 1️⃣ **First example:** You want a footer copyright with the current year as dynamic - so you set it once and forget. Our Shortcode `[bse-copyright]` does exactly that. 83 | 2️⃣ **Second example:** You want to put a "Last updated" date under each single post or page - use our Shortcode `[bse-post-modified-date]`, set your custom date format, set a custom label and place it into a (footer) widget. Done. 84 | 3️⃣ **Third example:** You are using Elementor free, *not* Pro, and want to display one of your templates via a Shortcode? Now you can! (with our Shortcode `[bse-elementor-template]`) 85 | 4️⃣ **Fourth example:** You want to display a Reusable Block via a Shortcode? Now you can! (with our Shortcode `[bse-wpblock]`) 86 | 87 | 88 | ### 🍰 Available Shortcodes: 89 | * **`[bse-version]`** -- attributes: wrapper, class, before, after, type, plugin, custom 90 | * **`[bse-copyright]`** -- attributes: wrapper, class, before, after, copyright, first 91 | * **`[bse-site-updated]`** -- attributes: wrapper, class, before, after, type, label_date, date_format, label_time, time_format, tooltip 92 | * **`[bse-site-title]`** -- attributes: wrapper, class, before, after 93 | * **`[bse-site-slogan]`** -- attributes: wrapper, class, before, after 94 | * **`[bse-home-link]`** -- attributes: wrapper, class, before, after, text, target, rel 95 | * **`[bse-loginout]`** -- attributes: wrapper, class, before, after, login_text, logout_text, login_target, logout_target, login_redirect, logout_redirect 96 | * **`[bse-user]`** -- attributes: wrapper, class, before, after, user_id, field, default 97 | * **`[bse-post-count]`** -- attributes: wrapper, class, before, after, post_type, status 98 | * **`[bse-post-date]`** -- attributes: wrapper, class, before, after, post_id, format, label, relative_depth 99 | * **`[bse-post-time]`** -- attributes: wrapper, class, before, after, post_id, format, label 100 | * **`[bse-post-modified-date]`** / **`[bse-item-last-updated]`** -- attributes: wrapper, class, before, after, post_id, format, label, relative_depth 101 | * **`[bse-post-modified-time]`** -- attributes: wrapper, class, before, after, post_id, format, label 102 | * **`[bse-post-author]`** -- attributes: wrapper, class, before, after 103 | * **`[bse-post-author-link]`** -- attributes: wrapper, class, before, after, target, rel 104 | * **`[bse-post-author-posts-link]`** -- attributes: wrapper, class, before, after, target, rel 105 | * **`[bse-post-tags]`** -- attributes: wrapper, class, before, after, sep 106 | * **`[bse-post-categories]`** -- attributes: wrapper, class, before, after, sep 107 | * **`[bse-post-terms]`** -- attributes: wrapper, class, before, after, sep, taxonomy 108 | * **`[bse-post-edit]`** (Post Edit Link) -- attributes: wrapper, class, before, after, label 109 | * **`[bse-post-link]`** -- attributes: wrapper, class, before, after, id, slug, post_type, privacy, text, target, rel 110 | * **`[bse-item-content]`** -- attributes: id, css 111 | * **`[bse-nav-menu]`** -- attributes: wrapper, class, before, after, menu, container, container_class, container_id, menu_class, menu_id, fallback_cb, item_before, item_after, link_before, link_after, depth, walker, theme_location, items_wrap, item_spacing 112 | * **`[bse-comment-form]`** -- attributes: wrapper, class, before, after, post_id, id_form, class_form, title_reply, title_reply_to, cancel_reply_link, label_submit 113 | 114 | 115 | ### 🍰 Available Integrations - Shortcodes: 116 | * *Gutenberg Block Editor, Reusable Blocks:* **`[bse-wpblock]`** -- attributes: id 117 | * *Elementor free version:* **`[bse-elementor-template]`** -- attributes: id, css 118 | * *Astra Custom Layouts (via Astra Pro):* **`[bse-astra-layout]`** -- attributes: id 119 | * *Genesis Framework v3.1.0 or higher:* **`[bse-genesis-footer]`** -- attributes: wrapper, class 120 | * *Genesis Framework:* **`[bse-genesis-breadcrumbs]`** -- attributes: wrapper, class 121 | * **Note:** All these integrations are optional, only if the supported plugin or theme is installed and currently active. For the Block Editor there is smart logic in place recognizing popular "disable" plugins like "Classic Editor", "Disable Gutenberg" amongst others. 122 | 123 | --- 124 | 125 | ## Frequently Asked Questions 126 | 127 | 128 | ### How does styling work? 129 | The plugin itself loads NO styles or scripts for the Shortcodes! It only adds very minimal markup by default (HTML span tag), with one specific class for the Shortcode. It's **completely up to you** to style these default classes (if you want) or add your own. -- In most cases the Shortcodes put out only simple strings - so, when used within regular text paragraphs you won't see any difference compared to the text around. But, if you need some special styling you can always add it and tweak your styles. 130 | 131 | 132 | 133 | ### What does the Gutenberg Block Editor Shortcode do? 134 | It can display any Reusable Block from WordPress Core Reusable Blocks (post type: `wp_block`) via a Shortcode. Just copy the Shortcode for a certain Reusable Block from the post type list table - look for the "Blocks" left-hand admin menu. This will make the Reusable Blocks way more useful and you can use them everyhwere - without coding! 135 | 136 | 137 | 138 | ### What does the Astra Layout Shortcode do? 139 | It can display any Astra Custom Layout via a Shortcode. Just copy the Shortcode for a certain Astra Custom Layout from the post type list table - look for the "Custom Layouts" under the left-hand "Appearance" admin menu. This will make those Custom Layouts even more useful and you can use them everyhwere - without coding! This Shortcode feature comes in handy especially for "Hook" type Shortcodes: you don't need to specify a Hook if used via Shortcode. This makes the Astra Custom Layouts more independent from Hooks and gives you even more possibilities. 140 | 141 | 142 | 143 | ### What does the Elementor Template Shortcode do? 144 | It displays the a template from Elementor "Saved Templates" (former "My Templates") library via a Shortcode. It is the same thing Elementor Pro does - but our plugin brings this feature to Elementor free version. This will make Elementor free version way more useful as this brings so many new possibilities to work with Templates! 145 | 146 | 147 | 148 | ### What are the two Genesis Shortcodes doing? 149 | **Genesis Footer Shortcode** - It takes the whole content block of your Genesis Footer settings from the Customizer - since Genesis 3.1.0 or higher - and displays it wherever you want. That way it becomes totally easy to customize your footer info text even if you want to show it somewhere else than the default location. It is easier than to use hooks or code for that. 150 | 151 | **Genesis Breadcrumbs Shortcode** - It takes the whole content block of Breadcrumbs for a current item/view and displays it wherever you want via Shortcode. This could be useful in some situations. It can make you a bit more independent from hooks and coding work. Please note: At the time being it is not possible to tweak the Breadcrumb arguments via the Shortcode! 152 | 153 | 154 | 155 | ### Can I use these Shortcodes in my Page Builder? 156 | Yes, of course! Everywhere a Shortcode is working in your Page Builder, our plugin's Shortcodes will also work. For more info on that you might also have a look in the documentation of your favorite Page Builder or similar plugin about Shortcode support for that tool. 157 | 158 | 159 | 160 | ### Does this Plugin work with Gutenberg / WordPress 5.0+ / Block Editor? 161 | Yes, of course! - The plugin is fully compatible with Gutenberg Block Editor: you can use Shortcodes almost everywhere within the Block Editor, not just in the so-called "Shortcode" block but also in Paragraph, List, Heading, whereever you can enter regular text, most likely Shortcodes will also be rendered. And, for our type of Shortcodes this makes total sense, for example to display a "last updated date", a post counter, a version number, some user info field, whatever. Just try it out. 162 | 163 | 164 | 165 | ### Does this Plugin work with Classic Editor and even ClassicPress? 166 | Yes, this plugin works with the Classic Editor plugin perfectly fine. 167 | 168 | By default the plugin is also fully compatible with ClassicPress. I will try my best to also have my plugin work perfectly in ClassicPress, the fork of WordPress without Gutenberg. It should already be fully compatible but I will follow all events closely to adjust compat if needed. 169 | 170 | 171 | 172 | ### Will this Plugin slow down my site? 173 | Absolutely not. Since the plugin is NOT loading any scripts or styles all is really lightweight. A no brainer to install and use. 174 | 175 | 176 | 177 | ### Does the Plugin work with Multisite? 178 | Yes, it works fine in Multisite, you could even activate it Network-wide. You can use the Shortcodes in each sub site like you would in a regular (single) install. 179 | 180 | 181 | 182 | ### Will other third-party Plugins be supported? 183 | Only if it makes sense, like the current Elementor Template Shortcode for example. Remember: we don't want to load any scripts or styles. So, if a potential Shortcode fits our philosophy and could be totally useful, then the chance of adding it to this plugin gets very high! ;-) 184 | 185 | If you have any suggestion for such a Shortcode, please feel free to [**open a new GitHub Issue**](https://github.com/deckerweb/builder-shortcode-extras/issues) in our development repository and tell us all about it. Thanks in advance! 186 | 187 | --- 188 | 189 | ## Screenshots 190 | 191 | ### 1. Use the Shortcodes in Gutenberg Block Editor: Shortcode Block, Paragraph Block, List Block, Heading Block etc. 192 | ![Use the Shortcodes in Gutenberg Block Editor: Shortcode Block, Paragraph Block, List Block, Heading Block etc.](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-1.png) 193 | 194 | 195 | ### 2. The Shortcodes from Block Editor rendered on the Frontend 196 | ![The Shortcodes from Block Editor rendered on the Frontend](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-2.png) 197 | 198 | 199 | ### 3. Shortcode for each Reusable Block to insert & display anywhere (especially outside of the Block Editor...) 200 | ![Shortcode for each Reusable Block to insert & display anywhere (especially outside of the Block Editor...)](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-3.png) 201 | 202 | 203 | ### 4. Use the Shortcodes in Classic Editor as well: Visual Mode or Text Mode (HTML) - doesn't matter, will work 204 | ![Use the Shortcodes in Classic Editor as well: Visual Mode or Text Mode (HTML) - doesn't matter, will work](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-4.png) 205 | 206 | 207 | ### 5. Insert a Shortcode into Text Widget or Custom HTML Widget 208 | ![Insert a Shortcode into Text Widget or Custom HTML Widget](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-5.png) 209 | 210 | 211 | ### 6. For Elementor Free Version: Shortcode for each Saved Template! 212 | ![For Elementor Free Version: Shortcode for each Saved Template!](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-6.png) 213 | 214 | 215 | ### 7. Insert a Shortcode into Elementor Page Builder: Shortcode Widget 216 | ![Insert a Shortcode into Elementor Page Builder: Shortcode Widget](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-7.png) 217 | 218 | 219 | ### 8. Insert a Shortcode into Elementor Text Editor Widget 220 | ![Insert a Shortcode into Elementor Text Editor Widget](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-8.png) 221 | 222 | 223 | ### 9. Insert a Shortcode into Elementor Heading widget (will be rendered fully on the frontend, of course!) 224 | ![Insert a Shortcode into Elementor Heading widget (will be rendered fully on the frontend, of course!)](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-9.png) 225 | 226 | 227 | ### 10. For Astra Pro: Shortcode for each Astra Custom Layout - great for reusage 228 | ![For Astra Pro: Shortcode for each Astra Custom Layout - great for reusage](https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/master/assets-repos/wordpress-org/screenshot-10.png) 229 | 230 | --- 231 | 232 | ## Changelog 233 | 234 | ### 🎉 v1.2.0 – 2025-04-?? 235 | * Improved: Better compatibility for [_Git Updater_](https://git-updater.com/) integration 236 | * Change: Re-added translations loader as translations display is otherwise not optimal for non-.org hosted plugins 237 | * Update: `.pot` file, plus packaged German translations, now including new `l10n.php` files! 238 | 239 | ### 🎉 v1.1.0 – 2025-3-15 240 | * Bring back the plugin to a workable state 241 | * Removed all wordpress.org stuff 242 | * Removed the _DDWlib Plugin Installer Recommendations_ library got removed, it is no longer wanted/supported anyways 243 | * Removed own translations loader; WordPress now does it all itself; the packaged translations remain :) 244 | * **Note:** No longer in the .org plugin repo available – thanks to Matt... (I've taken it out myself as I have no longer interest in WordPress.org repo strategy) – just install it yourself via ZIP file, see above under "Installation" 245 | 246 | 247 | ### 🎉 1.0.0 - 2019-09-10 248 | * *Plugin launch. Everything's new!* 249 | * New: 25 general Shortcodes 250 | * New: 5 Shortcodes for Integrations 251 | 252 | 253 | ### ⚡ 0.9.0 - 2019-09-09 254 | * New: Beta release of the plugin on [its public GitHub repository](https://github.com/deckerweb/builder-shortcode-extras) 255 | 256 | 257 | ## ☺️ Donate 258 | Enjoy using *Builder Shortcode Extras*? **[Please consider making a donation](https://www.paypal.me/deckerweb)** - every donation helps to support the project's continued development, maintenance and support. 259 | **Thank you very much in advance for your support!** 260 | 261 | --- 262 | 263 | ## Plugin Scope / Disclaimer 264 | 265 | This plugin comes as is. 266 | 267 | _Disclaimer 1:_ So far I will support the plugin for breaking errors to keep it working. Otherwise support will be very limited. Also, it will NEVER be released to WordPress.org Plugin Repository for a lot of reasons (ah, thanks, Matt!). 268 | 269 | _Disclaimer 2:_ All of the above might change. I do all this stuff only in my spare time. 270 | 271 | _Most of all:_ Have fun building great sites!!! ;-) 272 | 273 | --- 274 | 275 | Icon used in promo graphics: [© Tabler Icons by Paweł Kuna](https://tabler.io/icons) 276 | 277 | Readme & Plugin Copyright: © 2019–2025, David Decker – DECKERWEB.de -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /assets-repos/github-com/bse-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/github-com/bse-banner.png -------------------------------------------------------------------------------- /assets-repos/github-com/bse-banner_old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/github-com/bse-banner_old.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/banner-1544x500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/banner-1544x500.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/banner-772x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/banner-772x250.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/icon-128x128.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/icon-256x256.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-1.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-10.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-2.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-3.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-4.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-5.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-6.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-7.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-8.png -------------------------------------------------------------------------------- /assets-repos/wordpress-org/screenshot-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets-repos/wordpress-org/screenshot-9.png -------------------------------------------------------------------------------- /assets/banner-1544x500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets/banner-1544x500.png -------------------------------------------------------------------------------- /assets/banner-772x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets/banner-772x250.png -------------------------------------------------------------------------------- /assets/css/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "{{ site.theme }}"; 5 | 6 | .page-header { 7 | background-color: #C86DD7; 8 | background-image: linear-gradient(120deg, #3023AE, #C86DD7); 9 | } 10 | 11 | .main-content h1, 12 | .main-content h2, 13 | .main-content h3, 14 | .main-content h4, 15 | .main-content h5, 16 | .main-content h6 { 17 | font-weight: 700; 18 | color: #C86DD7; 19 | } -------------------------------------------------------------------------------- /assets/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets/icon-128x128.png -------------------------------------------------------------------------------- /assets/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets/icon-256x256.png -------------------------------------------------------------------------------- /assets/icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/bse-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets/images/bse-icon.png -------------------------------------------------------------------------------- /assets/images/bse-icon_old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/assets/images/bse-icon_old.png -------------------------------------------------------------------------------- /assets/images/index.php: -------------------------------------------------------------------------------- 1 | =7.4" 21 | } 22 | } -------------------------------------------------------------------------------- /includes/admin/admin-extras.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'Builder Shortcode Extras', 'builder-shortcode-extras' ) . ' (' . esc_html__( 'Plugin', 'builder-shortcode-extras' ) . ')', 161 | 'fields' => [ 162 | 'bse_plugin_version' => [ 163 | 'label' => __( 'Plugin version', 'builder-shortcode-extras' ), 164 | 'value' => BSE_PLUGIN_VERSION, 165 | ], 166 | 'bse_elementor_free' => [ 167 | 'label' => __( 'Elementor free', 'builder-shortcode-extras' ), 168 | 'value' => ddw_bse_is_elementor_active() ? $string_enabled : $string_disabled, 169 | ], 170 | 'bse_elementor_pro' => [ 171 | 'label' => __( 'Elementor Pro', 'builder-shortcode-extras' ), 172 | 'value' => ddw_bse_is_elementor_pro_active() ? $string_enabled : $string_disabled, 173 | ], 174 | ], 175 | ]; 176 | 177 | /** Return modified Debug Info array */ 178 | return $debug_info; 179 | 180 | } // end function 181 | 182 | 183 | if ( ! function_exists( 'ddw_wp_site_health_remove_percentage' ) ) : 184 | 185 | add_action( 'admin_head', 'ddw_wp_site_health_remove_percentage', 100 ); 186 | /** 187 | * Remove the "Percentage Progress" display in Site Health feature as this will 188 | * get users obsessed with fullfilling a 100% where there are non-problems! 189 | * 190 | * @link https://make.wordpress.org/core/2019/04/25/site-health-check-in-5-2/ 191 | * 192 | * @since 1.0.0 193 | */ 194 | function ddw_wp_site_health_remove_percentage() { 195 | 196 | /** Bail early if not on WP 5.2+ */ 197 | if ( version_compare( $GLOBALS[ 'wp_version' ], '5.2-beta', '<' ) ) { 198 | return; 199 | } 200 | 201 | ?> 202 | 207 | =' ) ) 57 | ); 58 | 59 | } // end function 60 | 61 | 62 | /** 63 | * Check if Astra theme is active or not. 64 | * 65 | * @since 1.0.0 66 | * 67 | * @return bool TRUE if constant defined, FALSE otherwise. 68 | */ 69 | function ddw_bse_is_astra_active() { 70 | 71 | return ( defined( 'ASTRA_THEME_VERSION' ) ); 72 | 73 | } // end function 74 | 75 | 76 | /** 77 | * Check if "Astra Custom Layouts" module is active or not. 78 | * Note: Only via Astra Pro Add-On plugin. 79 | * 80 | * @since 1.0.0 81 | * 82 | * @return bool TRUE if module is active, FALSE otherwise. 83 | */ 84 | function ddw_bse_is_astra_custom_layouts_active() { 85 | 86 | //return ( defined( 'ASTRA_EXT_VER' ) || class_exists( 'Astra_Addon_Update' ) ); 87 | return ( class_exists( 'Astra_Ext_Extension' ) && Astra_Ext_Extension::is_active( 'advanced-hooks' ) ); 88 | 89 | } // end function 90 | 91 | 92 | /** 93 | * 5) Block Editor (Gutenberg) integrations - WP Core, plugins etc.: 94 | * @since 1.0.0 95 | * ----------------------------------------------------------------------------- 96 | */ 97 | 98 | /** 99 | * Check if the "Blocks Editor" is available or not. This can currently mean: 100 | * 1) WordPress is in version 5.0.0+ (will contain blocks editor by default) 101 | * 2) or, the "Gutenberg" plugin is active (it is the blocks editor) 102 | * 103 | * @since 1.0.0 104 | * 105 | * @global string $GLOBALS[ 'wp_version' ] 106 | * @return bool TRUE if blocks editor available, FALSE otherwise. 107 | */ 108 | function ddw_bse_is_block_editor_active() { 109 | 110 | if ( version_compare( $GLOBALS[ 'wp_version' ], '5.0-beta1', '>=' ) 111 | || defined( 'GUTENBERG_VERSION' ) 112 | ) { 113 | return TRUE; 114 | } 115 | 116 | return FALSE; 117 | 118 | } // end function 119 | 120 | 121 | /** 122 | * Is the Classic Editor plugin active or not? 123 | * 124 | * @since 1.0.0 125 | * 126 | * @return bool TRUE if plugin is active, FALSE otherwise. 127 | */ 128 | function ddw_bse_is_classic_editor_plugin_active() { 129 | 130 | return class_exists( 'Classic_Editor' ); 131 | 132 | } // end function 133 | 134 | 135 | /** 136 | * Is the Classic Editor Add-On plugin active or not? 137 | * 138 | * @since 1.0.0 139 | * 140 | * @return bool TRUE if Add-On plugin is active, FALSE otherwise. 141 | */ 142 | function ddw_bse_is_classic_editor_addon_active() { 143 | 144 | return function_exists( 'classic_editor_addon_post_init' ); 145 | 146 | } // end function 147 | 148 | 149 | /** 150 | * Is the Disable Gutenberg plugin active or not? 151 | * 152 | * @since 1.0.0 153 | * 154 | * @return bool TRUE if plugin is active, FALSE otherwise. 155 | */ 156 | function ddw_bse_is_disable_gutenberg_active() { 157 | 158 | return class_exists( 'DisableGutenberg' ); 159 | 160 | } // end function 161 | 162 | 163 | /** 164 | * Is the Gutenberg Ramp plugin active or not? 165 | * 166 | * @since 1.0.0 167 | * 168 | * @return bool TRUE if plugin is active, FALSE otherwise. 169 | */ 170 | function ddw_bse_is_gutenberg_ramp_active() { 171 | 172 | return class_exists( 'Gutenberg_Ramp' ); 173 | 174 | } // end function 175 | 176 | 177 | /** 178 | * Is the Gutenberg Manager plugin active or not? 179 | * 180 | * @since 1.0.0 181 | * 182 | * @return bool TRUE if plugin is active, FALSE otherwise. 183 | */ 184 | function ddw_bse_is_gutenberg_manager_active() { 185 | 186 | return function_exists( 'gm_check_gutenberg' ); 187 | 188 | } // end function 189 | 190 | 191 | /** 192 | * Is the No Gutenberg plugin active or not? 193 | * 194 | * @since 1.0.0 195 | * 196 | * @return bool TRUE if plugin is active, FALSE otherwise. 197 | */ 198 | function ddw_bse_is_nogutenberg_plugin_active() { 199 | 200 | return function_exists( 'no_gutenberg_init' ); 201 | 202 | } // end function 203 | 204 | 205 | /** 206 | * Is the Disable WP Block Editor plugin active or not? 207 | * 208 | * @since 1.0.0 209 | * 210 | * @return bool TRUE if plugin is active, FALSE otherwise. 211 | */ 212 | function ddw_bse_is_disable_wp_block_editor_active() { 213 | 214 | return function_exists( 'dwgu_disable_update' ); 215 | 216 | } // end function 217 | 218 | 219 | /** 220 | * Is the Disable WordPress "Gutenberg" Update plugin active or not? 221 | * 222 | * @since 1.0.0 223 | * 224 | * @return bool TRUE if plugin is active, FALSE otherwise. 225 | */ 226 | function ddw_bse_is_disable_wpgutenberg_update_active() { 227 | 228 | return function_exists( 'dwgu_disable_update' ); 229 | 230 | } // end function 231 | 232 | 233 | /** 234 | * When Block Editor is active, check if any external plugin is deactiving the 235 | * Block Editor. 236 | * 237 | * @since 1.0.0 238 | * 239 | * @uses ddw_bse_is_block_editor_active() 240 | * @uses ddw_bse_is_classic_editor_plugin_active() 241 | * @uses ddw_bse_is_classic_editor_addon_active() 242 | * @uses ddw_bse_is_disable_gutenberg_active() 243 | * @uses ddw_bse_is_gutenberg_ramp_active() 244 | * @uses ddw_bse_is_nogutenberg_plugin_active() 245 | * @uses ddw_bse_is_disable_wp_block_editor_active() 246 | * @uses ddw_bse_is_disable_wpgutenberg_update_active() 247 | * @uses ddw_bse_is_gutenberg_manager_active() 248 | * 249 | * @return bool TRUE if certain popular plugins are NOT globally disabling the 250 | * Block Editor. 251 | */ 252 | function ddw_bse_is_block_editor_wanted() { 253 | 254 | /** Bail early if Block Editor isn't active at all */ 255 | if ( ! ddw_bse_is_block_editor_active() ) { 256 | return FALSE; 257 | } 258 | 259 | /** 260 | * For: "Classic Editor Add-On" plugin (it deactivates Block Editor 261 | * completely, automatically). 262 | * FALSE when plugin is active. 263 | */ 264 | if ( ddw_bse_is_classic_editor_addon_active() ) { 265 | return FALSE; 266 | } 267 | 268 | 269 | /** 270 | * For: "No Gutenberg" plugin (deactivates Block Editor completely). 271 | * FALSE when plugin is active. 272 | */ 273 | if ( ddw_bse_is_nogutenberg_plugin_active() ) { 274 | return FALSE; 275 | } 276 | 277 | 278 | /** 279 | * For: "No Gutenberg" plugin (deactivates Block Editor completely). 280 | * FALSE when plugin is active. 281 | */ 282 | if ( ddw_bse_is_disable_wp_block_editor_active() ) { 283 | return FALSE; 284 | } 285 | 286 | 287 | /** 288 | * For: "Disable WordPress 'Gutenberg' Update" plugin (keeps WordPress on 289 | * the legacy 4.9 branch - no updates to 5.0+). 290 | * FALSE when plugin is active. 291 | */ 292 | if ( ddw_bse_is_disable_wpgutenberg_update_active() ) { 293 | return FALSE; 294 | } 295 | 296 | 297 | /** 298 | * For: "Classic Editor" plugin (there are various options we need to check). 299 | * FALSE when "Classic Editor" is set and users cannot change editor. 300 | */ 301 | $classic_type = get_option( 'classic-editor-replace' ); 302 | $classic_user = get_option( 'classic-editor-allow-users' ); 303 | 304 | if ( ddw_bse_is_classic_editor_plugin_active() 305 | && ( isset( $classic_type ) && 'classic' === $classic_type ) 306 | && ( isset( $classic_user ) && 'disallow' === $classic_user ) 307 | ) { 308 | return FALSE; 309 | } 310 | 311 | 312 | /** 313 | * For: "Disable Gutenberg" plugin (there are various options we need to 314 | * check). 315 | * FALSE when option 'disable for all' is set. 316 | */ 317 | $g7g_options = get_option( 'disable_gutenberg_options', 'default_disabled_all_not_saved' ); 318 | 319 | if ( ddw_bse_is_disable_gutenberg_active() 320 | && ( 321 | ( 'default_disabled_all_not_saved' === $g7g_options ) 322 | || ( isset( $g7g_options[ 'disable-all' ] ) && 1 === $g7g_options[ 'disable-all' ] ) 323 | ) 324 | ) { 325 | return FALSE; 326 | } 327 | 328 | 329 | /** 330 | * For: "Gutenberg Ramp" plugin (there are various options we need to check). 331 | */ 332 | if ( ddw_bse_is_gutenberg_ramp_active() ) { 333 | 334 | $gutenberg_ramp = Gutenberg_Ramp::get_instance(); 335 | $gbramp_types = get_option( 'gutenberg_ramp_post_types' ); 336 | 337 | /** 338 | * FALSE when no $criteria set & no post types in settings are set 339 | */ 340 | if ( FALSE === $gutenberg_ramp->active && empty( $gbramp_types ) ) { 341 | return FALSE; 342 | } 343 | 344 | } // end if 345 | 346 | 347 | /** 348 | * For: "Gutenberg Manager" plugin. 349 | */ 350 | if ( ddw_bse_is_gutenberg_manager_active() ) { 351 | 352 | $gb_manager = get_option( 'gm-global-disable' ); 353 | 354 | /** 355 | * FALSE when option is set to global disable Gutenberg 356 | */ 357 | if ( 1 === absint( $gb_manager ) ) { 358 | return FALSE; 359 | } 360 | 361 | } // end if 362 | 363 | /** For: Default - TRUE */ 364 | return TRUE; 365 | 366 | } // end function 367 | -------------------------------------------------------------------------------- /includes/functions-global.php: -------------------------------------------------------------------------------- 1 | array( 30 | 'label' => esc_attr__( 'No Integration registered', 'builder-shortcode-extras' ), 31 | 'post_type' => 'bse-custom-post-type', 32 | 'shortcode_tag' => 'no-shortcode-tag', 33 | ), 34 | ); 35 | 36 | /** Allow the array to be filtered (= adding more integrations) */ 37 | $integrations = (array) apply_filters( 38 | 'bse/filter/integrations/all', 39 | $integrations, 40 | array() 41 | ); 42 | 43 | /** Escape the values of the array */ 44 | foreach ( $integrations as $integration => $integration_data ) { 45 | 46 | $integration = sanitize_key( $integration ); 47 | $integration_data[ 'label' ] = esc_attr( $integration_data[ 'label' ] ); 48 | $integration_data[ 'post_type' ] = sanitize_key( $integration_data[ 'post_type' ] ); 49 | $integration_data[ 'shortcode_tag' ] = sanitize_key( $integration_data[ 'shortcode_tag' ] ); 50 | 51 | } // end foreach 52 | 53 | /** Return registered integrations */ 54 | return (array) $integrations; 55 | 56 | } // end function 57 | 58 | 59 | /** 60 | * Setting internal plugin helper values. 61 | * 62 | * @since 1.0.0 63 | * 64 | * @uses ddw_bse_get_db_version() 65 | * @uses genesis_get_theme_version() 66 | * 67 | * @return array $bse_info Array of info values. 68 | */ 69 | function ddw_bse_info_values() { 70 | 71 | /** Get current user */ 72 | $user = wp_get_current_user(); 73 | 74 | /** Build Newsletter URL */ 75 | $url_nl = sprintf( 76 | 'https://deckerweb.us2.list-manage.com/subscribe?u=e09bef034abf80704e5ff9809&id=380976af88&MERGE0=%1$s&MERGE1=%2$s', 77 | esc_attr( $user->user_email ), 78 | esc_attr( $user->user_firstname ) 79 | ); 80 | 81 | $bse_info = [ 82 | 83 | 'url_snippets' => 'https://github.com/deckerweb/builder-shortcode-extras/wiki/Code-Snippets', 84 | 85 | 'author' => __( 'David Decker - DECKERWEB', 'builder-shortcode-extras' ), 86 | 'author_uri' => 'https://deckerweb.de/', 87 | 'license' => 'GPL-2.0-or-later', 88 | 'url_license' => 'https://opensource.org/licenses/GPL-2.0', 89 | 'first_code' => '2019', 90 | 'plugin_icon_png' => plugins_url( '/assets/images/bse-icon.png', dirname( __FILE__ ) ), 91 | 92 | 'url_donate' => 'https://www.paypal.me/deckerweb', 93 | 'url_patreon' => 'https://www.patreon.com/deckerweb', 94 | 'url_newsletter' => $url_nl, 95 | 'url_plugin' => 'https://github.com/deckerweb/builder-shortcode-extras', 96 | 'url_plugin_docs' => 'https://github.com/deckerweb/builder-shortcode-extras/wiki', 97 | 'url_github' => 'https://github.com/deckerweb/builder-shortcode-extras', 98 | 'url_github_issues' => 'https://github.com/deckerweb/builder-shortcode-extras/issues', 99 | 'url_github_follow' => 'https://github.com/deckerweb', 100 | 101 | /** For our Shortcodes specifically */ 102 | 'php_current' => phpversion(), 103 | 'php_minimum' => '7.4', 104 | 'php_recommended' => '8.2', 105 | 'wp_current' => $GLOBALS[ 'wp_version' ], 106 | 'wp_minimum' => '6.7', 107 | 'wp_recommended' => '6.7.2', 108 | //'db_current' => esc_attr( ddw_bse_get_db_version() ), 109 | 'server_software' => esc_attr( wp_unslash( $_SERVER[ 'SERVER_SOFTWARE' ] ) ), 110 | 'mysql_minimum' => '5.0', 111 | 'mysql_recommended' => '5.6', 112 | 'mariadb_minimum' => '10.0', 113 | 'mariadb_recommended' => '10.1', 114 | 'elementor_free' => defined( 'ELEMENTOR_VERSION' ) ? ELEMENTOR_VERSION : '', 115 | 'elementor_pro' => defined( 'ELEMENTOR_PRO_VERSION' ) ? ELEMENTOR_PRO_VERSION : '', 116 | 'genesis_parent' => defined( 'PARENT_THEME_VERSION' ) ? PARENT_THEME_VERSION : '', 117 | 'genesis_child' => function_exists( 'genesis_get_theme_version' ) ? genesis_get_theme_version() : '', 118 | 'astra_theme' => defined( 'ASTRA_THEME_VERSION' ) ? ASTRA_THEME_VERSION : '', 119 | 'astra_pro' => defined( 'ASTRA_EXT_VER' ) ? ASTRA_EXT_VER : '', 120 | 121 | ]; // end of array 122 | 123 | return $bse_info; 124 | 125 | } // end function 126 | 127 | 128 | /** 129 | * Get URL of specific BTC info value. 130 | * 131 | * @since 1.0.0 132 | * 133 | * @uses ddw_bse_info_values() 134 | * 135 | * @param string $url_key String of value key from array of ddw_bse_info_values() 136 | * @param bool $raw If raw escaping or regular escaping of URL gets used 137 | * @return string URL for info value. 138 | */ 139 | function ddw_bse_get_info_url( $url_key = '', $raw = FALSE ) { 140 | 141 | $bse_info = (array) ddw_bse_info_values(); 142 | 143 | $output = esc_url( $bse_info[ sanitize_key( $url_key ) ] ); 144 | 145 | if ( TRUE === $raw ) { 146 | $output = esc_url_raw( $bse_info[ esc_attr( $url_key ) ] ); 147 | } 148 | 149 | return $output; 150 | 151 | } // end function 152 | 153 | 154 | /** 155 | * Get link with complete markup for a specific BSE info value. 156 | * 157 | * @since 1.0.0 158 | * 159 | * @uses ddw_bse_get_info_url() 160 | * 161 | * @param string $url_key String of value key 162 | * @param string $text String of text and link attribute 163 | * @param string $class String of CSS class 164 | * @return string HTML markup for linked URL. 165 | */ 166 | function ddw_bse_get_info_link( $url_key = '', $text = '', $class = '' ) { 167 | 168 | $link = sprintf( 169 | '%3$s', 170 | strtolower( esc_attr( $class ) ), //sanitize_html_class( $class ), 171 | ddw_bse_get_info_url( $url_key ), 172 | esc_html( $text ) 173 | ); 174 | 175 | return $link; 176 | 177 | } // end function 178 | 179 | 180 | /** 181 | * Get timespan of coding years for this plugin. 182 | * 183 | * @since 1.0.0 184 | * 185 | * @uses ddw_bse_info_values() 186 | * 187 | * @param int $first_year Integer number of first year 188 | * @return string Timespan of years. 189 | */ 190 | function ddw_bse_coding_years( $first_year = '' ) { 191 | 192 | $bse_info = (array) ddw_bse_info_values(); 193 | 194 | $first_year = ( empty( $first_year ) ) ? absint( $bse_info[ 'first_code' ] ) : absint( $first_year ); 195 | 196 | /** Set year of first released code */ 197 | $code_first_year = ( date( 'Y' ) == $first_year || 0 === $first_year ) ? '' : $first_year . '–'; 198 | 199 | return $code_first_year . date( 'Y' ); 200 | 201 | } // end function 202 | 203 | 204 | /** 205 | * Build string "Shortcode" for reusage. 206 | * 207 | * @since 1.0.0 208 | * 209 | * @return string Translateable string. 210 | */ 211 | function ddw_bse_string_shortcode() { 212 | 213 | return __( 'Shortcode', 'builder-shortcode-extras' ); 214 | 215 | } // end function 216 | 217 | 218 | /** 219 | * Calculate the time difference - a replacement for `human_time_diff()` until 220 | * it is improved. 221 | * 222 | * Based on BuddyPress function `bp_core_time_since()`, which in turn is based 223 | * on functions created by Dunstan Orchard - http://1976design.com 224 | * 225 | * This function will return an text representation of the time elapsed since a 226 | * given date, giving the two largest units e.g.: 227 | * 228 | * - 2 hours and 50 minutes 229 | * - 4 days 230 | * - 4 weeks and 6 days 231 | * 232 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 233 | * @link https://toolbarextras.com/go/genesis/ 234 | * @license GPLv2-or-later 235 | * 236 | * @since 1.0.0 237 | * 238 | * @param int $older_date Unix timestamp of date you want to calculate 239 | * the time since for`. 240 | * @param int|bool $newer_date Optional. Unix timestamp of date to compare 241 | * older date to. Default false (current time). 242 | * @param int $relative_depth Optional, how many units to include in 243 | * relative date. Default 2. 244 | * @return string The time difference between two dates. 245 | */ 246 | function ddw_bse_human_time_diff( $older_date, $newer_date = false, $relative_depth = 2 ) { 247 | 248 | if ( ! is_int( $older_date ) ) { 249 | return ''; 250 | } 251 | 252 | // If no newer date is given, assume now. 253 | $newer_date = $newer_date ?: time(); 254 | 255 | // Difference in seconds. 256 | $since = absint( $newer_date - $older_date ); 257 | 258 | if ( ! $since ) { 259 | return '0 ' . _x( 'seconds', 'time difference', 'builder-shortcode-extras' ); 260 | } 261 | 262 | // Hold units of time in seconds, and their pluralised strings (not translated yet). 263 | $units = [ 264 | /* translators: %s: Number of year(s). */ 265 | [ 31536000, _nx_noop( '%s year', '%s years', 'Time difference', 'builder-shortcode-extras' ) ], // 60 * 60 * 24 * 365 266 | /* translators: %s: Number of month(s). */ 267 | [ 2592000, _nx_noop( '%s month', '%s months', 'Time difference', 'builder-shortcode-extras' ) ], // 60 * 60 * 24 * 30 268 | /* translators: %s: Number of week(s). */ 269 | [ 604800, _nx_noop( '%s week', '%s weeks', 'Time difference', 'builder-shortcode-extras' ) ], // 60 * 60 * 24 * 7 270 | /* translators: %s: Number of day(s). */ 271 | [ 86400, _nx_noop( '%s day', '%s days', 'Time difference', 'builder-shortcode-extras' ) ], // 60 * 60 * 24 272 | /* translators: %s: Number of hour(s). */ 273 | [ 3600, _nx_noop( '%s hour', '%s hours', 'Time difference', 'builder-shortcode-extras' ) ], // 60 * 60 274 | /* translators: %s: Number of minute(s). */ 275 | [ 60, _nx_noop( '%s minute', '%s minutes', 'Time difference', 'builder-shortcode-extras' ) ], 276 | /* translators: %s: Number of second(s). */ 277 | [ 1, _nx_noop( '%s second', '%s seconds', 'Time difference', 'builder-shortcode-extras' ) ], 278 | ]; 279 | 280 | // Build output with as many units as specified in $relative_depth. 281 | $relative_depth = (int) $relative_depth ?: 2; 282 | 283 | $i = 0; 284 | 285 | $counted_seconds = 0; 286 | 287 | $date_partials = []; 288 | $amount_date_partials = 0; 289 | $amount_units = count( $units ); 290 | 291 | while ( $amount_date_partials < $relative_depth && $i < $amount_units ) { 292 | 293 | $seconds = $units[ $i ][0]; 294 | $count = (int) floor( ( $since - $counted_seconds ) / $seconds ); 295 | 296 | if ( 0 !== $count ) { 297 | 298 | $date_partials[] = sprintf( 299 | translate_nooped_plural( $units[ $i ][1], $count, 'builder-shortcode-extras' ), 300 | $count 301 | ); 302 | $counted_seconds += $count * $seconds; 303 | $amount_date_partials = count( $date_partials ); 304 | 305 | } // end if 306 | 307 | $i++; 308 | 309 | } // end while 310 | 311 | if ( empty( $date_partials ) ) { 312 | 313 | $output = ''; 314 | 315 | } elseif ( 1 === count( $date_partials ) ) { 316 | 317 | $output = $date_partials[0]; 318 | 319 | } else { 320 | 321 | /** Combine all but last partial using commas. */ 322 | $output = implode( ', ', array_slice( $date_partials, 0, -1 ) ); 323 | 324 | /** Add 'and' separator. */ 325 | $output .= ' ' . _x( 'and', 'Separator in time difference', 'builder-shortcode-extras' ) . ' '; 326 | 327 | /** Add last partial. */ 328 | $output .= end( $date_partials ); 329 | 330 | } // end if 331 | 332 | return $output; 333 | 334 | } // end function 335 | 336 | 337 | /** 338 | * Merge array of attributes with defaults, and apply contextual filter on array. 339 | * 340 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 341 | * @link https://toolbarextras.com/go/genesis/ 342 | * @license GPLv2-or-later 343 | * 344 | * @since 1.0.0 345 | * 346 | * @param string $context The context, to build filter name. 347 | * @param array $attributes Optional. Extra attributes to merge with defaults. 348 | * @param array $args Optional. Custom data to pass to filter. 349 | * @return array Merged and filtered attributes. 350 | */ 351 | function ddw_bse_parse_attr( $context, $attributes = [], $args = [] ) { 352 | 353 | $defaults = [ 354 | 'class' => sanitize_html_class( $context ), 355 | ]; 356 | 357 | $attributes = wp_parse_args( $attributes, $defaults ); 358 | 359 | /** Contextual filter. */ 360 | return apply_filters( 361 | "bse/filter/attr_{$context}", 362 | $attributes, 363 | $context, 364 | $args 365 | ); 366 | 367 | } // end function 368 | 369 | 370 | /** 371 | * Build list of attributes into a string and apply contextual filter on string. 372 | * 373 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 374 | * @link https://toolbarextras.com/go/genesis/ 375 | * @license GPLv2-or-later 376 | * 377 | * @since 1.0.0 378 | * 379 | * @uses ddw_bse_parse_attr() 380 | * 381 | * @param string $context The context, to build filter name. 382 | * @param array $attributes Optional. Extra attributes to merge with defaults. 383 | * @param array $args Optional. Custom data to pass to filter. 384 | * @return string String of HTML attributes and values. 385 | */ 386 | function ddw_bse_attr( $context, $attributes = [], $args = [] ) { 387 | 388 | $attributes = ddw_bse_parse_attr( $context, $attributes, $args ); 389 | 390 | $output = ''; 391 | 392 | // Cycle through attributes, build tag attribute string. 393 | foreach ( $attributes as $key => $value ) { 394 | 395 | if ( ! $value ) { 396 | continue; 397 | } 398 | 399 | if ( TRUE === $value ) { 400 | 401 | $output .= esc_html( $key ) . ' '; 402 | 403 | } else { 404 | 405 | $output .= sprintf( 406 | '%s="%s" ', 407 | esc_html( $key ), 408 | esc_attr( $value ) 409 | ); 410 | 411 | } // end if 412 | 413 | } // end foreach 414 | 415 | $output = apply_filters( 416 | "bse/filter/attr_{$context}_output", 417 | $output, 418 | $attributes, 419 | $context, 420 | $args 421 | ); 422 | 423 | return trim( $output ); 424 | 425 | } // end function 426 | 427 | 428 | /** 429 | * Helper function: This will check the modified_date of all posts and give you 430 | * the most/ least recent date. 431 | * 432 | * @since 1.0.0 433 | * 434 | * @global mixed $wpdb 435 | * 436 | * @param string $val string Defaults to MIN, only accepts MAX as alternative. 437 | * @return string UNIX Date Time Stamp, e.g. 2014-12-05 01:34:25. 438 | */ 439 | function ddw_bse_site_updated( $value = 'MIN' ) { 440 | 441 | global $wpdb; 442 | 443 | /** Sanitize $value */ 444 | $value = ( 'MIN' === $value ) ? $value : 'MAX'; 445 | 446 | /** Return date time stamp */ 447 | return $wpdb->get_var( "SELECT $value( $wpdb->posts.post_modified ) FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish'" ); 448 | 449 | } // end function 450 | 451 | 452 | /** 453 | * Get the current database version - this works for MySQL and MariaDB. 454 | * 455 | * @since 1.0.0 456 | * 457 | * @global object $GLOBALS[ 'wpdb' ] 458 | * 459 | * @return string Current database version. 460 | */ 461 | function ddw_bse_get_db_version() { 462 | 463 | //global $wpdb; 464 | 465 | return $GLOBALS[ 'wpdb' ]->get_var( "SELECT VERSION();" ); 466 | 467 | } // end function 468 | 469 | 470 | /** 471 | * Sanitize multiple HTML classes in one pass. 472 | * 473 | * Accepts either an array of `$classes`, or a space separated string of classes 474 | * and sanitizes them using the `sanitize_html_class()` WordPress function. 475 | * 476 | * @since 1.0.0 477 | * 478 | * @param array|string $classes Classes to be sanitized. 479 | * @param string $return_format Optional. The return format, 'input', 'string', or 'array'. Default is 'input'. 480 | * @return array|string String of multiple sanitized classes. 481 | */ 482 | function ddw_bse_sanitize_html_classes( $classes, $return_format = 'input' ) { 483 | 484 | if ( 'input' === $return_format ) { 485 | $return_format = is_array( $classes ) ? 'array' : 'string'; 486 | } 487 | 488 | $classes = is_array( $classes ) ? $classes : explode( ' ', $classes ); 489 | 490 | $sanitized_classes = array_map( 'sanitize_html_class', $classes ); 491 | 492 | if ( 'array' === $return_format ) { 493 | return $sanitized_classes; 494 | } 495 | 496 | return implode( ' ', $sanitized_classes ); 497 | 498 | } // end function 499 | 500 | 501 | /** 502 | * Returns the ID of a post type item based on the incoming slug. 503 | * 504 | * @link https://tommcfarlin.com/permalink-by-slug/ 505 | * @link https://wordpress.stackexchange.com/questions/4999/is-it-possible-to-get-a-page-link-from-its-slug 506 | * 507 | * @since 1.0.0 508 | * 509 | * @param string $slug The post ID of the post type item to which we're going to link. 510 | * @return string The post ID of the post type item. 511 | */ 512 | function ddw_bse_get_post_id_by_slug( $slug = '', $post_type = '' ) { 513 | 514 | /** Initialize the post_id value */ 515 | $post_id = null; 516 | 517 | /** Set the arguments for WP_Query */ 518 | $args = array( 519 | 'name' => sanitize_key( $slug ), 520 | 'max_num_posts' => 1 521 | ); 522 | 523 | /** If the optional argument is set, add it to the arguments array */ 524 | if ( '' !== $post_type ) { 525 | $args = array_merge( $args, array( 'post_type' => sanitize_key( $post_type ) ) ); 526 | } 527 | 528 | /** Run the query (and afterwards reset it) */ 529 | $query = new WP_Query( $args ); 530 | 531 | if ( $query->have_posts() ) { 532 | 533 | $query->the_post(); 534 | $post_id = get_the_ID(); 535 | wp_reset_postdata(); 536 | 537 | } // end if 538 | 539 | /** Return the determined post_id */ 540 | return $post_id; 541 | 542 | } // end function 543 | -------------------------------------------------------------------------------- /includes/index.php: -------------------------------------------------------------------------------- 1 | __( 'Astra Custom Layouts', 'builder-shortcode-extras' ), 28 | 'post_type' => 'astra-advanced-hook', 29 | 'shortcode_tag' => 'astra-layout', 30 | ); 31 | 32 | return $integrations; 33 | 34 | } // end function 35 | -------------------------------------------------------------------------------- /includes/integrations/block-editor.php: -------------------------------------------------------------------------------- 1 | __( 'WordPress Reusable Blocks', 'builder-shortcode-extras' ), 28 | 'post_type' => 'wp_block', 29 | 'shortcode_tag' => 'wpblock', 30 | ); 31 | 32 | return $integrations; 33 | 34 | } // end function 35 | 36 | 37 | add_action( 'admin_menu', 'ddw_bse_maybe_add_menu_wpblock_posttype', 20 ); 38 | /** 39 | * Add the appropriate admin menu - using the post type list table page as 40 | * the callback. 41 | * 42 | * @since 1.0.0 43 | * 44 | * @see WP Core /wp-includes/post.php for 'wp_block' capabilities 45 | * 46 | * @uses add_menu_page() 47 | * @uses add_submenu_page() 48 | * 49 | * @global string $GLOBALS[ 'admin_page_hooks' ] 50 | */ 51 | function ddw_bse_maybe_add_menu_wpblock_posttype() { 52 | 53 | /** 54 | * Bail early if the same stuff as below was already added by other plugins. 55 | */ 56 | if ( ! empty( $GLOBALS[ 'admin_page_hooks' ][ 'edit.php?post_type=wp_block' ] ) ) { 57 | return; 58 | } 59 | 60 | /** Add "Blocks" top-level Admin menu, below "Comments" */ 61 | add_menu_page( 62 | _x( 'Reusable Blocks', 'Admin page title', 'builder-shortcode-extras' ), 63 | _x( 'Blocks', 'Admin menu label', 'builder-shortcode-extras' ), 64 | 'publish_posts', 65 | 'edit.php?post_type=wp_block', 66 | '', 67 | 'dashicons-screenoptions', 68 | '25.1' // directly after comments 69 | ); 70 | 71 | /** "Blocks" submenu: "Add New" (Reusable Block) */ 72 | add_submenu_page( 73 | 'edit.php?post_type=wp_block', 74 | _x( 'Add New Reusable Block', 'Admin page title', 'builder-shortcode-extras' ), 75 | _x( 'Add New', 'Admin menu label', 'builder-shortcode-extras' ), 76 | 'publish_posts', 77 | 'post-new.php?post_type=wp_block' 78 | ); 79 | 80 | } // end function 81 | -------------------------------------------------------------------------------- /includes/integrations/index.php: -------------------------------------------------------------------------------- 1 | '', // before menu container 37 | 'after' => '', // after menu container 38 | 'class' => '', // class for wrapper 39 | 'wrapper' => 'div', // wrapper HTML tag 40 | 41 | /** For the Nav Menu */ 42 | 'menu' => '', // name, ID, slug, object 43 | 'container' => 'div', // string, bool ("false") 44 | 'container_class' => '', 45 | 'container_id' => '', 46 | 'menu_class' => 'menu', 47 | 'menu_id' => '', 48 | 'fallback_cb' => 'wp_page_menu', // function, bool ("false") 49 | 'item_before' => '', 50 | 'item_after' => '', 51 | 'link_before' => '', 52 | 'link_after' => '', 53 | 'depth' => 0, // int 54 | 'walker' => '', 55 | 'theme_location' => '', 56 | 'items_wrap' => '', 57 | 'item_spacing' => 'preserve', // string "preserve" or "discard" only 58 | ] 59 | ); 60 | 61 | /** Default shortcode attributes */ 62 | $atts = shortcode_atts( $defaults, $atts, 'bse-nav-menu' ); 63 | 64 | $nav_menu = wp_nav_menu( 65 | [ 66 | 'echo' => FALSE, 67 | 'menu' => $atts[ 'menu' ], 68 | 'container' => sanitize_key( $atts[ 'container' ] ), 69 | 'container_class' => $atts[ 'container_class' ], 70 | 'menu_class' => $atts[ 'menu_class' ], 71 | 'menu_id' => $atts[ 'menu_id' ], 72 | 'fallback_cb' => $atts[ 'fallback_cb' ], 73 | 'before' => $atts[ 'item_before' ], 74 | 'after' => $atts[ 'item_after' ], 75 | 'link_before' => $atts[ 'link_before' ], 76 | 'link_after' => $atts[ 'link_after' ], 77 | 'depth' => (int) $atts[ 'depth' ], 78 | 'walker' => $atts[ 'walker' ], 79 | 'theme_location' => $atts[ 'theme_location' ], 80 | 'items_wrap' => $atts[ 'items_wrap' ], 81 | 'item_spacing' => sanitize_key( $atts[ 'item_spacing' ] ), 82 | ] 83 | ); 84 | 85 | /** Prepare output */ 86 | $output = sprintf( 87 | '<%1$s class="bse-nav-menu%2$s">%3$s%4$s%5$s', 88 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 89 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 90 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 91 | $nav_menu, 92 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 93 | ); 94 | 95 | /** Return the output - filterable */ 96 | return apply_filters( 97 | 'bse/filter/shortcode/nav_menu', 98 | $output, 99 | $atts // additional param 100 | ); 101 | 102 | } // end function 103 | 104 | endif; 105 | 106 | 107 | if ( ! function_exists( 'ddw_bse_shortcode_item_content' ) ) : 108 | 109 | add_shortcode( 'bse-item-content', 'ddw_bse_shortcode_item_content' ); 110 | /** 111 | * Shortcode to output the content of a singular post type item by given ID. 112 | * 113 | * @since 1.0.0 114 | * 115 | * @uses ddw_bse_is_elementor_active() 116 | * 117 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 118 | * @return string Output for `footer_home_link` shortcode. 119 | */ 120 | function ddw_bse_shortcode_item_content( $atts, $content = null ) { 121 | 122 | /** Set default shortcode attributes */ 123 | $defaults = apply_filters( 124 | 'bse/filter/shortcode_defaults/item_content', 125 | [ 126 | 'id' => '', 127 | 'css' => 'false', 128 | ] 129 | ); 130 | 131 | /** Default shortcode attributes */ 132 | $atts = shortcode_atts( $defaults, $atts, 'bse-item-content' ); 133 | 134 | /** Start output buffering (we have no chance...) */ 135 | ob_start(); 136 | 137 | if ( $atts[ 'id' ] ) { 138 | 139 | /** Check if the post type item was created with Elementor */ 140 | $elementor = get_post_meta( $atts[ 'id' ], '_elementor_edit_mode', TRUE ); 141 | 142 | $include_css = false; 143 | 144 | if ( isset( $atts[ 'css' ] ) && 'false' !== $atts[ 'css' ] ) { 145 | $include_css = (bool) $atts[ 'css' ]; 146 | } 147 | 148 | /** Case: Elementor */ 149 | if ( ddw_bse_is_elementor_active() && $elementor ) { 150 | 151 | echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $atts[ 'id' ], $include_css ); 152 | 153 | } 154 | 155 | /** Case: Beaver Builder */ 156 | elseif ( class_exists( 'FLBuilder' ) && ! empty( $atts[ 'id' ] ) ) { 157 | 158 | echo do_shortcode( '[fl_builder_insert_layout id="' . $atts[ 'id' ] . '"]' ); 159 | 160 | } 161 | 162 | /** Else: Embed the regular post item content */ 163 | else { 164 | 165 | /** Get item content */ 166 | $content = $atts[ 'id' ]; 167 | 168 | if ( ! empty( $content ) ) { 169 | 170 | $template = get_post( $content ); 171 | 172 | if ( $template && ! is_wp_error( $template ) ) { 173 | $content = $template->post_content; 174 | } 175 | 176 | } 177 | 178 | /** Display item content */ 179 | echo do_shortcode( $content ); 180 | 181 | } // end if 182 | 183 | } // end if 184 | 185 | /** Return the output - from the WordPress output buffer */ 186 | return ob_get_clean(); 187 | 188 | } // end function 189 | 190 | endif; 191 | 192 | 193 | if ( ! function_exists( 'ddw_bse_shortcode_comment_form' ) ) : 194 | 195 | add_shortcode( 'bse-comment-form', 'ddw_bse_shortcode_comment_form' ); 196 | /** 197 | * Shortcode to output a comment form for a specific Post ID (or the current 198 | * post). 199 | * 200 | * @since 1.0.0 201 | * 202 | * @uses comment_form() 203 | * 204 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 205 | * @return string Output for `footer_home_link` shortcode. 206 | */ 207 | function ddw_bse_shortcode_comment_form( $atts, $content = null ) { 208 | 209 | /** Set default shortcode attributes */ 210 | $defaults = apply_filters( 211 | 'bse/filter/shortcode_defaults/comment_form', 212 | [ 213 | /** For the wrapper */ 214 | 'before' => '', 215 | 'after' => '', 216 | 'class' => '', 217 | 'wrapper' => 'div', 218 | 219 | /** For the comment form */ 220 | 'post_id' => FALSE, 221 | 'id_form' => 'commentform', 222 | 'class_form' => 'comment-form', 223 | 'title_reply' => _x( 'Leave a Reply', 'Label for Comment Form', 'builder-shortcode-extras' ), 224 | /* translators: %s - name of the author of the comment being replied to */ 225 | 'title_reply_to' => _x( 'Leave a Reply to %s', 'Label for Comment Form', 'builder-shortcode-extras' ), 226 | 'cancel_reply_link' => _x( 'Cancel reply', 'Label for Comment Form', 'builder-shortcode-extras' ), 227 | 'label_submit' => _x( 'Post Comment', 'Label for Comment Form', 'builder-shortcode-extras' ), 228 | ] 229 | ); 230 | 231 | /** Default shortcode attributes */ 232 | $atts = shortcode_atts( $defaults, $atts, 'bse-comment-form' ); 233 | 234 | $post_id = ( empty( $atts[ 'post_id' ] ) ) ? get_the_ID() : absint( $atts[ 'post_id' ] ); 235 | 236 | $args = [ 237 | 'id_form' => sanitize_html_class( $atts[ 'id_form' ], 'commentform' ), 238 | 'class_form' => sanitize_html_class( $atts[ 'class_form' ], 'comment-form' ), 239 | 'title_reply' => $atts[ 'title_reply' ], 240 | 'title_reply_to' => $atts[ 'title_reply_to' ], 241 | 'cancel_reply_link' => $atts[ 'cancel_reply_link' ], 242 | 'label_submit' => $atts[ 'label_submit' ], 243 | ]; 244 | 245 | ob_start(); 246 | comment_form( $args, $post_id ); 247 | $comment_form = ob_get_clean(); //ob_get_contents(); 248 | //ob_end_clean(); 249 | 250 | /** Prepare output */ 251 | $output = sprintf( 252 | '<%1$s class="bse-comment-form%2$s">%3$s%4$s%5$s', 253 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 254 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 255 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 256 | $comment_form, 257 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 258 | ); 259 | 260 | /** Return the output - filterable */ 261 | return apply_filters( 262 | 'bse/filter/shortcode/comment_form', 263 | $output, 264 | $atts // additional param 265 | ); 266 | 267 | } // end function 268 | 269 | endif; 270 | -------------------------------------------------------------------------------- /includes/shortcodes/elementor.php: -------------------------------------------------------------------------------- 1 | ', 69 | $shortcode 70 | ); 71 | 72 | } // end if 73 | 74 | } // end function 75 | 76 | endif; 77 | 78 | 79 | if ( ! function_exists( 'ddw_bse_shortcode_elementor_template' ) ) : 80 | 81 | add_shortcode( 'bse-elementor-template', 'ddw_bse_shortcode_elementor_template' ); 82 | /** 83 | * Shortcode to output an Elementor Saved Template by given ID. 84 | * 85 | * @since 1.0.0 86 | * 87 | * @uses \Elementor\Plugin::$instance 88 | * 89 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 90 | * @return string Output for `footer_home_link` shortcode. 91 | */ 92 | function ddw_bse_shortcode_elementor_template( $atts = [] ) { 93 | 94 | /** Set default shortcode attributes */ 95 | $defaults = apply_filters( 96 | 'bse/filter/shortcode_defaults/elementor_template', 97 | array( 98 | 'id' => '', 99 | 'css' => 'false', 100 | ) 101 | ); 102 | 103 | /** Default shortcode attributes */ 104 | $atts = shortcode_atts( $defaults, $atts, 'bse-elementor-template' ); 105 | 106 | if ( empty( $atts[ 'id' ] ) ) { 107 | return ''; 108 | } 109 | 110 | $include_css = false; 111 | 112 | if ( isset( $atts[ 'css' ] ) && 'false' !== $atts[ 'css' ] ) { 113 | $include_css = (bool) $atts[ 'css' ]; 114 | } 115 | 116 | $output = \Elementor\Plugin::$instance->frontend->get_builder_content_for_display( $atts[ 'id' ], $include_css ); 117 | 118 | /** Return the output - filterable */ 119 | return apply_filters( 120 | 'bse/filter/shortcode/elementor_template', 121 | $output, 122 | $atts // additional param 123 | ); 124 | 125 | } // end function 126 | 127 | endif; 128 | -------------------------------------------------------------------------------- /includes/shortcodes/genesis.php: -------------------------------------------------------------------------------- 1 | '', 42 | 'wrapper' => 'p', 43 | ] 44 | ); 45 | 46 | /** Default shortcode attributes */ 47 | $atts = shortcode_atts( $defaults, $atts, 'bse-genesis-footer' ); 48 | 49 | $creds_text = wp_kses_post( genesis_get_option( 'footer_text' ) ); 50 | 51 | /** Prepare output */ 52 | $output = sprintf( 53 | '<%1$s class="bse-genesis-footer%2$s">%3$s', 54 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 55 | ( ! empty( $atts[ 'class' ] ) ) ? ' ' . ddw_bse_sanitize_html_classes( $atts[ 'class' ], 'string' ) : '', 56 | do_shortcode( genesis_strip_p_tags( $creds_text ) ) 57 | ); 58 | 59 | /** Return the output - filterable */ 60 | return apply_filters( 61 | 'bse/filter/shortcode/genesis_footer', 62 | $output, 63 | $atts // additional param 64 | ); 65 | 66 | } // end function 67 | 68 | endif; 69 | 70 | 71 | if ( ! function_exists( 'ddw_bse_shortcode_genesis_breadcrumbs' ) ) : 72 | 73 | add_shortcode( 'bse-genesis-breadcrumbs', 'ddw_bse_shortcode_genesis_breadcrumbs' ); 74 | /** 75 | * Shortcode to output the complete Genesis Breadcrumb container. 76 | * 77 | * @since 1.0.0 78 | * 79 | * @uses genesis_do_breadcrumbs() 80 | * @uses ddw_bse_sanitize_html_classes() 81 | * 82 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 83 | * @return string Output for `breadcrumbs_copyright` shortcode. 84 | */ 85 | function ddw_bse_shortcode_genesis_breadcrumbs( $atts ) { 86 | 87 | /** Bail early if not in needed Genesis context */ 88 | if ( ! function_exists( 'genesis_do_breadcrumbs' ) ) { 89 | return ''; 90 | } 91 | 92 | $defaults = apply_filters( 93 | 'bse/filter/shortcode_defaults/genesis_breadcrumbs', 94 | [ 95 | 'class' => '', 96 | 'wrapper' => 'div', 97 | ] 98 | ); 99 | 100 | /** Default shortcode attributes */ 101 | $atts = shortcode_atts( $defaults, $atts, 'bse-genesis-breadcrumbs' ); 102 | 103 | /** Create the Edit link via Output Buffering (we have no chance...) */ 104 | ob_start(); 105 | genesis_do_breadcrumbs(); 106 | $genesis_breadcrumbs = ob_get_clean(); 107 | 108 | /** Prepare output */ 109 | $output = sprintf( 110 | '<%1$s class="bse-genesis-breadcrumbs%2$s">%3$s', 111 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 112 | ( ! empty( $atts[ 'class' ] ) ) ? ' ' . ddw_bse_sanitize_html_classes( $atts[ 'class' ], 'string' ) : '', 113 | $genesis_breadcrumbs 114 | ); 115 | 116 | /** Return the output - filterable */ 117 | return apply_filters( 118 | 'bse/filter/shortcode/genesis_breadcrumbs', 119 | $output, 120 | $atts // additional param 121 | ); 122 | 123 | } // end function 124 | 125 | endif; 126 | -------------------------------------------------------------------------------- /includes/shortcodes/index.php: -------------------------------------------------------------------------------- 1 | '', 40 | 'before' => '', 41 | 'copyright' => '©', 42 | 'first' => '', 43 | 'class' => '', 44 | 'wrapper' => 'span', 45 | ] 46 | ); 47 | 48 | $atts = shortcode_atts( $defaults, $atts, 'bse-copyright' ); 49 | 50 | $date_first = ''; 51 | 52 | if ( '' !== $atts[ 'first' ] && date( 'Y' ) !== $atts[ 'first' ] ) { 53 | $date_first = $atts[ 'first' ] . '–'; 54 | } 55 | 56 | /** Prepare output */ 57 | $output = sprintf( 58 | '<%1$s class="bse-copyright%2$s">%3$s%4$s%5$s', 59 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 60 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 61 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 62 | $atts[ 'copyright' ] . ' ' . $date_first . date( 'Y' ), 63 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 64 | ); 65 | 66 | /** Return the output - filterable */ 67 | return apply_filters( 68 | 'bse/filter/shortcode/bse_copyright', 69 | $output, 70 | $atts // additional param 71 | ); 72 | 73 | } // end function 74 | 75 | endif; 76 | 77 | 78 | if ( ! function_exists( 'ddw_bse_shortcode_site_title' ) ) : 79 | 80 | add_shortcode( 'bse-site-title', 'ddw_bse_shortcode_site_title' ); 81 | /** 82 | * Shortcode to output the site title. 83 | * 84 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 85 | * @link https://toolbarextras.com/go/genesis/ 86 | * @license GPLv2-or-later 87 | * 88 | * @since 1.0.0 89 | * 90 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 91 | * @return string Output for `footer_site_title` shortcode. 92 | */ 93 | function ddw_bse_shortcode_site_title( $atts ) { 94 | 95 | /** Bail early if site title is empty */ 96 | if ( empty( get_bloginfo( 'name' ) ) ) { 97 | return ''; 98 | } 99 | 100 | $defaults = apply_filters( 101 | 'bse/filter/shortcode_defaults/site_title', 102 | [ 103 | 'after' => '', 104 | 'before' => '', 105 | 'class' => '', 106 | 'wrapper' => 'span', 107 | ] 108 | ); 109 | 110 | $atts = shortcode_atts( $defaults, $atts, 'bse-site-title' ); 111 | 112 | /** Prepare output */ 113 | $output = sprintf( 114 | '<%1$s class="bse-site-title%2$s">%3$s%4$s%5$s', 115 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 116 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 117 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 118 | get_bloginfo( 'name' ), 119 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 120 | ); 121 | 122 | /** Return the output - filterable */ 123 | return apply_filters( 124 | 'bse/filter/shortcode/site_title', 125 | $output, 126 | $atts // additional param 127 | ); 128 | 129 | } // end function 130 | 131 | endif; 132 | 133 | 134 | if ( ! function_exists( 'ddw_bse_shortcode_site_slogan' ) ) : 135 | 136 | add_shortcode( 'bse-site-slogan', 'ddw_bse_shortcode_site_slogan' ); 137 | /** 138 | * Shortcode to output the site slogan (aka Description/ Tag line). 139 | * 140 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 141 | * @link https://toolbarextras.com/go/genesis/ 142 | * @license GPLv2-or-later 143 | * 144 | * @since 1.0.0 145 | * 146 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 147 | * @return string Output for `footer_site_slogan` shortcode. 148 | */ 149 | function ddw_bse_shortcode_site_slogan( $atts ) { 150 | 151 | /** Bail early if site slogan is empty */ 152 | if ( empty( get_bloginfo( 'description' ) ) ) { 153 | return ''; 154 | } 155 | 156 | $defaults = apply_filters( 157 | 'bse/filter/shortcode_defaults/site_slogan', 158 | [ 159 | 'after' => '', 160 | 'before' => '', 161 | 'class' => '', 162 | 'wrapper' => 'span', 163 | ] 164 | ); 165 | 166 | $atts = shortcode_atts( $defaults, $atts, 'bse-site-slogan' ); 167 | 168 | /** Prepare output */ 169 | $output = sprintf( 170 | '<%1$s class="bse-site-slogan%2$s">%3$s%4$s%5$s', 171 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 172 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 173 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 174 | get_bloginfo( 'description' ), 175 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 176 | ); 177 | 178 | /** Return the output - filterable */ 179 | return apply_filters( 180 | 'bse/filter/shortcode/site_slogan', 181 | $output, 182 | $atts // additional param 183 | ); 184 | 185 | } // end function 186 | 187 | endif; 188 | 189 | 190 | if ( ! function_exists( 'ddw_bse_shortcode_home_link' ) ) : 191 | 192 | add_shortcode( 'bse-home-link', 'ddw_bse_shortcode_home_link' ); 193 | /** 194 | * Shortcode to output a link to the home URL. 195 | * 196 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 197 | * @link https://toolbarextras.com/go/genesis/ 198 | * @license GPLv2-or-later 199 | * 200 | * @since 1.0.0 201 | * 202 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 203 | * @return string Output for `footer_home_link` shortcode. 204 | */ 205 | function ddw_bse_shortcode_home_link( $atts ) { 206 | 207 | $defaults = apply_filters( 208 | 'bse/filter/shortcode_defaults/home_link', 209 | [ 210 | 'after' => '', 211 | 'before' => '', 212 | 'text' => get_bloginfo( 'name' ), 213 | 'target' => '', 214 | 'rel' => '', 215 | 'class' => '', 216 | 'wrapper' => 'span', 217 | ] 218 | ); 219 | 220 | $atts = shortcode_atts( $defaults, $atts, 'bse-home-link' ); 221 | 222 | $target = sprintf( 223 | 'target="%s"', 224 | sanitize_key( $atts[ 'target' ] ) 225 | ); 226 | 227 | $rel = sprintf( 228 | 'rel="%s"', 229 | strtolower( esc_attr( $atts[ 'rel' ] ) ) 230 | ); 231 | 232 | $home_link = sprintf( 233 | '%4$s', 234 | esc_url( home_url() ), 235 | ( ! empty( $atts[ 'target' ] ) ) ? $target : '', 236 | ( ! empty( $atts[ 'target' ] ) && ! empty( $atts[ 'rel' ] ) ) ? $rel : '', 237 | $atts[ 'text' ] 238 | ); 239 | 240 | /** Prepare output */ 241 | $output = sprintf( 242 | '<%1$s class="bse-home-link%2$s">%3$s%4$s%5$s', 243 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 244 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 245 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 246 | $home_link, 247 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 248 | ); 249 | 250 | /** Return the output - filterable */ 251 | return apply_filters( 252 | 'bse/filter/shortcode/home_link', 253 | $output, 254 | $atts // additional param 255 | ); 256 | 257 | } // end function 258 | 259 | endif; 260 | 261 | 262 | if ( ! function_exists( 'ddw_bse_shortcode_loginout' ) ) : 263 | 264 | add_shortcode( 'bse-loginout', 'ddw_bse_shortcode_loginout' ); 265 | /** 266 | * Shortcode to output an admin login/ logout link. 267 | * 268 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 269 | * @link https://toolbarextras.com/go/genesis/ 270 | * @license GPLv2-or-later 271 | * 272 | * @since 1.0.0 273 | * 274 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 275 | * @return string Output for `footer_loginout` shortcode. 276 | */ 277 | function ddw_bse_shortcode_loginout( $atts ) { 278 | 279 | $defaults = apply_filters( 280 | 'bse/filter/shortcode_defaults/loginout', 281 | [ 282 | 'after' => '', 283 | 'before' => '', 284 | 'login_text' => __( 'Log in', 'builder-shortcode-extras' ), 285 | 'logout_text' => __( 'Log out', 'builder-shortcode-extras' ), 286 | 'login_target' => '', 287 | 'logout_target' => '', 288 | 'login_redirect' => '', 289 | 'logout_redirect' => '', 290 | 'class' => '', 291 | 'wrapper' => 'span', 292 | ] 293 | ); 294 | 295 | $atts = shortcode_atts( $defaults, $atts, 'bse-loginout' ); 296 | 297 | $target_login = sprintf( 298 | 'target="%s"', 299 | sanitize_key( $atts[ 'login_target' ] ) 300 | ); 301 | 302 | $target_logout = sprintf( 303 | 'target="%s"', 304 | sanitize_key( $atts[ 'logout_target' ] ) 305 | ); 306 | 307 | if ( ! is_user_logged_in() ) { 308 | 309 | $link = sprintf( 310 | '%3$s', 311 | esc_url( wp_login_url( $atts[ 'login_redirect' ] ) ), 312 | ( ! empty( $atts[ 'login_target' ] ) ) ? $target_login : '', 313 | $atts[ 'login_text' ] 314 | ); 315 | 316 | } else { 317 | 318 | $link = sprintf( 319 | '%3$s', 320 | esc_url( wp_logout_url( $atts[ 'logout_redirect' ] ) ), 321 | ( ! empty( $atts[ 'logout_target' ] ) ) ? $target_logout : '', 322 | $atts[ 'logout_text' ] 323 | ); 324 | 325 | } // end if 326 | 327 | /** Prepare output */ 328 | $output = sprintf( 329 | '<%1$s class="bse-loginout%2$s">%3$s%4$s%5$s', 330 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 331 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 332 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 333 | apply_filters( 'loginout', $link ), // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- core WP hook. 334 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 335 | ); 336 | 337 | /** Return the output - filterable */ 338 | return apply_filters( 339 | 'bse/filter/shortcode/loginout', 340 | $output, 341 | $atts // additional param 342 | ); 343 | 344 | } // end function 345 | 346 | endif; 347 | 348 | 349 | if ( ! function_exists( 'ddw_bse_shortcode_site_updated' ) ) : 350 | 351 | add_shortcode( 'bse-site-updated', 'ddw_bse_shortcode_site_updated' ); 352 | /** 353 | * Returns the date value when the content on the site was first published 354 | * or last updated. 355 | * 356 | * Note: 357 | * - both date types are taken from the "posts" DB table 358 | * - "first" = the first published post type item (post status: publish) 359 | * - "last" = the last published post type item (post status: publish) 360 | * 361 | * @since 1.0.0 362 | * 363 | * @uses ddw_bse_site_updated() 364 | * 365 | * @param array $atts Shortcode attributes 366 | * @return string Shortcode output. 367 | */ 368 | function ddw_bse_shortcode_site_updated( $atts ) { 369 | 370 | /** Set default shortcode attributes */ 371 | $defaults = apply_filters( 372 | 'bse/filter/shortcode_defaults/site_updated', 373 | [ 374 | 'before' => '', 375 | 'after' => '', 376 | 'type' => 'last', 377 | 'label_date' => '', 378 | 'date_format' => get_option( 'date_format' ), 379 | 'label_time' => '', 380 | 'time_format' => get_option( 'time_format' ), 381 | 'tooltip' => '', 382 | 'class' => '', 383 | 'wrapper' => 'span', 384 | ] 385 | ); 386 | 387 | /** Default shortcode attributes */ 388 | $atts = shortcode_atts( $defaults, $atts, 'bse-site-updated' ); 389 | 390 | $type = sanitize_key( $atts[ 'type' ] ); 391 | $type = ( 'first' === $type ) ? $type : 'last'; 392 | 393 | /** For "first": Get date & time format */ 394 | $site_first_updated_date = date_i18n( 395 | $atts[ 'date_format' ], 396 | strtotime( ddw_bse_site_updated() ) 397 | ); 398 | 399 | $site_first_updated_time = date_i18n( 400 | $atts[ 'time_format' ], 401 | strtotime( ddw_bse_site_updated() ) 402 | ); 403 | 404 | /** For "last": Get date & time format */ 405 | $site_last_updated_date = date_i18n( 406 | $atts[ 'date_format' ], 407 | strtotime( ddw_bse_site_updated( 'MAX' ) ) 408 | ); 409 | 410 | $site_last_updated_time = date_i18n( 411 | $atts[ 'time_format' ], 412 | strtotime( ddw_bse_site_updated( 'MAX' ) ) 413 | ); 414 | 415 | /** For "first": Date & time display logic */ 416 | $show_updated_date = $site_first_updated_date ? ' ' . $site_first_updated_date . '' : ''; 417 | 418 | $show_updated_time = $site_first_updated_time ? ' ' . sprintf( 419 | _x( '%s', 'Translators: shortcode, first published content time string', 'builder-shortcode-extras' ), 420 | '' . $site_first_updated_time . '' 421 | ) : ''; 422 | 423 | /** For "last": Date & time display logic */ 424 | if ( 'last' === $type ) { 425 | 426 | $show_updated_date = $site_last_updated_date ? ' ' . $site_last_updated_date . '' : ''; 427 | 428 | $show_updated_time = $site_last_updated_time ? ' ' . sprintf( 429 | _x( '%s', 'Translators: shortcode, last updated time string', 'builder-shortcode-extras' ), 430 | '' . $site_last_updated_time . '' 431 | ) : ''; 432 | 433 | } // end if 434 | 435 | $date_time_string = sprintf( 436 | '%1$s %2$s %3$s %4$s', 437 | $atts[ 'label_date' ], 438 | $show_updated_date, 439 | $atts[ 'label_time' ], 440 | $show_updated_time 441 | ); 442 | 443 | /** Prepare output */ 444 | $output = sprintf( 445 | '<%1$s class="bse-site-%2$s-updated%3$s"%4$s>%5$s%6$s%7$s', 446 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 447 | $type, 448 | ( ! empty( $atts[ 'class' ] ) ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 449 | ( ! empty( $atts[ 'tooltip' ] ) ) ? ' title="' . esc_html( $atts[ 'tooltip' ] ) . '"' : '', 450 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 451 | $date_time_string, 452 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 453 | ); 454 | 455 | /** Return the output - filterable */ 456 | return apply_filters( 457 | 'bse/filter/shortcode/site_updated', 458 | $output, 459 | $atts // additional param 460 | ); 461 | 462 | } // end function 463 | 464 | endif; 465 | -------------------------------------------------------------------------------- /includes/shortcodes/integrations.php: -------------------------------------------------------------------------------- 1 | ', 104 | $integration[ 'shortcode_tag' ], 105 | $shortcode 106 | ); 107 | 108 | } // end if 109 | 110 | } // end foreach 111 | 112 | } // end function 113 | -------------------------------------------------------------------------------- /includes/shortcodes/post.php: -------------------------------------------------------------------------------- 1 | 'post', 37 | 'status' => 'publish', 38 | 'before' => '', 39 | 'after' => '', 40 | 'class' => '', 41 | 'wrapper' => 'span', 42 | ] 43 | ); 44 | 45 | /** Default shortcode attributes */ 46 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-count' ); 47 | 48 | $post_type = sanitize_key( $atts[ 'post_type' ] ); 49 | $post_status = sanitize_key( $atts[ 'status' ] ); 50 | 51 | $post_count = wp_count_posts( $post_type ); 52 | 53 | $post_count_result = $post_count->$post_status; 54 | 55 | /** Prepare output */ 56 | $output = sprintf( 57 | '<%1$s class="bse-post-count%2$s">%3$s%4$s%5$s', 58 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 59 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 60 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 61 | absint( $post_count_result ), 62 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 63 | ); 64 | 65 | /** Return the output - filterable */ 66 | return apply_filters( 67 | 'bse/filter/shortcode/post_count', 68 | $output, 69 | $atts // additional param 70 | ); 71 | 72 | } // end function 73 | 74 | endif; 75 | 76 | 77 | if ( ! function_exists( 'ddw_bse_shortcode_post_date' ) ) : 78 | 79 | add_shortcode( 'bse-post-date', 'ddw_bse_shortcode_post_date' ); 80 | /** 81 | * Shortcode to output the date of post publication (or for any post type). 82 | * 83 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 84 | * @link https://toolbarextras.com/go/genesis/ 85 | * @license GPLv2-or-later 86 | * 87 | * @since 1.0.0 88 | * 89 | * @uses ddw_bse_human_time_diff() 90 | * 91 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 92 | * @return string Output for `post_date` shortcode. 93 | */ 94 | function ddw_bse_shortcode_post_date( $atts ) { 95 | 96 | $defaults = apply_filters( 97 | 'bse/filter/shortcode_defaults/post_date', 98 | [ 99 | 'after' => '', 100 | 'before' => '', 101 | 'post_id' => get_the_ID(), 102 | 'format' => get_option( 'date_format' ), 103 | 'label' => '', 104 | 'relative_depth' => 2, 105 | 'class' => '', 106 | 'wrapper' => 'span', 107 | ] 108 | ); 109 | 110 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-date' ); 111 | 112 | $post_id = ( ! is_null( $atts[ 'post_id' ] ) ) ? absint( $atts[ 'post_id' ] ) : null; 113 | 114 | if ( 'relative' === $atts[ 'format' ] ) { 115 | 116 | $display = ddw_bse_human_time_diff( get_the_time( 'U', $post_id ), current_time( 'timestamp' ), $atts[ 'relative_depth' ] ); 117 | $display .= ' ' . __( 'ago', 'builder-shortcode-extras' ); 118 | 119 | } else { 120 | 121 | $display = get_the_time( $atts[ 'format' ] ); 122 | 123 | } // end if 124 | 125 | $date_string = sprintf( 126 | '', 127 | ddw_bse_attr( 'entry-time' ), 128 | $atts[ 'label' ] . $display 129 | ); 130 | 131 | /** Prepare output */ 132 | $output = sprintf( 133 | '<%1$s class="bse-post-time%2$s">%3$s%4$s%5$s', 134 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 135 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 136 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 137 | $date_string, 138 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 139 | ); 140 | 141 | /** Return the output - filterable */ 142 | return apply_filters( 143 | 'bse/filter/shortcode/post_date', 144 | $output, 145 | $atts // additional param 146 | ); 147 | 148 | } // end function 149 | 150 | endif; 151 | 152 | 153 | if ( ! function_exists( 'ddw_bse_shortcode_post_time' ) ) : 154 | 155 | add_shortcode( 'bse-post-time', 'ddw_bse_shortcode_post_time' ); 156 | /** 157 | * Shortcode to output the time of post publication (or for any post type). 158 | * 159 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 160 | * @link https://toolbarextras.com/go/genesis/ 161 | * @license GPLv2-or-later 162 | * 163 | * @since 1.0.0 164 | * 165 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 166 | * @return string Output for `post_time` shortcode`. 167 | */ 168 | function ddw_bse_shortcode_post_time( $atts ) { 169 | 170 | $defaults = apply_filters( 171 | 'bse/filter/shortcode_defaults/post_time', 172 | [ 173 | 'after' => '', 174 | 'before' => '', 175 | 'post_id' => get_the_ID(), 176 | 'format' => get_option( 'time_format' ), 177 | 'label' => '', 178 | 'class' => '', 179 | 'wrapper' => 'span', 180 | ] 181 | ); 182 | 183 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-time' ); 184 | 185 | $post_id = ( ! is_null( $atts[ 'post_id' ] ) ) ? absint( $atts[ 'post_id' ] ) : null; 186 | 187 | $time_string = sprintf( 188 | '', 189 | ddw_bse_attr( 'entry-time' ), 190 | $atts[ 'label' ] . get_the_time( $atts[ 'format' ], $post_id ) 191 | ); 192 | 193 | /** Prepare output */ 194 | $output = sprintf( 195 | '<%1$s class="bse-post-time%2$s">%3$s%4$s%5$s', 196 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 197 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 198 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 199 | $time_string, 200 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 201 | ); 202 | 203 | /** Return the output - filterable */ 204 | return apply_filters( 205 | 'bse/filter/shortcode/post_time', 206 | $output, 207 | $atts // additional param 208 | ); 209 | 210 | } // end function 211 | 212 | endif; 213 | 214 | 215 | if ( ! function_exists( 'ddw_bse_shortcode_post_modified_date' ) ) : 216 | 217 | add_shortcode( 'bse-post-modified-date', 'ddw_bse_shortcode_post_modified_date' ); 218 | /** 219 | * Shortcode to output the post last modified date (or for any post type). 220 | * 221 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 222 | * @link https://toolbarextras.com/go/genesis/ 223 | * @license GPLv2-or-later 224 | * 225 | * @since 1.0.0 226 | * 227 | * @uses ddw_bse_human_time_diff() 228 | * 229 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 230 | * @return string Output for `post_modified_date` shortcode. 231 | */ 232 | function ddw_bse_shortcode_post_modified_date( $atts ) { 233 | 234 | $defaults = apply_filters( 235 | 'bse/filter/shortcode_defaults/post_modified_date', 236 | [ 237 | 'after' => '', 238 | 'before' => '', 239 | 'post_id' => get_the_ID(), 240 | 'format' => get_option( 'date_format' ), 241 | 'label' => '', 242 | 'relative_depth' => 2, 243 | 'class' => '', 244 | 'wrapper' => 'span', 245 | ] 246 | ); 247 | 248 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-modified-date' ); 249 | 250 | $post_id = ( ! is_null( $atts[ 'post_id' ] ) ) ? absint( $atts[ 'post_id' ] ) : null; 251 | 252 | if ( 'relative' === $atts[ 'format' ] ) { 253 | 254 | $display = ddw_bse_human_time_diff( get_the_modified_time( 'U', $post_id ), current_time( 'timestamp' ), $atts[ 'relative_depth' ] ); 255 | $display .= ' ' . __( 'ago', 'builder-shortcode-extras' ); 256 | 257 | } else { 258 | 259 | $display = get_the_modified_time( $atts[ 'format' ], $post_id ); 260 | 261 | } // end if 262 | 263 | $date_string = sprintf( 264 | '', 265 | ddw_bse_attr( 'entry-modified-time' ), 266 | $atts[ 'label' ] . $display 267 | ); 268 | 269 | /** Prepare output */ 270 | $output = sprintf( 271 | '<%1$s class="bse-post-modified-date%2$s">%3$s%4$s%5$s', 272 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 273 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 274 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 275 | $date_string, 276 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 277 | ); 278 | 279 | /** Return the output - filterable */ 280 | return apply_filters( 281 | 'bse/filter/shortcode/post_modified_date', 282 | $output, 283 | $atts // additional param 284 | ); 285 | 286 | } // end function 287 | 288 | endif; 289 | 290 | 291 | if ( ! function_exists( 'ddw_bse_shortcode_item_last_updated' ) ) : 292 | 293 | add_shortcode( 'bse-item-last-updated', 'ddw_bse_shortcode_item_last_updated' ); 294 | /** 295 | * Shortcode to output the date when a post type item was last updated. 296 | * 297 | * @since 1.0.0 298 | * 299 | * @uses ddw_bse_shortcode_post_modified_date() 300 | * 301 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 302 | * @return string Output for `bse-item-last-updated` shortcode. 303 | */ 304 | function ddw_bse_shortcode_item_last_updated( $atts ) { 305 | 306 | return ddw_bse_shortcode_post_modified_date( $atts ); 307 | 308 | } // end function 309 | 310 | endif; 311 | 312 | 313 | if ( ! function_exists( 'ddw_bse_shortcode_post_modified_time' ) ) : 314 | 315 | add_shortcode( 'bse-post-modified-time', 'ddw_bse_shortcode_post_modified_time' ); 316 | /** 317 | * Shortcode to output the post last modified time (or for any post type). 318 | * 319 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 320 | * @link https://toolbarextras.com/go/genesis/ 321 | * @license GPLv2-or-later 322 | * 323 | * @since 1.0.0 324 | * 325 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 326 | * @return string Output for `bse-post-modified-time` shortcode. 327 | */ 328 | function ddw_bse_shortcode_post_modified_time( $atts ) { 329 | 330 | $defaults = apply_filters( 331 | 'bse/filter/shortcode_defaults/post_modified_time', 332 | [ 333 | 'after' => '', 334 | 'before' => '', 335 | 'post_id' => get_the_ID(), 336 | 'format' => get_option( 'time_format' ), 337 | 'label' => '', 338 | 'class' => '', 339 | 'wrapper' => 'span', 340 | ] 341 | ); 342 | 343 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-modified-time' ); 344 | 345 | $post_id = ( ! is_null( $atts[ 'post_id' ] ) ) ? absint( $atts[ 'post_id' ] ) : null; 346 | 347 | $time_string = sprintf( 348 | '', 349 | ddw_bse_attr( 'entry-modified-time' ), 350 | $atts[ 'label' ] . get_the_modified_time( $atts[ 'format' ], $post_id ) 351 | ); 352 | 353 | /** Prepare output */ 354 | $output = sprintf( 355 | '<%1$s class="bse-post-modified-time%2$s">%3$s%4$s%5$s', 356 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 357 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 358 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 359 | $time_string, 360 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 361 | ); 362 | 363 | /** Return the output - filterable */ 364 | return apply_filters( 365 | 'bse/filter/shortcode/post_modified_time', 366 | $output, 367 | $atts // additional param 368 | ); 369 | 370 | } // end function 371 | 372 | endif; 373 | 374 | 375 | if ( ! function_exists( 'ddw_bse_shortcode_post_author' ) ) : 376 | 377 | add_shortcode( 'bse-post-author', 'ddw_bse_shortcode_post_author' ); 378 | /** 379 | * Shortcode to output the author of the post/ post type item (unlinked 380 | * display name). 381 | * 382 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 383 | * @link https://toolbarextras.com/go/genesis/ 384 | * @license GPLv2-or-later 385 | * 386 | * @since 1.0.0 387 | * 388 | * @uses ddw_bse_attr() 389 | * 390 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 391 | * @return string Return empty string if post type does not support `author`, or has no author assigned. 392 | * Otherwise, output for `bse-post-author` shortcode. 393 | */ 394 | function ddw_bse_shortcode_post_author( $atts ) { 395 | 396 | /** Bail early if post type supports no author */ 397 | if ( ! post_type_supports( get_post_type(), 'author' ) ) { 398 | return ''; 399 | } 400 | 401 | $author = get_the_author(); 402 | 403 | /** Bail early if there is no author */ 404 | if ( ! $author ) { 405 | return ''; 406 | } 407 | 408 | $defaults = apply_filters( 409 | 'bse/filter/shortcode_defaults/post_author', 410 | [ 411 | 'after' => '', 412 | 'before' => '', 413 | 'class' => '', 414 | 'wrapper' => 'span', 415 | ] 416 | ); 417 | 418 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-author' ); 419 | 420 | /** Author string */ 421 | $author_string = sprintf( 422 | '%s', 423 | ddw_bse_attr( 'entry-author-name' ), 424 | esc_html( $author ) 425 | ); 426 | 427 | /** Prepare output */ 428 | $output = sprintf( 429 | '<%1$s class="entry-author bse-post-author%2$s">%3$s%4$s%5$s', 430 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 431 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 432 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 433 | $author_string, 434 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 435 | ); 436 | 437 | /** Return the output - filterable */ 438 | return apply_filters( 439 | 'bse/filter/shortcode/post_author', 440 | $output, 441 | $atts // additional param 442 | ); 443 | 444 | } // end function 445 | 446 | endif; 447 | 448 | 449 | if ( ! function_exists( 'ddw_bse_shortcode_post_author_link' ) ) : 450 | 451 | add_shortcode( 'bse-post-author-link', 'ddw_bse_shortcode_post_author_link' ); 452 | /** 453 | * Shortcode to output the author of the post/ post type item (link to 454 | * author URL). 455 | * 456 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 457 | * @link https://toolbarextras.com/go/genesis/ 458 | * @license GPLv2-or-later 459 | * 460 | * @since 1.0.0 461 | * 462 | * @uses ddw_bse_shortcode_post_author() 463 | * @uses ddw_bse_attr() 464 | * 465 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 466 | * @return string Return empty string if post type does not support `author` or post has no author assigned. 467 | * Return `genesis_post_author_shortcode()` if author has no URL. 468 | * Otherwise, output for `post_author_link` shortcode. 469 | */ 470 | function ddw_bse_shortcode_post_author_link( $atts ) { 471 | 472 | /** Bail early if post type supports no author */ 473 | if ( ! post_type_supports( get_post_type(), 'author' ) ) { 474 | return ''; 475 | } 476 | 477 | $url = get_the_author_meta( 'url' ); 478 | 479 | /** If no URL, use post author shortcode function. */ 480 | if ( ! $url ) { 481 | return ddw_bse_shortcode_post_author( $atts ); 482 | } 483 | 484 | $author = get_the_author(); 485 | 486 | /** Bail early if there is no author */ 487 | if ( ! $author ) { 488 | return ''; 489 | } 490 | 491 | $defaults = apply_filters( 492 | 'bse/filter/shortcode_defaults/post_author_link', 493 | [ 494 | 'after' => '', 495 | 'before' => '', 496 | 'target' => '', 497 | 'rel' => '', 498 | 'class' => '', 499 | 'wrapper' => 'span', 500 | ] 501 | ); 502 | 503 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-author-link' ); 504 | 505 | $target = sprintf( 506 | 'target="%s"', 507 | sanitize_key( $atts[ 'target' ] ) 508 | ); 509 | 510 | $rel = sprintf( 511 | 'rel="%s"', 512 | strtolower( esc_attr( $atts[ 'rel' ] ) ) 513 | ); 514 | 515 | /** Author link */ 516 | $author_link = sprintf( 517 | '%6$s', 518 | esc_url( $url ), 519 | ( ! empty( $atts[ 'target' ] ) ) ? $target : '', 520 | ( ! empty( $atts[ 'target' ] ) && ! empty( $atts[ 'rel' ] ) ) ? $rel : '', 521 | ddw_bse_attr( 'entry-author-link' ), 522 | ddw_bse_attr( 'entry-author-name' ), 523 | esc_html( $author ) 524 | ); 525 | 526 | /** Prepare output */ 527 | $output = sprintf( 528 | '<%1$s class="entry-author bse-post-author-link%2$s">%3$s%4$s%5$s', 529 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 530 | ( ! empty( $atts[ 'class' ] ) ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 531 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 532 | $author_link, 533 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 534 | ); 535 | 536 | /** Return the output - filterable */ 537 | return apply_filters( 538 | 'bse/filter/shortcode/post_author_link', 539 | $output, 540 | $atts // additional param 541 | ); 542 | 543 | } // end function 544 | 545 | endif; 546 | 547 | 548 | if ( ! function_exists( 'ddw_bse_shortcode_post_author_posts_link' ) ) : 549 | 550 | add_shortcode( 'bse-post-author-posts-link', 'ddw_bse_shortcode_post_author_posts_link' ); 551 | /** 552 | * Shortcode to output the author of the post/ post type item (link to 553 | * author archive). 554 | * 555 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 556 | * @link https://toolbarextras.com/go/genesis/ 557 | * @license GPLv2-or-later 558 | * 559 | * @since 1.0.0 560 | * 561 | * @uses ddw_bse_attr() 562 | * 563 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 564 | * @return string Return empty string if post type does not support `author` or post has no author assigned. 565 | * Otherwise, output for `post_author_posts_link` shortcode. 566 | */ 567 | function ddw_bse_shortcode_post_author_posts_link( $atts ) { 568 | 569 | /** Bail early if post type supports no author */ 570 | if ( ! post_type_supports( get_post_type(), 'author' ) ) { 571 | return ''; 572 | } 573 | 574 | $author = get_the_author(); 575 | 576 | /** Bail early if there is no author */ 577 | if ( ! $author ) { 578 | return ''; 579 | } 580 | 581 | $defaults = apply_filters( 582 | 'bse/filter/shortcode_defaults/post_author_posts_link', 583 | [ 584 | 'after' => '', 585 | 'before' => '', 586 | 'target' => '', 587 | 'rel' => '', 588 | 'class' => '', 589 | 'wrapper' => 'span', 590 | ] 591 | ); 592 | 593 | $atts = shortcode_atts( $defaults, $atts, 'post_author_posts_link' ); 594 | 595 | $url = get_author_posts_url( get_the_author_meta( 'ID' ) ); 596 | 597 | $target = sprintf( 598 | 'target="%s"', 599 | sanitize_key( $atts[ 'target' ] ) 600 | ); 601 | 602 | $rel = sprintf( 603 | 'rel="%s"', 604 | strtolower( esc_attr( $atts[ 'rel' ] ) ) 605 | ); 606 | 607 | /** Author link */ 608 | $author_link = sprintf( 609 | '%6$s', 610 | esc_url( $url ), 611 | ( ! empty( $atts[ 'target' ] ) ) ? $target : '', 612 | ( ! empty( $atts[ 'target' ] ) && ! empty( $atts[ 'rel' ] ) ) ? $rel : '', 613 | ddw_bse_attr( 'entry-author-link' ), 614 | ddw_bse_attr( 'entry-author-name' ), 615 | esc_html( $author ) 616 | ); 617 | 618 | /** Prepare output */ 619 | $output = sprintf( 620 | '<%1$s class="entry-author bse-post-author-posts-link%2$s">%3$s%4$s%5$s', 621 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 622 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 623 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 624 | $author_link, 625 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 626 | ); 627 | 628 | /** Return the output - filterable */ 629 | return apply_filters( 630 | 'bse/filter/shortcode/post_author_posts_link', 631 | $output, 632 | $atts 633 | ); 634 | 635 | } // end function 636 | 637 | endif; 638 | 639 | 640 | if ( ! function_exists( 'ddw_bse_shortcode_post_tags' ) ) : 641 | 642 | add_shortcode( 'bse-post-tags', 'ddw_bse_shortcode_post_tags' ); 643 | /** 644 | * Shortcode to output the tag links list (Post Tags). 645 | * 646 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 647 | * @link https://toolbarextras.com/go/genesis/ 648 | * @license GPLv2-or-later 649 | * 650 | * @since 1.0.0 651 | * 652 | * @uses ddw_bse_attr() 653 | * 654 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 655 | * @return string Return empty string if the `post_tag` taxonomy is not associated with the current post type 656 | * or if the post has no tags. Otherwise, output for `post_tags` shortcode. 657 | */ 658 | function ddw_bse_shortcode_post_tags( $atts ) { 659 | 660 | if ( ! is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) { 661 | return ''; 662 | } 663 | 664 | $defaults = apply_filters( 665 | 'bse/filter/shortcode_defaults/post_tags', 666 | [ 667 | 'after' => '', 668 | 'before' => __( 'Tagged With:', 'builder-shortcode-extras' ), 669 | 'sep' => ', ', 670 | 'class' => '', 671 | 'wrapper' => 'span', 672 | ] 673 | ); 674 | 675 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-tags' ); 676 | 677 | $tags = get_the_tag_list( 678 | $atts[ 'before' ] . ' ', 679 | trim( $atts[ 'sep' ] ) . ' ', 680 | ' ' . $atts[ 'after' ] 681 | ); 682 | 683 | /** Do nothing if no tags. */ 684 | if ( ! $tags ) { 685 | return ''; 686 | } 687 | 688 | //$output = sprintf( '', ddw_bse_attr( 'entry-tags' ) ) . $tags . ''; 689 | 690 | /** Prepare output */ 691 | $output = sprintf( 692 | '<%1$s class="entry-tags bse-post-tags%2$s">%3$s', 693 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 694 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 695 | $tags 696 | ); 697 | 698 | /** Return the output - filterable */ 699 | return apply_filters( 700 | 'bse/filter/shortcode/post_tags', 701 | $output, 702 | $atts // additional param 703 | ); 704 | 705 | } // end function 706 | 707 | endif; 708 | 709 | 710 | if ( ! function_exists( 'ddw_bse_shortcode_post_categories' ) ) : 711 | 712 | add_shortcode( 'bse-post-categories', 'ddw_bse_shortcode_post_categories' ); 713 | /** 714 | * Shortcode to output the category links list (Post Categories). 715 | * 716 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 717 | * @link https://toolbarextras.com/go/genesis/ 718 | * @license GPLv2-or-later 719 | * 720 | * @since 1.0.0 721 | * 722 | * @uses ddw_bse_attr() 723 | * 724 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 725 | * @return string Return empty string if the `category` taxonomy is not associated with the current post type 726 | * or if the post has no categories. Otherwise, output for `post_categories` shortcode. 727 | */ 728 | function ddw_bse_shortcode_post_categories( $atts ) { 729 | 730 | if ( ! is_object_in_taxonomy( get_post_type(), 'category' ) ) { 731 | return ''; 732 | } 733 | 734 | $defaults = apply_filters( 735 | 'bse/filter/shortcode_defaults/post_categories', 736 | [ 737 | 'sep' => ', ', 738 | 'before' => __( 'Filed Under:', 'builder-shortcode-extras' ), 739 | 'after' => '', 740 | 'class' => '', 741 | 'wrapper' => 'span', 742 | ] 743 | ); 744 | 745 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-categories' ); 746 | 747 | $cats = get_the_category_list( trim( $atts[ 'sep' ] ) . ' ' ); 748 | 749 | /** Do nothing if there are no categories. */ 750 | if ( ! $cats ) { 751 | return ''; 752 | } 753 | 754 | /** Prepare output */ 755 | $output = sprintf( 756 | '<%1$s class="entry-categories bse-post-categories%2$s">%3$s%4$s%5$s', 757 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 758 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 759 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 760 | $cats, 761 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 762 | ); 763 | 764 | /** Return the output - filterable */ 765 | return apply_filters( 766 | 'bse/filter/shortcode/post_categories', 767 | $output, 768 | $atts // additional param 769 | ); 770 | 771 | } // end function 772 | 773 | endif; 774 | 775 | 776 | if ( ! function_exists( 'ddw_bse_shortcode_post_terms' ) ) : 777 | 778 | add_shortcode( 'bse-post-terms', 'ddw_bse_shortcode_post_terms' ); 779 | /** 780 | * Shortcode to output the linked post taxonomy terms list (for any (custom) 781 | * taxonomy). 782 | * 783 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 784 | * @link https://toolbarextras.com/go/genesis/ 785 | * @license GPLv2-or-later 786 | * 787 | * @since 1.0.0 788 | * 789 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 790 | * @return string Output for `post_terms` shortcode, or empty string on failure to retrieve terms. 791 | */ 792 | function ddw_bse_shortcode_post_terms( $atts ) { 793 | 794 | $defaults = apply_filters( 795 | 'bse/filter/shortcode_defaults/post_terms', 796 | [ 797 | 'after' => '', 798 | 'before' => __( 'Filed Under:', 'builder-shortcode-extras' ), 799 | 'sep' => ', ', 800 | 'taxonomy' => 'category', 801 | 'class' => '', 802 | 'wrapper' => 'span', 803 | ] 804 | ); 805 | 806 | /** 807 | * Post terms shortcode defaults. Allows the default args in the post 808 | * terms shortcode function to be filtered. 809 | * 810 | * @since 1.0.0 811 | * 812 | * @param array $defaults The default args array. 813 | */ 814 | $defaults = apply_filters( 'bse/filter/shortcode_defaults/post_terms', $defaults ); 815 | 816 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-terms' ); 817 | 818 | $terms = get_the_term_list( 819 | get_the_ID(), 820 | $atts[ 'taxonomy' ], 821 | $atts[ 'before' ] . ' ', 822 | trim( $atts[ 'sep' ] ) . ' ', 823 | $atts[ 'after' ] 824 | ); 825 | 826 | /** Do nothing if WP_Error object is true */ 827 | if ( is_wp_error( $terms ) ) { 828 | return ''; 829 | } 830 | 831 | /** Do nothing if terms list is empty */ 832 | if ( empty( $terms ) ) { 833 | return ''; 834 | } 835 | 836 | /* 837 | $output = sprintf( 838 | '%s', 839 | ddw_bse_attr( 'entry-terms' ), 840 | $terms 841 | ); 842 | */ 843 | 844 | /** Prepare output */ 845 | $output = sprintf( 846 | '<%1$s class="entry-terms bse-post-terms%2$s">%3$s', 847 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 848 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 849 | $terms 850 | ); 851 | 852 | /** Return the output - filterable */ 853 | return apply_filters( 854 | 'bse/filter/shortcode/post_terms', 855 | $output, 856 | $terms, // additional param 857 | $atts // additional param 858 | ); 859 | 860 | } // end function 861 | 862 | endif; 863 | 864 | 865 | if ( ! function_exists( 'ddw_bse_shortcode_post_edit' ) ) : 866 | 867 | add_shortcode( 'bse-post-edit', 'ddw_bse_shortcode_post_edit' ); 868 | /** 869 | * Shortcode to output the edit post link for logged in users. 870 | * 871 | * Function code based on: Genesis Framework by StudioPress (studiopress.com) 872 | * @link https://toolbarextras.com/go/genesis/ 873 | * @license GPLv2-or-later 874 | * 875 | * @since 1.0.0 876 | * 877 | * @param array|string $atts Shortcode attributes. Empty string if no attributes. 878 | * @return string Output for `post_edit` shortcode, or empty string if `genesis_edit_post_link` filter returns `false`. 879 | */ 880 | function ddw_bse_shortcode_post_edit( $atts ) { 881 | 882 | /** Bail early if deactivated via our filter */ 883 | if ( ! apply_filters( 'bse/filter/edit_post_link', TRUE ) ) { 884 | return ''; 885 | } 886 | 887 | $defaults = apply_filters( 888 | 'bse/filter/shortcode_defaults/post_edit', 889 | [ 890 | 'after' => '', 891 | 'before' => '', 892 | 'label' => __( '(Edit)', 'builder-shortcode-extras' ), 893 | 'class' => '', 894 | 'wrapper' => 'span', 895 | ] 896 | ); 897 | 898 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-edit' ); 899 | 900 | /** Create the Edit link via Output Buffering (we have no chance...) */ 901 | ob_start(); 902 | edit_post_link( $atts[ 'label' ], $atts[ 'before' ], $atts[ 'after' ] ); 903 | $edit = ob_get_clean(); 904 | 905 | /** Prepare output */ 906 | $output = sprintf( 907 | '<%1$s class="bse-post-edit%2$s">%3$s', 908 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 909 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 910 | $edit 911 | ); 912 | 913 | //$output = $edit; 914 | 915 | /** Return the output - filterable */ 916 | return apply_filters( 917 | 'bse/filter/shortcode/post_edit', 918 | $output, 919 | $atts // additional param 920 | ); 921 | 922 | } // end function 923 | 924 | endif; 925 | 926 | 927 | if ( ! function_exists( 'ddw_bse_shortcode_post_link' ) ) : 928 | 929 | add_shortcode( 'bse-post-link', 'ddw_bse_shortcode_post_link' ); 930 | /** 931 | * Shortcode to output the current number of all items of a given post type 932 | * for a given post status. 933 | * 934 | * @since 1.0.0 935 | * 936 | * @uses ddw_bse_get_post_id_by_slug() 937 | * 938 | * @param array $atts Array of Shortcode attributes. 939 | * @param string $content Content of Shortcode. 940 | * @return string Filterable text string of user's ID. 941 | */ 942 | function ddw_bse_shortcode_post_link( $atts, $content ) { 943 | 944 | /** Set default shortcode attributes */ 945 | $defaults = apply_filters( 946 | 'bse/filter/shortcode_defaults/post_link', 947 | [ 948 | 'id' => '', 949 | 'slug' => '', 950 | 'post_type' => '', 951 | 'privacy' => '', 952 | 'text' => '', 953 | 'target' => '', 954 | 'rel' => '', 955 | 'before' => '', 956 | 'after' => '', 957 | 'class' => '', 958 | 'wrapper' => 'span', 959 | ] 960 | ); 961 | 962 | /** Default shortcode attributes */ 963 | $atts = shortcode_atts( $defaults, $atts, 'bse-post-link' ); 964 | 965 | $target = sprintf( 966 | 'target="%s"', 967 | sanitize_key( $atts[ 'target' ] ) 968 | ); 969 | 970 | $rel = sprintf( 971 | 'rel="%s"', 972 | strtolower( esc_attr( $atts[ 'rel' ] ) ) 973 | ); 974 | 975 | $bool_array = array( 'yes', '1', 'true' ); 976 | $privacy = ( in_array( strtolower( $atts[ 'privacy' ] ), $bool_array ) ) ? get_option( 'wp_page_for_privacy_policy' ) : ''; 977 | $post_id = ( '' !== $atts[ 'privacy' ] && '' !== $privacy ) ? absint( $privacy ) : absint( $atts[ 'id' ] ); 978 | $permalink = null; 979 | $title = null; 980 | 981 | if ( '' !== $post_id ) { 982 | 983 | $permalink = get_permalink( $post_id ); 984 | $title = get_the_title( $post_id ); 985 | 986 | } elseif ( '' === $post_id && '' !== $atts[ 'slug' ] ) { 987 | 988 | $permalink = get_permalink( ddw_bse_get_post_id_by_slug( $atts[ 'slug' ], $atts[ 'post_type' ] ) ); 989 | $title = get_the_title( ddw_bse_get_post_id_by_slug( $atts[ 'slug' ], $atts[ 'post_type' ] ) ); 990 | 991 | } // end if 992 | 993 | $post_link = sprintf( 994 | '%4$s', 995 | esc_url( $permalink ), 996 | ( ! empty( $atts[ 'target' ] ) ) ? $target : '', 997 | ( ! empty( $atts[ 'target' ] ) && ! empty( $atts[ 'rel' ] ) ) ? $rel : '', 998 | ( empty( $atts[ 'text' ] ) ) ? $title : $atts[ 'text' ] 999 | ); 1000 | 1001 | /** Prepare output */ 1002 | $output = sprintf( 1003 | '<%1$s class="bse-post-link%2$s">%3$s%4$s%5$s', 1004 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 1005 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 1006 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 1007 | $post_link, 1008 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 1009 | ); 1010 | 1011 | /** Return the output - filterable */ 1012 | return apply_filters( 1013 | 'bse/filter/shortcode/post_link', 1014 | $output, 1015 | $atts // additional param 1016 | ); 1017 | 1018 | } // end function 1019 | 1020 | endif; 1021 | -------------------------------------------------------------------------------- /includes/shortcodes/user.php: -------------------------------------------------------------------------------- 1 | '', 33 | 'field' => 'display_name', 34 | 'default' => '', 35 | 'before' => '', 36 | 'after' => '', 37 | 'class' => '', 38 | 'wrapper' => 'span', 39 | ) 40 | ); 41 | 42 | /** Default shortcode attributes */ 43 | $atts = shortcode_atts( $defaults, $atts, 'bse-user' ); 44 | 45 | 46 | $output_text = ''; 47 | 48 | /** Bail early if password gets requested - not allowed! */ 49 | if ( 'user_pass' === $atts[ 'field' ] ) { 50 | 51 | return sprintf( 52 | '%s: %s', 53 | __( 'User', 'builder-shortcode-extras' ), 54 | __( 'The password field is not allowed', 'builder-shortcode-extras' ) 55 | ); 56 | 57 | } // end if 58 | 59 | /** Optionally get current user ID */ 60 | if ( ! $atts[ 'user_id' ] ) { 61 | $atts[ 'user_id' ] = get_current_user_id(); 62 | } 63 | 64 | /** Check user ID - Bail early if no proper ID */ 65 | if ( ! is_numeric( $atts[ 'user_id' ] ) || $atts[ 'user_id' ] < 0 ) { 66 | 67 | return sprintf( 68 | '%s: %s', 69 | __( 'User', 'builder-shortcode-extras' ), 70 | __( 'The user ID is incorrect', 'builder-shortcode-extras' ) 71 | ); 72 | 73 | } // end if 74 | 75 | /** Get the user object, by ID */ 76 | $user = get_user_by( 'id', $atts[ 'user_id' ] ); 77 | 78 | /** Get the requested user data by 'field' if user was found */ 79 | $user_data = ( $user && isset( $user->data->{ $atts[ 'field' ] } ) ) ? $user->data->{ $atts[ 'field' ] } : $atts[ 'default' ]; 80 | 81 | /** Prepare output */ 82 | $output = sprintf( 83 | '<%1$s class="bse-user%2$s">%3$s%4$s%5$s', 84 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 85 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 86 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 87 | ( $user_data ) ? $user_data : '', 88 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 89 | ); 90 | 91 | /** Return the output - filterable */ 92 | return apply_filters( 93 | 'bse/filter/shortcode/user', 94 | $output, 95 | $atts // additional param 96 | ); 97 | 98 | } // end function 99 | 100 | endif; 101 | 102 | 103 | if ( ! function_exists( 'ddw_bse_shortcode_user_id' ) ) : 104 | 105 | add_shortcode( 'bse-userid', 'ddw_bse_shortcode_user_id' ); 106 | /** 107 | * Shortcode to output a users ID. 108 | * 109 | * @since 1.0.0 110 | * 111 | * @param array $atts Array of Shortcode attributes. 112 | * @param string $content Content of Shortcode. 113 | * @return string Filterable text string of user's ID. 114 | */ 115 | function ddw_bse_shortcode_user_id( $atts, $content ) { 116 | 117 | /** Bail early if not logged in */ 118 | if ( ! is_user_logged_in() ) { 119 | return; 120 | } 121 | 122 | /** Get current user */ 123 | $user = wp_get_current_user(); 124 | 125 | /** Output */ 126 | return $user->ID; 127 | 128 | } // end function 129 | 130 | endif; 131 | 132 | 133 | if ( ! function_exists( 'ddw_bse_shortcode_user_email' ) ) : 134 | 135 | add_shortcode( 'bse-email', 'ddw_bse_shortcode_user_email' ); 136 | /** 137 | * Shortcode to output a users email. 138 | * 139 | * @since 1.0.0 140 | * 141 | * @param array $atts Array of Shortcode attributes. 142 | * @param string $content Content of Shortcode. 143 | * @return string Filterable text string of user's email. 144 | */ 145 | function ddw_bse_shortcode_user_email( $atts, $content ) { 146 | 147 | /** Bail early if not logged in */ 148 | if ( ! is_user_logged_in() ) { 149 | return; 150 | } 151 | 152 | /** Get current user */ 153 | $user = wp_get_current_user(); 154 | 155 | /** Output */ 156 | return $user->user_email; 157 | 158 | } // end function 159 | 160 | endif; 161 | 162 | 163 | if ( ! function_exists( 'ddw_bse_shortcode_user_login_name' ) ) : 164 | 165 | add_shortcode( 'bse-login', 'ddw_bse_shortcode_user_login_name' ); 166 | /** 167 | * Shortcode to output a users login handle/name. 168 | * 169 | * @since 1.0.0 170 | * 171 | * @param array $atts Array of Shortcode attributes. 172 | * @param string $content Content of Shortcode. 173 | * @return string Filterable text string of user's login name. 174 | */ 175 | function ddw_bse_shortcode_user_login_name( $atts, $content ) { 176 | 177 | /** Bail early if not logged in */ 178 | if ( ! is_user_logged_in() ) { 179 | return; 180 | } 181 | 182 | /** Get current user */ 183 | $user = wp_get_current_user(); 184 | 185 | /** Output */ 186 | return $user->user_login; 187 | 188 | } // end function 189 | 190 | endif; 191 | 192 | 193 | if ( ! function_exists( 'ddw_bse_shortcode_user_display_name' ) ) : 194 | 195 | add_shortcode( 'bse-displayname', 'ddw_bse_shortcode_user_display_name' ); 196 | /** 197 | * Shortcode to output a users display name. 198 | * 199 | * @since 1.0.0 200 | * 201 | * @param array $atts Array of Shortcode attributes. 202 | * @param string $content Content of Shortcode. 203 | * @return string Filterable text string of user's display name. 204 | */ 205 | function ddw_bse_shortcode_user_display_name( $atts, $content ) { 206 | 207 | /** Bail early if not logged in */ 208 | if ( ! is_user_logged_in() ) { 209 | return; 210 | } 211 | 212 | /** Get current user */ 213 | $user = wp_get_current_user(); 214 | 215 | /** Output */ 216 | return ! empty( $user->display_name ) ? esc_attr( $user->display_name ) : ''; 217 | 218 | } // end function 219 | 220 | endif; 221 | 222 | 223 | if ( ! function_exists( 'ddw_bse_shortcode_user_firstname' ) ) : 224 | 225 | add_shortcode( 'bse-firstname', 'ddw_bse_shortcode_user_firstname' ); 226 | /** 227 | * Shortcode to output a users first name. 228 | * 229 | * @since 1.0.0 230 | * 231 | * @param array $atts Array of Shortcode attributes. 232 | * @param string $content Content of Shortcode. 233 | * @return string Filterable text string of user's first name. 234 | */ 235 | function ddw_bse_shortcode_user_firstname( $atts ) { 236 | 237 | /** Bail early if not logged in */ 238 | if ( ! is_user_logged_in() ) { 239 | return; 240 | } 241 | 242 | /** Get current user */ 243 | $user = wp_get_current_user(); 244 | 245 | /** Output */ 246 | return ! empty( $user->user_firstname ) ? esc_attr( $user->user_firstname ) : esc_attr( $user->display_name ); 247 | 248 | } // end function 249 | 250 | endif; 251 | 252 | 253 | if ( ! function_exists( 'ddw_bse_shortcode_user_lastname' ) ) : 254 | 255 | add_shortcode( 'bse-lastname', 'ddw_bse_shortcode_user_lastname' ); 256 | /** 257 | * Shortcode to output a users last name. 258 | * 259 | * @since 1.0.0 260 | * 261 | * @param array $atts Array of Shortcode attributes. 262 | * @param string $content Content of Shortcode. 263 | * @return string Filterable text string of user's last name. 264 | */ 265 | function ddw_bse_shortcode_user_lastname( $atts ) { 266 | 267 | /** Bail early if not logged in */ 268 | if ( ! is_user_logged_in() ) { 269 | return; 270 | } 271 | 272 | /** Get current user */ 273 | $user = wp_get_current_user(); 274 | 275 | /** Output */ 276 | return ! empty( $user->user_lastname ) ? esc_attr( $user->user_lastname ) : ''; 277 | 278 | } // end function 279 | 280 | endif; 281 | -------------------------------------------------------------------------------- /includes/shortcodes/version.php: -------------------------------------------------------------------------------- 1 | 'version', 37 | 'plugin' => 'bse', 38 | 'constant' => '', 39 | 'custom' => '', 40 | 'before' => '', 41 | 'after' => '', 42 | 'class' => '', 43 | 'wrapper' => 'span', 44 | ] 45 | ); 46 | 47 | /** Default shortcode attributes */ 48 | $atts = shortcode_atts( $defaults, $atts, 'bse-version' ); 49 | 50 | $type = sanitize_key( $atts[ 'type' ] ); 51 | $plugin = sanitize_key( $atts[ 'plugin' ] ); 52 | $version = ''; 53 | $defined = ''; 54 | $constant = ''; 55 | $bse = defined( 'BSE_PLUGIN_VERSION' ) ? BSE_PLUGIN_VERSION : ''; 56 | $sys_types = [ 57 | 'php_current', 'php_minimum', 'php_recommended', 58 | 'wp_current', 'wp_minimum', 'wp_recommended', 59 | //'db_current', 60 | 'server_software', 61 | 'mysql_minimum', 'mysql_recommended', 62 | 'mariadb_minimum', 'mariadb_recommended', 63 | 'elementor_free', 'elementor_pro', 64 | 'genesis_parent', 'genesis_child', 65 | 'astra_theme', 'astra_pro', 66 | ]; 67 | 68 | if ( 'bse' === $plugin && 'version' === $type ) { 69 | 70 | $version = $bse; 71 | 72 | } elseif ( 'required' === $type ) { 73 | 74 | $plugin = strtoupper( $plugin ); 75 | $defined = constant( $plugin . '_REQUIRED_BASE_PLUGIN_VERSION' ); 76 | $version = $defined ? $defined : $bse; 77 | 78 | } elseif ( 'custom' === $type ) { 79 | 80 | $version = wp_filter_nohtml_kses( $atts[ 'custom' ] ); 81 | 82 | } elseif ( 'constant' === $type ) { 83 | 84 | $constant = strtoupper( sanitize_key( $atts[ 'constant' ] ) ); 85 | $constant = constant( $constant ); 86 | $version = $constant ? $constant : __( '(Not defined)', 'builder-shortcode-extras' ); 87 | 88 | } elseif ( 'db_current' === $type ) { 89 | 90 | if ( method_exists( $wpdb, 'db_version' ) ) { 91 | $version = preg_replace( '/[^0-9.].*/', '', $wpdb->db_version() ); 92 | } else { 93 | $version = 'N/A'; 94 | } 95 | 96 | } elseif ( in_array( $type, $sys_types ) ) { 97 | 98 | $bse_info = ddw_bse_info_values(); 99 | $version = $bse_info[ $type ]; 100 | 101 | } // end if 102 | 103 | /** Prepare output */ 104 | $output = sprintf( 105 | '<%1$s class="bse-version%2$s">%3$s%4$s%5$s', 106 | strtolower( sanitize_html_class( $atts[ 'wrapper' ] ) ), 107 | ! empty( $atts[ 'class' ] ) ? ' ' . sanitize_html_class( $atts[ 'class' ] ) : '', 108 | ( ! empty( $atts[ 'before' ] ) ) ? esc_html__( $atts[ 'before' ] ) . ' ' : '', 109 | ( ! is_null( $version ) ) ? $version : '', 110 | ( ! empty( $atts[ 'after' ] ) ) ? ' ' . esc_html__( $atts[ 'after' ] ) : '' 111 | ); 112 | 113 | /** Return the output - filterable */ 114 | return apply_filters( 115 | 'bse/filter/shortcode/version', 116 | $output, 117 | $atts // additional param 118 | ); 119 | 120 | } // end function 121 | 122 | } // end if 123 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | \n" 7 | "Language-Team: David Decker DECKERWEB.de\n" 8 | "Language: de_DE\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.5\n" 14 | "X-Poedit-Basepath: ..\n" 15 | "X-Poedit-Flags-xgettext: --add-comments=translators:\n" 16 | "X-Poedit-WPHeader: builder-shortcode-extras.php\n" 17 | "X-Poedit-SourceCharset: UTF-8\n" 18 | "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" 19 | "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" 20 | "_nx_noop:3c,1,2;__ngettext_noop:1,2\n" 21 | "X-Poedit-SearchPath-0: .\n" 22 | "X-Poedit-SearchPathExcluded-0: *.min.js\n" 23 | 24 | #: includes/admin/admin-extras.php:61 25 | msgctxt "Plugins page listing" 26 | msgid "Support" 27 | msgstr "Support" 28 | 29 | #: includes/admin/admin-extras.php:68 30 | msgctxt "Plugins page listing" 31 | msgid "Code Snippets" 32 | msgstr "Code-Snippets" 33 | 34 | #: includes/admin/admin-extras.php:75 35 | msgctxt "Plugins page listing" 36 | msgid "Donate" 37 | msgstr "Spenden" 38 | 39 | #: includes/admin/admin-extras.php:82 40 | msgctxt "Plugins page listing" 41 | msgid "Join our Newsletter" 42 | msgstr "Newsletter jetzt!" 43 | 44 | #: includes/admin/admin-extras.php:155 45 | msgid "Enabled" 46 | msgstr "Aktiviert" 47 | 48 | #: includes/admin/admin-extras.php:156 49 | msgid "Disabled" 50 | msgstr "Deaktiviert" 51 | 52 | #. Plugin Name of the plugin/theme 53 | #: includes/admin/admin-extras.php:160 54 | msgid "Builder Shortcode Extras" 55 | msgstr "Builder Shortcode Extras" 56 | 57 | #: includes/admin/admin-extras.php:160 58 | msgid "Plugin" 59 | msgstr "Plugin" 60 | 61 | #: includes/admin/admin-extras.php:163 62 | msgid "Plugin version" 63 | msgstr "Plugin-Version" 64 | 65 | #: includes/admin/admin-extras.php:167 66 | msgid "Elementor free" 67 | msgstr "Elementor Free Version" 68 | 69 | #: includes/admin/admin-extras.php:171 70 | msgid "Elementor Pro" 71 | msgstr "Elementor Pro" 72 | 73 | #: includes/functions-global.php:30 74 | msgid "No Integration registered" 75 | msgstr "Keine Integration registriert" 76 | 77 | #. Author of the plugin/theme 78 | #: includes/functions-global.php:85 79 | msgid "David Decker - DECKERWEB" 80 | msgstr "David Decker - DECKERWEB" 81 | 82 | #: includes/functions-global.php:213 83 | msgid "Shortcode" 84 | msgstr "Shortcode" 85 | 86 | #: includes/functions-global.php:259 87 | msgctxt "time difference" 88 | msgid "seconds" 89 | msgstr "Sekunden" 90 | 91 | #. translators: %s: Number of year(s). 92 | #: includes/functions-global.php:265 93 | #, php-format 94 | msgctxt "Time difference" 95 | msgid "%s year" 96 | msgid_plural "%s years" 97 | msgstr[0] "%s Jahr" 98 | msgstr[1] "%s Jahre" 99 | 100 | #. translators: %s: Number of month(s). 101 | #: includes/functions-global.php:267 102 | #, php-format 103 | msgctxt "Time difference" 104 | msgid "%s month" 105 | msgid_plural "%s months" 106 | msgstr[0] "%s Monat" 107 | msgstr[1] "%s Monate" 108 | 109 | #. translators: %s: Number of week(s). 110 | #: includes/functions-global.php:269 111 | #, php-format 112 | msgctxt "Time difference" 113 | msgid "%s week" 114 | msgid_plural "%s weeks" 115 | msgstr[0] "%s Woche" 116 | msgstr[1] "%s Wochen" 117 | 118 | #. translators: %s: Number of day(s). 119 | #: includes/functions-global.php:271 120 | #, php-format 121 | msgctxt "Time difference" 122 | msgid "%s day" 123 | msgid_plural "%s days" 124 | msgstr[0] "%s Tag" 125 | msgstr[1] "%s Tage" 126 | 127 | #. translators: %s: Number of hour(s). 128 | #: includes/functions-global.php:273 129 | #, php-format 130 | msgctxt "Time difference" 131 | msgid "%s hour" 132 | msgid_plural "%s hours" 133 | msgstr[0] "%s Stunde" 134 | msgstr[1] "%s Stunden" 135 | 136 | #. translators: %s: Number of minute(s). 137 | #: includes/functions-global.php:275 138 | #, php-format 139 | msgctxt "Time difference" 140 | msgid "%s minute" 141 | msgid_plural "%s minutes" 142 | msgstr[0] "%s Minute" 143 | msgstr[1] "%s Minuten" 144 | 145 | #. translators: %s: Number of second(s). 146 | #: includes/functions-global.php:277 147 | #, php-format 148 | msgctxt "Time difference" 149 | msgid "%s second" 150 | msgid_plural "%s seconds" 151 | msgstr[0] "%s Sekunde" 152 | msgstr[1] "%s Sekunden" 153 | 154 | #: includes/functions-global.php:325 155 | msgctxt "Separator in time difference" 156 | msgid "and" 157 | msgstr "und" 158 | 159 | #: includes/integrations/astra.php:27 160 | msgid "Astra Custom Layouts" 161 | msgstr "Astra Eigene Layouts" 162 | 163 | #: includes/integrations/block-editor.php:27 164 | msgid "WordPress Reusable Blocks" 165 | msgstr "WordPress Wiederverwendbare Blöcke" 166 | 167 | #: includes/integrations/block-editor.php:62 168 | msgctxt "Admin page title" 169 | msgid "Reusable Blocks" 170 | msgstr "Wiederverwendbare Blöcke" 171 | 172 | #: includes/integrations/block-editor.php:63 173 | msgctxt "Admin menu label" 174 | msgid "Blocks" 175 | msgstr "Blöcke" 176 | 177 | #: includes/integrations/block-editor.php:74 178 | msgctxt "Admin page title" 179 | msgid "Add New Reusable Block" 180 | msgstr "Neuen wiederverwendbaren Block erstellen" 181 | 182 | #: includes/integrations/block-editor.php:75 183 | msgctxt "Admin menu label" 184 | msgid "Add New" 185 | msgstr "Erstellen" 186 | 187 | #: includes/shortcodes/content.php:223 188 | msgctxt "Label for Comment Form" 189 | msgid "Leave a Reply" 190 | msgstr "Hinterlasse eine Antwort" 191 | 192 | #. translators: %s - name of the author of the comment being replied to 193 | #: includes/shortcodes/content.php:225 194 | #, php-format 195 | msgctxt "Label for Comment Form" 196 | msgid "Leave a Reply to %s" 197 | msgstr "Hinterlasse eine Antwort an %s" 198 | 199 | #: includes/shortcodes/content.php:226 200 | msgctxt "Label for Comment Form" 201 | msgid "Cancel reply" 202 | msgstr "Antwort abbrechen" 203 | 204 | #: includes/shortcodes/content.php:227 205 | msgctxt "Label for Comment Form" 206 | msgid "Post Comment" 207 | msgstr "Kommentar absenden" 208 | 209 | #: includes/shortcodes/info.php:284 210 | msgid "Log in" 211 | msgstr "Anmelden" 212 | 213 | #: includes/shortcodes/info.php:285 214 | msgid "Log out" 215 | msgstr "Abmelden" 216 | 217 | #: includes/shortcodes/info.php:419 218 | #, php-format 219 | msgctxt "Translators: shortcode, first published content time string" 220 | msgid "%s" 221 | msgstr "%s" 222 | 223 | #: includes/shortcodes/info.php:429 224 | #, php-format 225 | msgctxt "Translators: shortcode, last updated time string" 226 | msgid "%s" 227 | msgstr "%s" 228 | 229 | #: includes/shortcodes/post.php:117 includes/shortcodes/post.php:255 230 | msgid "ago" 231 | msgstr "vor" 232 | 233 | #: includes/shortcodes/post.php:668 234 | msgid "Tagged With:" 235 | msgstr "Stichwörter:" 236 | 237 | #: includes/shortcodes/post.php:738 includes/shortcodes/post.php:798 238 | msgid "Filed Under:" 239 | msgstr "Abgelegt unter:" 240 | 241 | #: includes/shortcodes/post.php:892 242 | msgid "(Edit)" 243 | msgstr "(Bearbeiten)" 244 | 245 | #: includes/shortcodes/user.php:53 includes/shortcodes/user.php:69 246 | msgid "User" 247 | msgstr "Anwender" 248 | 249 | #: includes/shortcodes/user.php:54 250 | msgid "The password field is not allowed" 251 | msgstr "Das Passwortfeld ist nicht erlaubt" 252 | 253 | #: includes/shortcodes/user.php:70 254 | msgid "The user ID is incorrect" 255 | msgstr "Die Benutzer-ID ist falsch" 256 | 257 | #: includes/shortcodes/version.php:86 258 | msgid "(Not defined)" 259 | msgstr "(Nicht definiert)" 260 | 261 | #. Plugin URI of the plugin/theme 262 | msgid "https://github.com/deckerweb/builder-shortcode-extras" 263 | msgstr "https://github.com/deckerweb/builder-shortcode-extras" 264 | 265 | #. Description of the plugin/theme 266 | msgid "" 267 | "A collection of totally useful extra Shortcodes to make the life of Site " 268 | "Builders more easy." 269 | msgstr "" 270 | "Eine Sammlung von sehr nützlichen zusätzlichen Shortcodes, um das Leben von " 271 | "Site Buildern zu erleichtern." 272 | 273 | #. Author URI of the plugin/theme 274 | msgid "https://deckerweb.de/" 275 | msgstr "https://deckerweb.de/" 276 | 277 | #~ msgctxt "Plugins page listing" 278 | #~ msgid "Facebook Group" 279 | #~ msgstr "Facebook Gruppe" 280 | 281 | #~ msgctxt "Plugins page listing" 282 | #~ msgid "Translations" 283 | #~ msgstr "Übersetzungen" 284 | 285 | #~ msgctxt "Plugin installer: Tab name in installer toolbar" 286 | #~ msgid "Newest" 287 | #~ msgstr "Neueste" 288 | 289 | #~ msgctxt "Plugin card: plugin version" 290 | #~ msgid "Version:" 291 | #~ msgstr "Version:" 292 | 293 | #~ msgctxt "Plugin installer: Tab name in installer toolbar" 294 | #~ msgid "deckerweb Plugins" 295 | #~ msgstr "deckerweb Plugins" 296 | 297 | #~ msgctxt "Plugin installer: Page title" 298 | #~ msgid "deckerweb Plugins" 299 | #~ msgstr "deckerweb Plugins" 300 | 301 | #~ msgid "" 302 | #~ "Great helper tools for Site Builders to save time and get more productive" 303 | #~ msgstr "" 304 | #~ "Großartige Helferlein-Plugins für Site-Builder, um wertvolle Zeit zu " 305 | #~ "sparen und noch produktiver zu werden" 306 | 307 | #, php-format 308 | #~ msgid "You can use any of our free plugins or premium plugins from %s" 309 | #~ msgstr "" 310 | #~ "Du kannst jedes unserer kostenlosen Plugins oder Premium-Plugins von %s " 311 | #~ "verwenden" 312 | 313 | #~ msgid "Join our Newsletter" 314 | #~ msgstr "Newsletter jetzt!" 315 | 316 | #~ msgid "Facebook User Group" 317 | #~ msgstr "Facebook Nutzer-Gruppe" 318 | 319 | #, php-format 320 | #~ msgid "%s 5-star rating" 321 | #~ msgstr "%s 5-Sterne-Bewertung" 322 | 323 | #, php-format 324 | #~ msgid "" 325 | #~ "Hello! Seems like you are using the Shortcodes from %s for quite a while " 326 | #~ "— Thanks so much!" 327 | #~ msgstr "" 328 | #~ "Hallo! Es scheint so, als ob du die Shortcodes von %s schon eine ganze " 329 | #~ "Weile verwendest - vielen Dank!" 330 | 331 | #, php-format 332 | #~ msgid "" 333 | #~ "Could you please do me a BIG favor and give it a %s on WordPress.org? " 334 | #~ "This would boost my motivation and help other users make a comfortable " 335 | #~ "decision while saving time for various tasks of a site builder." 336 | #~ msgstr "" 337 | #~ "Könntest du mir bitte einen GROSSEN Gefallen tun und dem Plugin eine %s " 338 | #~ "auf WordPress.org geben? Dies würde meine Motivation steigern und anderen " 339 | #~ "Nutzern helfen, eine komfortable Entscheidung zu treffen und gleichzeitig " 340 | #~ "Zeit für verschiedene Aufgaben eines Site-Builders zu sparen." 341 | 342 | #~ msgid "Ok, you deserve it" 343 | #~ msgstr "Ok, ihr habt es verdient" 344 | 345 | #~ msgid "Maybe later" 346 | #~ msgstr "Vielleicht später" 347 | 348 | #~ msgid "I already did" 349 | #~ msgstr "Habe ich schon erledigt" 350 | 351 | #~ msgid "You must be logged in to run this script." 352 | #~ msgstr "Du musst angemeldet sein, um dieses Skript ausführen zu können." 353 | 354 | #~ msgid "You do not have permission to run this script." 355 | #~ msgstr "Du hast keine Berechtigung, um dieses Skript ausführen zu können." 356 | 357 | #~ msgid "Builder Template Categories" 358 | #~ msgstr "Builder Template-Kategorien" 359 | 360 | #~ msgctxt "For Builder Template Categories Plugin" 361 | #~ msgid "Template Categories" 362 | #~ msgstr "Template-Kategorien" 363 | 364 | #~ msgid "" 365 | #~ "Enjoyed %1$s? Please leave us a %2$s. We really appreciate your support!" 366 | #~ msgstr "" 367 | #~ "Gefällt dir %1$s? Dann gib uns bitte eine %2$s. Wir schätzen deine " 368 | #~ "Unterstützung!" 369 | -------------------------------------------------------------------------------- /languages/builder-shortcode-extras-de_DE_formal.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deckerweb/builder-shortcode-extras/c10c5b01ae334df649f3e3fe7bd19612095ab2ae/languages/builder-shortcode-extras-de_DE_formal.mo -------------------------------------------------------------------------------- /languages/builder-shortcode-extras-de_DE_formal.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: Builder Shortcode Extras\n" 4 | "POT-Creation-Date: 2025-03-15 09:53+0100\n" 5 | "PO-Revision-Date: 2025-03-15 09:54+0100\n" 6 | "Last-Translator: David Decker DECKERWEB.de \n" 7 | "Language-Team: David Decker DECKERWEB.de\n" 8 | "Language: de_DE@formal\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.5\n" 14 | "X-Poedit-Basepath: ..\n" 15 | "X-Poedit-Flags-xgettext: --add-comments=translators:\n" 16 | "X-Poedit-WPHeader: builder-shortcode-extras.php\n" 17 | "X-Poedit-SourceCharset: UTF-8\n" 18 | "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" 19 | "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" 20 | "_nx_noop:3c,1,2;__ngettext_noop:1,2\n" 21 | "X-Poedit-SearchPath-0: .\n" 22 | "X-Poedit-SearchPathExcluded-0: *.min.js\n" 23 | 24 | #: includes/admin/admin-extras.php:61 25 | msgctxt "Plugins page listing" 26 | msgid "Support" 27 | msgstr "Support" 28 | 29 | #: includes/admin/admin-extras.php:68 30 | msgctxt "Plugins page listing" 31 | msgid "Code Snippets" 32 | msgstr "Code-Snippets" 33 | 34 | #: includes/admin/admin-extras.php:75 35 | msgctxt "Plugins page listing" 36 | msgid "Donate" 37 | msgstr "Spenden" 38 | 39 | #: includes/admin/admin-extras.php:82 40 | msgctxt "Plugins page listing" 41 | msgid "Join our Newsletter" 42 | msgstr "Newsletter jetzt!" 43 | 44 | #: includes/admin/admin-extras.php:155 45 | msgid "Enabled" 46 | msgstr "Aktiviert" 47 | 48 | #: includes/admin/admin-extras.php:156 49 | msgid "Disabled" 50 | msgstr "Deaktiviert" 51 | 52 | #. Plugin Name of the plugin/theme 53 | #: includes/admin/admin-extras.php:160 54 | msgid "Builder Shortcode Extras" 55 | msgstr "Builder Shortcode Extras" 56 | 57 | #: includes/admin/admin-extras.php:160 58 | msgid "Plugin" 59 | msgstr "Plugin" 60 | 61 | #: includes/admin/admin-extras.php:163 62 | msgid "Plugin version" 63 | msgstr "Plugin-Version" 64 | 65 | #: includes/admin/admin-extras.php:167 66 | msgid "Elementor free" 67 | msgstr "Elementor Free Version" 68 | 69 | #: includes/admin/admin-extras.php:171 70 | msgid "Elementor Pro" 71 | msgstr "Elementor Pro" 72 | 73 | #: includes/functions-global.php:30 74 | msgid "No Integration registered" 75 | msgstr "Keine Integration registriert" 76 | 77 | #. Author of the plugin/theme 78 | #: includes/functions-global.php:85 79 | msgid "David Decker - DECKERWEB" 80 | msgstr "David Decker - DECKERWEB" 81 | 82 | #: includes/functions-global.php:213 83 | msgid "Shortcode" 84 | msgstr "Shortcode" 85 | 86 | #: includes/functions-global.php:259 87 | msgctxt "time difference" 88 | msgid "seconds" 89 | msgstr "Sekunden" 90 | 91 | #. translators: %s: Number of year(s). 92 | #: includes/functions-global.php:265 93 | #, php-format 94 | msgctxt "Time difference" 95 | msgid "%s year" 96 | msgid_plural "%s years" 97 | msgstr[0] "%s Jahr" 98 | msgstr[1] "%s Jahre" 99 | 100 | #. translators: %s: Number of month(s). 101 | #: includes/functions-global.php:267 102 | #, php-format 103 | msgctxt "Time difference" 104 | msgid "%s month" 105 | msgid_plural "%s months" 106 | msgstr[0] "%s Monat" 107 | msgstr[1] "%s Monate" 108 | 109 | #. translators: %s: Number of week(s). 110 | #: includes/functions-global.php:269 111 | #, php-format 112 | msgctxt "Time difference" 113 | msgid "%s week" 114 | msgid_plural "%s weeks" 115 | msgstr[0] "%s Woche" 116 | msgstr[1] "%s Wochen" 117 | 118 | #. translators: %s: Number of day(s). 119 | #: includes/functions-global.php:271 120 | #, php-format 121 | msgctxt "Time difference" 122 | msgid "%s day" 123 | msgid_plural "%s days" 124 | msgstr[0] "%s Tag" 125 | msgstr[1] "%s Tage" 126 | 127 | #. translators: %s: Number of hour(s). 128 | #: includes/functions-global.php:273 129 | #, php-format 130 | msgctxt "Time difference" 131 | msgid "%s hour" 132 | msgid_plural "%s hours" 133 | msgstr[0] "%s Stunde" 134 | msgstr[1] "%s Stunden" 135 | 136 | #. translators: %s: Number of minute(s). 137 | #: includes/functions-global.php:275 138 | #, php-format 139 | msgctxt "Time difference" 140 | msgid "%s minute" 141 | msgid_plural "%s minutes" 142 | msgstr[0] "%s Minute" 143 | msgstr[1] "%s Minuten" 144 | 145 | #. translators: %s: Number of second(s). 146 | #: includes/functions-global.php:277 147 | #, php-format 148 | msgctxt "Time difference" 149 | msgid "%s second" 150 | msgid_plural "%s seconds" 151 | msgstr[0] "%s Sekunde" 152 | msgstr[1] "%s Sekunden" 153 | 154 | #: includes/functions-global.php:325 155 | msgctxt "Separator in time difference" 156 | msgid "and" 157 | msgstr "und" 158 | 159 | #: includes/integrations/astra.php:27 160 | msgid "Astra Custom Layouts" 161 | msgstr "Astra Eigene Layouts" 162 | 163 | #: includes/integrations/block-editor.php:27 164 | msgid "WordPress Reusable Blocks" 165 | msgstr "WordPress Wiederverwendbare Blöcke" 166 | 167 | #: includes/integrations/block-editor.php:62 168 | msgctxt "Admin page title" 169 | msgid "Reusable Blocks" 170 | msgstr "Wiederverwendbare Blöcke" 171 | 172 | #: includes/integrations/block-editor.php:63 173 | msgctxt "Admin menu label" 174 | msgid "Blocks" 175 | msgstr "Blöcke" 176 | 177 | #: includes/integrations/block-editor.php:74 178 | msgctxt "Admin page title" 179 | msgid "Add New Reusable Block" 180 | msgstr "Neuen wiederverwendbaren Block erstellen" 181 | 182 | #: includes/integrations/block-editor.php:75 183 | msgctxt "Admin menu label" 184 | msgid "Add New" 185 | msgstr "Erstellen" 186 | 187 | #: includes/shortcodes/content.php:223 188 | msgctxt "Label for Comment Form" 189 | msgid "Leave a Reply" 190 | msgstr "Hinterlassen Sie eine Antwort" 191 | 192 | #. translators: %s - name of the author of the comment being replied to 193 | #: includes/shortcodes/content.php:225 194 | #, php-format 195 | msgctxt "Label for Comment Form" 196 | msgid "Leave a Reply to %s" 197 | msgstr "Hinterlassen Sie eine Antwort an %s" 198 | 199 | #: includes/shortcodes/content.php:226 200 | msgctxt "Label for Comment Form" 201 | msgid "Cancel reply" 202 | msgstr "Antwort abbrechen" 203 | 204 | #: includes/shortcodes/content.php:227 205 | msgctxt "Label for Comment Form" 206 | msgid "Post Comment" 207 | msgstr "Kommentar absenden" 208 | 209 | #: includes/shortcodes/info.php:284 210 | msgid "Log in" 211 | msgstr "Anmelden" 212 | 213 | #: includes/shortcodes/info.php:285 214 | msgid "Log out" 215 | msgstr "Abmelden" 216 | 217 | #: includes/shortcodes/info.php:419 218 | #, php-format 219 | msgctxt "Translators: shortcode, first published content time string" 220 | msgid "%s" 221 | msgstr "%s" 222 | 223 | #: includes/shortcodes/info.php:429 224 | #, php-format 225 | msgctxt "Translators: shortcode, last updated time string" 226 | msgid "%s" 227 | msgstr "%s" 228 | 229 | #: includes/shortcodes/post.php:117 includes/shortcodes/post.php:255 230 | msgid "ago" 231 | msgstr "vor" 232 | 233 | #: includes/shortcodes/post.php:668 234 | msgid "Tagged With:" 235 | msgstr "Stichwörter:" 236 | 237 | #: includes/shortcodes/post.php:738 includes/shortcodes/post.php:798 238 | msgid "Filed Under:" 239 | msgstr "Abgelegt unter:" 240 | 241 | #: includes/shortcodes/post.php:892 242 | msgid "(Edit)" 243 | msgstr "(Bearbeiten)" 244 | 245 | #: includes/shortcodes/user.php:53 includes/shortcodes/user.php:69 246 | msgid "User" 247 | msgstr "Anwender" 248 | 249 | #: includes/shortcodes/user.php:54 250 | msgid "The password field is not allowed" 251 | msgstr "Das Passwortfeld ist nicht erlaubt" 252 | 253 | #: includes/shortcodes/user.php:70 254 | msgid "The user ID is incorrect" 255 | msgstr "Die Benutzer-ID ist falsch" 256 | 257 | #: includes/shortcodes/version.php:86 258 | msgid "(Not defined)" 259 | msgstr "(Nicht definiert)" 260 | 261 | #. Plugin URI of the plugin/theme 262 | msgid "https://github.com/deckerweb/builder-shortcode-extras" 263 | msgstr "https://github.com/deckerweb/builder-shortcode-extras" 264 | 265 | #. Description of the plugin/theme 266 | msgid "" 267 | "A collection of totally useful extra Shortcodes to make the life of Site " 268 | "Builders more easy." 269 | msgstr "" 270 | "Eine Sammlung von sehr nützlichen zusätzlichen Shortcodes, um das Leben von " 271 | "Site Buildern zu erleichtern." 272 | 273 | #. Author URI of the plugin/theme 274 | msgid "https://deckerweb.de/" 275 | msgstr "https://deckerweb.de/" 276 | 277 | #~ msgctxt "Plugins page listing" 278 | #~ msgid "Facebook Group" 279 | #~ msgstr "Facebook Gruppe" 280 | 281 | #~ msgctxt "Plugins page listing" 282 | #~ msgid "Translations" 283 | #~ msgstr "Übersetzungen" 284 | 285 | #~ msgctxt "Plugin installer: Tab name in installer toolbar" 286 | #~ msgid "Newest" 287 | #~ msgstr "Neueste" 288 | 289 | #~ msgctxt "Plugin card: plugin version" 290 | #~ msgid "Version:" 291 | #~ msgstr "Version:" 292 | 293 | #~ msgctxt "Plugin installer: Tab name in installer toolbar" 294 | #~ msgid "deckerweb Plugins" 295 | #~ msgstr "deckerweb Plugins" 296 | 297 | #~ msgctxt "Plugin installer: Page title" 298 | #~ msgid "deckerweb Plugins" 299 | #~ msgstr "deckerweb Plugins" 300 | 301 | #~ msgid "" 302 | #~ "Great helper tools for Site Builders to save time and get more productive" 303 | #~ msgstr "" 304 | #~ "Großartige Helferlein-Plugins für Site-Builder, um wertvolle Zeit zu " 305 | #~ "sparen und noch produktiver zu werden" 306 | 307 | #, php-format 308 | #~ msgid "You can use any of our free plugins or premium plugins from %s" 309 | #~ msgstr "" 310 | #~ "Sie können jedes unserer kostenlosen Plugins oder Premium-Plugins von %s " 311 | #~ "verwenden" 312 | 313 | #~ msgid "Join our Newsletter" 314 | #~ msgstr "Newsletter jetzt!" 315 | 316 | #~ msgid "Facebook User Group" 317 | #~ msgstr "Facebook Nutzer-Gruppe" 318 | 319 | #, php-format 320 | #~ msgid "%s 5-star rating" 321 | #~ msgstr "%s 5-Sterne-Bewertung" 322 | 323 | #, php-format 324 | #~ msgid "" 325 | #~ "Hello! Seems like you are using the Shortcodes from %s for quite a while " 326 | #~ "— Thanks so much!" 327 | #~ msgstr "" 328 | #~ "Hallo! Es Scheint so, als ob Sie die Shortcodes von %s schon eine ganze " 329 | #~ "Weile verwenden - vielen Dank!" 330 | 331 | #, php-format 332 | #~ msgid "" 333 | #~ "Could you please do me a BIG favor and give it a %s on WordPress.org? " 334 | #~ "This would boost my motivation and help other users make a comfortable " 335 | #~ "decision while saving time for various tasks of a site builder." 336 | #~ msgstr "" 337 | #~ "Könnten Sie mir bitte einen GROSSEN Gefallen tun und dem Plugin eine %s " 338 | #~ "auf WordPress.org geben? Dies würde meine Motivation steigern und anderen " 339 | #~ "Nutzern helfen, eine komfortable Entscheidung zu treffen und gleichzeitig " 340 | #~ "Zeit für verschiedene Aufgaben eines Site-Builders zu sparen." 341 | 342 | #~ msgid "Ok, you deserve it" 343 | #~ msgstr "Ok, Sie haben es verdient" 344 | 345 | #~ msgid "Maybe later" 346 | #~ msgstr "Vielleicht später" 347 | 348 | #~ msgid "I already did" 349 | #~ msgstr "Habe ich schon erledigt" 350 | 351 | #~ msgid "You must be logged in to run this script." 352 | #~ msgstr "Sie müssen angemeldet sein, um dieses Skript ausführen zu können." 353 | 354 | #~ msgid "You do not have permission to run this script." 355 | #~ msgstr "Sie haben keine Berechtigung, um dieses Skript ausführen zu können." 356 | 357 | #~ msgid "Builder Template Categories" 358 | #~ msgstr "Builder Template-Kategorien" 359 | 360 | #~ msgctxt "For Builder Template Categories Plugin" 361 | #~ msgid "Template Categories" 362 | #~ msgstr "Template-Kategorien" 363 | 364 | #~ msgid "" 365 | #~ "Enjoyed %1$s? Please leave us a %2$s. We really appreciate your support!" 366 | #~ msgstr "" 367 | #~ "Gefällt Ihnen %1$s? Dann geben Sie uns bitte eine %2$s. Wir schätzen Ihre " 368 | #~ "Unterstützung!" 369 | -------------------------------------------------------------------------------- /languages/builder-shortcode-extras.pot: -------------------------------------------------------------------------------- 1 | #, fuzzy 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Builder Shortcode Extras\n" 5 | "POT-Creation-Date: 2025-03-15 09:53+0100\n" 6 | "PO-Revision-Date: 2019-09-05 11:58+0200\n" 7 | "Last-Translator: David Decker DECKERWEB.de\n" 8 | "Language-Team: David Decker DECKERWEB.de\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" 13 | "X-Generator: Poedit 3.5\n" 14 | "X-Poedit-Basepath: ..\n" 15 | "X-Poedit-Flags-xgettext: --add-comments=translators:\n" 16 | "X-Poedit-WPHeader: builder-shortcode-extras.php\n" 17 | "X-Poedit-SourceCharset: UTF-8\n" 18 | "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" 19 | "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" 20 | "_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" 21 | "X-Poedit-SearchPath-0: .\n" 22 | "X-Poedit-SearchPathExcluded-0: *.min.js\n" 23 | 24 | #: includes/admin/admin-extras.php:61 25 | msgctxt "Plugins page listing" 26 | msgid "Support" 27 | msgstr "" 28 | 29 | #: includes/admin/admin-extras.php:68 30 | msgctxt "Plugins page listing" 31 | msgid "Code Snippets" 32 | msgstr "" 33 | 34 | #: includes/admin/admin-extras.php:75 35 | msgctxt "Plugins page listing" 36 | msgid "Donate" 37 | msgstr "" 38 | 39 | #: includes/admin/admin-extras.php:82 40 | msgctxt "Plugins page listing" 41 | msgid "Join our Newsletter" 42 | msgstr "" 43 | 44 | #: includes/admin/admin-extras.php:155 45 | msgid "Enabled" 46 | msgstr "" 47 | 48 | #: includes/admin/admin-extras.php:156 49 | msgid "Disabled" 50 | msgstr "" 51 | 52 | #. Plugin Name of the plugin/theme 53 | #: includes/admin/admin-extras.php:160 54 | msgid "Builder Shortcode Extras" 55 | msgstr "" 56 | 57 | #: includes/admin/admin-extras.php:160 58 | msgid "Plugin" 59 | msgstr "" 60 | 61 | #: includes/admin/admin-extras.php:163 62 | msgid "Plugin version" 63 | msgstr "" 64 | 65 | #: includes/admin/admin-extras.php:167 66 | msgid "Elementor free" 67 | msgstr "" 68 | 69 | #: includes/admin/admin-extras.php:171 70 | msgid "Elementor Pro" 71 | msgstr "" 72 | 73 | #: includes/functions-global.php:30 74 | msgid "No Integration registered" 75 | msgstr "" 76 | 77 | #. Author of the plugin/theme 78 | #: includes/functions-global.php:85 79 | msgid "David Decker - DECKERWEB" 80 | msgstr "" 81 | 82 | #: includes/functions-global.php:213 83 | msgid "Shortcode" 84 | msgstr "" 85 | 86 | #: includes/functions-global.php:259 87 | msgctxt "time difference" 88 | msgid "seconds" 89 | msgstr "" 90 | 91 | #. translators: %s: Number of year(s). 92 | #: includes/functions-global.php:265 93 | #, php-format 94 | msgctxt "Time difference" 95 | msgid "%s year" 96 | msgid_plural "%s years" 97 | msgstr[0] "" 98 | msgstr[1] "" 99 | 100 | #. translators: %s: Number of month(s). 101 | #: includes/functions-global.php:267 102 | #, php-format 103 | msgctxt "Time difference" 104 | msgid "%s month" 105 | msgid_plural "%s months" 106 | msgstr[0] "" 107 | msgstr[1] "" 108 | 109 | #. translators: %s: Number of week(s). 110 | #: includes/functions-global.php:269 111 | #, php-format 112 | msgctxt "Time difference" 113 | msgid "%s week" 114 | msgid_plural "%s weeks" 115 | msgstr[0] "" 116 | msgstr[1] "" 117 | 118 | #. translators: %s: Number of day(s). 119 | #: includes/functions-global.php:271 120 | #, php-format 121 | msgctxt "Time difference" 122 | msgid "%s day" 123 | msgid_plural "%s days" 124 | msgstr[0] "" 125 | msgstr[1] "" 126 | 127 | #. translators: %s: Number of hour(s). 128 | #: includes/functions-global.php:273 129 | #, php-format 130 | msgctxt "Time difference" 131 | msgid "%s hour" 132 | msgid_plural "%s hours" 133 | msgstr[0] "" 134 | msgstr[1] "" 135 | 136 | #. translators: %s: Number of minute(s). 137 | #: includes/functions-global.php:275 138 | #, php-format 139 | msgctxt "Time difference" 140 | msgid "%s minute" 141 | msgid_plural "%s minutes" 142 | msgstr[0] "" 143 | msgstr[1] "" 144 | 145 | #. translators: %s: Number of second(s). 146 | #: includes/functions-global.php:277 147 | #, php-format 148 | msgctxt "Time difference" 149 | msgid "%s second" 150 | msgid_plural "%s seconds" 151 | msgstr[0] "" 152 | msgstr[1] "" 153 | 154 | #: includes/functions-global.php:325 155 | msgctxt "Separator in time difference" 156 | msgid "and" 157 | msgstr "" 158 | 159 | #: includes/integrations/astra.php:27 160 | msgid "Astra Custom Layouts" 161 | msgstr "" 162 | 163 | #: includes/integrations/block-editor.php:27 164 | msgid "WordPress Reusable Blocks" 165 | msgstr "" 166 | 167 | #: includes/integrations/block-editor.php:62 168 | msgctxt "Admin page title" 169 | msgid "Reusable Blocks" 170 | msgstr "" 171 | 172 | #: includes/integrations/block-editor.php:63 173 | msgctxt "Admin menu label" 174 | msgid "Blocks" 175 | msgstr "" 176 | 177 | #: includes/integrations/block-editor.php:74 178 | msgctxt "Admin page title" 179 | msgid "Add New Reusable Block" 180 | msgstr "" 181 | 182 | #: includes/integrations/block-editor.php:75 183 | msgctxt "Admin menu label" 184 | msgid "Add New" 185 | msgstr "" 186 | 187 | #: includes/shortcodes/content.php:223 188 | msgctxt "Label for Comment Form" 189 | msgid "Leave a Reply" 190 | msgstr "" 191 | 192 | #. translators: %s - name of the author of the comment being replied to 193 | #: includes/shortcodes/content.php:225 194 | #, php-format 195 | msgctxt "Label for Comment Form" 196 | msgid "Leave a Reply to %s" 197 | msgstr "" 198 | 199 | #: includes/shortcodes/content.php:226 200 | msgctxt "Label for Comment Form" 201 | msgid "Cancel reply" 202 | msgstr "" 203 | 204 | #: includes/shortcodes/content.php:227 205 | msgctxt "Label for Comment Form" 206 | msgid "Post Comment" 207 | msgstr "" 208 | 209 | #: includes/shortcodes/info.php:284 210 | msgid "Log in" 211 | msgstr "" 212 | 213 | #: includes/shortcodes/info.php:285 214 | msgid "Log out" 215 | msgstr "" 216 | 217 | #: includes/shortcodes/info.php:419 218 | #, php-format 219 | msgctxt "Translators: shortcode, first published content time string" 220 | msgid "%s" 221 | msgstr "" 222 | 223 | #: includes/shortcodes/info.php:429 224 | #, php-format 225 | msgctxt "Translators: shortcode, last updated time string" 226 | msgid "%s" 227 | msgstr "" 228 | 229 | #: includes/shortcodes/post.php:117 includes/shortcodes/post.php:255 230 | msgid "ago" 231 | msgstr "" 232 | 233 | #: includes/shortcodes/post.php:668 234 | msgid "Tagged With:" 235 | msgstr "" 236 | 237 | #: includes/shortcodes/post.php:738 includes/shortcodes/post.php:798 238 | msgid "Filed Under:" 239 | msgstr "" 240 | 241 | #: includes/shortcodes/post.php:892 242 | msgid "(Edit)" 243 | msgstr "" 244 | 245 | #: includes/shortcodes/user.php:53 includes/shortcodes/user.php:69 246 | msgid "User" 247 | msgstr "" 248 | 249 | #: includes/shortcodes/user.php:54 250 | msgid "The password field is not allowed" 251 | msgstr "" 252 | 253 | #: includes/shortcodes/user.php:70 254 | msgid "The user ID is incorrect" 255 | msgstr "" 256 | 257 | #: includes/shortcodes/version.php:86 258 | msgid "(Not defined)" 259 | msgstr "" 260 | 261 | #. Plugin URI of the plugin/theme 262 | msgid "https://github.com/deckerweb/builder-shortcode-extras" 263 | msgstr "" 264 | 265 | #. Description of the plugin/theme 266 | msgid "" 267 | "A collection of totally useful extra Shortcodes to make the life of Site " 268 | "Builders more easy." 269 | msgstr "" 270 | 271 | #. Author URI of the plugin/theme 272 | msgid "https://deckerweb.de/" 273 | msgstr "" 274 | -------------------------------------------------------------------------------- /languages/index.php: -------------------------------------------------------------------------------- 1 |