This file contains 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 | |
/* | |
* Basic WordPress Widget Code | |
* Save to: /wp-content/theme/widgets.php | |
* in functions.php or appropriate place: if ($wp_version >= 2.8) require_once(TEMPLATEPATH.'/widgets.php'); | |
* | |
*/ | |
class MyWidgetName extends WP_Widget | |
{ |
This file contains 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 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 | |
// This code snippet adds a meta box in the right sidebar of the post screen that lists all available shortcodes | |
// As we use a default WordPress admin meta box the box can be closed to save space and opened when needed | |
// Add a custom function to create the meta box | |
add_action( 'add_meta_boxes', 'add_shortcodes_metabox' ); | |
// This function adds the meta box | |
function add_shortcodes_metabox() { |
This file contains 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
// | |
// RichTextEditor.swift | |
// SwitDataApp | |
// | |
// Created by zentrope on 1/17/22. | |
// | |
import AppKit | |
import Combine | |
import SwiftUI |
This file contains 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 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
// | |
// SyntaxHighlighter.swift | |
// CardsCardsCards | |
// | |
// Created by Martin Pichlmair on 12/10/2018. | |
// | |
// Based on https://raw.githubusercontent.com/kuyawa/Macaw/master/Macaw/Macaw.swift | |
import Cocoa |
This file contains 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
cd /home/$user/public_html; | |
pwd; | |
wget http://wordpress.org/latest.zip; | |
unzip latest.zip; | |
mv ./wordpress/* ./ -f; | |
rm wordpress -rf; | |
cp wp-config-sample.php wp-config.php; | |
sed -i 's/database_name_here/'$user'/g' wp-config.php; | |
sed -i 's/username_here/'$user'/g' wp-config.php; | |
sed -i 's/password_here/'$password'/g' wp-config.php; |