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
Change Log - Real Homes Theme | |
============================= | |
----------------------------------------------- | |
VERSION 4.3.0 – UPDATED ON 23rd April 2024 | |
----------------------------------------------- | |
Introduced - The New Hotel Demo: Experience the latest addition with a purpose-specific design for hotels and rental websites: https://ultra.realhomes.io/hotel | |
Added - Booking widget show/hide control for individual properties |
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 | |
// Start preparing an array to insert Download Monitor's Download Version (which is a CPT with Download as parent post). | |
$dlm_download_version = array( | |
'post_title' => 'Download #' . $download_id . ' File Version', | |
'post_type' => 'dlm_download_version', | |
'post_status' => 'publish', | |
'post_parent' => $download_id, | |
'post_author' => $attachment->post_author, | |
); |
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
// Disable PHP warnings when running wp-cli | |
if ( ! defined( '$_SERVER["HTTP_HOST"]' ) ) { | |
define( 'WP_DEBUG', FALSE ); | |
} | |
if ( ! defined( 'WP_DEBUG' ) ) { | |
ini_set('display_errors','Off'); | |
ini_set('error_reporting', E_ALL ); | |
define('WP_DEBUG_DISPLAY', false); |
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 | |
if ( ! function_exists( 'inspiry_google_maps_api_key' ) ) : | |
/** | |
* This function adds API key ( if provided in settings ) to google maps arguments | |
*/ | |
function inspiry_google_maps_api_key( $google_map_arguments ) { | |
/* Get Google Maps API Key if available */ | |
$google_maps_api_key = get_option( 'inspiry_google_maps_api_key' ); | |
if ( ! empty( $google_maps_api_key ) ) { | |
$google_map_arguments[ 'key' ] = urlencode( $google_maps_api_key ); |
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 | |
/** | |
* Add new rewrite for post type | |
* Add permalink structure | |
*/ | |
function _post_type_rewrite() { | |
global $wp_rewrite; | |
// Set the query arguments used by WordPress | |
$queryarg = 'post_type=property&p='; |
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 | |
// //remove emoji support | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
// // Remove rss feed links | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
remove_action( 'wp_head', 'feed_links', 2 ); |
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
// check version | |
node -v || node --version | |
// list installed versions of node (via nvm) | |
nvm ls | |
// install specific version of node | |
nvm install 16 | |
// set default version of node |
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 | |
$image_sizes = get_intermediate_image_sizes(); | |
foreach( $image_sizes as $image_size ){ | |
$holder_width = get_option( $image_size . '_size_w' ); | |
$holder_height = get_option( $image_size . '_size_h' ); | |
echo $image_size . ":" . $holder_width . " x " . $holder_height; | |
} |
NewerOlder