Changeset 2749653
- Timestamp:
- 06/29/2022 12:50:11 PM (4 years ago)
- Location:
- the-real-estate-voice
- Files:
-
- 75 added
- 12 edited
-
tags/1.1.9 (added)
-
tags/1.1.9/classes (added)
-
tags/1.1.9/classes/class-trev-csmap-contentlibrary.php (added)
-
tags/1.1.9/classes/class-trev-csmap-revoice-calendar.php (added)
-
tags/1.1.9/classes/class-trev-csmap-schedules-table.php (added)
-
tags/1.1.9/classes/class-trev-csmap-settings.php (added)
-
tags/1.1.9/classes/index.php (added)
-
tags/1.1.9/css (added)
-
tags/1.1.9/css/images (added)
-
tags/1.1.9/css/images/ui-bg_flat_75_ffffff_40x100.png (added)
-
tags/1.1.9/css/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.1.9/css/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.1.9/css/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.1.9/css/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.1.9/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.1.9/css/images/ui-icons_222222_256x240.png (added)
-
tags/1.1.9/css/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.1.9/css/images/ui-icons_454545_256x240.png (added)
-
tags/1.1.9/css/images/ui-icons_888888_256x240.png (added)
-
tags/1.1.9/css/trev-csmap-css.css (added)
-
tags/1.1.9/css/trev-csmap-insta-style.css (added)
-
tags/1.1.9/css/trev-csmap-jquery-ui.css (added)
-
tags/1.1.9/images (added)
-
tags/1.1.9/images/Asset-1.jpg (added)
-
tags/1.1.9/images/Asset-2.png (added)
-
tags/1.1.9/images/Asset-3.jpg (added)
-
tags/1.1.9/images/Asset-4.jpg (added)
-
tags/1.1.9/images/Asset-5.jpg (added)
-
tags/1.1.9/images/Asset-6.jpg (added)
-
tags/1.1.9/images/Asset-7.jpg (added)
-
tags/1.1.9/images/calendar.png (added)
-
tags/1.1.9/images/facebook.png (added)
-
tags/1.1.9/images/instagram-icon.png (added)
-
tags/1.1.9/images/re-connect-small.png (added)
-
tags/1.1.9/images/social_graph_banner.jpg (added)
-
tags/1.1.9/images/step1.png (added)
-
tags/1.1.9/images/step2.png (added)
-
tags/1.1.9/images/step3.png (added)
-
tags/1.1.9/images/trash_icon_transparent.png (added)
-
tags/1.1.9/includes (added)
-
tags/1.1.9/includes/advance-ajax.php (added)
-
tags/1.1.9/includes/advance-functions.php (added)
-
tags/1.1.9/includes/ajax.php (added)
-
tags/1.1.9/includes/calendar-tab.php (added)
-
tags/1.1.9/includes/cron.php (added)
-
tags/1.1.9/includes/custom-functions.php (added)
-
tags/1.1.9/includes/hooks.php (added)
-
tags/1.1.9/includes/index.php (added)
-
tags/1.1.9/includes/instagram (added)
-
tags/1.1.9/includes/instagram/days-tab.php (added)
-
tags/1.1.9/includes/instagram/index.php (added)
-
tags/1.1.9/includes/main-tab.php (added)
-
tags/1.1.9/includes/my-content-tab.php (added)
-
tags/1.1.9/includes/order-tab.php (added)
-
tags/1.1.9/includes/revoice-facebook-insight.php (added)
-
tags/1.1.9/includes/revoice-instagram-insight.php (added)
-
tags/1.1.9/includes/revoice-social-graph.php (added)
-
tags/1.1.9/includes/scheduled-tab.php (added)
-
tags/1.1.9/includes/settings-tab.php (added)
-
tags/1.1.9/includes/share-listing-tab.php (added)
-
tags/1.1.9/includes/share-tab.php (added)
-
tags/1.1.9/includes/trev-csmap-automation-settings.php (added)
-
tags/1.1.9/index.php (added)
-
tags/1.1.9/js (added)
-
tags/1.1.9/js/chart.min.js (added)
-
tags/1.1.9/js/jquery-ui-timepicker-addon.js (added)
-
tags/1.1.9/js/sweetalert2.js (added)
-
tags/1.1.9/js/trev-csmap-custom.js (added)
-
tags/1.1.9/js/trev-csmap-instagram.js (added)
-
tags/1.1.9/js/trev-csmap-revoice.js (added)
-
tags/1.1.9/languages (added)
-
tags/1.1.9/languages/the-real-estate-voice.pot (added)
-
tags/1.1.9/readme.txt (added)
-
tags/1.1.9/the-real-estate-voice.php (added)
-
trunk/classes/class-trev-csmap-revoice-calendar.php (modified) (6 diffs)
-
trunk/classes/class-trev-csmap-schedules-table.php (modified) (3 diffs)
-
trunk/classes/class-trev-csmap-settings.php (modified) (4 diffs)
-
trunk/css/trev-csmap-css.css (modified) (4 diffs)
-
trunk/includes/advance-functions.php (added)
-
trunk/includes/ajax.php (modified) (8 diffs)
-
trunk/includes/custom-functions.php (modified) (11 diffs)
-
trunk/includes/hooks.php (modified) (5 diffs)
-
trunk/includes/order-tab.php (modified) (5 diffs)
-
trunk/includes/share-listing-tab.php (modified) (13 diffs)
-
trunk/js/trev-csmap-revoice.js (modified) (9 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/the-real-estate-voice.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
the-real-estate-voice/trunk/classes/class-trev-csmap-revoice-calendar.php
r2742727 r2749653 44 44 public function trev_csmap_display_calendar() { 45 45 46 $general_tab_option_name = get_option( 'general_tab_option_name' ); 47 48 $agentPoint = false; 49 50 if ( isset( $general_tab_option_name['website_platform'] ) && 'Agentpoint' == $general_tab_option_name['website_platform'] ) { 51 52 $agentPoint = true; 53 54 } 55 $general_tab_options = get_option( 'general_tab_option_name' ); 46 56 $current_time_zone = get_option( 'timezone_string' ); 47 $general_tab_options = get_option( 'general_tab_option_name' ); 48 date_default_timezone_set( $current_time_zone ); 57 58 if( !empty( $current_time_zone ) ){ 59 date_default_timezone_set( $current_time_zone ); 60 } 61 62 49 63 50 64 $args = array( … … 189 203 $html .= '<div class="day_num' . esc_attr( $selected ) . '">'; 190 204 $html .= '<span>' . esc_html( $i ) . '</span>'; 191 205 192 206 foreach ( $this->events as $event ) { 193 207 194 208 for ( $d = 0; $d <= ( $event[2] - 1 ); $d++ ) { 195 209 $listing_color = ''; 210 196 211 $post_id = $event[4]; 197 $get_post_data = trev_csmap_get_post_data( $post_id ); 198 199 $content_post = get_post($post_id); 212 213 $content_post = get_post($post_id); 200 214 201 215 $page_ids = get_post_meta( $post_id, 'revoice_scheduled_page_id', true ); … … 204 218 205 219 $page_listing = get_post_meta( $post_id, 'revoice_listingpage', true ); 220 206 221 $datetime = $event[1] . ' ' . $event[5]; 207 222 $current_date = date( 'Y-m-d', strtotime( $datetime ) ); 208 223 209 224 $post_color = ''; 210 $revoice_post_type = get_post_meta( $post_id, 'revoice_post_type', true );225 $revoice_post_type = get_post_meta($post_id, 'revoice_post_type', true ); 211 226 212 227 if ( $datetime < current_time( 'mysql' ) ) { … … 225 240 226 241 $parent_id = get_post_meta( $post_id, 'revoice_scheduled_post_id', true ); 242 227 243 $parent_content = get_the_excerpt( $parent_id ); 228 244 229 245 $listing_details = trev_csmap_get_web_plateform_data($revoice_post_type, $parent_id); 230 246 247 if( 'property' == $revoice_post_type ){ 248 249 $get_post_data = trev_csmap_get_agentpoint_data( $post_id ); 250 $permalink = get_site_url().'/'.$parent_id; 251 $listing_details['listing_link'] = $permalink; 252 253 }else{ 254 255 $get_post_data = trev_csmap_get_post_data( $post_id ); 256 } 257 231 258 $bedroom_emoji = ''; 232 259 if ( ! empty( $listing_details['bedroom'] ) ) { … … 260 287 } else { 261 288 262 if ( 'listing ' == $revoice_post_type) {289 if ( 'listings' == $revoice_post_type || 'listing' == $revoice_post_type || 'property' == $revoice_post_type) { 263 290 $plugin_status = false; 264 291 if ( ! empty( $event[1] ) && $event[1] < current_time( 'mysql' ) ) { … … 271 298 $plugin_status = trev_csmap_is_pro_license_plugin(); 272 299 } 300 273 301 ?> 274 302 <a style="color:<?php echo esc_attr( $listing_color ); ?>" href="javascript:void(0)" class="edit_schedule edit_post_cl" data-event_time="<?php echo esc_attr( $scheduled ); ?>" data-paglisting="<?php echo esc_attr( $page_listing ); ?>" data-listing-details='<?php echo esc_attr( $js_code ); ?>' data-parent-content="<?php echo esc_attr( $parent_content ); ?>" data-post-type="<?php echo esc_attr( $revoice_post_type ); ?>" data-event_time="<?php echo esc_attr( $datetime ); ?>" data-pageid="<?php echo esc_attr( $page_ids ); ?>" data-event="<?php echo esc_attr( $event[0] ); ?>" data-id="<?php echo esc_attr( $event[4] ); ?>" data-image="<?php echo esc_url( $get_post_data['image_url'] ); ?>" data-content-page="<?php echo esc_attr( 'scheduled' ); ?>" data-desc="<?php echo esc_attr( $get_post_data['desc'] ); ?>" data-plugin-status ="<?php echo esc_attr( $plugin_status ); ?>"> <?php echo esc_html( $event[5] ) . ' ' . esc_html( $event[0] ); ?></a> 275 303 276 304 <?php 305 277 306 $cal_sch = ob_get_contents(); 278 307 ob_end_clean(); 279 308 $html .= $cal_sch; 309 280 310 } else { 311 281 312 if ( ! empty( $event[1] ) && $event[1] < current_time( 'mysql' ) ) { 282 313 $event[1] = ''; -
the-real-estate-voice/trunk/classes/class-trev-csmap-schedules-table.php
r2742727 r2749653 143 143 if ( ! empty( $posts ) ) { 144 144 foreach ( $posts as $post ) { 145 $get_post_data = trev_csmap_get_post_data( $post->ID );145 146 146 147 147 // Current fb page id of schedule post … … 149 149 $insta_ids = get_post_meta( $post->ID, 'revoice_scheduled_insta_id', true ); 150 150 $revoice_post_type = get_post_meta( $post->ID, 'revoice_post_type', true ); 151 151 152 $parent_id = get_post_meta( $post->ID, 'revoice_scheduled_post_id', true ); 153 152 154 $revoice_listing_detail = get_post_meta( $post->ID, 'revoice_listing_detail', true ); 155 153 156 $parent_content = get_the_excerpt( $parent_id ); 154 157 155 158 $listing_details = trev_csmap_get_web_plateform_data($revoice_post_type ,$parent_id); 159 160 $get_post_data = trev_csmap_get_post_data( $post->ID ); 161 162 if( 'property' == $revoice_post_type ){ 163 164 $get_post_data = trev_csmap_get_agentpoint_data( $post->ID ); 165 $permalink = get_site_url().'/'.$parent_id; 166 $listing_details['listing_link'] = $permalink; 167 168 }else{ 169 170 $get_post_data = trev_csmap_get_post_data( $post->ID ); 171 } 156 172 157 173 $bedroom_emoji = ''; … … 228 244 } else { 229 245 230 if ( 'listing ' == $revoice_post_type) {246 if ( 'listings' == $revoice_post_type || 'listing' == $revoice_post_type || 'property' == $revoice_post_type) { 231 247 if ( ! empty( $scheduled ) && $scheduled < current_time( 'mysql' ) ) { 232 248 $scheduled = ''; -
the-real-estate-voice/trunk/classes/class-trev-csmap-settings.php
r2745011 r2749653 1088 1088 'WPCasa' => esc_html__( 'WPCasa', 'the-real-estate-voice' ), 1089 1089 'Website Blue' => esc_html__( 'Website Blue', 'the-real-estate-voice' ), 1090 // 'Agentpoint'=> esc_html__('Agentpoint','the-real-estate-voice'),1090 //'Agentpoint' => esc_html__('Agentpoint','the-real-estate-voice'), 1091 1091 'Easy Property Listings' => esc_html__( 'Easy Property Listings', 'the-real-estate-voice' ), 1092 1092 'SiteLoft' => esc_html__( 'SiteLoft', 'the-real-estate-voice' ) … … 1101 1101 foreach ( $website_platform as $key => $platform ) { 1102 1102 $selected = ( isset( $this->general_tab_options['website_platform'] ) && $this->general_tab_options['website_platform'] == $key ) ? 'selected' : ''; ?> 1103 1103 1104 1104 <option value="<?php echo esc_attr( $key ); ?>" <?php echo esc_attr( $selected ); ?> > <?php echo esc_html( $platform ); ?></option> 1105 1105 … … 1107 1107 1108 1108 </select> 1109 1110 1109 1111 1110 <p class="description"> 1112 1111 <i><?php esc_html_e( "Select your website provider.", 'the-real-estate-voice' ); ?></i> … … 1226 1225 ?> 1227 1226 1228 <textarea name="instagram_tab_option_name[hashtags]" id="default_hashtags" rows="8" style="width:44%"><?php echo esc_html( $hashtags ); ?></textarea> 1227 <textarea name="instagram_tab_option_name[hashtags]" id="default_hashtags" placeholder="#realestate #voicerealestate #iloverealestate 1228 1229 Voice Real Estate 1230 📞 9999 99999 1231 💻 www.voicerealestate.com 1232 LINK IN BIO" rows="8" style="width:44%"><?php echo esc_html( $hashtags ); ?></textarea> 1229 1233 <p class="description"> 1230 1234 <i><?php esc_html_e( 'Enter any content you always want to add when sharing', 'the-real-estate-voice' ); ?></i> -
the-real-estate-voice/trunk/css/trev-csmap-css.css
r2744106 r2749653 561 561 .fb-content-list .blog_image { 562 562 min-height: 210px; 563 max-height: 210px; 564 overflow: hidden; 563 565 } 564 566 … … 1527 1529 1528 1530 .swal2-container.swal2-center.post #swal2-html-container .map_share_window, 1529 .swal2-container.swal2-center.listing #swal2-html-container .map_share_window { 1531 .swal2-container.swal2-center.listing #swal2-html-container .map_share_window, 1532 .swal2-container.swal2-center.listings #swal2-html-container .map_share_window, 1533 .swal2-container.swal2-center.property #swal2-html-container .map_share_window { 1530 1534 padding: 5px 30px 30px 30px; 1531 1535 } … … 1534 1538 .swal2-container.swal2-center.post .swal2-popup.swal2-modal, 1535 1539 .swal2-container.swal2-center.post #swal2-html-container, 1536 .swal2-container.swal2-center.listing #swal2-html-container { 1540 .swal2-container.swal2-center.listing #swal2-html-container, 1541 .swal2-container.swal2-center.listings #swal2-html-container, 1542 .swal2-container.swal2-center.property #swal2-html-container { 1537 1543 padding-bottom: 0px !important; 1538 1544 … … 1560 1566 } 1561 1567 1562 .swal2-container.listing .post_image { 1568 .swal2-container.listing .post_image, 1569 .swal2-container.listings .post_image, 1570 .swal2-container.property .post_image { 1563 1571 padding: 0 0px; 1564 1572 height: 200px; -
the-real-estate-voice/trunk/includes/ajax.php
r2742727 r2749653 140 140 function trev_csmap_add_schedule() { 141 141 check_ajax_referer( 'revoice_nonce_fb', 'security' ); 142 143 $general_tab_option_name = get_option( 'general_tab_option_name' ); 144 145 142 146 143 147 $title = sanitize_text_field( wp_unslash( $_POST['title'] ) ); … … 173 177 update_post_meta( $post_id, 'revoice_post_type', $post_type ); 174 178 update_post_meta( $post_id, 'revoice_listing_detail', $share_desc ); 175 update_post_meta( $id, 'revoice_scheduled_id', $post_id ); 176 update_post_meta( $id, 'revoice_sharing_status', $status ); 179 180 181 if( isset( $general_tab_option_name['website_platform'] ) && 'Agentpoint' == $general_tab_option_name['website_platform'] ) { 182 trev_csmap_update_preperty_meta( $id, 'revoice_scheduled_id', $post_id ); 183 trev_csmap_update_preperty_meta( $id, 'revoice_sharing_status', $status ); 184 185 }else{ 186 update_post_meta( $id, 'revoice_scheduled_id', $post_id ); 187 update_post_meta( $id, 'revoice_sharing_status', $status ); 188 189 } 190 177 191 update_post_meta( $post_id, 'revoice_scheduled_page_id', $page_id ); 178 192 update_post_meta( $post_id, 'revoice_platform', $plafrom ); … … 213 227 214 228 $post_data = array( 229 215 230 'post_title' => $title, 216 231 'post_content' => $share_desc, … … 220 235 'post_date' => $postdate, 221 236 'edit_date' => 'true', 237 222 238 ); 223 239 … … 320 336 update_post_meta( $id, 'revoice_scheduled', $date_time ); 321 337 update_post_meta( $id, 'revoice_scheduled_page_id', $page_id ); 338 322 339 if ( ! empty( $sharable_agent ) ) { 323 340 update_post_meta( $id, 'revoice_scheduled_agenet_details', $sharable_agent ); … … 343 360 function trev_csmap_remove_schedule() { 344 361 check_ajax_referer( 'revoice_nonce_fb', 'security' ); 362 345 363 $id = sanitize_text_field( wp_unslash( $_POST['id'] ) ); 346 364 347 365 $post_id = get_post_meta( $id, 'revoice_scheduled_post_id', true ); 348 366 349 if ( metadata_exists( 'post', $post_id, 'revoice_shared' ) ) { 350 update_post_meta( $post_id, 'revoice_sharing_status', 'Shared' ); 351 } else { 352 update_post_meta( $post_id, 'revoice_sharing_status', 'Never Shared' ); 353 } 354 355 delete_post_meta( $post_id, 'revoice_scheduled_id', $id ); 356 367 $general_tab_option_name = get_option( 'general_tab_option_name' ); 368 369 if( isset( $general_tab_option_name['website_platform'] ) && 'Agentpoint' == $general_tab_option_name['website_platform'] ) { 370 371 if( trev_csmap_exist_preperty_meta($post_id, 'revoice_shared') ){ 372 trev_csmap_update_preperty_meta( $post_id, 'revoice_sharing_status', 'Shared' ); 373 }else{ 374 trev_csmap_update_preperty_meta($post_id, 'revoice_sharing_status', 'Never Shared' ); 375 } 376 377 trev_delete_preperty_meta( $post_id, 'revoice_scheduled_id' ); 378 379 }else{ 380 if ( metadata_exists( 'post', $post_id, 'revoice_shared' ) ) { 381 update_post_meta( $post_id, 'revoice_sharing_status', 'Shared' ); 382 } else { 383 update_post_meta( $post_id, 'revoice_sharing_status', 'Never Shared' ); 384 } 385 386 delete_post_meta( $post_id, 'revoice_scheduled_id', $id ); 387 388 } 357 389 wp_delete_post( $id ); 390 391 358 392 die(); 359 393 … … 392 426 $status = sanitize_text_field( wp_unslash( $_POST['status'] ) ); 393 427 $id = sanitize_text_field( wp_unslash( $_POST['id'] ) ); 394 $current_status = get_post_meta( $id, 'revoice_sharing_status', true ); 428 $general_tab_option_name = get_option( 'general_tab_option_name' ); 429 430 if ( isset( $general_tab_option_name['website_platform'] ) && 'Agentpoint' == $general_tab_option_name['website_platform'] ) { 431 432 $current_status = trev_csmap_get_preperty_meta( $id, 'revoice_sharing_status' ); 433 434 }else{ 435 436 $current_status = get_post_meta( $id, 'revoice_sharing_status', true ); 437 438 } 439 395 440 396 441 if ( 'Currently scheduled' == $current_status ) { … … 436 481 $data['status'] = 'success'; 437 482 $data['msg'] = esc_html__( 'Successfully Shared', 'the-real-estate-voice' ); 438 update_post_meta( $id, 'revoice_shared', current_datetime() ); 439 update_post_meta( $id, 'revoice_sharing_status', $status ); 483 484 if( isset( $general_tab_option_name['website_platform'] ) && 'Agentpoint' == $general_tab_option_name['website_platform'] ) { 485 486 $current_datetime = date( 'd/m/Y' ); 487 488 trev_csmap_update_preperty_meta($id,'revoice_shared',$current_datetime); 489 trev_csmap_update_preperty_meta( $id, 'revoice_sharing_status', $status ); 490 491 }else{ 492 493 update_post_meta( $id, 'revoice_shared', current_datetime() ); 494 update_post_meta( $id, 'revoice_sharing_status', $status ); 495 496 } 497 440 498 } else { 441 499 $data['status'] = 'error'; -
the-real-estate-voice/trunk/includes/custom-functions.php
r2742727 r2749653 181 181 function trev_csmap_get_post_data( $schedule_id ) { 182 182 183 $get_post_date = array(); 184 $post_id = get_post_meta( $schedule_id, 'revoice_scheduled_post_id', true ); 185 $image_url = get_the_post_thumbnail_url( $post_id, 'full' ); 183 $general_tab_options = get_option( 'general_tab_option_name' ); 184 $get_post_date = array(); 185 $post_id = get_post_meta( $schedule_id, 'revoice_scheduled_post_id', true ); 186 $image_url =''; 187 188 if ( isset( $general_tab_options['website_platform'] ) && 'SiteLoft' == $general_tab_options['website_platform'] ) { 189 190 $postType = get_post_type($post_id); 191 192 if('listings' == $postType){ 193 194 $hero_image_thumbs = get_post_meta( $post_id, 'thumbnails', true ); 195 196 if(!empty($hero_image_thumbs) && ! empty( $hero_image_thumbs[0]['full'] )){ 197 198 $image_url = $hero_image_thumbs[0]['full']; 199 200 }else{ 201 202 $hero_image_full = get_post_meta( $post_id, 'images', true ); 203 204 if(!empty($hero_image_full)){ 205 $image_url = $hero_image_full[0]['full']; 206 } 207 } 208 }else{ 209 $hero_image_thumbs = get_post_meta( $post_id, 'hero_image_thumbs', true ); 210 if ( ! empty( $hero_image_thumbs['full'] ) ) { 211 $image_url = $hero_image_thumbs['full']; 212 } 213 } 214 215 216 }else{ 217 $image_url = get_the_post_thumbnail_url( $post_id, 'full' ); 218 } 219 186 220 $desc = get_the_excerpt( $schedule_id ); 187 221 $get_post_date['post_id'] = $post_id; … … 192 226 } 193 227 } 228 229 function trev_csmap_get_agentpoint_data( $schedule_id ) { 230 231 $get_post_date = array(); 232 $post_id = get_post_meta( $schedule_id, 'revoice_scheduled_post_id', true ); 233 234 global $wpdb; 235 236 $properties = 'properties'; 237 238 $qry_post = "SELECT * FROM $properties WHERE id=".$post_id; 239 240 $posts = $wpdb->get_results( $qry_post ); 241 242 $attachment = 'attachments'; 243 244 $qry_img = "SELECT * FROM $attachment WHERE parent_id=".$post_id; 245 246 $images_res = $wpdb->get_results( $qry_img ); 247 if(!empty($images_res) || !empty($posts)){ 248 $image_url = $images_res[0]->url; 249 $desc = $posts[0]->description; 250 $get_post_date['post_id'] = $post_id; 251 $get_post_date['image_url'] = $image_url; 252 $get_post_date['desc'] = $desc; 253 } 254 255 256 return $get_post_date; 257 } 194 258 195 259 if ( ! function_exists( 'trev_csmap_listing_auto_share_post' ) ) { … … 335 399 // If Drip feed enabled 336 400 if ( $auto_schedule_share ) { 401 337 402 $fb_page_ids = implode( ',', $page_ids ); 338 403 $current_time_zone = get_option( 'timezone_string' ); … … 343 408 344 409 if ( $dripfeed_schedule > $date_now ) { 410 345 411 $date_time = date( 'Y-m-d' ) . ' ' . $dripfeed_schedule; 346 412 347 413 } else { 414 348 415 date( 'Y-m-d', strtotime( date( 'Y-m-d' ) . ' +1 days' ) ); 349 416 $tomorrow = date( 'Y-m-d', strtotime( '+1 days' ) ); … … 370 437 if ( $schedule_post_id > 0 ) { 371 438 372 update_post_meta( $schedule_post_id, 'revoice_scheduled', $date_time ); 373 update_post_meta( $schedule_post_id, 'revoice_scheduled_status', 'scheduled' ); 374 update_post_meta( $schedule_post_id, 'revoice_scheduled_post_id', $post_id ); 375 update_post_meta( $schedule_post_id, 'revoice_post_type', $post_type ); 376 update_post_meta( $post_id, 'revoice_scheduled_id', $schedule_post_id ); 377 update_post_meta( $post_id, 'revoice_sharing_status', $status ); 378 update_post_meta( $schedule_post_id, 'revoice_scheduled_page_id', $fb_page_ids ); 439 update_post_meta( $schedule_post_id, 'revoice_scheduled', $date_time ); 440 update_post_meta( $schedule_post_id, 'revoice_scheduled_status', 'scheduled' ); 441 update_post_meta( $schedule_post_id, 'revoice_scheduled_post_id', $post_id ); 442 update_post_meta( $schedule_post_id, 'revoice_post_type', $post_type ); 443 update_post_meta( $post_id, 'revoice_scheduled_id', $schedule_post_id ); 444 update_post_meta( $post_id, 'revoice_sharing_status', $status ); 445 update_post_meta( $schedule_post_id, 'revoice_scheduled_page_id', $fb_page_ids); 446 379 447 } 380 448 } … … 581 649 function trev_csmap_licence_version_url() { 582 650 583 $current_domain = home_url(); 651 $current_domain = 'https://projects.theglobalwebdev.com/real-estate-voice-content'; 652 //$current_domain = home_url(); 584 653 $url = preg_replace( '(^https?://)', '', $current_domain ); 585 654 $response = wp_remote_get( … … 1140 1209 $listing_details['map_address'] = $addressStreetNumber . $addressStreet . $addressSuburb . $addressPostcode . $addressState; 1141 1210 1142 }elseif( isset($general_tab_options['website_platform']) && 'Easy Property Listings' == $general_tab_options['website_platform'] ) { 1143 1144 $listing_details['bedroom'] = get_post_meta( $post_id, 'property_bedrooms', true ); 1145 $listing_details['bathroom'] = get_post_meta( $post_id, 'property_bathrooms', true ); 1146 $listing_details['garage'] = get_post_meta( $post_id, 'property_garage', true ); 1147 1148 $property_sold_price = get_post_meta( $post_id, 'property_sold_price', true ); 1149 1150 if ( !empty( $property_sold_price ) ) { 1151 1152 $listing_details['price'] = $property_sold_price; 1153 }else{ 1154 1155 $listing_details['price'] = get_post_meta( $post_id, 'property_price_view', true ); 1156 } 1157 1158 $listing_details['name'] = get_post_meta( $post_id, 'property_agent', true ); 1159 1160 $listing_details['phone'] = get_post_meta( $post_id, 'property_owner', true ); 1161 1162 $addressStreetNumber = get_post_meta( $post_id, 'property_address_street_number', true ); 1163 1164 1165 $addressStreet = get_post_meta( $post_id, 'property_address_street', true ); 1166 $addressSuburb = get_post_meta( $post_id, 'property_address_suburb', true ); 1167 $addressState = get_post_meta( $post_id, 'property_address_state', true ); 1168 $addressPostcode = get_post_meta( $post_id, 'property_address_postal_code',true ); 1169 $property_country = get_post_meta( $post_id, 'property_address_country',true ); 1170 1171 if ( ! empty( $addressStreetNumber ) ) { 1172 $addressStreetNumber .= ', '; 1173 } 1174 1175 if ( ! empty( $addressStreet ) ) { 1176 $addressStreet .= ', '; 1177 } 1178 1179 if ( ! empty( $addressSuburb ) ) { 1180 $addressSuburb .= ', '; 1181 } 1182 1183 if ( ! empty( $addressState ) ) { 1184 $addressState .= ', '; 1185 } 1186 1187 if ( ! empty( $addressPostcode ) && ! empty( $property_country ) ) { 1188 $property_country .= ', '; 1211 1212 }elseif( isset($general_tab_options['website_platform']) && 'Agentpoint' == $general_tab_options['website_platform'] ) { 1213 1214 global $wpdb; 1215 1216 if('property' == $revoice_post_type){ 1217 1218 $properties = 'properties'; 1219 1220 $qry_post = "SELECT * FROM $properties WHERE id=$post_id"; 1221 1222 $posts = $wpdb->get_results( $qry_post ); 1223 if(!empty($posts)){ 1224 $listing_details['bedroom'] = $posts[0]->bedrooms; 1225 $listing_details['bathroom'] = $posts[0]->bathrooms; 1226 $listing_details['garage'] = $posts[0]->garage; 1227 1228 $listing_details['price'] = $posts[0]->price; 1229 1230 if ( empty( $listing_details['price'] ) ) { 1231 1232 $listing_details['price'] = $posts[0]->display_price_text; 1233 } 1234 1235 $addressStreetNumber = $posts[0]->street_number; 1236 1237 $addressStreet = $posts[0]->street; 1238 $addressSuburb = $posts[0]->suburb; 1239 $addressPostcode = $posts[0]->postcode; 1240 $addressState = $posts[0]->state; 1241 1242 if ( ! empty( $addressStreetNumber ) ) { 1243 $addressStreetNumber .= ','; 1244 } 1245 1246 if ( ! empty( $addressStreet ) ) { 1247 $addressStreet .= ','; 1248 } 1249 1250 if ( ! empty( $addressSuburb ) ) { 1251 $addressSuburb .= ','; 1252 } 1253 1254 if ( ! empty( $addressPostcode ) && ! empty( $addressState ) ) { 1255 $addressPostcode .= ','; 1256 } 1257 1258 $listing_details['map_address'] = $addressStreetNumber . $addressStreet . $addressSuburb . $addressPostcode . $addressState; 1259 1260 } 1261 1262 1189 1263 } 1190 1264 1191 $listing_details['map_address'] = $addressStreetNumber . $addressStreet . $addressSuburb . $addressState . $property_country . $addressPostcode; 1265 1192 1266 1193 1267 }else{ … … 1243 1317 * @since 1.0.0 1244 1318 **/ 1245 function trev_csmap_admin_footer() { ?>1246 1319 function trev_csmap_admin_footer() { 1320 ?> 1247 1321 <style type="text/css"> 1248 1322 .revoice_activation_notice.error .notice-wrap { … … 1254 1328 <script type="text/javascript"> 1255 1329 jQuery( "ul#adminmenu a[href='<?php echo TREV_CSMAP_HELP_LINK ?>']" ).attr( 'target', '_blank' ); 1330 1256 1331 </script> 1257 1332 <?php 1258 1333 } 1259 1334 } 1335 1260 1336 1261 1337 /** … … 1288 1364 $countryName = 'Australia'; 1289 1365 break; 1290 case 'US ':1291 $countryName = 'U nited States of America';1366 case 'USA': 1367 $countryName = 'USA'; 1292 1368 break; 1293 1369 case 'UK': 1294 $countryName = 'U nited Kingdom';1370 $countryName = 'UK'; 1295 1371 break; 1296 1372 case 'NZ': … … 1339 1415 1340 1416 } 1417 -
the-real-estate-voice/trunk/includes/hooks.php
r2742727 r2749653 57 57 58 58 $revoice_platform = get_post_meta( $post->ID, 'revoice_platform', true ); 59 $general_tab_option_name = get_option( 'general_tab_option_name' ); 59 60 60 61 if ( 'instagram' == $revoice_platform ) { … … 132 133 $page_id = get_post_meta( $id, 'revoice_scheduled_page_id', true ); 133 134 $post_id = get_post_meta( $id, 'revoice_scheduled_post_id', true ); 135 134 136 $sharable_agent = get_post_meta( $id, 'revoice_scheduled_agenet_details', true ); 137 135 138 $revoice_post_type = get_post_meta( $id, 'revoice_post_type', true ); 139 136 140 $revoice_listing_detail = ''; 137 141 138 if ( 'listing ' == $revoice_post_type ) {142 if ( 'listings' == $revoice_post_type || 'listing' == $revoice_post_type || 'property' == $revoice_post_type ) { 139 143 140 144 $revoice_listing_detail = get_post_meta( $id, 'revoice_listing_detail', true ); … … 171 175 if ( 0 == $result->error ) { 172 176 173 update_post_meta( $post_id, 'revoice_shared', current_datetime() ); 174 update_post_meta( $post_id, 'revoice_sharing_status', $status ); 177 if( isset( $general_tab_option_name['website_platform'] ) && 'Agentpoint' == $general_tab_option_name['website_platform'] ) { 178 179 trev_csmap_update_preperty_meta( $post_id, 'revoice_shared', current_datetime() ); 180 trev_csmap_update_preperty_meta( $post_id, 'revoice_sharing_status', $status ); 181 182 }else{ 183 update_post_meta( $post_id, 'revoice_shared', current_datetime() ); 184 update_post_meta( $post_id, 'revoice_sharing_status', $status ); 185 } 186 175 187 176 188 } else { … … 228 240 function trev_csmap_og_meta() { 229 241 230 global $post; 231 232 $revcp_settings_options = get_option( 'auto_social_option_name' ); 242 global $post, $rev_post_types, $wpdb; 243 244 $revcp_settings_options = get_option( 'auto_social_option_name' ); 245 $general_tab_option_name = get_option( 'general_tab_option_name' ); 246 247 if( isset( $general_tab_option_name['website_platform'] ) && 'Agentpoint' == $general_tab_option_name['website_platform'] ) { 248 249 remove_action( 'aioseo_meta_views', 'aioseo_filter_meta_views'); 250 251 } 252 233 253 234 254 if ( is_array( $revcp_settings_options ) ) { 235 255 $featured_img_url=''; 236 256 if ( isset( $revcp_settings_options['add_open_graph_tags_1'] ) && 1 == trim( $revcp_settings_options['add_open_graph_tags_1'] ) ) { 237 257 238 if ( is_single() ) { 239 240 $postsubtitrare = get_post_meta( $post->ID, 'id-subtitrare', true ); 258 259 if ( isset( $general_tab_option_name['website_platform'] ) && 'SiteLoft' == $general_tab_option_name['website_platform'] ) { 260 261 $post_id = $post->ID; 262 263 $hero_image_thumbs = get_post_meta( $post->ID, 'thumbnails', true ); 264 if(!empty($hero_image_thumbs) && ! empty( $hero_image_thumbs[0]['full'] )){ 265 $featured_img_url = $hero_image_thumbs[0]['full']; 266 }else{ 267 $hero_image_full = get_post_meta( $post_id, 'images', true ); 268 if(!empty($hero_image_full)){ 269 $featured_img_url = $hero_image_full[0]['full']; 270 } 271 } 272 if( strpos($featured_img_url, '//') !== false ){ 273 274 $featured_img_url = str_replace('//', 'https://',$featured_img_url); 275 276 } 277 278 279 }elseif (isset( $general_tab_option_name['website_platform'] ) && 'Agentpoint' == $general_tab_option_name['website_platform']) { 280 281 282 $actual_link = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; 283 284 $parts = parse_url($actual_link); 285 286 $id = explode('/', $parts['path']); 287 288 $post_id = end($id); 289 290 if(!empty($post_id)){ 291 292 $qry_img ="SELECT * FROM attachments WHERE parent_id = $post_id"; 293 $image_res = $wpdb->get_results( $qry_img ); 294 } 295 296 297 298 if(!empty($image_res)){ 299 $featured_img_url= $image_res[0]->url; 300 } 301 302 if(!empty($post_id)){ 303 $qry_post="SELECT * FROM properties WHERE id=$post_id"; 304 $qry_res = $wpdb->get_results( $qry_post ); 305 } 306 307 if(!empty($qry_res)){ 308 $title = $qry_res[0]->headline; 309 $content = $qry_res[0]->description; 310 $permalink = get_site_url().'/'.$post_id; 311 } 312 313 314 $featured_img_url = $featured_img_url.'.png'; 315 316 317 } 318 else{ 319 $fb_image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'thumbnail' ); 320 $post_id = $post->ID; 321 322 $featured_img_url = $fb_image[0]; 323 324 $title = get_the_title($post_id); 325 326 $permalink = get_site_url().'/'.$post_id; 327 328 $postsubtitrare = get_post_meta( $post_id, 'id-subtitrare', true ); 241 329 $post_subtitrare = get_post( $postsubtitrare ); 242 330 $content = trev_csmap_revoice_limit( strip_tags( $post_subtitrare->post_content ), 297 ); 331 } 332 333 $postType = get_post_type(); 334 335 if ( in_array($postType, $rev_post_types) || is_single() ) { 336 243 337 ?> 244 <meta property="og:title" content="<?php the_title(); ?>"/> 338 339 <meta property="og:title" content="<?php echo esc_html($title); ?>"/> 245 340 <meta property="og:description" content="<?php echo esc_attr( $content ); ?>" /> 246 <meta property="og:url" content="<?php the_permalink(); ?>"/> 247 <?php $fb_image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'thumbnail' ); ?> 248 <?php if ( $fb_image ) : ?> 249 <meta property="og:image" content="<?php echo esc_url( $fb_image[0] ); ?>" /> 250 <?php endif; ?> 251 <meta property="og:type" content=" 252 <?php 253 if ( is_single() || is_page() ) { 254 echo esc_attr( 'article' ); 255 } else { 256 echo esc_attr( 'website' );} 257 ?> 258 " /> 341 <meta property="og:url" content="<?php echo esc_url($permalink); ?>"/> 342 <meta property="og:image" content="<?php echo esc_url( $featured_img_url ); ?>" /> 343 <meta property="og:image:url" content="<?php echo esc_url( $featured_img_url ); ?>" /> 344 <meta property="og:image:secure_url" content="<?php echo esc_url( $featured_img_url );?>" /> 345 346 <meta property="og:image:type" content="image/png" /> 347 <meta property="og:image:width" content="1120"> 348 <meta property="og:image:height" content="500"> 349 350 <meta property="og:type" content="<?php echo esc_attr('article');?>" /> 259 351 <meta property="og:site_name" content="<?php bloginfo( 'name' ); ?>"/> 260 352 <?php … … 264 356 } 265 357 } 266 add_action( 'wp_head', 'trev_csmap_og_meta' ); 358 add_action( 'wp_head', 'trev_csmap_og_meta',1 ); 359 -
the-real-estate-voice/trunk/includes/order-tab.php
r2744106 r2749653 49 49 $original_feed_ex = implode('&', $original_ex); 50 50 51 $original_feed = $original_feed_ex.$current_page;51 $original_feed = $original_feed_ex.$current_page; 52 52 $original_rss = simplexml_load_file( $original_feed ); 53 53 } 54 54 55 56 55 57 56 $final_feed = TREV_CSMAP_FEED_URL . $current_page; 58 57 59 58 $rss = simplexml_load_file( $final_feed ); 60 61 59 62 60 $checked = ''; 63 61 $eparm = ''; … … 65 63 66 64 67 if ( isset( $_GET['include_exists'] ) ) { 68 $checked = 'checked'; 69 $eparm = '&include_exists=1'; 70 $include_exists = 1; 71 } else { 72 if ( ! trev_csmap_is_pro_license_plugin() ) { 73 $checked = 'checked'; 65 if ( isset( $_GET['include_exists'] ) ) { 66 $checked = 'checked'; 67 $eparm = '&include_exists=1'; 68 $include_exists = 1; 69 } else { 70 if ( ! trev_csmap_is_pro_license_plugin() ) { 71 $checked = 'checked'; 72 } 74 73 } 75 }76 74 77 75 … … 166 164 <div class="country-library-section <?php echo (trev_csmap_is_pro_license_plugin())? 'premium-ver':''; ?>"> 167 165 <?php 166 168 167 $countryCode = trev_selected_country(); 169 $country = trev_csmap_country_name($countryCode); ?> 170 171 <span><?php echo esc_html($country).' ' ;?> 168 $country = trev_csmap_country_name($countryCode); 169 170 ?> 171 172 <span> 173 <?php echo esc_html($country).' ' ;?> 172 174 <?php echo esc_html('Library','the-real-estate-voice');?></span> 173 175 <a href="<?php echo esc_url( admin_url('admin.php?page=trev-csmap-settings&tab=general'))?>" title="<?php echo esc_attr($country);?>"> … … 188 190 <?php 189 191 190 $rss_items = array();191 $icount = 0;192 $rss_items = array(); 193 $icount = 0; 192 194 $feed_count = 0; 193 194 195 195 196 foreach ( $original_rss->channel->item as $item ) { 197 196 198 $alreay_exist = post_exists( $item->title, '', '', 'post' ); 197 198 if ( $alreay_exist && !isset($_GET['include_exists'])) {199 200 if( $alreay_exist && !isset($_GET['include_exists']) ) { 199 201 continue; 200 202 } … … 204 206 } 205 207 206 207 208 $start = 1; 208 209 209 if(!empty($csrp_paged) && $csrp_paged > 1) { 210 if( !empty($csrp_paged) && $csrp_paged > 1 ) { 211 210 212 $start = $start + $post_per_page * $csrp_paged; 211 213 } 212 214 215 if( $feed_count >= 50 ){ 216 217 $new_rss_items = array_slice( $rss_items, $start, $post_per_page ); 218 219 }else{ 220 221 $new_rss_items = $original_rss->channel->item; 222 } 223 224 225 $num_pages = ceil( $feed_count / $post_per_page ); 213 226 214 215 $new_rss_items = array_slice( $rss_items, $start, $post_per_page ); 216 217 $num_pages = ceil( $feed_count / $post_per_page ); 218 219 if(!empty($new_rss_items)){ 227 if( !empty($new_rss_items) ){ 220 228 221 229 foreach ( $new_rss_items as $item ) { -
the-real-estate-voice/trunk/includes/share-listing-tab.php
r2742727 r2749653 1 1 <?php 2 3 if ( ! defined( 'ABSPATH' ) ) { 4 exit; 5 } 6 7 global $rev_post_types; 8 9 $tax_query = array( 'relation' => 'OR' ); 10 $general_tab_option_name = get_option( 'general_tab_option_name' ); 11 12 if ( isset( $general_tab_option_name['website_platform'] ) && 'SiteLoft' == $general_tab_option_name['website_platform'] ) { 13 $listing = 'listings'; 14 } 15 elseif ( isset( $general_tab_option_name['website_platform'] ) && 'Easy Property Listings' == $general_tab_option_name['website_platform'] ) { 16 $listing = 'property'; 17 }else { 18 $listing = 'listing'; 19 } 2 global $wpdb; 3 4 if ( ! defined( 'ABSPATH' ) ) { 5 exit; 6 } 7 8 global $rev_post_types; 9 10 $tax_query = array( 'relation' => 'OR' ); 11 $general_tab_option_name = get_option( 'general_tab_option_name' ); 12 13 $agentPoint = false; 14 $siteloft = false; 15 if ( isset( $general_tab_option_name['website_platform'] ) && 'Agentpoint' == $general_tab_option_name['website_platform'] ) { 16 $agentPoint = true; 17 18 } 19 20 if ( isset( $general_tab_option_name['website_platform'] ) && 'SiteLoft' == $general_tab_option_name['website_platform'] ) { 21 22 $listing = 'listings'; 23 $siteloft = true; 24 25 } 26 elseif ( isset( $general_tab_option_name['website_platform'] ) && ( 'Easy Property Listings' == $general_tab_option_name['website_platform'] || $agentPoint )) { 27 28 29 $listing = 'property'; 30 31 }else { 32 33 $listing = 'listing'; 34 35 } 20 36 21 37 $args = array( … … 27 43 ); 28 44 45 46 47 29 48 if ( isset( $_GET['category'] ) ) { 30 49 $selected = sanitize_text_field( wp_unslash( $_GET['category'] ) ); … … 34 53 35 54 36 if ( isset( $_GET['type'] ) ) { 37 $current_post_type = sanitize_text_field( wp_unslash( $_GET['type'] ) ); 38 39 if ( 'all' != $current_post_type ) { 40 $args['post_type'] = $current_post_type; 41 } 42 43 } else { 44 $current_post_type = esc_html__( 'listing', 'the-real-estate-voice' ); 45 } 55 56 $current_post_type = $listing; 57 46 58 47 59 if ( isset( $_GET['status'] ) && ! empty( $_GET['status'] ) ) { … … 62 74 ); 63 75 64 $taxonomies_objects = get_object_taxonomies( $current_post_type, 'objects' ); 65 66 if ( ! empty( $taxonomies_objects ) ) { 67 $taxonomies = get_taxonomies( array( 'object_type' => array( $current_post_type ) ) ); 68 foreach ( $unset_cat as $taxonomy ) { 69 unset( $taxonomies[ $taxonomy ] ); 70 71 } 72 73 foreach ( $taxonomies as $taxonomy ) { 74 $hierarchical = $taxonomies_objects[ $taxonomy ]->hierarchical; 75 if ( $hierarchical ) { 76 $args_taxonomy = array( 77 'taxonomy' => $taxonomy, 78 'orderby' => 'name', 79 'order' => 'ASC', 80 'hide_empty' => false, 81 ); 82 83 84 if ( $selected != 'all' ) { 85 $tax_query[] = array( 86 'taxonomy' => $taxonomy, 87 'field' => 'id', 88 'terms' => $selected, 89 'operator' => 'IN', 76 77 78 79 80 if($agentPoint){ 81 82 $cate_ap = array(); 83 $categories = array(); 84 $properties = 'properties'; 85 $qry_property = "SELECT property_type FROM ".$properties; 86 $res_property = $wpdb->get_results( $qry_property ); 87 88 foreach ($res_property as $key => $value) { 89 $cate_ap[] = $value->property_type; 90 } 91 92 $cate_ap = array_unique($cate_ap); 93 94 foreach ($cate_ap as $key => $cate) { 95 96 $categories_ap = new stdClass(); 97 $categories_ap->term_id = $cate; 98 $categories_ap->name = $cate; 99 $categories[] = $categories_ap; 100 101 } 102 103 } 104 105 if($siteloft) { 106 107 $cate_ap = array(); 108 $categories = array(); 109 110 $listCategories = json_decode(str_replace('\\', '', get_option('siteloft_settings_filter_category_options'))); 111 112 if (($listCategories = get_option('siteloft_settings_filter_category_options'))) { 113 $listCategories = json_decode(str_replace('\\', '', $listCategories), true); 114 } 115 116 $listCategories = array_column($listCategories ?: [], 'value', 'key'); 117 118 $listCategories = is_array($listCategories) ? $listCategories : []; 119 120 if(!empty($listCategories)){ 121 foreach ($listCategories as $key => $cate_sl) { 122 $categories_ap = new stdClass(); 123 $categories_ap->term_id = $cate_sl; 124 $categories_ap->name = $cate_sl; 125 $categories[] = $categories_ap; 126 } 127 } 128 129 130 131 if ( $selected != 'all' ) { 132 $args['meta_query'] = array( 133 'relation' => 'OR', 134 array( 135 'key' => 'subcategories', 136 'value' => $selected, 137 'compare' => 'LIKE', 138 ) 139 ); 140 } 141 142 143 } 144 else{ 145 146 $taxonomies_objects = get_object_taxonomies( $current_post_type, 'objects' ); 147 148 if ( ! empty( $taxonomies_objects ) ) { 149 150 $taxonomies=get_taxonomies( array( 'object_type' => array( $current_post_type ) ) ); 151 foreach ( $unset_cat as $taxonomy ) { 152 unset( $taxonomies[ $taxonomy ] ); 153 154 } 155 156 foreach ( $taxonomies as $taxonomy ) { 157 $hierarchical = $taxonomies_objects[ $taxonomy ]->hierarchical; 158 if ( $hierarchical ) { 159 $args_taxonomy = array( 160 'taxonomy' => $taxonomy, 161 'orderby' => 'name', 162 'order' => 'ASC', 163 'hide_empty' => false, 90 164 ); 91 $args['tax_query'] = $tax_query; 92 } 93 } 94 } 95 $categories = get_categories( $args_taxonomy ); 96 } 97 165 166 167 if ( $selected != 'all' ) { 168 $tax_query[] = array( 169 'taxonomy' => $taxonomy, 170 'field' => 'id', 171 'terms' => $selected, 172 'operator' => 'IN', 173 ); 174 $args['tax_query'] = $tax_query; 175 } 176 } 177 } 178 179 $categories = get_categories( $args_taxonomy ); 180 181 } 182 } 98 183 99 184 if ( isset( $_GET['post_status'] ) ) { … … 122 207 } 123 208 } 124 125 126 209 127 210 $reset = false; … … 144 227 <select name="category" id="category" data-url="<?php echo esc_url( admin_url( 'admin.php?page=trev-csmap-social-media&tab=share_listing&paged=1' ) ); ?>"> 145 228 146 <option value="all"><?php esc_html_e( 'All Categories', 'the-real-estate-voice' ); ?></option> 229 <option value="all"> 230 <?php esc_html_e( 'All Categories', 'the-real-estate-voice' ); ?></option> 147 231 148 232 <?php … … 155 239 ?> 156 240 <option value="<?php echo esc_attr( $cat->term_id ); ?>" <?php echo esc_attr( $select ); ?>><?php echo esc_html( $cat->name ); ?></option> 157 <?php } ?> 241 <?php } ?> 158 242 </select> 159 243 </div> … … 187 271 <?php if ( $reset ) { ?> 188 272 <div class="category_filter"> 189 <a href="<?php echo esc_url( admin_url( 'admin.php?page=trev-csmap-social-media&tab=share' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Reset Filter', 'the-real-estate-voice' ); ?></a> 273 274 <a href="<?php echo esc_url( admin_url( 'admin.php?page=trev-csmap-social-media&tab=share_listing' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Reset Filter', 'the-real-estate-voice' ); ?> 275 </a> 276 190 277 </div> 191 278 <?php } ?> … … 198 285 199 286 $icount = 0; 200 $posts = get_posts( $args ); 201 $eparm = ''; 202 $args_temp = $args; 203 unset( $args_temp['posts_per_page'] ); 204 205 $args_temp['posts_per_page'] = -1; 206 207 $posts_temp = get_posts( $args_temp ); 208 $post_count = count( $posts_temp ); 287 288 if($agentPoint){ 289 290 $properties = 'properties'; 291 $attachment = 'attachments'; 292 293 if(!empty($get_status) && 'all' == $get_status && 'all' != $selected && isset($_GET['filter'])){ 294 $qry_post="SELECT * FROM $properties WHERE property_type='$selected'"; 295 296 }elseif ( isset($get_status) && 'all' != $get_status && !empty( $get_status) && isset($_GET['filter']) && 'all' == $selected ) { 297 298 $qry_post="SELECT * FROM $properties as p LEFT JOIN property_meta as m ON p.id = m.property_id WHERE m.meta_value='$get_status' AND m.meta_key='revoice_sharing_status'"; 299 300 301 }elseif ( isset($_GET['status'] ) && isset($_GET['category']) && 'all' != $selected ) { 302 303 $qry_post="SELECT * FROM $properties as p LEFT JOIN property_meta as m ON p.id = m.property_id WHERE p.property_type='$selected' AND m.meta_value='$get_status' AND m.meta_key='revoice_sharing_status'"; 304 305 }else{ 306 307 $qry_post="SELECT * FROM ".$properties; 308 309 } 310 311 312 $posts = $wpdb->get_results( $qry_post ); 313 314 $post_count = count( $posts ); 315 }else{ 316 $posts = get_posts( $args ); 317 $eparm = ''; 318 $args_temp = $args; 319 unset( $args_temp['posts_per_page'] ); 320 321 $args_temp['posts_per_page'] = -1; 322 323 $posts_temp = get_posts( $args_temp ); 324 $post_count = count( $posts_temp ); 325 } 326 327 328 209 329 $general_tab_options = get_option( 'general_tab_option_name' ); 210 330 … … 217 337 218 338 $num_pages = ceil( $post_count / $post_per_page ); 339 $revoice_scheduled_id = ''; 340 219 341 if ( $post_count > 0 ) { 220 342 221 foreach ( $posts as $ post ) {343 foreach ( $posts as $key => $post ) { 222 344 $last_shared = ''; 223 $post_id = $post->ID; 224 if ( metadata_exists( 'post', $post_id, 'revoice_sharing_status' ) ) { 225 $status = get_post_meta( $post_id, 'revoice_sharing_status', true ); 226 } else { 227 update_post_meta( $post_id, 'revoice_sharing_status', 'Never Shared' ); 228 $status = esc_html__( 'Never Shared', 'the-real-estate-voice' ); 229 } 230 231 232 $featured_img_url = get_the_post_thumbnail_url( $post_id, 'full' ); 233 $categories = get_the_category( $post_id ); 234 $revoice_scheduled_id = get_post_meta( $post_id, 'revoice_scheduled_id', true ); 235 $parent_content = get_the_excerpt( $post_id ); 236 $listing_details = trev_csmap_get_web_plateform_data($current_post_type, $post_id); 237 345 $featured_img_url=''; 346 347 if($agentPoint){ 348 349 $post_id = $post->id; 350 $qry_img ="SELECT * FROM ".$attachment." WHERE parent_id =$post_id"; 351 $image_res = $wpdb->get_results( $qry_img ); 352 353 if(!empty($image_res)){ 354 $featured_img_url= $image_res[0]->url; 355 } 356 357 $permalink = get_site_url().'/'.$post_id; 358 $title = $post->headline; 359 $description = $post->description; 360 $listing_details=trev_csmap_get_web_plateform_data($current_post_type, $post_id); 361 362 $listing_details['listing_link'] = $permalink; 363 $listing_details['listing_desc'] = $description; 364 365 366 if ( trev_csmap_exist_preperty_meta( $post_id, 'revoice_shared' ) ) { 367 368 $last_shared = trev_csmap_get_preperty_meta( $post_id, 'revoice_shared' ); 369 370 // if(!empty($revoice_shared)){ 371 // $last_shared = date( 'd/m/Y', strtotime( $revoice_shared ) ); 372 // } 373 374 } 375 376 377 if ( trev_csmap_exist_preperty_meta( $post_id, 'revoice_sharing_status' ) ) { 378 379 $status = trev_csmap_get_preperty_meta( $post_id, 'revoice_sharing_status', true ); 380 381 382 } else { 383 384 $res = trev_csmap_update_preperty_meta( $post_id, 'revoice_sharing_status', 'Never Shared' ); 385 $status = esc_html__( 'Never Shared', 'the-real-estate-voice' ); 386 } 387 388 $revoice_scheduled_id = trev_csmap_get_preperty_meta( $post_id, 'revoice_scheduled_id' ); 389 390 }else{ 391 392 $post_id = $post->ID; 393 $permalink = get_permalink( $post_id ); 394 $title = get_the_title( $post_id ); 395 396 $featured_img_url = get_the_post_thumbnail_url( $post_id, 'full' ); 397 if ( empty( $featured_img_url ) && isset( $general_tab_options['website_platform'] ) && 'SiteLoft' == $general_tab_options['website_platform'] ) { 398 399 $hero_image_thumbs = get_post_meta( $post_id, 'thumbnails', true ); 400 401 if(!empty($hero_image_thumbs) && ! empty( $hero_image_thumbs[0]['full'] )){ 402 403 $featured_img_url = $hero_image_thumbs[0]['full']; 404 405 }else{ 406 407 $hero_image_full = get_post_meta( $post_id, 'images', true ); 408 409 if(!empty($hero_image_full)){ 410 $featured_img_url = $hero_image_full[0]['full']; 411 } 412 } 413 414 } 415 416 if($siteloft){ 417 $categories = get_post_meta($post_id,'subcategories',true); 418 419 }else{ 420 $categories = get_the_category( $post_id ); 421 } 422 423 $parent_content = get_the_excerpt( $post_id ); 424 425 if ( metadata_exists( 'post', $post_id, 'revoice_shared' ) ) { 426 $revoice_shared = get_post_meta( $post_id, 'revoice_shared', true ); 427 $last_shared = date( 'd/m/Y', strtotime( $revoice_shared->date ) ); 428 } 429 430 $listing_details = trev_csmap_get_web_plateform_data($current_post_type, $post_id); 431 432 if ( metadata_exists( 'post', $post_id, 'revoice_sharing_status' ) ) { 433 434 $status = get_post_meta( $post_id, 'revoice_sharing_status', true ); 435 436 } else { 437 438 update_post_meta( $post_id, 'revoice_sharing_status', 'Never Shared' ); 439 $status = esc_html__( 'Never Shared', 'the-real-estate-voice' ); 440 } 441 442 $revoice_scheduled_id = get_post_meta( $post_id, 'revoice_scheduled_id', true ); 443 } 444 445 446 $page_ids = get_post_meta( $revoice_scheduled_id, 'revoice_scheduled_page_id', true ); 447 448 $scheduled = get_post_meta( $revoice_scheduled_id, 'revoice_scheduled', true ); 449 if ( $scheduled < current_time( 'mysql' ) ) { 450 $scheduled = ''; 451 } 452 453 $post_content = get_post( $revoice_scheduled_id ); 454 455 238 456 $bedroom_emoji = ''; 239 457 if ( ! empty( $listing_details['bedroom'] ) ) { … … 257 475 $version_status = true; 258 476 } 259 260 $page_ids = get_post_meta( $revoice_scheduled_id, 'revoice_scheduled_page_id', true ); 261 $scheduled = get_post_meta( $revoice_scheduled_id, 'revoice_scheduled', true ); 262 if ( $scheduled < current_time( 'mysql' ) ) { 263 $scheduled = ''; 264 } 265 $post_content = get_post( $revoice_scheduled_id ); 477 266 478 267 479 $autshare = false; 268 269 if ( metadata_exists( 'post', $post_id, 'revoice_shared' ) ) {270 $revoice_shared = get_post_meta( $post_id, 'revoice_shared', true );271 $last_shared = date( 'd/m/Y', strtotime( $revoice_shared->date ) );272 }273 274 480 ?> 275 481 276 <div class="blog_item"> 277 278 <div class="blog_image"> 279 <img class="map_image" src="<?php echo esc_url( $featured_img_url ); ?>"></div> 280 <h3 class="map_date"> 281 282 283 <?php 284 if ( ! empty( $last_shared ) && $last_shared != '' ) { 285 ?> 286 <span><?php esc_html_e( 'Last Shared: ', 'the-real-estate-voice' ); ?> <?php echo esc_html( $last_shared ); ?></span> 287 <span class="saperater"> <?php esc_html_e( '| ', 'the-real-estate-voice' ); ?> </span> 288 <?php } ?> 289 290 <?php 291 if ( $status != '' || ! empty( $status ) ) { 292 ?> 293 <span> <?php esc_html_e( 'Status: ', 'the-real-estate-voice' ); ?><?php echo esc_html( $status ); ?></span> 294 <?php } ?> 295 </h3> 296 297 <div class="blog_description social-media-desc"> 298 299 <h3 class="map_title"> 300 <a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" class="" target="_blank"> 301 <?php echo esc_html( get_the_title( $post_id ) ); ?> 302 </a> 303 </h3> 304 <?php 305 if ( is_array( $categories ) ) { 306 foreach ( $categories as $cat ) { 307 ?> 308 <div class="map_category"> 309 <?php echo esc_html( $cat->cat_name ); ?> 310 </div> 311 <?php 312 } 313 } 314 315 ?> 316 317 318 <div class="map_desc test"> 319 <?php 320 $get_content = $post->post_excerpt; 321 322 if ( ! empty( $get_content ) ) { 323 echo wp_kses_post( $get_content ); 324 } else { 325 $get_content = apply_filters( 'the_content', $post->post_content ); 326 $get_content = preg_replace( '~(?:\[/?)[^/\]]+/?\]~s', '', $get_content ); 327 328 echo wp_kses_post( $get_content ); 329 } 330 331 ?> 332 333 </div> 334 <div class="map_content" style="display:none;"><?php echo wp_kses_post( $post->post_content ); ?></div> 335 336 337 </div> 338 339 340 <div class="blog_action"> 341 <?php 342 343 if ( 'Currently scheduled' == $status && trev_csmap_is_pro_license_plugin() ) { 344 ?> 345 346 <button class="button button-primary edit_schedule edit_post_cl" data-bedroom-emoji="<?php echo esc_attr( $bedroom_emoji ); ?>" data-event_time="<?php echo esc_attr( $scheduled ); ?>" data-pageid="<?php echo esc_attr( $page_ids ); ?>" data-id="<?php echo esc_attr( $revoice_scheduled_id ); ?>" data-post-id="<?php echo esc_attr( $post->ID ); ?>" data-event="<?php echo esc_attr( get_the_title( $revoice_scheduled_id ) ); ?>" data-bathroom-emoji="<?php echo esc_attr( $bathroom_emoji ); ?>" data-garage-emoji="<?php echo esc_attr( $garage_emoji ); ?>" data-post-type="<?php echo esc_attr( $current_post_type ); ?>" data-address="<?php echo esc_attr( $listing_details['map_address'] ); ?>" data-listing-link="<?php echo esc_attr( $listing_details['listing_link'] ); ?>" data-bedroom="<?php echo esc_attr( $listing_details['bedroom'] ); ?>" data-bathroom="<?php echo esc_attr( $listing_details['bathroom'] ); ?>" data-garage="<?php echo esc_attr( $listing_details['garage'] ); ?>" data-image="<?php echo esc_url( $featured_img_url ); ?>" data-schedule-id="<?php echo esc_attr( $revoice_scheduled_id ); ?>" data-id="<?php echo esc_attr( $post->ID ); ?>" data-title="<?php echo esc_attr( get_the_title( $post_id ) ); ?>" data-listing-details='<?php echo esc_attr( $js_code ); ?>' data-content-page="<?php esc_attr( 'content' ); ?>" data-parent-content="<?php echo esc_attr( $listing_details['listing_desc'] ); ?>" data-desc="<?php echo wp_kses_post( $post_content->post_content ); ?>" ><?php esc_html_e( 'Edit', 'the-real-estate-voice' ); ?></button> 347 348 <?php } else { ?> 349 <button class="button button-primary map_share_btn" data-bedroom-emoji="<?php echo esc_attr( $bedroom_emoji ); ?>" data-bathroom-emoji="<?php echo esc_attr( $bathroom_emoji ); ?>" data-garage-emoji="<?php echo esc_attr( $garage_emoji ); ?>" data-post-type="<?php echo esc_attr( $current_post_type ); ?>" data-address="<?php echo esc_attr( $listing_details['map_address'] ); ?>" data-listing-link="<?php echo esc_url( $listing_details['listing_link'] ); ?>" data-bedroom="<?php echo esc_attr( $listing_details['bedroom'] ); ?>" data-bathroom="<?php echo esc_attr( $listing_details['bathroom'] ); ?>" data-garage="<?php echo esc_attr( $listing_details['garage'] ); ?>" data-image="<?php echo esc_url( $featured_img_url ); ?>" data-schedule-id="<?php echo esc_attr( $revoice_scheduled_id ); ?>" data-id="<?php echo esc_attr( $post->ID ); ?>" data-title="<?php echo esc_attr( get_the_title( $post_id ) ); ?>" data-listing-details='<?php echo esc_attr( $js_code ); ?>' data-plugin-version="<?php esc_attr_e( $version_status ); ?>" data-desc="<?php echo esc_html( strip_tags( $get_content ) ); ?>" ><?php esc_html_e( 'Share', 'the-real-estate-voice' ); ?></button> 350 351 <?php } ?> 352 353 </div> 354 355 </div> 482 <div class="blog_item <?php echo esc_attr($post_id)?>"> 483 484 <div class="blog_image"> 485 <img class="map_image" src="<?php echo esc_url( $featured_img_url ); ?>"></div> 486 <h3 class="map_date"> 487 488 489 <?php 490 if ( ! empty( $last_shared ) && $last_shared != '' ) { 491 ?> 492 <span><?php esc_html_e( 'Last Shared: ', 'the-real-estate-voice' ); ?> <?php echo esc_html( $last_shared ); ?></span> 493 <span class="saperater"> <?php esc_html_e( '| ', 'the-real-estate-voice' ); ?> </span> 494 <?php } ?> 495 496 <?php 497 if ( $status != '' || ! empty( $status ) ) { 498 ?> 499 <span> <?php esc_html_e( 'Status: ', 'the-real-estate-voice' ); ?><?php echo esc_html( $status ); ?></span> 500 <?php } ?> 501 </h3> 502 503 <div class="blog_description social-media-desc"> 504 505 <h3 class="map_title"> 506 <a href="<?php echo esc_url( $permalink ); ?>" class="" target="_blank"> 507 <?php echo esc_html( $title ); ?> 508 </a> 509 </h3> 510 <?php 511 512 if($agentPoint){ 513 514 $qry_property = "SELECT property_type FROM $properties WHERE id=".$post_id; 515 516 $res_property = $wpdb->get_results( $qry_property ); 517 ?> 518 519 <div class="map_category"> 520 <?php echo esc_html( $res_property[0]->property_type ); ?> 521 </div> 522 523 <?php 524 }else{ 525 526 if ( is_array( $categories ) ) { 527 foreach ( $categories as $cat ) { 528 ?> 529 <div class="map_category"> 530 <?php 531 if($siteloft){ 532 echo esc_html( $cat ); 533 }else{ 534 echo esc_html( $cat->name ); 535 }?> 536 </div> 537 <?php 538 } 539 } 540 } 541 542 543 544 545 546 547 ?> 548 549 550 <div class="map_desc test"> 551 <?php 552 553 if($agentPoint){ 554 $get_content = $description; 555 echo wp_kses_post($description); 556 557 558 }else{ 559 560 $get_content = $post->post_excerpt; 561 562 if ( ! empty( $get_content ) ) { 563 564 echo wp_kses_post( $get_content ); 565 566 } else { 567 568 $get_content = apply_filters( 'the_content', $post->post_content ); 569 $get_content = preg_replace( '~(?:\[/?)[^/\]]+/?\]~s', '', $get_content ); 570 571 echo wp_kses_post( $get_content ); 572 } 573 574 } 575 576 577 ?> 578 579 </div> 580 <div class="map_content" style="display:none;"> 581 582 <?php 583 if($agentPoint){ 584 echo wp_kses_post( $description ); 585 }else{ 586 echo wp_kses_post( $post->post_content ); 587 } 588 ?></div> 589 590 591 </div> 592 593 594 <div class="blog_action"> 595 <?php 596 597 if ( isset($status) && 'Currently scheduled' == $status && trev_csmap_is_pro_license_plugin() ) { 598 ?> 599 600 <button class="button button-primary edit_schedule edit_post_cl" data-bedroom-emoji="<?php echo esc_attr( $bedroom_emoji ); ?>" data-event_time="<?php echo esc_attr( $scheduled ); ?>" data-pageid="<?php echo esc_attr( $page_ids ); ?>" data-id="<?php echo esc_attr( $revoice_scheduled_id ); ?>" data-post-id="<?php echo esc_attr( $post_id ); ?>" data-event="<?php echo esc_attr( $title ); ?>" data-bathroom-emoji="<?php echo esc_attr( $bathroom_emoji ); ?>" data-garage-emoji="<?php echo esc_attr( $garage_emoji ); ?>" data-post-type="<?php echo esc_attr( $current_post_type ); ?>" data-address="<?php echo esc_attr( $listing_details['map_address'] ); ?>" data-listing-link="<?php echo esc_attr( $listing_details['listing_link'] ); ?>" data-bedroom="<?php echo esc_attr( $listing_details['bedroom'] ); ?>" data-bathroom="<?php echo esc_attr( $listing_details['bathroom'] ); ?>" data-garage="<?php echo esc_attr( $listing_details['garage'] ); ?>" data-image="<?php echo esc_url( $featured_img_url ); ?>" data-schedule-id="<?php echo esc_attr( $revoice_scheduled_id ); ?>" data-id="<?php echo esc_attr( $post_id ); ?>" data-title="<?php echo esc_attr( $title ); ?>" data-listing-details='<?php echo esc_attr( $js_code ); ?>' data-content-page="<?php esc_attr( 'content' ); ?>" data-parent-content="<?php echo esc_attr( $listing_details['listing_desc'] ); ?>" data-desc="<?php echo wp_kses_post( $post_content->post_content ); ?>" ><?php esc_html_e( 'Edit', 'the-real-estate-voice' ); ?></button> 601 602 <?php } else { ?> 603 <button class="button button-primary map_share_btn" data-bedroom-emoji="<?php echo esc_attr( $bedroom_emoji ); ?>" data-bathroom-emoji="<?php echo esc_attr( $bathroom_emoji ); ?>" data-garage-emoji="<?php echo esc_attr( $garage_emoji ); ?>" data-post-type="<?php echo esc_attr( $current_post_type ); ?>" data-address="<?php echo esc_attr( $listing_details['map_address'] ); ?>" data-listing-link="<?php echo esc_url( $listing_details['listing_link'] ); ?>" data-bedroom="<?php echo esc_attr( $listing_details['bedroom'] ); ?>" data-bathroom="<?php echo esc_attr( $listing_details['bathroom'] ); ?>" data-garage="<?php echo esc_attr( $listing_details['garage'] ); ?>" data-image="<?php echo esc_url( $featured_img_url ); ?>" data-schedule-id="<?php echo esc_attr( $revoice_scheduled_id ); ?>" data-id="<?php echo esc_attr( $post_id ); ?>" data-title="<?php echo esc_attr($title ); ?>" data-listing-details='<?php echo esc_attr( $js_code ); ?>' data-plugin-version="<?php esc_attr_e( $version_status ); ?>" data-desc="<?php echo esc_html( strip_tags( $get_content ) ); ?>" ><?php esc_html_e( 'Share', 'the-real-estate-voice' ); ?></button> 604 605 <?php } ?> 606 607 </div> 608 609 </div> 356 610 357 611 <?php … … 393 647 394 648 if ( $page < $num_pages ) { 649 395 650 $page = $page + 1; 651 396 652 $paginationUrl = add_query_arg( 397 653 array( … … 404 660 admin_url( 'admin.php' ) 405 661 ); 662 406 663 ?> 407 664 -
the-real-estate-voice/trunk/js/trev-csmap-revoice.js
r2745011 r2749653 30 30 } 31 31 32 }); 33 32 33 }); 34 34 35 35 … … 372 372 revoice_scheduled_id = jQuery(this).attr('data-schedule-id'); 373 373 374 if (post_type == 'listing' ) {374 if (post_type == 'listing' || post_type == 'listings' || post_type == 'property') { 375 375 listing_detail['bedroom'] = listing_detail_back.bedroom; 376 376 listing_detail['bathroom'] = listing_detail_back.bathroom; … … 529 529 revoice_scheduled_id = jQuery(this).attr('data-schedule-id'); 530 530 531 if (post_type == 'listing' ) {531 if (post_type == 'listing' || post_type == 'listings' || post_type == 'property') { 532 532 listing_detail['bedroom'] = jQuery(this).data('bedroom'); 533 533 listing_detail['bathroom'] = jQuery(this).data('bathroom'); … … 619 619 620 620 function schedule_share_post_popup(desc, title, image, id, revoice_scheduled_id = '', listing_detail = '') { 621 622 fb_page_load.forEach(function (item) {621 if(fb_page_select.length == 0){ 622 fb_page_load.forEach(function (item) { 623 623 624 624 fb_page_select.push(item.id); 625 625 }); 626 626 627 } 628 627 629 628 630 var listing_detail_obj = {}; … … 659 661 660 662 661 if (revoiceDataAjax.is_listing_tab && revoiceDataAjax.plugin_version == false && post_type == 'listing') {663 if (revoiceDataAjax.is_listing_tab && revoiceDataAjax.plugin_version == false && ( post_type == 'listing' || post_type == 'listings' || post_type == 'property' ) ) { 662 664 trev_csmap_subscription_popup(); 663 665 return false; … … 911 913 jQuery('body').addClass('open-overlay'); 912 914 913 desc = jQuery(this).attr('data-desc');915 desc = jQuery(this).attr('data-desc'); 914 916 title = jQuery(this).attr('data-title'); 915 917 image = jQuery(this).attr('data-image'); … … 932 934 } 933 935 934 if (revoiceDataAjax.is_listing_tab && revoiceDataAjax.plugin_version == false && post_type == 'listing') {936 if (revoiceDataAjax.is_listing_tab && revoiceDataAjax.plugin_version == false && ( post_type == 'listing' || post_type == 'property') ) { 935 937 trev_csmap_subscription_popup(); 936 938 return false; … … 947 949 } 948 950 949 if (post_type == 'listing' ) {951 if (post_type == 'listing' || post_type == 'property' || post_type == 'listings' ) { 950 952 listing_detail = jQuery(this).data('listing-details'); 951 953 } … … 986 988 var listing_detail_show = ''; 987 989 988 if (post_type == 'listing' ) {990 if (post_type == 'listing' || post_type == 'property' || post_type == 'listings') { 989 991 if (listing_detail) { 990 992 list_data = bedroom + ' ' + bedroom_emoji + nullSpace + bathroom + ' ' + bathroom_emoji + nullSpace + garage + ' ' + garage_emoji; -
the-real-estate-voice/trunk/readme.txt
r2745011 r2749653 5 5 Tested up to: 6.0 6 6 Requires PHP: 5.6 7 Stable tag: 1.1. 87 Stable tag: 1.1.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 93 93 == Changelog == 94 94 95 = 1.1.9 = 96 * Fixed issue of siteloft plugin's listing image 97 * Added categories to category dropdown in siteloft plugin's listing page 98 * Added placeholder to Instagram default hashtags area in Instagram setting 99 95 100 = 1.1.8 = 96 101 * Fixed issue of facebook sharing twice -
the-real-estate-voice/trunk/the-real-estate-voice.php
r2745011 r2749653 379 379 if ( ! empty( $instagram_option ) ) { 380 380 $logo_id = ! empty( $instagram_option['logo'] ) ? $instagram_option['logo'] : ''; 381 $hashtags = $instagram_option['hashtags']; 381 if(isset($instagram_option['hashtags'])){ 382 $hashtags = $instagram_option['hashtags']; 383 } 384 382 385 } 383 386 … … 568 571 569 572 if ( isset( $general_tab_option_name['website_platform'] ) && 'SiteLoft' == $general_tab_option_name['website_platform'] ) { 573 570 574 $listing = 'listings'; 571 575 } 572 576 elseif ( isset( $general_tab_option_name['website_platform'] ) && 'Easy Property Listings' == $general_tab_option_name['website_platform'] ) { 577 573 578 $listing = 'property'; 579 574 580 }else { 581 575 582 $listing = 'listing'; 583 576 584 } 577 585 … … 642 650 $auto_social_option = get_option( 'auto_social_option_name'); 643 651 644 $instagram_option = get_option( 'instagram_tab_option_name' );645 646 if( isset( $instagram_option['hashtags'] ) && empty( $instagram_option['hashtags'] ) ){647 648 $instagram_option['hashtags'] = '#realestate #voicerealestate #iloverealestate649 650 Voice Real Estate651 📞 9999 99999652 💻 www.voicerealestate.com653 LINK IN BIO';654 }655 656 652 $revcp_settings['post_status_2'] = 'publish'; 657 653 $revcp_settings['attribute_posts_to_this_user_1'] = 1; … … 659 655 $auto_post_settings['auto_attribute_posts_to_this_user_2'] = 1; 660 656 $auto_post_settings['auto_post_status_3'] = 'publish'; 657 658 $auto_social_option['add_open_graph_tags_1'] = 1; 659 660 $revcp_settings['pro_version'] = 0; 661 661 662 662 663 $auto_social_option['add_open_graph_tags_1'] = 1;664 665 666 667 $revcp_settings['pro_version'] = 0;668 669 663 if ( is_array($get_pro_url) && ! empty( $get_pro_url ) ) { 670 671 664 $revcp_settings['pro_version'] = 1; 672 665 $library_cats = trev_csmap_article_library_categories(); 673 666 $auto_post_settings['auto_maximum_posts_per_check_4'] = 2; 674 667 $temp = array(); 668 675 669 foreach ( $library_cats as $cat_id => $cat_name ) { 676 670 $temp[ $cat_name ] = $cat_id; … … 678 672 679 673 $revcp_settings['library_cats'] = $temp; 680 681 674 } 682 675 … … 684 677 update_option( 'auto_post_option_name', $auto_post_settings ); 685 678 update_option( 'auto_social_option_name', $auto_social_option ); 686 update_option( 'instagram_tab_option_name', $instagram_option );679 687 680 } 688 681
Note: See TracChangeset
for help on using the changeset viewer.