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: Custom Dashboard Widgets | |
Plugin URI: https://wpnathan.com | |
Description: Creates Custom Dashboard Widgets for Client Websites | |
Version: 2024.11 | |
Author: Nathan Ingram | |
Author URI: https://wpnathan.com | |
License: GPL2 | |
*/ |
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 a custom function to create the meta box | |
add_action('add_meta_boxes', 'add_shortcodes_metabox'); | |
// Function to add the meta box to the post edit screen | |
function add_shortcodes_metabox() { | |
add_meta_box( | |
'shortcodes-metabox', // Unique ID for the meta box | |
'Available Shortcodes', // Title of the meta box | |
'display_shortcodes', // Callback to display the meta box content | |
'post', // Screen (post type) where the meta box will be displayed |
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 | |
/** | |
* Capture User Fields as User Properties For Reporting in Google Analytics Integration Add On | |
* title: Capture User Fields as User Properties For Reporting in Google Analytics Integration Add On | |
* layout: snippet | |
* collection: add-ons, pmpro-google-analytics | |
* category: users, custom user fields | |
* link: TBD | |
* | |
* You can add this recipe to your site by creating a custom plugin |
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 | |
/*********************************** | |
* | |
* ! DISABLE COMMENTS | |
* | |
* *********************************/ | |
function df_disable_comments_post_types_support() | |
{ |
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
// | |
// webview.swift | |
// BR | |
// | |
// Created by BAproductions on 8/12/22. | |
// | |
import SwiftUI | |
import WebKit | |
import Combine |
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
import SwiftUI | |
struct ContentView: View { | |
let svgURL = URL(string: "URL TO YOUR SVG")! | |
var body: some View { | |
WebView(url: svgURL) | |
} | |
} |
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
import SwiftUI | |
import WebKit | |
@main | |
struct MonacoApp: App { | |
let codeSnippet = """ | |
var body: some Scene { | |
WindowGroup { | |
EditorView(content: codeSnippet, language: "swift", theme: "vs-dark") | |
} |
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
import SwiftUI | |
public struct AsyncImage<Content>: View where Content: View { | |
private var content: (ImageProvider) -> _ConditionalContent< | |
SwiftUI.AsyncImage<Content>, Content | |
> | |
@Environment(\.imageProvider) var imageProvider | |
public init( |
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 | |
/** | |
* The blocks class file. | |
* | |
* @package WordPress | |
* @subpackage Swift_News_Theme | |
*/ | |
namespace Swift; |
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 | |
// Disable Commenting in WordPress | |
// https://endurtech.com/how-to-completely-disable-comments-in-wordpress/ | |
add_action( 'admin_init', function () | |
{ | |
// Redirect any user trying to access comments page | |
global $pagenow; | |
if ( $pagenow === 'edit-comments.php' ) |
NewerOlder