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
| #!/bin/bash | |
| # =============================================== | |
| # WordPress Local Site Links Display Function | |
| # =============================================== | |
| # | |
| # Description: | |
| # A standalone function to display clickable terminal links for WordPress sites. | |
| # Automatically detects single site vs multisite installations and shows appropriate links. | |
| # This function can be used independently or sourced by other scripts. |
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
| #!/usr/bin/env bash | |
| download_vip_db() { | |
| echo "Fetching application list from VIP CLI using 'vip app list'..." | |
| # Run VIP app list and remove ANSI color codes | |
| local APP_OUTPUT | |
| APP_OUTPUT=$(vip app list 2>/dev/null) | |
| if [ $? -ne 0 ] || [[ -z "$APP_OUTPUT" ]]; then | |
| echo "❌ Error: Failed to execute 'vip app list'. Make sure you're logged in with 'vip login'." |
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
| # An example global gitignore file | |
| # | |
| # Place a copy if this at ~/.gitignore_global | |
| # Run `git config --global core.excludesfile ~/.gitignore_global` | |
| # Git # | |
| ####### | |
| .git | |
| .gitattributes |
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 | |
| /** | |
| * Checks if the current page is being viewed in the Elementor editor. | |
| * | |
| * This function determines if the user is currently in the Elementor | |
| * page builder's edit or preview mode. It also returns true if | |
| * the user is in the WordPress admin area, as Elementor's editor | |
| * is a part of the admin interface. | |
| * |
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: WP Toggle Admin Bar | |
| * Plugin URI: https://rtcamp.com/ | |
| * Description: A simple plugin to toggle the WordPress admin bar visibility for logged-in users. | |
| * Version: 1.0.0 | |
| * Author: rtCamp | |
| * Author URI: https://rtcamp.com/ | |
| * License: GPL2 | |
| * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
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 | |
| function ms_filter_posts_columns( $columns ) { | |
| $columns['gutenberg_markup'] = __( 'Gutenberg Markup?', 'text-domain' ); | |
| return $columns; | |
| } | |
| function ms_page_column( $column, $post_id ) { |
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
| document.addEventListener( 'DOMContentLoaded', function() { | |
| var getPost = async function() { | |
| var response = await fetch( 'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/metadata/icons.json' ); | |
| var icons = await response.json(); | |
| let fontAwesomeObj = {}; | |
| let currentObject = fontAwesomeObj; | |
| Object.entries( icons ).forEach( ( [ key, icon ] ) => { | |
| const styles = icon.styles; |
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 | |
| /** | |
| * Register post meta for featured image display. | |
| */ | |
| function register_block_post_meta() { | |
| register_post_meta( | |
| 'post', | |
| 'featuredImageDisplay', | |
| [ |
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
| // All block lists. | |
| wp.blocks.getBlockTypes(); | |
| // All Core blocks only. | |
| wp.blocks.getBlockTypes().filter((block) => { return block.name.indexOf('core') !== -1}); | |
| // All block list name only. | |
| wp.blocks.getBlockTypes().filter((block) => { console.log( block.name ) }); | |
| // All block list name only EXCLUDING child block. |
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 | |
| /** | |
| * Rename Aside post format to Look post format | |
| */ | |
| function rtp_rename_post_formats( $safe_text ) { | |
| if ( $safe_text == __( 'Aside' , 'fab' ) ) { | |
| return __( 'Look' , 'fab' ); | |
| } | |
| return $safe_text; |
NewerOlder