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
// Exclude Image Sizes from SIR Plugin | |
// List all sizes to be excluded in the list below | |
add_filter('wp_sir_exclude_sizes', function() { | |
return [ | |
'woocommerce_gallery_thumbnail', | |
'thumbnail', | |
'medium', | |
'medium_large', | |
'large', | |
'news_grid', |
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
/* Responsive grid for portfolio layout */ | |
.fusion-portfolio-wrapper { | |
display: grid; | |
grid-template-columns: repeat(3, 1fr); /* 3 columns on large screens */ | |
gap: 20px; | |
justify-content: center; | |
align-items: start; | |
} | |
/* Responsive adjustments for tablets (768px and up) */ |
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
////////////////////////////////////////////////////////////////////////////// | |
// Looker Dashboard Iframe Shortcode | |
////////////////////////////////////////////////////////////////////////////// | |
// Function to generate the iframe HTML | |
function bww_looker_dashboard_shortcode() { | |
// Retrieve the fields from the Meta Box settings page | |
$all_options = get_option('site-info'); | |
$iframe_height = $all_options['bww_looker_iframe_height'] ?? ''; | |
$iframe_src = $all_options['bww_site_looker'] ?? ''; |
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: Brilliant Dashboard | |
Description: Custom Dashboard Replacement with iFrame | |
Version: 2024.12 | |
Author: Brilliant Web Works | |
*/ | |
// Prevent direct access | |
if (!defined('ABSPATH')) { |
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 Tools and Kadence Menus for Editors | |
function ni_remove_tools_kadence_for_editors() { | |
if (current_user_can('editor') && !current_user_can('administrator')) { | |
// Remove 'Tools' Menu (default WordPress) | |
remove_menu_page('tools.php'); | |
// Remove 'Kadence' Menu (from Kadence Blocks) | |
remove_menu_page('kadence-blocks'); | |
} | |
} |
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
////////////////////////////////////////////////////////////////////////////// | |
// Display Business Hours in a Table | |
// usage [business-hours] | |
////////////////////////////////////////////////////////////////////////////// | |
// Shortcode to display business hours | |
function bww_business_hours_shortcode() { | |
// Retrieve the business hours from the Meta Box settings page | |
$all_options = get_option('site-info'); |
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
////////////////////////////////////////////////////////////////////////////// | |
// Clickable Main Phone Number from Site Info | |
// usage [phone] | |
////////////////////////////////////////////////////////////////////////////// | |
function bww_phone_shortcode() { | |
// Retrieve phone fields from the Meta Box settings page | |
$all_options = get_option('site-info'); | |
$phone_number = $all_options['bww_info_phone'] ?? ''; |
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
////////////////////////////////////////////////////////////////////////////// | |
// Dynamic Copyright Date Based on Start Date and Biz Name | |
// Usage: [bww-copyright] | |
////////////////////////////////////////////////////////////////////////////// | |
// Shortcode to render a dynamic copyright statement | |
function bww_copyright_shortcode() { | |
// Retrieve the start year and business name from the Meta Box custom fields | |
$all_options = get_option('site-info'); |
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
////////////////////////////////////////////////////////////////////////////// | |
// Change Default GF Send To Email to the one in Site Info | |
////////////////////////////////////////////////////////////////////////////// | |
add_filter('gform_notification', function ($notification, $form, $entry) { | |
// Retrieve the replacement email from the Meta Box settings | |
$all_options = get_option('site-info'); | |
$replacement_email = $all_options['bww_info_form_email'] ?? ''; |
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
////////////////////////////////////////////////////////////////////////////// | |
// Add GA, GSC, and GTM Code to <head> | |
// and GTM Code to <body> from Site Settings | |
////////////////////////////////////////////////////////////////////////////// | |
// Add code to the <head> | |
add_action('wp_head', function () { | |
// Retrieve the fields from the Meta Box settings page | |
$all_options = get_option('site-info'); | |
$ga_tag = $all_options['bww_info_ga_tag'] ?? ''; |
NewerOlder