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 | |
function sc_embassy_countries() { | |
return array("Afghanistan","Albania","Algeria","Andorra","Angola","Antigua & Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombia","Comoros","Cook Islands","Costa Rica","Croatia","Cuba","Cyprus","Czech Republic","Democratic Republic of Congo","Denmark","Djibouti","Dominican Republic","East Timor","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia","Georgia","Germany","Ghana","Greece","Greenland","Grenada","Guatemala","Guinea","Guinea - Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Ivory Coast","Jamaica","Japan"," |
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 | |
namespace Elementor; | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
/** | |
* A Font Icon select box. | |
*/ | |
class CASE27_Elementor_Control_Icon extends Control_Base { |
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 | |
return [ | |
'' => 'fa-500px', | |
'' => 'fa-address-book', | |
'' => 'fa-address-book-o', | |
'' => 'fa-address-card', | |
'' => 'fa-address-card-o', | |
'' => 'fa-adjust', | |
'' => 'fa-adn', |
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 | |
return [ | |
'' => '3d_rotation', | |
'' => 'access_alarm', | |
'' => 'access_alarms', | |
'' => 'access_time', | |
'' => 'accessibility', | |
'' => 'account_balance', | |
'' => 'account_balance_wallet', |
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 | |
/* | |
* my-listing-child/functions.php | |
*/ | |
add_filter( 'case27/listingtypes/profile_layout_blocks', function( $blocks ) { | |
$blocks[] = [ | |
'type' => 'block_name', // needs to be something unique | |
'icon' => 'view_headline', // from material-icons list | |
'title' => 'Block Title', |
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 | |
# 1. Install MyListing Child Theme | |
# 2. Make sure you're editing through FTP, so you can restore the page if anything goes wrong. | |
# 3. Paste the code below in my-listing-child/functions.php below line 11. | |
// Enqueue script.js | |
add_action( 'wp_enqueue_scripts', function() { | |
wp_enqueue_script( 'child-script', | |
get_stylesheet_directory_uri() . '/script.js', ['jquery'], |
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
(function() { | |
if ( document.getElementsByClassName('finder-map').length ) { | |
var interval = setInterval(function() { | |
if ( CASE27_Maps.get( CASE27_Explore_Listings.$xyz.map.id ) ) { | |
var map = CASE27_Maps.get( CASE27_Explore_Listings.$xyz.map.id ).map; | |
map.setOptions({ | |
mapTypeControl: true, | |
scrollwheel: true, | |
styles: [], |
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
// Limit listing description character length | |
add_filter('submit_job_form_validate_fields', function( $isValid, $fields, $values ) { | |
$description_character_limit = 280; | |
foreach ( $fields['job'] as $key => $field ) { | |
if ($field['slug'] == 'job_description' && isset($values['job']['job_description']) && strlen($values['job']['job_description']) > $description_character_limit) { | |
return new \WP_Error( 'validation-error', sprintf( __( '%s can\'t be longer than %s characters.', 'my-listing' ), $field['label'], $description_character_limit ) ); | |
} | |
} |
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_action( 'woocommerce_register_form', function() { | |
wc_get_template( 'checkout/terms.php' ); | |
} ); | |
add_action( 'woocommerce_process_registration_errors', function( $errors, $username, $password, $email ){ | |
if ( empty( $_POST['terms'] ) ) { | |
throw new Exception( __( 'You must accept the terms and conditions in order to register.', 'text-domain' ) ); | |
} | |
return $errors; | |
}, 10, 4 ); |
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_filter( 'comment_notification_recipients', '__return_empty_array', PHP_INT_MAX ); | |
add_filter( 'comment_moderation_recipients', '__return_empty_array', PHP_INT_MAX ); |
OlderNewer