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
/** | |
* | |
* Styles matching the provided website mockup. | |
* | |
* NOTES: | |
* – We'll use WP's native custom properties wherever possible. | |
* – The usage of `!important`, although a bad practice, is unavoidable in the situations it was used. | |
*/ | |
/* Define custom properties where there's no equivalent in WordPress. */ |
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
{ | |
"name": "Branda", | |
"url": "https:\/\/wpmudev.com\/plugins\/ultimate-branding", | |
"version": "3.4.23", | |
"timestamp": 1745721211, | |
"date": "2025-04-27T02:33:31+00:00", | |
"activate_module": { | |
"front-end\/site-status-page.php": "yes" | |
}, | |
"modules": { |
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 // Ignore this line if your functions.php already include it. | |
function register_book_author_taxonomy() { | |
$labels = array( | |
'name' => 'Book Authors', | |
'singular_name' => 'Book Author', | |
'menu_name' => 'Book Authors', | |
'all_items' => 'All Book Authors', | |
'edit_item' => 'Edit Book Author', | |
'view_item' => 'View Book Author', | |
'update_item' => 'Update Book Author', |
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 | |
// Add Shortcode | |
function subform() { | |
// Get the current user | |
$current_user = wp_get_current_user(); | |
// Check if user is logged in and get the nickname | |
if ($current_user->exists()) { | |
$user_display_name = $current_user->nickname; | |
// If nickname is empty, fall back to display_name |
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
<!-- wp:group {"layout":{"type":"default"}} --> | |
<div class="wp-block-group"><!-- wp:columns --> | |
<div class="wp-block-columns"><!-- wp:column --> | |
<div class="wp-block-column"><!-- wp:heading {"level":3} --> | |
<h3 class="wp-block-heading">Latest Posts</h3> | |
<!-- /wp:heading --> | |
<!-- wp:query {"queryId":28,"query":{"perPage":5,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"metadata":{"categories":["posts"],"patternName":"core/query-small-posts","name":"Small image and title"}} --> | |
<div class="wp-block-query"><!-- wp:post-template --> | |
<!-- wp:columns {"verticalAlignment":"center","style":{"color":{"background":"#f6ffeb"}}} --> |
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 WotW\Theme\Patterns; | |
use WotW\Theme\Contracts\Interfaces\Hookable; | |
class Save implements Hookable{ | |
public function register_hooks(): void { | |
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
/* Rankmath's breadcrumb style customization */ | |
.layout-1c .rank-math-breadcrumb .wrap { | |
margin-left: auto; | |
margin-right: auto; | |
max-width: 1260px; | |
} | |
.rank-math-breadcrumb { | |
text-align: center; | |
font-size: 0.75em; |
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 | |
/** | |
* Plugin Name: Auto Complete Virtual Orders | |
* Description: Conclui automaticamente pedidos de produtos virtuais quando o pagamento é confirmado. | |
* Version: 1.1 | |
* Author: Seu Nome | |
* License: GPL2 | |
*/ | |
// Evita o acesso direto ao arquivo |
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
// Auto-complete virtual orders if payment is completed by u/acephaliax | |
function auto_complete_virtual_orders($order_id) { | |
if (!$order_id) { | |
return; | |
} | |
// Get the order object | |
$order = wc_get_order($order_id); | |
// Check if the order contains virtual products |
NewerOlder