| Example | Format |
|---|---|
| 2021 | YYYY |
| 🦏 | 🦏 |
| 202108 | YYYYMM |
| 2021-08 | YYYY-MM |
| 🦏 | 🦏 |
| 8/5 | M/D |
| 08/05 | MM/DD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? // <- remove this line if you copy/paste into Code Snippets Pro | |
| /** | |
| * WP Settings: Set All Themes & Plugins to Auto-Update | |
| * | |
| * Set all themes and plug-ins to auto update. | |
| * * Run only as needed | |
| */ | |
| namespace tOrGBs5p; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // <- remove this line if you copy/paste into Code Snippets Pro | |
| /** | |
| * Posts: Auto Set First Image as Featured | |
| * | |
| * Takes the first image attached to a post and sets it as the post's featured image. | |
| * | |
| * Code from: https://wordpress.stackexchange.com/a/131436 | |
| */ | |
| namespace xKceqd2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? // <- remove this line if you copy/paste into Code Snippets Pro | |
| namespace cpZgLjBJ; | |
| function add_metabox_of_post_attachments() | |
| { | |
| add_meta_box('att_thumb_display', 'Attachments', '\cpZgLjBJ\generate_list_of_post_attachments', 'post'); // Change your post type here | |
| } | |
| function generate_list_of_post_attachments($post) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Adapted from: https://www.shibashake.com/wp/add-custom-taxonomy-tags-to-your-wordpress-permalinks | |
| namespace Bs3LfBs; | |
| function add_custom_tax_permalink($permalink, $post_id, $leavename) { | |
| // name of the custom taxonomy | |
| $taxName = 'song'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace FyjaHmx9; | |
| require_once(ABSPATH.'wp-admin/includes/user.php' ); | |
| \FyjaHmx9\create_and_delete_n_new_users(); | |
| function create_new_user() { | |
| $username = \uniqid(); | |
| $userdata = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * | |
| * ALLOW USER TO EDIT POST IF THEY ARE SELECTED AS THE PM | |
| * Preferred way would be to use `user_has_cap` - see: | |
| * - https://wordpress.stackexchange.com/a/360990/5380 | |
| * - https://developer.wordpress.org/reference/hooks/user_has_cap/ | |
| * However, WordPress has a nasty long standing issue with this line: | |
| * - https://bit.ly/3I72jOn | |
| * Where it forces a check to make sure the author is current user, which prevents any efforts to customize capabilities by using a `user_has_cap` filter. The bug is documented here: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "generator":"Code Snippets v3.3.0", | |
| "date_created":"2023-04-08 21:52", | |
| "snippets":[ | |
| { | |
| "name":"Block Editor: Open Advanced Panel on Hover [SnipSnip.pro]", | |
| "desc":"When using Gutenberg Block Editor, anytime your mouse enters the sidebar panel, if the \u201cAdvanced\u201d section is not open, then expand it. (Causes a minor annoyance where it scrolls to Advanced after expanding it.) (Includes a delay to ensure the sidebar is rendered... you might need to adjust the setTimeout delay if your site\/browser is slow to load the Block Editor.)\n\nCode revisions at: <a href=\"https:\/\/gist.github.com\/brandonjp\/bcfd56838359f12ef5c3ed2ecb6132dc\">https:\/\/gist.github.com\/brandonjp\/bcfd56838359f12ef5c3ed2ecb6132dc<\/a>\n\n<a href=\"https:\/\/snipsnip.pro\/s\/177\">https:\/\/snipsnip.pro\/s\/177<\/a>", | |
| "tags":[ | |
| "admin", | |
| "gutenberg", |