Changeset 1815229
- Timestamp:
- 02/04/2018 07:10:39 PM (8 years ago)
- Location:
- blogdog/trunk
- Files:
-
- 5 edited
-
admin/admin.php (modified) (1 diff)
-
admin/css/style.css (modified) (1 diff)
-
admin/js/admin.js (modified) (3 diffs)
-
blogdog.php (modified) (6 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
blogdog/trunk/admin/admin.php
r1813712 r1815229 896 896 897 897 if( $_REQUEST['ID'] === 'blogdog_city' ) { 898 899 $result = $this->blogdog_zipcode_checkbox( $_REQUEST['city'], array(), $_REQUEST['section'] ); 900 901 if( $result ) $response['html'] = $result; 902 else $response['html'] = 'No zipcodes available for this city.'; 903 898 899 $response['html'] = apply_filters( 'blogdog_GET', 'zipcodes/', array( urlencode( $_REQUEST['city'] ), $_REQUEST['section'] ) ); 900 904 901 $response['code'] = '#blogdog_zipcode_' . $_REQUEST['section']; 905 902 -
blogdog/trunk/admin/css/style.css
r1750834 r1815229 16 16 float:left; 17 17 margin: 6px 9px; 18 } 19 20 .location-footer{ 21 padding: 40px 0 10px; 18 22 } 19 23 -
blogdog/trunk/admin/js/admin.js
r1750834 r1815229 124 124 125 125 /** Update city and zipcode inputs */ 126 $( '#blogdog_admin' ).on( 'change click', '.blogdog_watch', function() {126 $( '#blogdog_admin' ).on( 'change', '.blogdog-city', function() { 127 127 128 128 var ID = this.id; 129 129 var city = $( this ).val(); 130 var state = $( '#blogdog_state' ).val();131 130 var section = $( this ).attr( 'section' ); 132 var shortcode_type = $( '#shortcode_type' ).val(); 133 131 132 $( this ).parents( '.locations-wrap' ).children( '.location_heading' ).children( '.city-text' ).html( city ); 134 133 135 134 jQuery.ajax ( { … … 140 139 ID : ID, 141 140 city : city, 142 state : state,143 141 section : section, 144 shortcode_type : shortcode_type, 145 blogdog_ajax_nonce : blogdog_url.nonce, 142 blogdog_ajax_nonce : blogdog_url.nonce, 143 }, 144 beforeSend: function() { 145 $( '#blogdog_zipcode_' + section ).html( '<i class="far fa-spin fa-spinner"></i>' ); 146 146 }, 147 147 success: function( response ) { … … 152 152 dataType:'json' 153 153 } ); 154 } );155 156 /* Update location heading on city select change */157 $( '#locations_wrap' ).on( 'change', '.blogdog-city', function( ) {158 var city = $( this ).val();159 $( this ).parents( '.locations-wrap' ).children( '.location_heading' ).children( '.city-text' ).html( city );160 154 } ); 161 155 -
blogdog/trunk/blogdog.php
r1814511 r1815229 4 4 Plugin URI: https://reblogdog.com 5 5 Description: Add automated real estate content to your website. We publish an SEO optimized blog post for you everyday. 6 Version: 9.0. 26 Version: 9.0.3 7 7 Author: reblogdog 8 8 Author URI: https://reblogdog.com … … 28 28 29 29 if ( ! defined( 'BLOGDOG_PLUGIN_VERSION' ) ) 30 define( 'BLOGDOG_PLUGIN_VERSION', '9.0. 2' );30 define( 'BLOGDOG_PLUGIN_VERSION', '9.0.3' ); 31 31 32 32 /** … … 604 604 605 605 } 606 607 $this->update_api_key_9_0_1(); 608 609 } 610 611 public function update_api_key_9_0_1() { 612 613 $option = 'update_api_key_9_0_1'; 614 615 if( ! get_option( $option ) ) { 616 617 $settings = get_option( 'blogdog_api_settings' ); 618 619 update_option( 'blogdog_api_key', $settings['api_key'] ); 620 621 update_option( $option, 'success' ); 622 623 } 624 606 625 607 } 626 608 … … 649 631 * @since 6.0.0 650 632 * 651 * @param object $ resultsThe MLS data object.652 */ 653 654 public function blogdog_elite_post( $ results) {655 656 if( $this->useable_listing( $ results) ) {633 * @param object $listing The MLS data object. 634 */ 635 636 public function blogdog_elite_post( $listing ) { 637 638 if( $this->useable_listing( $listing ) ) { 657 639 658 640 $arg = 'blogdog_elite_post_body_' . time(); 659 641 660 update_option( $arg, $ results);642 update_option( $arg, $listing ); 661 643 662 644 wp_schedule_single_event( time() + 60, 'blogdog_elite_publish', array( $arg ) ); … … 668 650 } 669 651 670 private function useable_listing( $ results) {652 private function useable_listing( $listing ) { 671 653 672 654 if( $settings = (array) apply_filters( 'blogdog_GET', 'elite-settings/' ) ) { … … 677 659 678 660 if( 679 ! empty( $results->images ) 680 && 681 $results->mls_class == 'res' 682 && 683 in_array( $results->ListStatus, array( 'Active', 'Closed', 'Sold' ) ) 684 && 685 empty( $results->Contingent ) 686 && 687 ( 688 in_array( $results->ListOfficeID, $broker_ids ) 689 || 690 in_array( $results->ListAgentID, $agent_ids ) 691 ) 692 && 693 in_array( $results->City, $areas ) 694 && 695 post_exists( 'Featured Listing: ' . $listing->PropertyAddress ) == 0 696 && 697 post_exists( 'Recently Sold: ' . $listing->PropertyAddress ) == 0 698 661 empty( $listing->images ) 662 || 663 $listing->mls_class != 'res' 664 || 665 ! in_array( $listing->ListStatus, array( 'Active', 'Closed', 'Sold' ) ) 666 || 667 ! empty( $listing->Contingent ) 668 || 669 ! in_array( $listing->ListOfficeID, $broker_ids ) 670 || 671 ! in_array( $listing->ListAgentID, $agent_ids ) 672 || 673 ! in_array( $listing->City, $areas ) 674 || 675 ( 676 in_array( $listing->ListStatus, array( 'Closed', 'Sold' ) ) 677 && 678 strtotime( $listing->DaysBack ) > ( time() - ( 86400 * 30 ) ) 679 ) 680 || 681 post_exists( 'Featured Listing: ' . $listing->PropertyAddress ) 682 || 683 post_exists( 'Recently Sold: ' . $listing->PropertyAddress ) 684 699 685 ) { 700 686 701 // Check for sold and inside 30 days. 702 if( 703 in_array( $results->ListStatus, array( 'Closed', 'Sold' ) ) 704 && 705 strtotime( $results->DaysBack ) > ( time() - ( 86400 * 30 ) ) 706 ) { 707 708 return false; 709 710 } 687 return false; 688 689 } 711 690 712 return true; 713 714 } 691 return true; 715 692 716 693 } -
blogdog/trunk/readme.txt
r1814512 r1815229 63 63 == Changelog == 64 64 65 = 9.0.3 = 66 67 * Bug fix - zipcode ajax request. 68 * Update conditions for Elite Automation posts. 69 65 70 = 9.0.2 = 66 71 67 * Bug fix - Wrong DBkey for api_key in blogdog API push.72 * Bug fix - Wrong options key for api_key in blogdog API push. 68 73 * Verify title does not exists for Elite Automation posts. 69 74
Note: See TracChangeset
for help on using the changeset viewer.