@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /* Path to the WordPress codebase you'd like to test. Add a backslash in the end. */ |
| 4 | -define( 'ABSPATH', getenv( 'WP_CORE_DIR' ) . '/' ); |
|
| 4 | +define('ABSPATH', getenv('WP_CORE_DIR').'/'); |
|
| 5 | 5 | |
| 6 | 6 | // Test with multisite enabled |
| 7 | -define( 'WP_TESTS_MULTISITE', (bool) getenv( 'WP_MULTISITE' ) ); |
|
| 7 | +define('WP_TESTS_MULTISITE', (bool) getenv('WP_MULTISITE')); |
|
| 8 | 8 | |
| 9 | 9 | // Force known bugs |
| 10 | 10 | // define( 'WP_TESTS_FORCE_KNOWN_BUGS', true ); |
| 11 | 11 | |
| 12 | 12 | // Test with WordPress debug mode on |
| 13 | -define( 'WP_DEBUG', true ); |
|
| 13 | +define('WP_DEBUG', true); |
|
| 14 | 14 | |
| 15 | 15 | // ** MySQL settings ** // |
| 16 | 16 | |
@@ -21,21 +21,21 @@ discard block |
||
| 21 | 21 | // These tests will DROP ALL TABLES in the database with the prefix named below. |
| 22 | 22 | // DO NOT use a production database or one that is shared with something else. |
| 23 | 23 | |
| 24 | -define( 'DB_NAME', 'wordpress_test' ); |
|
| 25 | -define( 'DB_USER', 'root' ); |
|
| 26 | -define( 'DB_PASSWORD', 'root' ); |
|
| 27 | -define( 'DB_HOST', 'localhost' ); |
|
| 28 | -define( 'DB_CHARSET', 'utf8' ); |
|
| 29 | -define( 'DB_COLLATE', '' ); |
|
| 24 | +define('DB_NAME', 'wordpress_test'); |
|
| 25 | +define('DB_USER', 'root'); |
|
| 26 | +define('DB_PASSWORD', 'root'); |
|
| 27 | +define('DB_HOST', 'localhost'); |
|
| 28 | +define('DB_CHARSET', 'utf8'); |
|
| 29 | +define('DB_COLLATE', ''); |
|
| 30 | 30 | |
| 31 | -define( 'WP_TESTS_DOMAIN', 'example.org' ); |
|
| 32 | -define( 'WP_TESTS_EMAIL', '[email protected]' ); |
|
| 33 | -define( 'WP_TESTS_TITLE', 'Test Blog' ); |
|
| 31 | +define('WP_TESTS_DOMAIN', 'example.org'); |
|
| 32 | +define('WP_TESTS_EMAIL', '[email protected]'); |
|
| 33 | +define('WP_TESTS_TITLE', 'Test Blog'); |
|
| 34 | 34 | |
| 35 | -define( 'WP_PHP_BINARY', 'php' ); |
|
| 35 | +define('WP_PHP_BINARY', 'php'); |
|
| 36 | 36 | |
| 37 | -define( 'FS_CHMOD_DIR', ( 0755 & ~ umask() ) ); |
|
| 38 | -define( 'FS_CHMOD_FILE', ( 0644 & ~ umask() ) ); |
|
| 37 | +define('FS_CHMOD_DIR', (0755 & ~ umask())); |
|
| 38 | +define('FS_CHMOD_FILE', (0644 & ~ umask())); |
|
| 39 | 39 | |
| 40 | -define( 'WPLANG', '' ); |
|
| 41 | -$table_prefix = 'wptests_'; |
|
| 42 | 40 | \ No newline at end of file |
| 41 | +define('WPLANG', ''); |
|
| 42 | +$table_prefix = 'wptests_'; |
|
| 43 | 43 | \ No newline at end of file |
@@ -1,141 +1,141 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class CheckShortcodes extends WP_UnitTestCase |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 7 | - wp_set_current_user(1); |
|
| 8 | - |
|
| 9 | - } |
|
| 10 | - |
|
| 11 | - public function testHomeMapShortcode() |
|
| 12 | - { |
|
| 13 | - $output = do_shortcode('[gd_homepage_map width=100% height=300 scrollwheel=false]'); |
|
| 14 | - $this->assertContains( 'geodir-map-home-page', $output ); |
|
| 15 | - } |
|
| 16 | - |
|
| 17 | - public function testListingMapShortcode() |
|
| 18 | - { |
|
| 19 | - $output = do_shortcode('[gd_listing_map width=100% height=300 scrollwheel=false sticky=true]'); |
|
| 20 | - $this->assertContains( 'geodir-map-listing-page', $output ); |
|
| 21 | - } |
|
| 22 | - |
|
| 23 | - public function testListingSliderShortcode() |
|
| 24 | - { |
|
| 25 | - $output = do_shortcode('[gd_listing_slider post_number=5 category=3 slideshow=true show_featured_only=true]'); |
|
| 26 | - $this->assertContains( 'geodir_widget_carousel', $output ); |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - public function testLoginBoxShortcode() |
|
| 30 | - { |
|
| 31 | - $output = do_shortcode('[gd_login_box]'); |
|
| 32 | - $this->assertContains( 'geodir-loginbox-list', $output ); |
|
| 33 | - } |
|
| 34 | - |
|
| 35 | - public function testPopPostCatShortcode() |
|
| 36 | - { |
|
| 37 | - global $geodir_post_type; |
|
| 38 | - $geodir_post_type = 'gd_place'; |
|
| 39 | - $output = do_shortcode('[gd_popular_post_category category_limit=30]'); |
|
| 40 | - $this->assertContains( 'geodir-popular-cat-list', $output ); |
|
| 41 | - } |
|
| 42 | - |
|
| 43 | - public function testPopPostViewShortcode() |
|
| 44 | - { |
|
| 45 | - $output = do_shortcode('[gd_popular_post_view category=3 layout=5 add_location_filter=true character_count=0 show_featured_only=true]'); |
|
| 46 | - $this->assertContains( 'geodir_category_list_view', $output ); |
|
| 47 | - } |
|
| 48 | - |
|
| 49 | - public function testRecentReviewsShortcode() |
|
| 50 | - { |
|
| 51 | - $query_args = array( |
|
| 52 | - 'post_status' => 'publish', |
|
| 53 | - 'post_type' => 'gd_place', |
|
| 54 | - 'posts_per_page' => 1, |
|
| 55 | - ); |
|
| 56 | - |
|
| 57 | - $all_posts = new WP_Query( $query_args ); |
|
| 58 | - $post_id = null; |
|
| 59 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 60 | - $post_id = get_the_ID(); |
|
| 61 | - endwhile; |
|
| 62 | - |
|
| 63 | - $this->assertTrue(is_int($post_id)); |
|
| 64 | - |
|
| 65 | - $time = current_time('mysql'); |
|
| 66 | - |
|
| 67 | - $data = array( |
|
| 68 | - 'comment_post_ID' => $post_id, |
|
| 69 | - 'comment_author' => 'admin', |
|
| 70 | - 'comment_author_email' => '[email protected]', |
|
| 71 | - 'comment_author_url' => 'http://wpgeodirectory.com', |
|
| 72 | - 'comment_content' => 'content here testtcc', |
|
| 73 | - 'comment_type' => '', |
|
| 74 | - 'comment_parent' => 0, |
|
| 75 | - 'user_id' => 1, |
|
| 76 | - 'comment_author_IP' => '127.0.0.1', |
|
| 77 | - 'comment_agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)', |
|
| 78 | - 'comment_date' => $time, |
|
| 79 | - 'comment_approved' => 1, |
|
| 80 | - ); |
|
| 81 | - |
|
| 82 | - $comment_id = wp_insert_comment($data); |
|
| 83 | - |
|
| 84 | - $_REQUEST['geodir_overallrating'] = 5.0; |
|
| 85 | - geodir_save_rating($comment_id); |
|
| 86 | - |
|
| 87 | - $output = do_shortcode('[gd_recent_reviews count=5]'); |
|
| 88 | - $this->assertContains( 'geodir_sc_recent_reviews', $output ); |
|
| 89 | - } |
|
| 90 | - |
|
| 91 | - public function testRelatedListingsShortcode() |
|
| 92 | - { |
|
| 93 | - $query_args = array( |
|
| 94 | - 'post_status' => 'publish', |
|
| 95 | - 'post_type' => 'gd_place', |
|
| 96 | - 'posts_per_page' => 1, |
|
| 97 | - ); |
|
| 98 | - |
|
| 99 | - $all_posts = new WP_Query( $query_args ); |
|
| 100 | - $post_id = null; |
|
| 101 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 102 | - $post_id = get_the_ID(); |
|
| 103 | - global $post; |
|
| 104 | - $post = geodir_get_post_info($post_id); |
|
| 105 | - setup_postdata($post); |
|
| 106 | - $output = do_shortcode('[gd_related_listings relate_to=category layout=3 add_location_filter=0 list_sort=featured character_count=0]'); |
|
| 107 | - $this->assertContains( 'geodir_location_listing', $output ); |
|
| 108 | - endwhile; |
|
| 109 | - |
|
| 110 | - $this->assertTrue(is_int($post_id)); |
|
| 111 | - |
|
| 112 | - } |
|
| 113 | - |
|
| 114 | - public function testListingsShortcode() |
|
| 115 | - { |
|
| 116 | - $output = do_shortcode('[gd_listings post_type="gd_place" category="1,3" post_number="10" list_sort="high_review"]'); |
|
| 117 | - $this->assertContains( 'geodir-sc-gd-listings', $output ); |
|
| 118 | - } |
|
| 119 | - |
|
| 120 | - public function texstBestOfWidgetShortcode() |
|
| 121 | - { |
|
| 122 | - $template = geodir_plugin_path() . '/geodirectory-widgets/geodirectory_bestof_widget.php'; |
|
| 123 | - include_once($template); |
|
| 124 | - |
|
| 125 | - $output = do_shortcode('[gd_bestof_widget title="widget title" post_type=gd_hotel post_limit=5 categ_limit=6 character_count=50 use_viewing_post_type=true add_location_filter=true tab_layout=bestof-tabs-as-dropdown]'); |
|
| 126 | - $this->assertContains( 'geodir_bestof_widget', $output ); |
|
| 127 | - } |
|
| 128 | - |
|
| 129 | - public function testAddListingShortcode() |
|
| 130 | - { |
|
| 131 | - $_REQUEST['listing_type'] = 'gd_place'; |
|
| 132 | - $output = do_shortcode('[gd_add_listing listing_type=gd_place login_msg="Please register and login to submit listings" show_login=true]'); |
|
| 133 | - $this->assertContains( 'geodir-add-listing-submit', $output ); |
|
| 134 | - } |
|
| 135 | - |
|
| 136 | - public function tearDown() |
|
| 137 | - { |
|
| 138 | - parent::tearDown(); |
|
| 139 | - } |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | + wp_set_current_user(1); |
|
| 8 | + |
|
| 9 | + } |
|
| 10 | + |
|
| 11 | + public function testHomeMapShortcode() |
|
| 12 | + { |
|
| 13 | + $output = do_shortcode('[gd_homepage_map width=100% height=300 scrollwheel=false]'); |
|
| 14 | + $this->assertContains( 'geodir-map-home-page', $output ); |
|
| 15 | + } |
|
| 16 | + |
|
| 17 | + public function testListingMapShortcode() |
|
| 18 | + { |
|
| 19 | + $output = do_shortcode('[gd_listing_map width=100% height=300 scrollwheel=false sticky=true]'); |
|
| 20 | + $this->assertContains( 'geodir-map-listing-page', $output ); |
|
| 21 | + } |
|
| 22 | + |
|
| 23 | + public function testListingSliderShortcode() |
|
| 24 | + { |
|
| 25 | + $output = do_shortcode('[gd_listing_slider post_number=5 category=3 slideshow=true show_featured_only=true]'); |
|
| 26 | + $this->assertContains( 'geodir_widget_carousel', $output ); |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + public function testLoginBoxShortcode() |
|
| 30 | + { |
|
| 31 | + $output = do_shortcode('[gd_login_box]'); |
|
| 32 | + $this->assertContains( 'geodir-loginbox-list', $output ); |
|
| 33 | + } |
|
| 34 | + |
|
| 35 | + public function testPopPostCatShortcode() |
|
| 36 | + { |
|
| 37 | + global $geodir_post_type; |
|
| 38 | + $geodir_post_type = 'gd_place'; |
|
| 39 | + $output = do_shortcode('[gd_popular_post_category category_limit=30]'); |
|
| 40 | + $this->assertContains( 'geodir-popular-cat-list', $output ); |
|
| 41 | + } |
|
| 42 | + |
|
| 43 | + public function testPopPostViewShortcode() |
|
| 44 | + { |
|
| 45 | + $output = do_shortcode('[gd_popular_post_view category=3 layout=5 add_location_filter=true character_count=0 show_featured_only=true]'); |
|
| 46 | + $this->assertContains( 'geodir_category_list_view', $output ); |
|
| 47 | + } |
|
| 48 | + |
|
| 49 | + public function testRecentReviewsShortcode() |
|
| 50 | + { |
|
| 51 | + $query_args = array( |
|
| 52 | + 'post_status' => 'publish', |
|
| 53 | + 'post_type' => 'gd_place', |
|
| 54 | + 'posts_per_page' => 1, |
|
| 55 | + ); |
|
| 56 | + |
|
| 57 | + $all_posts = new WP_Query( $query_args ); |
|
| 58 | + $post_id = null; |
|
| 59 | + while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 60 | + $post_id = get_the_ID(); |
|
| 61 | + endwhile; |
|
| 62 | + |
|
| 63 | + $this->assertTrue(is_int($post_id)); |
|
| 64 | + |
|
| 65 | + $time = current_time('mysql'); |
|
| 66 | + |
|
| 67 | + $data = array( |
|
| 68 | + 'comment_post_ID' => $post_id, |
|
| 69 | + 'comment_author' => 'admin', |
|
| 70 | + 'comment_author_email' => '[email protected]', |
|
| 71 | + 'comment_author_url' => 'http://wpgeodirectory.com', |
|
| 72 | + 'comment_content' => 'content here testtcc', |
|
| 73 | + 'comment_type' => '', |
|
| 74 | + 'comment_parent' => 0, |
|
| 75 | + 'user_id' => 1, |
|
| 76 | + 'comment_author_IP' => '127.0.0.1', |
|
| 77 | + 'comment_agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)', |
|
| 78 | + 'comment_date' => $time, |
|
| 79 | + 'comment_approved' => 1, |
|
| 80 | + ); |
|
| 81 | + |
|
| 82 | + $comment_id = wp_insert_comment($data); |
|
| 83 | + |
|
| 84 | + $_REQUEST['geodir_overallrating'] = 5.0; |
|
| 85 | + geodir_save_rating($comment_id); |
|
| 86 | + |
|
| 87 | + $output = do_shortcode('[gd_recent_reviews count=5]'); |
|
| 88 | + $this->assertContains( 'geodir_sc_recent_reviews', $output ); |
|
| 89 | + } |
|
| 90 | + |
|
| 91 | + public function testRelatedListingsShortcode() |
|
| 92 | + { |
|
| 93 | + $query_args = array( |
|
| 94 | + 'post_status' => 'publish', |
|
| 95 | + 'post_type' => 'gd_place', |
|
| 96 | + 'posts_per_page' => 1, |
|
| 97 | + ); |
|
| 98 | + |
|
| 99 | + $all_posts = new WP_Query( $query_args ); |
|
| 100 | + $post_id = null; |
|
| 101 | + while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 102 | + $post_id = get_the_ID(); |
|
| 103 | + global $post; |
|
| 104 | + $post = geodir_get_post_info($post_id); |
|
| 105 | + setup_postdata($post); |
|
| 106 | + $output = do_shortcode('[gd_related_listings relate_to=category layout=3 add_location_filter=0 list_sort=featured character_count=0]'); |
|
| 107 | + $this->assertContains( 'geodir_location_listing', $output ); |
|
| 108 | + endwhile; |
|
| 109 | + |
|
| 110 | + $this->assertTrue(is_int($post_id)); |
|
| 111 | + |
|
| 112 | + } |
|
| 113 | + |
|
| 114 | + public function testListingsShortcode() |
|
| 115 | + { |
|
| 116 | + $output = do_shortcode('[gd_listings post_type="gd_place" category="1,3" post_number="10" list_sort="high_review"]'); |
|
| 117 | + $this->assertContains( 'geodir-sc-gd-listings', $output ); |
|
| 118 | + } |
|
| 119 | + |
|
| 120 | + public function texstBestOfWidgetShortcode() |
|
| 121 | + { |
|
| 122 | + $template = geodir_plugin_path() . '/geodirectory-widgets/geodirectory_bestof_widget.php'; |
|
| 123 | + include_once($template); |
|
| 124 | + |
|
| 125 | + $output = do_shortcode('[gd_bestof_widget title="widget title" post_type=gd_hotel post_limit=5 categ_limit=6 character_count=50 use_viewing_post_type=true add_location_filter=true tab_layout=bestof-tabs-as-dropdown]'); |
|
| 126 | + $this->assertContains( 'geodir_bestof_widget', $output ); |
|
| 127 | + } |
|
| 128 | + |
|
| 129 | + public function testAddListingShortcode() |
|
| 130 | + { |
|
| 131 | + $_REQUEST['listing_type'] = 'gd_place'; |
|
| 132 | + $output = do_shortcode('[gd_add_listing listing_type=gd_place login_msg="Please register and login to submit listings" show_login=true]'); |
|
| 133 | + $this->assertContains( 'geodir-add-listing-submit', $output ); |
|
| 134 | + } |
|
| 135 | + |
|
| 136 | + public function tearDown() |
|
| 137 | + { |
|
| 138 | + parent::tearDown(); |
|
| 139 | + } |
|
| 140 | 140 | } |
| 141 | 141 | ?> |
| 142 | 142 | \ No newline at end of file |
@@ -11,25 +11,25 @@ discard block |
||
| 11 | 11 | public function testHomeMapShortcode() |
| 12 | 12 | { |
| 13 | 13 | $output = do_shortcode('[gd_homepage_map width=100% height=300 scrollwheel=false]'); |
| 14 | - $this->assertContains( 'geodir-map-home-page', $output ); |
|
| 14 | + $this->assertContains('geodir-map-home-page', $output); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | public function testListingMapShortcode() |
| 18 | 18 | { |
| 19 | 19 | $output = do_shortcode('[gd_listing_map width=100% height=300 scrollwheel=false sticky=true]'); |
| 20 | - $this->assertContains( 'geodir-map-listing-page', $output ); |
|
| 20 | + $this->assertContains('geodir-map-listing-page', $output); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | public function testListingSliderShortcode() |
| 24 | 24 | { |
| 25 | 25 | $output = do_shortcode('[gd_listing_slider post_number=5 category=3 slideshow=true show_featured_only=true]'); |
| 26 | - $this->assertContains( 'geodir_widget_carousel', $output ); |
|
| 26 | + $this->assertContains('geodir_widget_carousel', $output); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | public function testLoginBoxShortcode() |
| 30 | 30 | { |
| 31 | 31 | $output = do_shortcode('[gd_login_box]'); |
| 32 | - $this->assertContains( 'geodir-loginbox-list', $output ); |
|
| 32 | + $this->assertContains('geodir-loginbox-list', $output); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | public function testPopPostCatShortcode() |
@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | global $geodir_post_type; |
| 38 | 38 | $geodir_post_type = 'gd_place'; |
| 39 | 39 | $output = do_shortcode('[gd_popular_post_category category_limit=30]'); |
| 40 | - $this->assertContains( 'geodir-popular-cat-list', $output ); |
|
| 40 | + $this->assertContains('geodir-popular-cat-list', $output); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function testPopPostViewShortcode() |
| 44 | 44 | { |
| 45 | 45 | $output = do_shortcode('[gd_popular_post_view category=3 layout=5 add_location_filter=true character_count=0 show_featured_only=true]'); |
| 46 | - $this->assertContains( 'geodir_category_list_view', $output ); |
|
| 46 | + $this->assertContains('geodir_category_list_view', $output); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | public function testRecentReviewsShortcode() |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | 'posts_per_page' => 1, |
| 55 | 55 | ); |
| 56 | 56 | |
| 57 | - $all_posts = new WP_Query( $query_args ); |
|
| 57 | + $all_posts = new WP_Query($query_args); |
|
| 58 | 58 | $post_id = null; |
| 59 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 59 | + while ($all_posts->have_posts()) : $all_posts->the_post(); |
|
| 60 | 60 | $post_id = get_the_ID(); |
| 61 | 61 | endwhile; |
| 62 | 62 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | geodir_save_rating($comment_id); |
| 86 | 86 | |
| 87 | 87 | $output = do_shortcode('[gd_recent_reviews count=5]'); |
| 88 | - $this->assertContains( 'geodir_sc_recent_reviews', $output ); |
|
| 88 | + $this->assertContains('geodir_sc_recent_reviews', $output); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | public function testRelatedListingsShortcode() |
@@ -96,15 +96,15 @@ discard block |
||
| 96 | 96 | 'posts_per_page' => 1, |
| 97 | 97 | ); |
| 98 | 98 | |
| 99 | - $all_posts = new WP_Query( $query_args ); |
|
| 99 | + $all_posts = new WP_Query($query_args); |
|
| 100 | 100 | $post_id = null; |
| 101 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
| 101 | + while ($all_posts->have_posts()) : $all_posts->the_post(); |
|
| 102 | 102 | $post_id = get_the_ID(); |
| 103 | 103 | global $post; |
| 104 | - $post = geodir_get_post_info($post_id); |
|
| 104 | + $post = geodir_get_post_info($post_id); |
|
| 105 | 105 | setup_postdata($post); |
| 106 | 106 | $output = do_shortcode('[gd_related_listings relate_to=category layout=3 add_location_filter=0 list_sort=featured character_count=0]'); |
| 107 | - $this->assertContains( 'geodir_location_listing', $output ); |
|
| 107 | + $this->assertContains('geodir_location_listing', $output); |
|
| 108 | 108 | endwhile; |
| 109 | 109 | |
| 110 | 110 | $this->assertTrue(is_int($post_id)); |
@@ -114,23 +114,23 @@ discard block |
||
| 114 | 114 | public function testListingsShortcode() |
| 115 | 115 | { |
| 116 | 116 | $output = do_shortcode('[gd_listings post_type="gd_place" category="1,3" post_number="10" list_sort="high_review"]'); |
| 117 | - $this->assertContains( 'geodir-sc-gd-listings', $output ); |
|
| 117 | + $this->assertContains('geodir-sc-gd-listings', $output); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | public function texstBestOfWidgetShortcode() |
| 121 | 121 | { |
| 122 | - $template = geodir_plugin_path() . '/geodirectory-widgets/geodirectory_bestof_widget.php'; |
|
| 122 | + $template = geodir_plugin_path().'/geodirectory-widgets/geodirectory_bestof_widget.php'; |
|
| 123 | 123 | include_once($template); |
| 124 | 124 | |
| 125 | 125 | $output = do_shortcode('[gd_bestof_widget title="widget title" post_type=gd_hotel post_limit=5 categ_limit=6 character_count=50 use_viewing_post_type=true add_location_filter=true tab_layout=bestof-tabs-as-dropdown]'); |
| 126 | - $this->assertContains( 'geodir_bestof_widget', $output ); |
|
| 126 | + $this->assertContains('geodir_bestof_widget', $output); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | public function testAddListingShortcode() |
| 130 | 130 | { |
| 131 | 131 | $_REQUEST['listing_type'] = 'gd_place'; |
| 132 | 132 | $output = do_shortcode('[gd_add_listing listing_type=gd_place login_msg="Please register and login to submit listings" show_login=true]'); |
| 133 | - $this->assertContains( 'geodir-add-listing-submit', $output ); |
|
| 133 | + $this->assertContains('geodir-add-listing-submit', $output); |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | public function tearDown() |
@@ -1,53 +1,53 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class AuthorPage extends WP_UnitTestCase |
| 3 | 3 | { |
| 4 | - public function setUp() |
|
| 5 | - { |
|
| 6 | - parent::setUp(); |
|
| 7 | - } |
|
| 4 | + public function setUp() |
|
| 5 | + { |
|
| 6 | + parent::setUp(); |
|
| 7 | + } |
|
| 8 | 8 | |
| 9 | - public function testAuthorPage() |
|
| 10 | - { |
|
| 11 | - global $current_user; |
|
| 9 | + public function testAuthorPage() |
|
| 10 | + { |
|
| 11 | + global $current_user; |
|
| 12 | 12 | |
| 13 | - $user_id = $current_user->ID; |
|
| 13 | + $user_id = $current_user->ID; |
|
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | - // Add listing |
|
| 17 | + // Add listing |
|
| 18 | 18 | |
| 19 | - $args = array( |
|
| 20 | - 'listing_type' => 'gd_place', |
|
| 21 | - 'post_title' => 'Test Listing Title 2', |
|
| 22 | - 'post_desc' => 'Test Desc', |
|
| 23 | - 'post_tags' => 'test1,test2', |
|
| 24 | - 'post_address' => 'New York City Hall', |
|
| 25 | - 'post_zip' => '10007', |
|
| 26 | - 'post_mapview' => 'ROADMAP', |
|
| 27 | - 'post_mapzoom' => '10', |
|
| 28 | - 'geodir_timing' => '10.00 am to 6 pm every day', |
|
| 29 | - 'geodir_contact' => '1234567890', |
|
| 30 | - 'geodir_email' => '[email protected]', |
|
| 31 | - 'geodir_website' => 'http://test.com', |
|
| 32 | - 'geodir_twitter' => 'http://twitter.com/test', |
|
| 33 | - 'geodir_facebook' => 'http://facebook.com/test', |
|
| 34 | - 'geodir_special_offers' => 'Test offer' |
|
| 35 | - ); |
|
| 36 | - $post_id = geodir_save_listing($args, true); |
|
| 19 | + $args = array( |
|
| 20 | + 'listing_type' => 'gd_place', |
|
| 21 | + 'post_title' => 'Test Listing Title 2', |
|
| 22 | + 'post_desc' => 'Test Desc', |
|
| 23 | + 'post_tags' => 'test1,test2', |
|
| 24 | + 'post_address' => 'New York City Hall', |
|
| 25 | + 'post_zip' => '10007', |
|
| 26 | + 'post_mapview' => 'ROADMAP', |
|
| 27 | + 'post_mapzoom' => '10', |
|
| 28 | + 'geodir_timing' => '10.00 am to 6 pm every day', |
|
| 29 | + 'geodir_contact' => '1234567890', |
|
| 30 | + 'geodir_email' => '[email protected]', |
|
| 31 | + 'geodir_website' => 'http://test.com', |
|
| 32 | + 'geodir_twitter' => 'http://twitter.com/test', |
|
| 33 | + 'geodir_facebook' => 'http://facebook.com/test', |
|
| 34 | + 'geodir_special_offers' => 'Test offer' |
|
| 35 | + ); |
|
| 36 | + $post_id = geodir_save_listing($args, true); |
|
| 37 | 37 | |
| 38 | - $this->assertTrue(is_int($post_id)); |
|
| 38 | + $this->assertTrue(is_int($post_id)); |
|
| 39 | 39 | |
| 40 | - $count = count_user_posts( $user_id, "gd_place" ); |
|
| 40 | + $count = count_user_posts( $user_id, "gd_place" ); |
|
| 41 | 41 | |
| 42 | - $this->assertTrue(is_int((int) $count)); |
|
| 42 | + $this->assertTrue(is_int((int) $count)); |
|
| 43 | 43 | |
| 44 | 44 | |
| 45 | 45 | |
| 46 | - } |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - public function tearDown() |
|
| 49 | - { |
|
| 50 | - parent::tearDown(); |
|
| 51 | - } |
|
| 48 | + public function tearDown() |
|
| 49 | + { |
|
| 50 | + parent::tearDown(); |
|
| 51 | + } |
|
| 52 | 52 | } |
| 53 | 53 | ?> |
| 54 | 54 | \ No newline at end of file |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | |
| 38 | 38 | $this->assertTrue(is_int($post_id)); |
| 39 | 39 | |
| 40 | - $count = count_user_posts( $user_id, "gd_place" ); |
|
| 40 | + $count = count_user_posts($user_id, "gd_place"); |
|
| 41 | 41 | |
| 42 | 42 | $this->assertTrue(is_int((int) $count)); |
| 43 | 43 | |
@@ -2195,7 +2195,7 @@ discard block |
||
| 2195 | 2195 | * @global object $wpdb WordPress Database object. |
| 2196 | 2196 | * @global string $plugin_prefix Geodirectory plugin table prefix. |
| 2197 | 2197 | * @param int $attachment_id Attachment ID. |
| 2198 | - * @return bool|void Returns false on failure. |
|
| 2198 | + * @return false|null Returns false on failure. |
|
| 2199 | 2199 | */ |
| 2200 | 2200 | function geodirectory_before_featured_image_delete($attachment_id) |
| 2201 | 2201 | {
|
@@ -2368,6 +2368,7 @@ discard block |
||
| 2368 | 2368 | * @global object $wpdb WordPress Database object. |
| 2369 | 2369 | * @global object $current_user Current user object. |
| 2370 | 2370 | * @global string $plugin_prefix Geodirectory plugin table prefix. |
| 2371 | + * @param string $user_id |
|
| 2371 | 2372 | * @return array User listing count for each post type. |
| 2372 | 2373 | */ |
| 2373 | 2374 | function geodir_user_post_listing_count($user_id=null) |
@@ -3176,7 +3177,7 @@ discard block |
||
| 3176 | 3177 | * @since 1.0.0 |
| 3177 | 3178 | * @package GeoDirectory |
| 3178 | 3179 | * @param array $classes The class array of the HTML element. |
| 3179 | - * @return array Modified class array. |
|
| 3180 | + * @return string[] Modified class array. |
|
| 3180 | 3181 | */ |
| 3181 | 3182 | function geodir_body_class_no_rating($classes = array()) |
| 3182 | 3183 | {
|
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | /* ON TEMPLATE INCLUDE */ |
| 137 | 137 | ///////////////////////// |
| 138 | 138 | |
| 139 | -add_filter('template_include', 'geodir_template_loader',9);
|
|
| 139 | +add_filter('template_include', 'geodir_template_loader', 9);
|
|
| 140 | 140 | |
| 141 | 141 | ///////////////////////// |
| 142 | 142 | /* CATEGORY / TAXONOMY / CUSTOM POST ACTIONS */ |
@@ -176,9 +176,9 @@ discard block |
||
| 176 | 176 | /* WP REVIEW COUNT ACTIONS */ |
| 177 | 177 | //////////////////////// |
| 178 | 178 | |
| 179 | -add_action('geodir_update_postrating', 'geodir_term_review_count_force_update_single_post', 100,1);
|
|
| 179 | +add_action('geodir_update_postrating', 'geodir_term_review_count_force_update_single_post', 100, 1);
|
|
| 180 | 180 | //add_action('geodir_update_postrating', 'geodir_term_review_count_force_update', 100);
|
| 181 | -add_action('transition_post_status', 'geodir_term_review_count_force_update', 100,3);
|
|
| 181 | +add_action('transition_post_status', 'geodir_term_review_count_force_update', 100, 3);
|
|
| 182 | 182 | //add_action('created_term', 'geodir_term_review_count_force_update', 100);
|
| 183 | 183 | add_action('edited_term', 'geodir_term_review_count_force_update', 100);
|
| 184 | 184 | add_action('delete_term', 'geodir_term_review_count_force_update', 100);
|
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | function geodir_unset_prev_theme_nav_location($newname) |
| 224 | 224 | {
|
| 225 | - $geodir_theme_location = get_option('geodir_theme_location_nav_' . $newname);
|
|
| 225 | + $geodir_theme_location = get_option('geodir_theme_location_nav_'.$newname);
|
|
| 226 | 226 | if ($geodir_theme_location) {
|
| 227 | 227 | update_option('geodir_theme_location_nav', $geodir_theme_location);
|
| 228 | 228 | } else {
|
@@ -320,8 +320,8 @@ discard block |
||
| 320 | 320 | |
| 321 | 321 | /////// GEO DIRECOTORY CUSTOM HOOKS /// |
| 322 | 322 | |
| 323 | -add_action('geodir_before_tab_content', 'geodir_before_tab_content');// this function is in custom_functions.php and it is used to wrap detail page tab content
|
|
| 324 | -add_action('geodir_after_tab_content', 'geodir_after_tab_content');// this function is in custom_functions.php and it is used to wrap detail page tab content
|
|
| 323 | +add_action('geodir_before_tab_content', 'geodir_before_tab_content'); // this function is in custom_functions.php and it is used to wrap detail page tab content
|
|
| 324 | +add_action('geodir_after_tab_content', 'geodir_after_tab_content'); // this function is in custom_functions.php and it is used to wrap detail page tab content
|
|
| 325 | 325 | |
| 326 | 326 | // Detail page sidebar content |
| 327 | 327 | add_action('geodir_detail_page_sidebar', 'geodir_detail_page_sidebar_content_sorting', 1);
|
@@ -422,8 +422,8 @@ discard block |
||
| 422 | 422 | do_action('geodir_after_social_sharing_buttons');
|
| 423 | 423 | $content_html = ob_get_clean(); |
| 424 | 424 | if (trim($content_html) != '') |
| 425 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-social-sharing">' . $content_html . '</div>'; |
|
| 426 | - if ((int)get_option('geodir_disable_tfg_buttons_section') != 1) {
|
|
| 425 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-social-sharing">'.$content_html.'</div>'; |
|
| 426 | + if ((int) get_option('geodir_disable_tfg_buttons_section') != 1) {
|
|
| 427 | 427 | /** |
| 428 | 428 | * Filter the geodir_social_sharing_buttons() function content. |
| 429 | 429 | * |
@@ -469,8 +469,8 @@ discard block |
||
| 469 | 469 | do_action('geodir_after_share_this_button');
|
| 470 | 470 | $content_html = ob_get_clean(); |
| 471 | 471 | if (trim($content_html) != '') |
| 472 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-sharethis">' . $content_html . '</div>'; |
|
| 473 | - if ((int)get_option('geodir_disable_sharethis_button_section') != 1) {
|
|
| 472 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-sharethis">'.$content_html.'</div>'; |
|
| 473 | + if ((int) get_option('geodir_disable_sharethis_button_section') != 1) {
|
|
| 474 | 474 | /** |
| 475 | 475 | * Filter the geodir_share_this_button() function content. |
| 476 | 476 | * |
@@ -509,12 +509,12 @@ discard block |
||
| 509 | 509 | $post_id = $post->ID; |
| 510 | 510 | |
| 511 | 511 | if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
|
| 512 | - $post_id = (int)$_REQUEST['pid']; |
|
| 512 | + $post_id = (int) $_REQUEST['pid']; |
|
| 513 | 513 | } |
| 514 | 514 | |
| 515 | 515 | $postlink = get_permalink(geodir_add_listing_page_id()); |
| 516 | 516 | $editlink = geodir_getlink($postlink, array('pid' => $post_id), false);
|
| 517 | - echo ' <p class="edit_link"><i class="fa fa-pencil"></i> <a href="' . esc_url($editlink) . '">' . __('Edit this Post', 'geodirectory') . '</a></p>';
|
|
| 517 | + echo ' <p class="edit_link"><i class="fa fa-pencil"></i> <a href="'.esc_url($editlink).'">'.__('Edit this Post', 'geodirectory').'</a></p>';
|
|
| 518 | 518 | } |
| 519 | 519 | }// end of if, if its a preview or not |
| 520 | 520 | /** |
@@ -525,8 +525,8 @@ discard block |
||
| 525 | 525 | do_action('geodir_after_edit_post_link');
|
| 526 | 526 | $content_html = ob_get_clean(); |
| 527 | 527 | if (trim($content_html) != '') |
| 528 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-user-links">' . $content_html . '</div>'; |
|
| 529 | - if ((int)get_option('geodir_disable_user_links_section') != 1) {
|
|
| 528 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-user-links">'.$content_html.'</div>'; |
|
| 529 | + if ((int) get_option('geodir_disable_user_links_section') != 1) {
|
|
| 530 | 530 | /** |
| 531 | 531 | * Filter the geodir_edit_post_link() function content. |
| 532 | 532 | * |
@@ -579,14 +579,14 @@ discard block |
||
| 579 | 579 | $hide_refresh = get_option('geodir_ga_auto_refresh');
|
| 580 | 580 | |
| 581 | 581 | $auto_refresh = $hide_refresh && $refresh_time && $refresh_time > 0 ? 1 : 0; |
| 582 | - if (get_option('geodir_ga_stats') && is_user_logged_in() && (isset($package_info->google_analytics) && $package_info->google_analytics == '1') && (get_current_user_id()==$post->post_author || current_user_can( 'manage_options' )) ) {
|
|
| 582 | + if (get_option('geodir_ga_stats') && is_user_logged_in() && (isset($package_info->google_analytics) && $package_info->google_analytics == '1') && (get_current_user_id() == $post->post_author || current_user_can('manage_options'))) {
|
|
| 583 | 583 | $page_url = urlencode($_SERVER['REQUEST_URI']); |
| 584 | 584 | ?> |
| 585 | 585 | <script type="text/javascript"> |
| 586 | 586 | var gd_gaTimeOut; |
| 587 | - var gd_gaTime = parseInt('<?php echo $refresh_time;?>');
|
|
| 588 | - var gd_gaHideRefresh = <?php echo (int)$hide_refresh;?>; |
|
| 589 | - var gd_gaAutoRefresh = <?php echo $auto_refresh;?>; |
|
| 587 | + var gd_gaTime = parseInt('<?php echo $refresh_time; ?>');
|
|
| 588 | + var gd_gaHideRefresh = <?php echo (int) $hide_refresh; ?>; |
|
| 589 | + var gd_gaAutoRefresh = <?php echo $auto_refresh; ?>; |
|
| 590 | 590 | ga_data1 = false; |
| 591 | 591 | ga_data2 = false; |
| 592 | 592 | ga_data3 = false; |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | } |
| 728 | 728 | |
| 729 | 729 | function gdga_noResults() {
|
| 730 | - jQuery('#gdga-chart-container').html('<?php _e('No results available','geodirectory');?>');
|
|
| 730 | + jQuery('#gdga-chart-container').html('<?php _e('No results available', 'geodirectory'); ?>');
|
|
| 731 | 731 | jQuery('#gdga-legend-container').html('');
|
| 732 | 732 | } |
| 733 | 733 | |
@@ -759,18 +759,18 @@ discard block |
||
| 759 | 759 | var data2 = results[1].rows.map(function(row) { return +row[2]; });
|
| 760 | 760 | //var labelsN = results[0].rows.map(function(row) { return +row[1]; });
|
| 761 | 761 | |
| 762 | - var labels = ['<?php _e('Jan', 'geodirectory');?>',
|
|
| 763 | - '<?php _e('Feb', 'geodirectory');?>',
|
|
| 764 | - '<?php _e('Mar', 'geodirectory');?>',
|
|
| 765 | - '<?php _e('Apr', 'geodirectory');?>',
|
|
| 766 | - '<?php _e('May', 'geodirectory');?>',
|
|
| 767 | - '<?php _e('Jun', 'geodirectory');?>',
|
|
| 768 | - '<?php _e('Jul', 'geodirectory');?>',
|
|
| 769 | - '<?php _e('Aug', 'geodirectory');?>',
|
|
| 770 | - '<?php _e('Sep', 'geodirectory');?>',
|
|
| 771 | - '<?php _e('Oct', 'geodirectory');?>',
|
|
| 772 | - '<?php _e('Nov', 'geodirectory');?>',
|
|
| 773 | - '<?php _e('Dec', 'geodirectory');?>'];
|
|
| 762 | + var labels = ['<?php _e('Jan', 'geodirectory'); ?>',
|
|
| 763 | + '<?php _e('Feb', 'geodirectory'); ?>',
|
|
| 764 | + '<?php _e('Mar', 'geodirectory'); ?>',
|
|
| 765 | + '<?php _e('Apr', 'geodirectory'); ?>',
|
|
| 766 | + '<?php _e('May', 'geodirectory'); ?>',
|
|
| 767 | + '<?php _e('Jun', 'geodirectory'); ?>',
|
|
| 768 | + '<?php _e('Jul', 'geodirectory'); ?>',
|
|
| 769 | + '<?php _e('Aug', 'geodirectory'); ?>',
|
|
| 770 | + '<?php _e('Sep', 'geodirectory'); ?>',
|
|
| 771 | + '<?php _e('Oct', 'geodirectory'); ?>',
|
|
| 772 | + '<?php _e('Nov', 'geodirectory'); ?>',
|
|
| 773 | + '<?php _e('Dec', 'geodirectory'); ?>'];
|
|
| 774 | 774 | |
| 775 | 775 | // Ensure the data arrays are at least as long as the labels array. |
| 776 | 776 | // Chart.js bar charts don't (yet) accept sparse datasets. |
@@ -783,13 +783,13 @@ discard block |
||
| 783 | 783 | labels : labels, |
| 784 | 784 | datasets : [ |
| 785 | 785 | {
|
| 786 | - label: '<?php _e('Last Year', 'geodirectory');?>',
|
|
| 786 | + label: '<?php _e('Last Year', 'geodirectory'); ?>',
|
|
| 787 | 787 | fillColor : "rgba(220,220,220,0.5)", |
| 788 | 788 | strokeColor : "rgba(220,220,220,1)", |
| 789 | 789 | data : data2 |
| 790 | 790 | }, |
| 791 | 791 | {
|
| 792 | - label: '<?php _e('This Year', 'geodirectory');?>',
|
|
| 792 | + label: '<?php _e('This Year', 'geodirectory'); ?>',
|
|
| 793 | 793 | fillColor : "rgba(151,187,205,0.5)", |
| 794 | 794 | strokeColor : "rgba(151,187,205,1)", |
| 795 | 795 | data : data1 |
@@ -834,30 +834,30 @@ discard block |
||
| 834 | 834 | |
| 835 | 835 | <?php |
| 836 | 836 | // Here we list the shorthand days of the week so it can be used in translation. |
| 837 | - __("Mon",'geodirectory');
|
|
| 838 | - __("Tue",'geodirectory');
|
|
| 839 | - __("Wed",'geodirectory');
|
|
| 840 | - __("Thu",'geodirectory');
|
|
| 841 | - __("Fri",'geodirectory');
|
|
| 842 | - __("Sat",'geodirectory');
|
|
| 843 | - __("Sun",'geodirectory');
|
|
| 837 | + __("Mon", 'geodirectory');
|
|
| 838 | + __("Tue", 'geodirectory');
|
|
| 839 | + __("Wed", 'geodirectory');
|
|
| 840 | + __("Thu", 'geodirectory');
|
|
| 841 | + __("Fri", 'geodirectory');
|
|
| 842 | + __("Sat", 'geodirectory');
|
|
| 843 | + __("Sun", 'geodirectory');
|
|
| 844 | 844 | ?> |
| 845 | 845 | |
| 846 | 846 | labels = [ |
| 847 | - "<?php _e(date('D', strtotime("+1 day")),'geodirectory'); ?>",
|
|
| 848 | - "<?php _e(date('D', strtotime("+2 day")),'geodirectory'); ?>",
|
|
| 849 | - "<?php _e(date('D', strtotime("+3 day")),'geodirectory'); ?>",
|
|
| 850 | - "<?php _e(date('D', strtotime("+4 day")),'geodirectory'); ?>",
|
|
| 851 | - "<?php _e(date('D', strtotime("+5 day")),'geodirectory'); ?>",
|
|
| 852 | - "<?php _e(date('D', strtotime("+6 day")),'geodirectory'); ?>",
|
|
| 853 | - "<?php _e(date('D', strtotime("+7 day")),'geodirectory'); ?>"
|
|
| 847 | + "<?php _e(date('D', strtotime("+1 day")), 'geodirectory'); ?>",
|
|
| 848 | + "<?php _e(date('D', strtotime("+2 day")), 'geodirectory'); ?>",
|
|
| 849 | + "<?php _e(date('D', strtotime("+3 day")), 'geodirectory'); ?>",
|
|
| 850 | + "<?php _e(date('D', strtotime("+4 day")), 'geodirectory'); ?>",
|
|
| 851 | + "<?php _e(date('D', strtotime("+5 day")), 'geodirectory'); ?>",
|
|
| 852 | + "<?php _e(date('D', strtotime("+6 day")), 'geodirectory'); ?>",
|
|
| 853 | + "<?php _e(date('D', strtotime("+7 day")), 'geodirectory'); ?>"
|
|
| 854 | 854 | ]; |
| 855 | 855 | |
| 856 | 856 | var data = {
|
| 857 | 857 | labels : labels, |
| 858 | 858 | datasets : [ |
| 859 | 859 | {
|
| 860 | - label: '<?php _e('Last Week', 'geodirectory');?>',
|
|
| 860 | + label: '<?php _e('Last Week', 'geodirectory'); ?>',
|
|
| 861 | 861 | fillColor : "rgba(220,220,220,0.5)", |
| 862 | 862 | strokeColor : "rgba(220,220,220,1)", |
| 863 | 863 | pointColor : "rgba(220,220,220,1)", |
@@ -865,7 +865,7 @@ discard block |
||
| 865 | 865 | data : data2 |
| 866 | 866 | }, |
| 867 | 867 | {
|
| 868 | - label: '<?php _e('This Week', 'geodirectory');?>',
|
|
| 868 | + label: '<?php _e('This Week', 'geodirectory'); ?>',
|
|
| 869 | 869 | fillColor : "rgba(151,187,205,0.5)", |
| 870 | 870 | strokeColor : "rgba(151,187,205,1)", |
| 871 | 871 | pointColor : "rgba(151,187,205,1)", |
@@ -1072,18 +1072,18 @@ discard block |
||
| 1072 | 1072 | </style> |
| 1073 | 1073 | <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js"></script> |
| 1074 | 1074 | <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script> |
| 1075 | - <button type="button" class="gdga-show-analytics"><?php _e('Show Google Analytics', 'geodirectory');?></button>
|
|
| 1075 | + <button type="button" class="gdga-show-analytics"><?php _e('Show Google Analytics', 'geodirectory'); ?></button>
|
|
| 1076 | 1076 | <span id="ga_stats" class="gdga-analytics-box" style="display:none"> |
| 1077 | - <div id="ga-analytics-title"><?php _e("Analytics", 'geodirectory');?></div>
|
|
| 1077 | + <div id="ga-analytics-title"><?php _e("Analytics", 'geodirectory'); ?></div>
|
|
| 1078 | 1078 | <div id="gd-active-users-container"> |
| 1079 | - <div class="gd-ActiveUsers"><i id="gdga-loader-icon" class="fa fa-refresh fa-spin" title="<?php esc_attr_e("Refresh", 'geodirectory');?>"></i><?php _e("Active Users:", 'geodirectory');?>
|
|
| 1079 | + <div class="gd-ActiveUsers"><i id="gdga-loader-icon" class="fa fa-refresh fa-spin" title="<?php esc_attr_e("Refresh", 'geodirectory'); ?>"></i><?php _e("Active Users:", 'geodirectory'); ?>
|
|
| 1080 | 1080 | <b class="gd-ActiveUsers-value">0</b> |
| 1081 | 1081 | </div> |
| 1082 | 1082 | </div> |
| 1083 | 1083 | <select id="gdga-select-analytic" onchange="gdga_select_option();" style="display: none;"> |
| 1084 | - <option value="weeks"><?php _e("Last Week vs This Week", 'geodirectory');?></option>
|
|
| 1085 | - <option value="years"><?php _e("This Year vs Last Year", 'geodirectory');?></option>
|
|
| 1086 | - <option value="country"><?php _e("Top Countries", 'geodirectory');?></option>
|
|
| 1084 | + <option value="weeks"><?php _e("Last Week vs This Week", 'geodirectory'); ?></option>
|
|
| 1085 | + <option value="years"><?php _e("This Year vs Last Year", 'geodirectory'); ?></option>
|
|
| 1086 | + <option value="country"><?php _e("Top Countries", 'geodirectory'); ?></option>
|
|
| 1087 | 1087 | </select> |
| 1088 | 1088 | <div class="Chartjs-figure" id="gdga-chart-container"></div> |
| 1089 | 1089 | <ol class="Chartjs-legend" id="gdga-legend-container"></ol> |
@@ -1099,8 +1099,8 @@ discard block |
||
| 1099 | 1099 | do_action('geodir_after_google_analytics');
|
| 1100 | 1100 | $content_html = ob_get_clean(); |
| 1101 | 1101 | if (trim($content_html) != '') |
| 1102 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-google-analytics">' . $content_html . '</div>'; |
|
| 1103 | - if ((int)get_option('geodir_disable_google_analytics_section') != 1) {
|
|
| 1102 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-google-analytics">'.$content_html.'</div>'; |
|
| 1103 | + if ((int) get_option('geodir_disable_google_analytics_section') != 1) {
|
|
| 1104 | 1104 | /** |
| 1105 | 1105 | * Filter the geodir_edit_post_link() function content. |
| 1106 | 1106 | * |
@@ -1156,10 +1156,10 @@ discard block |
||
| 1156 | 1156 | |
| 1157 | 1157 | $reviews_text = $comment_count > 1 ? __("reviews", 'geodirectory') : __("review", 'geodirectory');
|
| 1158 | 1158 | |
| 1159 | - $html .= '<span itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating"><span class="rating" itemprop="average" content="' . $post_avgratings . '">' . $post_avgratings . '</span> / <span itemprop="best" content="5">5</span> ' . __("based on", 'geodirectory') . ' </span><span class="count" itemprop="count" content="' . $comment_count . '">' . $comment_count . ' ' . $reviews_text . '</span><br />';
|
|
| 1159 | + $html .= '<span itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating"><span class="rating" itemprop="average" content="'.$post_avgratings.'">'.$post_avgratings.'</span> / <span itemprop="best" content="5">5</span> '.__("based on", 'geodirectory').' </span><span class="count" itemprop="count" content="'.$comment_count.'">'.$comment_count.' '.$reviews_text.'</span><br />';
|
|
| 1160 | 1160 | |
| 1161 | 1161 | $html .= '<span class="item">'; |
| 1162 | - $html .= '<span class="fn" itemprop="itemreviewed">' . $post->post_title . '</span>'; |
|
| 1162 | + $html .= '<span class="fn" itemprop="itemreviewed">'.$post->post_title.'</span>'; |
|
| 1163 | 1163 | |
| 1164 | 1164 | if ($post_images) {
|
| 1165 | 1165 | foreach ($post_images as $img) {
|
@@ -1169,7 +1169,7 @@ discard block |
||
| 1169 | 1169 | } |
| 1170 | 1170 | |
| 1171 | 1171 | if (isset($post_img) && $post_img) {
|
| 1172 | - $html .= '<br /><img src="' . $post_img . '" class="photo" alt="' . esc_attr($post->post_title) . '" itemprop="photo" content="' . $post_img . '" class="photo" />'; |
|
| 1172 | + $html .= '<br /><img src="'.$post_img.'" class="photo" alt="'.esc_attr($post->post_title).'" itemprop="photo" content="'.$post_img.'" class="photo" />'; |
|
| 1173 | 1173 | } |
| 1174 | 1174 | |
| 1175 | 1175 | $html .= '</span>'; |
@@ -1196,9 +1196,9 @@ discard block |
||
| 1196 | 1196 | do_action('geodir_after_detail_page_review_rating');
|
| 1197 | 1197 | $content_html = ob_get_clean(); |
| 1198 | 1198 | if (trim($content_html) != '') {
|
| 1199 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-rating">' . $content_html . '</div>'; |
|
| 1199 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-rating">'.$content_html.'</div>'; |
|
| 1200 | 1200 | } |
| 1201 | - if ((int)get_option('geodir_disable_rating_info_section') != 1) {
|
|
| 1201 | + if ((int) get_option('geodir_disable_rating_info_section') != 1) {
|
|
| 1202 | 1202 | /** |
| 1203 | 1203 | * Filter the geodir_detail_page_review_rating() function content. |
| 1204 | 1204 | * |
@@ -1237,8 +1237,8 @@ discard block |
||
| 1237 | 1237 | |
| 1238 | 1238 | $content_html = ob_get_clean(); |
| 1239 | 1239 | if (trim($content_html) != '') |
| 1240 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-listing-info">' . $content_html . '</div>'; |
|
| 1241 | - if ((int)get_option('geodir_disable_listing_info_section') != 1) {
|
|
| 1240 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-listing-info">'.$content_html.'</div>'; |
|
| 1241 | + if ((int) get_option('geodir_disable_listing_info_section') != 1) {
|
|
| 1242 | 1242 | /** |
| 1243 | 1243 | * Filter the output html for function geodir_detail_page_more_info(). |
| 1244 | 1244 | * |
@@ -1336,7 +1336,7 @@ discard block |
||
| 1336 | 1336 | 'gd_allowed_img_types' => !empty($allowed_img_types) ? implode(',', $allowed_img_types) : '',
|
| 1337 | 1337 | 'geodir_txt_form_wait' => __('Wait...', 'geodirectory'),
|
| 1338 | 1338 | 'geodir_txt_form_searching' => __('Searching...', 'geodirectory'),
|
| 1339 | - 'fa_rating' => (int)get_option('geodir_reviewrating_enable_font_awesome') == 1 ? 1 : '',
|
|
| 1339 | + 'fa_rating' => (int) get_option('geodir_reviewrating_enable_font_awesome') == 1 ? 1 : '',
|
|
| 1340 | 1340 | 'reviewrating' => defined('GEODIRREVIEWRATING_VERSION') ? 1 : '',
|
| 1341 | 1341 | 'geodir_map_name' => geodir_map_name(), |
| 1342 | 1342 | ); |
@@ -1354,10 +1354,10 @@ discard block |
||
| 1354 | 1354 | foreach ($arr_alert_msg as $key => $value) {
|
| 1355 | 1355 | if (!is_scalar($value)) |
| 1356 | 1356 | continue; |
| 1357 | - $arr_alert_msg[$key] = html_entity_decode((string)$value, ENT_QUOTES, 'UTF-8'); |
|
| 1357 | + $arr_alert_msg[$key] = html_entity_decode((string) $value, ENT_QUOTES, 'UTF-8'); |
|
| 1358 | 1358 | } |
| 1359 | 1359 | |
| 1360 | - $script = "var geodir_all_js_msg = " . json_encode($arr_alert_msg) . ';'; |
|
| 1360 | + $script = "var geodir_all_js_msg = ".json_encode($arr_alert_msg).';'; |
|
| 1361 | 1361 | echo '<script>'; |
| 1362 | 1362 | echo $script; |
| 1363 | 1363 | echo '</script>'; |
@@ -1445,7 +1445,7 @@ discard block |
||
| 1445 | 1445 | $geodir_old_sidebars = get_option('geodir_sidebars');
|
| 1446 | 1446 | if (is_array($geodir_old_sidebars)) {
|
| 1447 | 1447 | foreach ($geodir_old_sidebars as $key => $val) {
|
| 1448 | - if(0 === strpos($key, 'geodir_'))// if gd widget |
|
| 1448 | + if (0 === strpos($key, 'geodir_'))// if gd widget |
|
| 1449 | 1449 | {
|
| 1450 | 1450 | $sidebars_widgets[$key] = $geodir_old_sidebars[$key]; |
| 1451 | 1451 | } |
@@ -1524,7 +1524,7 @@ discard block |
||
| 1524 | 1524 | global $post; |
| 1525 | 1525 | $term_condition = ''; |
| 1526 | 1526 | if (isset($_REQUEST['backandedit'])) {
|
| 1527 | - $post = (object)$gd_session->get('listing');
|
|
| 1527 | + $post = (object) $gd_session->get('listing');
|
|
| 1528 | 1528 | $term_condition = isset($post->geodir_accept_term_condition) ? $post->geodir_accept_term_condition : ''; |
| 1529 | 1529 | } |
| 1530 | 1530 | |
@@ -1538,7 +1538,7 @@ discard block |
||
| 1538 | 1538 | echo 'checked="checked"'; |
| 1539 | 1539 | } ?> field_type="checkbox" name="geodir_accept_term_condition" id="geodir_accept_term_condition" |
| 1540 | 1540 | class="geodir_textfield" value="1" |
| 1541 | - style="display:inline-block"/><a href="<?php $terms_page = get_option('geodir_term_condition_page'); if($terms_page){ echo get_permalink($terms_page);}?>" target="_blank"><?php _e('Please accept our terms and conditions', 'geodirectory'); ?></a>
|
|
| 1541 | + style="display:inline-block"/><a href="<?php $terms_page = get_option('geodir_term_condition_page'); if ($terms_page) { echo get_permalink($terms_page); }?>" target="_blank"><?php _e('Please accept our terms and conditions', 'geodirectory'); ?></a>
|
|
| 1542 | 1542 | </span> |
| 1543 | 1543 | </div> |
| 1544 | 1544 | <span class="geodir_message_error"><?php if (isset($required_msg)) {
|
@@ -1578,7 +1578,7 @@ discard block |
||
| 1578 | 1578 | /** This action is documented in geodirectory_template_actions.php */ |
| 1579 | 1579 | $desc_limit = apply_filters('geodir_description_field_desc_limit', '');
|
| 1580 | 1580 | |
| 1581 | - if (!($desc_limit === '' || (int)$desc_limit > 0)) {
|
|
| 1581 | + if (!($desc_limit === '' || (int) $desc_limit > 0)) {
|
|
| 1582 | 1582 | $is_display = false; |
| 1583 | 1583 | } |
| 1584 | 1584 | } |
@@ -1626,16 +1626,16 @@ discard block |
||
| 1626 | 1626 | global $wpdb, $plugin_prefix; |
| 1627 | 1627 | |
| 1628 | 1628 | // Remove unused virtual page |
| 1629 | - $listings_page_id = (int)get_option('geodir_listing_page');
|
|
| 1629 | + $listings_page_id = (int) get_option('geodir_listing_page');
|
|
| 1630 | 1630 | if ($listings_page_id) {
|
| 1631 | - $wpdb->query($wpdb->prepare("DELETE FROM " . $wpdb->posts . " WHERE ID=%d AND post_name = %s AND post_type=%s", array($listings_page_id, 'listings', 'page')));
|
|
| 1631 | + $wpdb->query($wpdb->prepare("DELETE FROM ".$wpdb->posts." WHERE ID=%d AND post_name = %s AND post_type=%s", array($listings_page_id, 'listings', 'page')));
|
|
| 1632 | 1632 | delete_option('geodir_listing_page');
|
| 1633 | 1633 | } |
| 1634 | 1634 | |
| 1635 | 1635 | if (!get_option('geodir_changes_in_custom_fields_table')) {
|
| 1636 | 1636 | $wpdb->query( |
| 1637 | 1637 | $wpdb->prepare( |
| 1638 | - "UPDATE " . GEODIR_CUSTOM_FIELDS_TABLE . " SET is_default=%s, is_admin=%s WHERE is_default=%s", |
|
| 1638 | + "UPDATE ".GEODIR_CUSTOM_FIELDS_TABLE." SET is_default=%s, is_admin=%s WHERE is_default=%s", |
|
| 1639 | 1639 | array('1', '1', 'admin')
|
| 1640 | 1640 | ) |
| 1641 | 1641 | ); |
@@ -1643,9 +1643,9 @@ discard block |
||
| 1643 | 1643 | |
| 1644 | 1644 | /* --- terms meta value set --- */ |
| 1645 | 1645 | |
| 1646 | - update_option('geodir_default_marker_icon', geodir_plugin_url() . '/geodirectory-functions/map-functions/icons/pin.png');
|
|
| 1646 | + update_option('geodir_default_marker_icon', geodir_plugin_url().'/geodirectory-functions/map-functions/icons/pin.png');
|
|
| 1647 | 1647 | |
| 1648 | - $options_data = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "options WHERE option_name LIKE %s", array('%tax_meta_%')));
|
|
| 1648 | + $options_data = $wpdb->get_results($wpdb->prepare("SELECT * FROM ".$wpdb->prefix."options WHERE option_name LIKE %s", array('%tax_meta_%')));
|
|
| 1649 | 1649 | |
| 1650 | 1650 | if (!empty($options_data)) {
|
| 1651 | 1651 | |
@@ -1653,7 +1653,7 @@ discard block |
||
| 1653 | 1653 | |
| 1654 | 1654 | $option_val = str_replace('tax_meta_', '', $optobj->option_name);
|
| 1655 | 1655 | |
| 1656 | - $taxonomies_data = $wpdb->get_results($wpdb->prepare("SELECT taxonomy FROM " . $wpdb->prefix . "term_taxonomy WHERE taxonomy LIKE %s AND term_id=%d", array('%category%', $option_val)));
|
|
| 1656 | + $taxonomies_data = $wpdb->get_results($wpdb->prepare("SELECT taxonomy FROM ".$wpdb->prefix."term_taxonomy WHERE taxonomy LIKE %s AND term_id=%d", array('%category%', $option_val)));
|
|
| 1657 | 1657 | |
| 1658 | 1658 | if (!empty($taxonomies_data)) {
|
| 1659 | 1659 | |
@@ -1662,17 +1662,17 @@ discard block |
||
| 1662 | 1662 | $taxObject = get_taxonomy($taxobj->taxonomy); |
| 1663 | 1663 | $post_type = $taxObject->object_type[0]; |
| 1664 | 1664 | |
| 1665 | - $opt_value = 'tax_meta_' . $post_type . '_' . $option_val; |
|
| 1665 | + $opt_value = 'tax_meta_'.$post_type.'_'.$option_val; |
|
| 1666 | 1666 | |
| 1667 | - $duplicate_data = $wpdb->get_var($wpdb->prepare("SELECT option_id FROM " . $wpdb->prefix . "options WHERE option_name=%s", array('tax_meta_' . $option_val)));
|
|
| 1667 | + $duplicate_data = $wpdb->get_var($wpdb->prepare("SELECT option_id FROM ".$wpdb->prefix."options WHERE option_name=%s", array('tax_meta_'.$option_val)));
|
|
| 1668 | 1668 | |
| 1669 | 1669 | if ($duplicate_data) {
|
| 1670 | 1670 | |
| 1671 | - $wpdb->query($wpdb->prepare("UPDATE " . $wpdb->prefix . "options SET option_name=%s WHERE option_id=%d", array($opt_value, $optobj->option_id)));
|
|
| 1671 | + $wpdb->query($wpdb->prepare("UPDATE ".$wpdb->prefix."options SET option_name=%s WHERE option_id=%d", array($opt_value, $optobj->option_id)));
|
|
| 1672 | 1672 | |
| 1673 | 1673 | } else {
|
| 1674 | 1674 | |
| 1675 | - $wpdb->query($wpdb->prepare("INSERT INTO " . $wpdb->prefix . "options (option_name,option_value,autoload) VALUES (%s, %s, %s)", array($opt_value, $optobj->option_value, $optobj->autoload)));
|
|
| 1675 | + $wpdb->query($wpdb->prepare("INSERT INTO ".$wpdb->prefix."options (option_name,option_value,autoload) VALUES (%s, %s, %s)", array($opt_value, $optobj->option_value, $optobj->autoload)));
|
|
| 1676 | 1676 | |
| 1677 | 1677 | } |
| 1678 | 1678 | |
@@ -1706,14 +1706,14 @@ discard block |
||
| 1706 | 1706 | |
| 1707 | 1707 | global $wpdb, $table_prefix; |
| 1708 | 1708 | |
| 1709 | - $slug_exists = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s", array($slug)));
|
|
| 1709 | + $slug_exists = $wpdb->get_var($wpdb->prepare("SELECT slug FROM ".$table_prefix."terms WHERE slug=%s", array($slug)));
|
|
| 1710 | 1710 | |
| 1711 | 1711 | if ($slug_exists) {
|
| 1712 | 1712 | |
| 1713 | 1713 | $suffix = 1; |
| 1714 | 1714 | do {
|
| 1715 | - $alt_location_name = _truncate_post_slug($slug, 200 - (strlen($suffix) + 1)) . "-$suffix"; |
|
| 1716 | - $location_slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s", array($alt_location_name)));
|
|
| 1715 | + $alt_location_name = _truncate_post_slug($slug, 200 - (strlen($suffix) + 1))."-$suffix"; |
|
| 1716 | + $location_slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM ".$table_prefix."terms WHERE slug=%s", array($alt_location_name)));
|
|
| 1717 | 1717 | $suffix++; |
| 1718 | 1718 | } while ($location_slug_check && $suffix < 100); |
| 1719 | 1719 | |
@@ -1767,7 +1767,7 @@ discard block |
||
| 1767 | 1767 | |
| 1768 | 1768 | $suffix = 1; |
| 1769 | 1769 | do {
|
| 1770 | - $new_slug = _truncate_post_slug($slug, 200 - (strlen($suffix) + 1)) . "-$suffix"; |
|
| 1770 | + $new_slug = _truncate_post_slug($slug, 200 - (strlen($suffix) + 1))."-$suffix"; |
|
| 1771 | 1771 | |
| 1772 | 1772 | /** This action is documented in geodirectory_hooks_actions.php */ |
| 1773 | 1773 | $term_slug_check = apply_filters('geodir_term_slug_is_exists', false, $new_slug, $term_id);
|
@@ -1779,7 +1779,7 @@ discard block |
||
| 1779 | 1779 | |
| 1780 | 1780 | //wp_update_term( $term_id, $taxonomy, array('slug' => $slug) );
|
| 1781 | 1781 | |
| 1782 | - $wpdb->query($wpdb->prepare("UPDATE " . $table_prefix . "terms SET slug=%s WHERE term_id=%d", array($slug, $term_id)));
|
|
| 1782 | + $wpdb->query($wpdb->prepare("UPDATE ".$table_prefix."terms SET slug=%s WHERE term_id=%d", array($slug, $term_id)));
|
|
| 1783 | 1783 | |
| 1784 | 1784 | } |
| 1785 | 1785 | |
@@ -1788,18 +1788,18 @@ discard block |
||
| 1788 | 1788 | $post_type = !empty($taxonomy_obj) ? $taxonomy_obj->object_type[0] : NULL; |
| 1789 | 1789 | |
| 1790 | 1790 | $post_types = geodir_get_posttypes(); |
| 1791 | - if ($post_type && in_array($post_type, $post_types) && $post_type . '_tags' == $taxonomy) {
|
|
| 1792 | - $posts_obj = $wpdb->get_results($wpdb->prepare("SELECT object_id FROM " . $wpdb->term_relationships . " WHERE term_taxonomy_id = %d", array($tt_id)));
|
|
| 1791 | + if ($post_type && in_array($post_type, $post_types) && $post_type.'_tags' == $taxonomy) {
|
|
| 1792 | + $posts_obj = $wpdb->get_results($wpdb->prepare("SELECT object_id FROM ".$wpdb->term_relationships." WHERE term_taxonomy_id = %d", array($tt_id)));
|
|
| 1793 | 1793 | |
| 1794 | 1794 | if (!empty($posts_obj)) {
|
| 1795 | 1795 | foreach ($posts_obj as $post_obj) {
|
| 1796 | 1796 | $post_id = $post_obj->object_id; |
| 1797 | 1797 | |
| 1798 | - $raw_tags = wp_get_object_terms($post_id, $post_type . '_tags', array('fields' => 'names'));
|
|
| 1798 | + $raw_tags = wp_get_object_terms($post_id, $post_type.'_tags', array('fields' => 'names'));
|
|
| 1799 | 1799 | $post_tags = !empty($raw_tags) ? implode(',', $raw_tags) : '';
|
| 1800 | 1800 | |
| 1801 | - $listing_table = $plugin_prefix . $post_type . '_detail'; |
|
| 1802 | - $wpdb->query($wpdb->prepare("UPDATE " . $listing_table . " SET post_tags=%s WHERE post_id =%d", array($post_tags, $post_id)));
|
|
| 1801 | + $listing_table = $plugin_prefix.$post_type.'_detail'; |
|
| 1802 | + $wpdb->query($wpdb->prepare("UPDATE ".$listing_table." SET post_tags=%s WHERE post_id =%d", array($post_tags, $post_id)));
|
|
| 1803 | 1803 | } |
| 1804 | 1804 | } |
| 1805 | 1805 | } |
@@ -1833,7 +1833,7 @@ discard block |
||
| 1833 | 1833 | if ($country_slug == $slug || $region_slug == $slug || $city_slug == $slug) |
| 1834 | 1834 | return $slug_exists = true; |
| 1835 | 1835 | |
| 1836 | - if ($wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s AND term_id != %d", array($slug, $term_id))))
|
|
| 1836 | + if ($wpdb->get_var($wpdb->prepare("SELECT slug FROM ".$table_prefix."terms WHERE slug=%s AND term_id != %d", array($slug, $term_id))))
|
|
| 1837 | 1837 | return $slug_exists = true; |
| 1838 | 1838 | |
| 1839 | 1839 | return $slug_exists; |
@@ -1873,43 +1873,43 @@ discard block |
||
| 1873 | 1873 | |
| 1874 | 1874 | |
| 1875 | 1875 | $gd_page = ''; |
| 1876 | - if(geodir_is_page('home')){
|
|
| 1876 | + if (geodir_is_page('home')) {
|
|
| 1877 | 1877 | $gd_page = 'home'; |
| 1878 | 1878 | $title = (get_option('geodir_meta_title_homepage')) ? get_option('geodir_meta_title_homepage') : $title;
|
| 1879 | 1879 | } |
| 1880 | - elseif(geodir_is_page('detail')){
|
|
| 1880 | + elseif (geodir_is_page('detail')) {
|
|
| 1881 | 1881 | $gd_page = 'detail'; |
| 1882 | 1882 | $title = (get_option('geodir_meta_title_detail')) ? get_option('geodir_meta_title_detail') : $title;
|
| 1883 | 1883 | } |
| 1884 | - elseif(geodir_is_page('pt')){
|
|
| 1884 | + elseif (geodir_is_page('pt')) {
|
|
| 1885 | 1885 | $gd_page = 'pt'; |
| 1886 | 1886 | $title = (get_option('geodir_meta_title_pt')) ? get_option('geodir_meta_title_pt') : $title;
|
| 1887 | 1887 | } |
| 1888 | - elseif(geodir_is_page('listing')){
|
|
| 1888 | + elseif (geodir_is_page('listing')) {
|
|
| 1889 | 1889 | $gd_page = 'listing'; |
| 1890 | 1890 | $title = (get_option('geodir_meta_title_listing')) ? get_option('geodir_meta_title_listing') : $title;
|
| 1891 | 1891 | } |
| 1892 | - elseif(geodir_is_page('location')){
|
|
| 1892 | + elseif (geodir_is_page('location')) {
|
|
| 1893 | 1893 | $gd_page = 'location'; |
| 1894 | 1894 | $title = (get_option('geodir_meta_title_location')) ? get_option('geodir_meta_title_location') : $title;
|
| 1895 | 1895 | } |
| 1896 | - elseif(geodir_is_page('search')){
|
|
| 1896 | + elseif (geodir_is_page('search')) {
|
|
| 1897 | 1897 | $gd_page = 'search'; |
| 1898 | 1898 | $title = (get_option('geodir_meta_title_search')) ? get_option('geodir_meta_title_search') : $title;
|
| 1899 | 1899 | } |
| 1900 | - elseif(geodir_is_page('add-listing')){
|
|
| 1900 | + elseif (geodir_is_page('add-listing')) {
|
|
| 1901 | 1901 | $gd_page = 'add-listing'; |
| 1902 | 1902 | $title = (get_option('geodir_meta_title_add-listing')) ? get_option('geodir_meta_title_add-listing') : $title;
|
| 1903 | 1903 | } |
| 1904 | - elseif(geodir_is_page('author')){
|
|
| 1904 | + elseif (geodir_is_page('author')) {
|
|
| 1905 | 1905 | $gd_page = 'author'; |
| 1906 | 1906 | $title = (get_option('geodir_meta_title_author')) ? get_option('geodir_meta_title_author') : $title;
|
| 1907 | 1907 | } |
| 1908 | - elseif(geodir_is_page('login')){
|
|
| 1908 | + elseif (geodir_is_page('login')) {
|
|
| 1909 | 1909 | $gd_page = 'login'; |
| 1910 | 1910 | $title = (get_option('geodir_meta_title_login')) ? get_option('geodir_meta_title_login') : $title;
|
| 1911 | 1911 | } |
| 1912 | - elseif(geodir_is_page('listing-success')){
|
|
| 1912 | + elseif (geodir_is_page('listing-success')) {
|
|
| 1913 | 1913 | $gd_page = 'listing-success'; |
| 1914 | 1914 | $title = (get_option('geodir_meta_title_listing-success')) ? get_option('geodir_meta_title_listing-success') : $title;
|
| 1915 | 1915 | } |
@@ -1941,12 +1941,12 @@ discard block |
||
| 1941 | 1941 | |
| 1942 | 1942 | if (!get_option('geodir_set_post_attachments')) {
|
| 1943 | 1943 | |
| 1944 | - require_once(ABSPATH . 'wp-admin/includes/image.php'); |
|
| 1945 | - require_once(ABSPATH . 'wp-admin/includes/file.php'); |
|
| 1944 | + require_once(ABSPATH.'wp-admin/includes/image.php'); |
|
| 1945 | + require_once(ABSPATH.'wp-admin/includes/file.php'); |
|
| 1946 | 1946 | |
| 1947 | 1947 | $all_postypes = geodir_get_posttypes(); |
| 1948 | 1948 | |
| 1949 | - foreach($all_postypes as $post_type){
|
|
| 1949 | + foreach ($all_postypes as $post_type) {
|
|
| 1950 | 1950 | $args = array( |
| 1951 | 1951 | 'posts_per_page' => -1, |
| 1952 | 1952 | 'post_type' => $post_type, |
@@ -2040,7 +2040,7 @@ discard block |
||
| 2040 | 2040 | {
|
| 2041 | 2041 | $user_id = get_current_user_id(); |
| 2042 | 2042 | |
| 2043 | - if(!$user_id){return $post;}
|
|
| 2043 | + if (!$user_id) {return $post; }
|
|
| 2044 | 2044 | |
| 2045 | 2045 | $gd_post_types = geodir_get_posttypes(); |
| 2046 | 2046 | |
@@ -2149,7 +2149,7 @@ discard block |
||
| 2149 | 2149 | |
| 2150 | 2150 | if (array_key_exists('post_video', $tabs_arr)) {
|
| 2151 | 2151 | |
| 2152 | - $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_video', $post_type)));
|
|
| 2152 | + $field_title = $wpdb->get_var($wpdb->prepare("select site_title from ".GEODIR_CUSTOM_FIELDS_TABLE." where htmlvar_name = %s and post_type = %s ", array('geodir_video', $post_type)));
|
|
| 2153 | 2153 | |
| 2154 | 2154 | if (isset($tabs_arr['post_video']['heading_text']) && $field_title != '') |
| 2155 | 2155 | $tabs_arr['post_video']['heading_text'] = $field_title; |
@@ -2157,7 +2157,7 @@ discard block |
||
| 2157 | 2157 | |
| 2158 | 2158 | if (array_key_exists('special_offers', $tabs_arr)) {
|
| 2159 | 2159 | |
| 2160 | - $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_special_offers', $post_type)));
|
|
| 2160 | + $field_title = $wpdb->get_var($wpdb->prepare("select site_title from ".GEODIR_CUSTOM_FIELDS_TABLE." where htmlvar_name = %s and post_type = %s ", array('geodir_special_offers', $post_type)));
|
|
| 2161 | 2161 | |
| 2162 | 2162 | if (isset($tabs_arr['special_offers']['heading_text']) && $field_title != '') |
| 2163 | 2163 | $tabs_arr['special_offers']['heading_text'] = $field_title; |
@@ -2178,7 +2178,7 @@ discard block |
||
| 2178 | 2178 | */ |
| 2179 | 2179 | function geodir_remove_template_redirect_actions() |
| 2180 | 2180 | {
|
| 2181 | - if (geodir_is_page('login')){
|
|
| 2181 | + if (geodir_is_page('login')) {
|
|
| 2182 | 2182 | remove_all_actions('template_redirect');
|
| 2183 | 2183 | remove_action('init', 'avia_modify_front', 10);
|
| 2184 | 2184 | } |
@@ -2225,25 +2225,25 @@ discard block |
||
| 2225 | 2225 | $split_img_file_path = isset($split_img_path[1]) ? $split_img_path[1] : ''; |
| 2226 | 2226 | |
| 2227 | 2227 | $wpdb->query( |
| 2228 | - $wpdb->prepare("DELETE FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id = %d AND file=%s ",
|
|
| 2228 | + $wpdb->prepare("DELETE FROM ".GEODIR_ATTACHMENT_TABLE." WHERE post_id = %d AND file=%s ",
|
|
| 2229 | 2229 | array($post_id, $split_img_file_path) |
| 2230 | 2230 | ) |
| 2231 | 2231 | ); |
| 2232 | 2232 | |
| 2233 | 2233 | $attachment_data = $wpdb->get_row( |
| 2234 | - $wpdb->prepare("SELECT ID, MIN(`menu_order`) FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id=%d",
|
|
| 2234 | + $wpdb->prepare("SELECT ID, MIN(`menu_order`) FROM ".GEODIR_ATTACHMENT_TABLE." WHERE post_id=%d",
|
|
| 2235 | 2235 | array($post_id) |
| 2236 | 2236 | ) |
| 2237 | 2237 | ); |
| 2238 | 2238 | |
| 2239 | 2239 | if (!empty($attachment_data)) {
|
| 2240 | - $wpdb->query("UPDATE " . GEODIR_ATTACHMENT_TABLE . " SET menu_order=1 WHERE ID=" . $attachment_data->ID);
|
|
| 2240 | + $wpdb->query("UPDATE ".GEODIR_ATTACHMENT_TABLE." SET menu_order=1 WHERE ID=".$attachment_data->ID);
|
|
| 2241 | 2241 | } |
| 2242 | 2242 | |
| 2243 | 2243 | |
| 2244 | - $table_name = $plugin_prefix . $post_type . '_detail'; |
|
| 2244 | + $table_name = $plugin_prefix.$post_type.'_detail'; |
|
| 2245 | 2245 | |
| 2246 | - $wpdb->query("UPDATE " . $table_name . " SET featured_image='' WHERE post_id =" . $post_id);
|
|
| 2246 | + $wpdb->query("UPDATE ".$table_name." SET featured_image='' WHERE post_id =".$post_id);
|
|
| 2247 | 2247 | |
| 2248 | 2248 | geodir_set_wp_featured_image($post_id); |
| 2249 | 2249 | |
@@ -2271,9 +2271,9 @@ discard block |
||
| 2271 | 2271 | |
| 2272 | 2272 | foreach ($all_postypes as $posttype) {
|
| 2273 | 2273 | |
| 2274 | - $tablename = $plugin_prefix . $posttype . '_detail'; |
|
| 2274 | + $tablename = $plugin_prefix.$posttype.'_detail'; |
|
| 2275 | 2275 | |
| 2276 | - $get_post_data = $wpdb->get_results("SELECT post_id FROM " . $tablename);
|
|
| 2276 | + $get_post_data = $wpdb->get_results("SELECT post_id FROM ".$tablename);
|
|
| 2277 | 2277 | |
| 2278 | 2278 | if (!empty($get_post_data)) {
|
| 2279 | 2279 | |
@@ -2281,7 +2281,7 @@ discard block |
||
| 2281 | 2281 | |
| 2282 | 2282 | $post_id = $data->post_id; |
| 2283 | 2283 | |
| 2284 | - $attachment_data = $wpdb->get_results("SELECT * FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id =" . $post_id . " AND file!=''");
|
|
| 2284 | + $attachment_data = $wpdb->get_results("SELECT * FROM ".GEODIR_ATTACHMENT_TABLE." WHERE post_id =".$post_id." AND file!=''");
|
|
| 2285 | 2285 | |
| 2286 | 2286 | if (!empty($attachment_data)) {
|
| 2287 | 2287 | |
@@ -2298,22 +2298,22 @@ discard block |
||
| 2298 | 2298 | |
| 2299 | 2299 | $file_name = $file_info['basename']; |
| 2300 | 2300 | |
| 2301 | - $img_arr['path'] = $uploads_path . $sub_dir . '/' . $file_name; |
|
| 2301 | + $img_arr['path'] = $uploads_path.$sub_dir.'/'.$file_name; |
|
| 2302 | 2302 | |
| 2303 | 2303 | if (!file_exists($img_arr['path'])) {
|
| 2304 | 2304 | |
| 2305 | - $wpdb->query("DELETE FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE ID=" . $attach->ID);
|
|
| 2305 | + $wpdb->query("DELETE FROM ".GEODIR_ATTACHMENT_TABLE." WHERE ID=".$attach->ID);
|
|
| 2306 | 2306 | |
| 2307 | 2307 | } |
| 2308 | 2308 | |
| 2309 | 2309 | } |
| 2310 | 2310 | |
| 2311 | - $attachment_data = $wpdb->get_row("SELECT ID, MIN(`menu_order`) FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id=" . $post_id . " GROUP BY post_id");
|
|
| 2311 | + $attachment_data = $wpdb->get_row("SELECT ID, MIN(`menu_order`) FROM ".GEODIR_ATTACHMENT_TABLE." WHERE post_id=".$post_id." GROUP BY post_id");
|
|
| 2312 | 2312 | |
| 2313 | 2313 | if (!empty($attachment_data)) {
|
| 2314 | 2314 | |
| 2315 | 2315 | if ($attachment_data->ID) |
| 2316 | - $wpdb->query("UPDATE " . GEODIR_ATTACHMENT_TABLE . " SET menu_order=1 WHERE ID=" . $attachment_data->ID);
|
|
| 2316 | + $wpdb->query("UPDATE ".GEODIR_ATTACHMENT_TABLE." SET menu_order=1 WHERE ID=".$attachment_data->ID);
|
|
| 2317 | 2317 | |
| 2318 | 2318 | } else {
|
| 2319 | 2319 | |
@@ -2327,7 +2327,7 @@ discard block |
||
| 2327 | 2327 | |
| 2328 | 2328 | } |
| 2329 | 2329 | |
| 2330 | - $wpdb->query("UPDATE " . $tablename . " SET featured_image='' WHERE post_id =" . $post_id);
|
|
| 2330 | + $wpdb->query("UPDATE ".$tablename." SET featured_image='' WHERE post_id =".$post_id);
|
|
| 2331 | 2331 | |
| 2332 | 2332 | geodir_set_wp_featured_image($post_id); |
| 2333 | 2333 | |
@@ -2356,7 +2356,7 @@ discard block |
||
| 2356 | 2356 | {
|
| 2357 | 2357 | |
| 2358 | 2358 | if (!get_option('geodir_default_rating_star_icon')) {
|
| 2359 | - update_option('geodir_default_rating_star_icon', geodir_plugin_url() . '/geodirectory-assets/images/stars.png');
|
|
| 2359 | + update_option('geodir_default_rating_star_icon', geodir_plugin_url().'/geodirectory-assets/images/stars.png');
|
|
| 2360 | 2360 | } |
| 2361 | 2361 | |
| 2362 | 2362 | } |
@@ -2373,10 +2373,10 @@ discard block |
||
| 2373 | 2373 | * @global string $plugin_prefix Geodirectory plugin table prefix. |
| 2374 | 2374 | * @return array User listing count for each post type. |
| 2375 | 2375 | */ |
| 2376 | -function geodir_user_post_listing_count($user_id=null) |
|
| 2376 | +function geodir_user_post_listing_count($user_id = null) |
|
| 2377 | 2377 | {
|
| 2378 | 2378 | global $wpdb, $plugin_prefix, $current_user; |
| 2379 | - if(!$user_id){
|
|
| 2379 | + if (!$user_id) {
|
|
| 2380 | 2380 | $user_id = $current_user->ID; |
| 2381 | 2381 | } |
| 2382 | 2382 | |
@@ -2387,7 +2387,7 @@ discard block |
||
| 2387 | 2387 | $user_listing = array(); |
| 2388 | 2388 | if (is_array($all_posts) && !empty($all_posts)) {
|
| 2389 | 2389 | foreach ($all_posts as $ptype) {
|
| 2390 | - $total_posts = $wpdb->get_var("SELECT count( ID ) FROM " . $wpdb->prefix . "posts WHERE post_author=" . $user_id . " AND post_type='" . $ptype . "' AND ( post_status = 'publish' OR post_status = 'draft' OR post_status = 'private' )");
|
|
| 2390 | + $total_posts = $wpdb->get_var("SELECT count( ID ) FROM ".$wpdb->prefix."posts WHERE post_author=".$user_id." AND post_type='".$ptype."' AND ( post_status = 'publish' OR post_status = 'draft' OR post_status = 'private' )");
|
|
| 2391 | 2391 | |
| 2392 | 2392 | if ($total_posts > 0) {
|
| 2393 | 2393 | $user_listing[$ptype] = $total_posts; |
@@ -2490,9 +2490,9 @@ discard block |
||
| 2490 | 2490 | } |
| 2491 | 2491 | |
| 2492 | 2492 | if (strpos($type['field_icon'], 'http') !== false) {
|
| 2493 | - $field_icon = ' background: url(' . $type['field_icon'] . ') no-repeat left center;background-size:18px 18px;padding-left: 21px;';
|
|
| 2493 | + $field_icon = ' background: url('.$type['field_icon'].') no-repeat left center;background-size:18px 18px;padding-left: 21px;';
|
|
| 2494 | 2494 | } elseif (strpos($type['field_icon'], 'fa fa-') !== false) {
|
| 2495 | - $field_icon = '<i class="' . $type['field_icon'] . '"></i>'; |
|
| 2495 | + $field_icon = '<i class="'.$type['field_icon'].'"></i>'; |
|
| 2496 | 2496 | } |
| 2497 | 2497 | |
| 2498 | 2498 | switch ($type['type']) {
|
@@ -2500,7 +2500,7 @@ discard block |
||
| 2500 | 2500 | $i = 0; |
| 2501 | 2501 | $fieldset_count++; |
| 2502 | 2502 | $field_set_start = 1; |
| 2503 | - $fieldset_arr[$fieldset_count]['htmlvar_name'] = 'gd_tab_' . $fieldset_count; |
|
| 2503 | + $fieldset_arr[$fieldset_count]['htmlvar_name'] = 'gd_tab_'.$fieldset_count; |
|
| 2504 | 2504 | $fieldset_arr[$fieldset_count]['label'] = $label; |
| 2505 | 2505 | } |
| 2506 | 2506 | break; |
@@ -2533,7 +2533,7 @@ discard block |
||
| 2533 | 2533 | // all search engines that use the nofollow value exclude links that use it from their ranking calculation |
| 2534 | 2534 | $rel = strpos($website, get_site_url()) !== false ? '' : 'rel="nofollow"'; |
| 2535 | 2535 | |
| 2536 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '"><span class="geodir-i-website" style="' . $field_icon . '">' . $field_icon_af . ' <a href="' . $website . '" target="_blank" ' . $rel . ' ><strong>' . |
|
| 2536 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'"><span class="geodir-i-website" style="'.$field_icon.'">'.$field_icon_af.' <a href="'.$website.'" target="_blank" '.$rel.' ><strong>'. |
|
| 2537 | 2537 | /** |
| 2538 | 2538 | * Filer the custom field website name. |
| 2539 | 2539 | * |
@@ -2542,7 +2542,7 @@ discard block |
||
| 2542 | 2542 | * @param string $website The website address. |
| 2543 | 2543 | * @param int $post->ID The post ID. |
| 2544 | 2544 | */ |
| 2545 | - apply_filters('geodir_custom_field_website_name', $title, $website, $post->ID) . '</strong></a></span></div>';
|
|
| 2545 | + apply_filters('geodir_custom_field_website_name', $title, $website, $post->ID).'</strong></a></span></div>';
|
|
| 2546 | 2546 | } |
| 2547 | 2547 | break; |
| 2548 | 2548 | case 'phone': {
|
@@ -2557,11 +2557,11 @@ discard block |
||
| 2557 | 2557 | |
| 2558 | 2558 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2559 | 2559 | |
| 2560 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-contact" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2560 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-contact" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2561 | 2561 | if ($field_set_start == 1 && $site_title != '') {
|
| 2562 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2562 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2563 | 2563 | } |
| 2564 | - $html .= ' </span>' . $post->{$type['htmlvar_name']} . '</div>';
|
|
| 2564 | + $html .= ' </span>'.$post->{$type['htmlvar_name']}.'</div>';
|
|
| 2565 | 2565 | } |
| 2566 | 2566 | break; |
| 2567 | 2567 | case 'time': {
|
@@ -2580,11 +2580,11 @@ discard block |
||
| 2580 | 2580 | |
| 2581 | 2581 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2582 | 2582 | |
| 2583 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-time" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2583 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-time" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2584 | 2584 | if ($field_set_start == 1 && $site_title != '') {
|
| 2585 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2585 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2586 | 2586 | } |
| 2587 | - $html .= ' </span>' . $value . '</div>'; |
|
| 2587 | + $html .= ' </span>'.$value.'</div>'; |
|
| 2588 | 2588 | } |
| 2589 | 2589 | break; |
| 2590 | 2590 | case 'datepicker': {
|
@@ -2596,15 +2596,15 @@ discard block |
||
| 2596 | 2596 | |
| 2597 | 2597 | // check if we need to change the format or not |
| 2598 | 2598 | $date_format_len = strlen(str_replace(' ', '', $date_format));
|
| 2599 | - if($date_format_len>5){// if greater then 5 then it's the old style format.
|
|
| 2599 | + if ($date_format_len > 5) {// if greater then 5 then it's the old style format.
|
|
| 2600 | 2600 | |
| 2601 | - $search = array('dd','d','DD','mm','m','MM','yy'); //jQuery UI datepicker format
|
|
| 2602 | - $replace = array('d','j','l','m','n','F','Y');//PHP date format
|
|
| 2601 | + $search = array('dd', 'd', 'DD', 'mm', 'm', 'MM', 'yy'); //jQuery UI datepicker format
|
|
| 2602 | + $replace = array('d', 'j', 'l', 'm', 'n', 'F', 'Y'); //PHP date format
|
|
| 2603 | 2603 | |
| 2604 | 2604 | $date_format = str_replace($search, $replace, $date_format); |
| 2605 | 2605 | |
| 2606 | - $post_htmlvar_value = ($date_format == 'd/m/Y' || $date_format == 'j/n/Y' ) ? str_replace('/', '-', $post->{$type['htmlvar_name']}) : $post->{$type['htmlvar_name']}; // PHP doesn't work well with dd/mm/yyyy format
|
|
| 2607 | - }else{
|
|
| 2606 | + $post_htmlvar_value = ($date_format == 'd/m/Y' || $date_format == 'j/n/Y') ? str_replace('/', '-', $post->{$type['htmlvar_name']}) : $post->{$type['htmlvar_name']}; // PHP doesn't work well with dd/mm/yyyy format
|
|
| 2607 | + } else {
|
|
| 2608 | 2608 | $post_htmlvar_value = $post->{$type['htmlvar_name']};
|
| 2609 | 2609 | } |
| 2610 | 2610 | |
@@ -2623,11 +2623,11 @@ discard block |
||
| 2623 | 2623 | |
| 2624 | 2624 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2625 | 2625 | |
| 2626 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-datepicker" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2626 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-datepicker" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2627 | 2627 | if ($field_set_start == 1 && $site_title != '') {
|
| 2628 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2628 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2629 | 2629 | } |
| 2630 | - $html .= ' </span>' . $value . '</div>'; |
|
| 2630 | + $html .= ' </span>'.$value.'</div>'; |
|
| 2631 | 2631 | } |
| 2632 | 2632 | break; |
| 2633 | 2633 | case 'text': {
|
@@ -2642,11 +2642,11 @@ discard block |
||
| 2642 | 2642 | |
| 2643 | 2643 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2644 | 2644 | |
| 2645 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2645 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-text" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2646 | 2646 | if ($field_set_start == 1 && $site_title != '') {
|
| 2647 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2647 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2648 | 2648 | } |
| 2649 | - $html .= ' </span>' . $post->{$type['htmlvar_name']} . '</div>';
|
|
| 2649 | + $html .= ' </span>'.$post->{$type['htmlvar_name']}.'</div>';
|
|
| 2650 | 2650 | } |
| 2651 | 2651 | break; |
| 2652 | 2652 | case 'radio': {
|
@@ -2683,13 +2683,13 @@ discard block |
||
| 2683 | 2683 | |
| 2684 | 2684 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2685 | 2685 | |
| 2686 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-radio" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2686 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-radio" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2687 | 2687 | |
| 2688 | 2688 | if ($field_set_start == 1 && $site_title != '') {
|
| 2689 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2689 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2690 | 2690 | } |
| 2691 | 2691 | |
| 2692 | - $html .= ' </span>' . $html_val . '</div>'; |
|
| 2692 | + $html .= ' </span>'.$html_val.'</div>'; |
|
| 2693 | 2693 | } |
| 2694 | 2694 | } |
| 2695 | 2695 | break; |
@@ -2697,7 +2697,7 @@ discard block |
||
| 2697 | 2697 | $html_var = $type['htmlvar_name']; |
| 2698 | 2698 | $html_val = $type['htmlvar_name']; |
| 2699 | 2699 | |
| 2700 | - if ((int)$post->{$html_var} == 1) {
|
|
| 2700 | + if ((int) $post->{$html_var} == 1) {
|
|
| 2701 | 2701 | |
| 2702 | 2702 | if ($post->{$type['htmlvar_name']} == '1') {
|
| 2703 | 2703 | $html_val = __('Yes', 'geodirectory');
|
@@ -2716,13 +2716,13 @@ discard block |
||
| 2716 | 2716 | |
| 2717 | 2717 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2718 | 2718 | |
| 2719 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-checkbox" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2719 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-checkbox" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2720 | 2720 | |
| 2721 | 2721 | if ($field_set_start == 1 && $site_title != '') {
|
| 2722 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2722 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2723 | 2723 | } |
| 2724 | 2724 | |
| 2725 | - $html .= ' </span>' . $html_val . '</div>'; |
|
| 2725 | + $html .= ' </span>'.$html_val.'</div>'; |
|
| 2726 | 2726 | } |
| 2727 | 2727 | } |
| 2728 | 2728 | break; |
@@ -2752,11 +2752,11 @@ discard block |
||
| 2752 | 2752 | |
| 2753 | 2753 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2754 | 2754 | |
| 2755 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2755 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-select" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2756 | 2756 | if ($field_set_start == 1 && $site_title != '') {
|
| 2757 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2757 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2758 | 2758 | } |
| 2759 | - $html .= ' </span>' . $field_value . '</div>'; |
|
| 2759 | + $html .= ' </span>'.$field_value.'</div>'; |
|
| 2760 | 2760 | } |
| 2761 | 2761 | break; |
| 2762 | 2762 | case 'multiselect': {
|
@@ -2790,18 +2790,18 @@ discard block |
||
| 2790 | 2790 | |
| 2791 | 2791 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2792 | 2792 | |
| 2793 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2793 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-select" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2794 | 2794 | if ($field_set_start == 1 && $site_title != '') {
|
| 2795 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2795 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2796 | 2796 | } |
| 2797 | 2797 | $html .= ' </span>'; |
| 2798 | 2798 | |
| 2799 | 2799 | $html .= ' <span class="gd-multiselect-value-output gd-val-'.$type['htmlvar_name'].'" >'; |
| 2800 | 2800 | |
| 2801 | 2801 | if (count($option_values) > 1) {
|
| 2802 | - $html .= "<span>".implode('</span>, <span>',$option_values)."</span>";
|
|
| 2802 | + $html .= "<span>".implode('</span>, <span>', $option_values)."</span>";
|
|
| 2803 | 2803 | } else {
|
| 2804 | - $vals = explode(",",$post->{$type['htmlvar_name']});
|
|
| 2804 | + $vals = explode(",", $post->{$type['htmlvar_name']});
|
|
| 2805 | 2805 | $html .= "<span>".implode('</span>, <span>', $vals)."</span>";
|
| 2806 | 2806 | } |
| 2807 | 2807 | |
@@ -2825,11 +2825,11 @@ discard block |
||
| 2825 | 2825 | |
| 2826 | 2826 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2827 | 2827 | |
| 2828 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-email" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2828 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-email" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2829 | 2829 | if ($field_set_start == 1 && $site_title != '') {
|
| 2830 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2830 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2831 | 2831 | } |
| 2832 | - $html .= ' </span>' . $post->{$type['htmlvar_name']} . '</div>';
|
|
| 2832 | + $html .= ' </span>'.$post->{$type['htmlvar_name']}.'</div>';
|
|
| 2833 | 2833 | } |
| 2834 | 2834 | break; |
| 2835 | 2835 | case 'textarea': {
|
@@ -2844,11 +2844,11 @@ discard block |
||
| 2844 | 2844 | |
| 2845 | 2845 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2846 | 2846 | |
| 2847 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2847 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-text" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2848 | 2848 | if ($field_set_start == 1 && $site_title != '') {
|
| 2849 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2849 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2850 | 2850 | } |
| 2851 | - $html .= '</span>' . wpautop($post->{$type['htmlvar_name']}) . '</div>';
|
|
| 2851 | + $html .= '</span>'.wpautop($post->{$type['htmlvar_name']}).'</div>';
|
|
| 2852 | 2852 | } |
| 2853 | 2853 | break; |
| 2854 | 2854 | case 'html': {
|
@@ -2863,11 +2863,11 @@ discard block |
||
| 2863 | 2863 | |
| 2864 | 2864 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2865 | 2865 | |
| 2866 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2866 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].'" style="clear:both;"><span class="geodir-i-text" style="'.$field_icon.'">'.$field_icon_af; |
|
| 2867 | 2867 | if ($field_set_start == 1 && $site_title != '') {
|
| 2868 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2868 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2869 | 2869 | } |
| 2870 | - $html .= ' </span>' . wpautop($post->{$type['htmlvar_name']}) . '</div>';
|
|
| 2870 | + $html .= ' </span>'.wpautop($post->{$type['htmlvar_name']}).'</div>';
|
|
| 2871 | 2871 | } |
| 2872 | 2872 | break; |
| 2873 | 2873 | case 'file': {
|
@@ -2878,7 +2878,7 @@ discard block |
||
| 2878 | 2878 | |
| 2879 | 2879 | if (!empty($files)) {
|
| 2880 | 2880 | $extra_fields = !empty($type['extra_fields']) ? maybe_unserialize($type['extra_fields']) : NULL; |
| 2881 | - $allowed_file_types = !empty($extra_fields['gd_file_types']) && is_array($extra_fields['gd_file_types']) && !in_array("*", $extra_fields['gd_file_types'] ) ? $extra_fields['gd_file_types'] : '';
|
|
| 2881 | + $allowed_file_types = !empty($extra_fields['gd_file_types']) && is_array($extra_fields['gd_file_types']) && !in_array("*", $extra_fields['gd_file_types']) ? $extra_fields['gd_file_types'] : '';
|
|
| 2882 | 2882 | |
| 2883 | 2883 | $file_paths = ''; |
| 2884 | 2884 | foreach ($files as $file) {
|
@@ -2907,9 +2907,9 @@ discard block |
||
| 2907 | 2907 | $file_paths .= '</a>'; |
| 2908 | 2908 | $file_paths .= '</div>'; |
| 2909 | 2909 | } else {
|
| 2910 | - $ext_path = '_' . $html_var . '_'; |
|
| 2910 | + $ext_path = '_'.$html_var.'_'; |
|
| 2911 | 2911 | $filename = explode($ext_path, $filename); |
| 2912 | - $file_paths .= '<a href="' . $file . '" target="_blank">' . $filename[count($filename) - 1] . '</a>'; |
|
| 2912 | + $file_paths .= '<a href="'.$file.'" target="_blank">'.$filename[count($filename) - 1].'</a>'; |
|
| 2913 | 2913 | } |
| 2914 | 2914 | } |
| 2915 | 2915 | } |
@@ -2926,13 +2926,13 @@ discard block |
||
| 2926 | 2926 | $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
| 2927 | 2927 | |
| 2928 | 2928 | |
| 2929 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . ' geodir-custom-file-box" style="clear:both;"><span class="geodir-i-file" style="display:inline-block;vertical-align:top;padding-right:14px;' . $field_icon . '">' . $field_icon_af; |
|
| 2929 | + $html = '<div class="geodir_more_info '.$geodir_odd_even.' '.$type['css_class'].' '.$type['htmlvar_name'].' geodir-custom-file-box" style="clear:both;"><span class="geodir-i-file" style="display:inline-block;vertical-align:top;padding-right:14px;'.$field_icon.'">'.$field_icon_af; |
|
| 2930 | 2930 | |
| 2931 | 2931 | if ($field_set_start == 1 && $site_title != '') {
|
| 2932 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2932 | + $html .= ' '.__($site_title, 'geodirectory').': '; |
|
| 2933 | 2933 | } |
| 2934 | 2934 | |
| 2935 | - $html .= ' </span>' . $file_paths . '</div>'; |
|
| 2935 | + $html .= ' </span>'.$file_paths.'</div>'; |
|
| 2936 | 2936 | } |
| 2937 | 2937 | } |
| 2938 | 2938 | } |
@@ -2983,7 +2983,7 @@ discard block |
||
| 2983 | 2983 | * @param string $htmlvar_name The field HTML var name. |
| 2984 | 2984 | */ |
| 2985 | 2985 | 'is_display' => apply_filters('geodir_detail_page_tab_is_display', true, $htmlvar_name),
|
| 2986 | - 'tab_content' => '<div class="geodir-company_info field-group">' . $fieldset_html . '</html>' |
|
| 2986 | + 'tab_content' => '<div class="geodir-company_info field-group">'.$fieldset_html.'</html>' |
|
| 2987 | 2987 | ); |
| 2988 | 2988 | } |
| 2989 | 2989 | } else {
|
@@ -3043,7 +3043,7 @@ discard block |
||
| 3043 | 3043 | } |
| 3044 | 3044 | $status .= ")</strong>"; |
| 3045 | 3045 | |
| 3046 | - $html = '<span class="geodir-post-status">' . $status_icon . ' <font class="geodir-status-label">' . __('Status: ', 'geodirectory') . '</font>' . $status . '</span>';
|
|
| 3046 | + $html = '<span class="geodir-post-status">'.$status_icon.' <font class="geodir-status-label">'.__('Status: ', 'geodirectory').'</font>'.$status.'</span>';
|
|
| 3047 | 3047 | } |
| 3048 | 3048 | } |
| 3049 | 3049 | |
@@ -3123,7 +3123,7 @@ discard block |
||
| 3123 | 3123 | function geodir_no_rating_comment_text($content, $comment = '') |
| 3124 | 3124 | {
|
| 3125 | 3125 | if (!is_admin()) {
|
| 3126 | - return '<div class="description">' . $content . '</div>'; |
|
| 3126 | + return '<div class="description">'.$content.'</div>'; |
|
| 3127 | 3127 | } else {
|
| 3128 | 3128 | return $content; |
| 3129 | 3129 | } |
@@ -3201,7 +3201,7 @@ discard block |
||
| 3201 | 3201 | $classes[] = 'gd-no-rating'; |
| 3202 | 3202 | } |
| 3203 | 3203 | |
| 3204 | - $classes[] = 'gd-map-' . geodir_map_name(); |
|
| 3204 | + $classes[] = 'gd-map-'.geodir_map_name(); |
|
| 3205 | 3205 | |
| 3206 | 3206 | return $classes; |
| 3207 | 3207 | } |
@@ -3221,7 +3221,7 @@ discard block |
||
| 3221 | 3221 | $class .= ' gd-no-rating'; |
| 3222 | 3222 | } |
| 3223 | 3223 | |
| 3224 | - $class .= ' gd-map-' . geodir_map_name(); |
|
| 3224 | + $class .= ' gd-map-'.geodir_map_name(); |
|
| 3225 | 3225 | |
| 3226 | 3226 | return $class; |
| 3227 | 3227 | } |
@@ -3256,7 +3256,7 @@ discard block |
||
| 3256 | 3256 | * @return array Translation texts. |
| 3257 | 3257 | */ |
| 3258 | 3258 | function geodir_load_gd_options_text_translation($translation_texts = array()) {
|
| 3259 | - $translation_texts = !empty( $translation_texts ) && is_array( $translation_texts ) ? $translation_texts : array(); |
|
| 3259 | + $translation_texts = !empty($translation_texts) && is_array($translation_texts) ? $translation_texts : array(); |
|
| 3260 | 3260 | |
| 3261 | 3261 | $gd_options = array('geodir_post_submited_success_email_subject_admin', 'geodir_post_submited_success_email_content_admin', 'geodir_post_submited_success_email_subject', 'geodir_post_submited_success_email_content', 'geodir_forgot_password_subject', 'geodir_forgot_password_content', 'geodir_registration_success_email_subject', 'geodir_registration_success_email_content', 'geodir_post_published_email_subject', 'geodir_post_published_email_content', 'geodir_email_friend_subject', 'geodir_email_friend_content', 'geodir_email_enquiry_subject', 'geodir_email_enquiry_content', 'geodir_post_added_success_msg_content', 'geodir_post_edited_email_subject_admin', 'geodir_post_edited_email_content_admin');
|
| 3262 | 3262 | |
@@ -3322,14 +3322,14 @@ discard block |
||
| 3322 | 3322 | * @param array $args The array of menu arguments. |
| 3323 | 3323 | * @return array The modified arguments. |
| 3324 | 3324 | */ |
| 3325 | -function geodir_add_nav_menu_class( $args ) |
|
| 3325 | +function geodir_add_nav_menu_class($args) |
|
| 3326 | 3326 | {
|
| 3327 | 3327 | |
| 3328 | - if(isset($args['menu_class'])){
|
|
| 3328 | + if (isset($args['menu_class'])) {
|
|
| 3329 | 3329 | $args['menu_class'] = $args['menu_class']." gd-menu-z"; |
| 3330 | 3330 | } |
| 3331 | 3331 | |
| 3332 | 3332 | return $args; |
| 3333 | 3333 | } |
| 3334 | 3334 | |
| 3335 | -add_filter( 'wp_nav_menu_args', 'geodir_add_nav_menu_class' ); |
|
| 3336 | 3335 | \ No newline at end of file |
| 3336 | +add_filter('wp_nav_menu_args', 'geodir_add_nav_menu_class'); |
|
| 3337 | 3337 | \ No newline at end of file |
@@ -86,8 +86,9 @@ discard block |
||
| 86 | 86 | add_filter('query_vars', 'geodir_add_location_var');
|
| 87 | 87 | add_filter('query_vars', 'geodir_add_geodir_page_var');
|
| 88 | 88 | add_action('wp', 'geodir_add_page_id_in_query_var'); // problem fix in wordpress 3.8
|
| 89 | -if (get_option('permalink_structure') != '')
|
|
| 90 | - add_filter('parse_request', 'geodir_set_location_var_in_session_in_core');
|
|
| 89 | +if (get_option('permalink_structure') != '') { |
|
| 90 | + add_filter('parse_request', 'geodir_set_location_var_in_session_in_core'); |
|
| 91 | +} |
|
| 91 | 92 | |
| 92 | 93 | add_filter('parse_query', 'geodir_modified_query');
|
| 93 | 94 | |
@@ -421,8 +422,9 @@ discard block |
||
| 421 | 422 | */ |
| 422 | 423 | do_action('geodir_after_social_sharing_buttons');
|
| 423 | 424 | $content_html = ob_get_clean(); |
| 424 | - if (trim($content_html) != '') |
|
| 425 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-social-sharing">' . $content_html . '</div>'; |
|
| 425 | + if (trim($content_html) != '') { |
|
| 426 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-social-sharing">' . $content_html . '</div>'; |
|
| 427 | + } |
|
| 426 | 428 | if ((int)get_option('geodir_disable_tfg_buttons_section') != 1) {
|
| 427 | 429 | /** |
| 428 | 430 | * Filter the geodir_social_sharing_buttons() function content. |
@@ -468,8 +470,9 @@ discard block |
||
| 468 | 470 | */ |
| 469 | 471 | do_action('geodir_after_share_this_button');
|
| 470 | 472 | $content_html = ob_get_clean(); |
| 471 | - if (trim($content_html) != '') |
|
| 472 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-sharethis">' . $content_html . '</div>'; |
|
| 473 | + if (trim($content_html) != '') { |
|
| 474 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-sharethis">' . $content_html . '</div>'; |
|
| 475 | + } |
|
| 473 | 476 | if ((int)get_option('geodir_disable_sharethis_button_section') != 1) {
|
| 474 | 477 | /** |
| 475 | 478 | * Filter the geodir_share_this_button() function content. |
@@ -524,8 +527,9 @@ discard block |
||
| 524 | 527 | */ |
| 525 | 528 | do_action('geodir_after_edit_post_link');
|
| 526 | 529 | $content_html = ob_get_clean(); |
| 527 | - if (trim($content_html) != '') |
|
| 528 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-user-links">' . $content_html . '</div>'; |
|
| 530 | + if (trim($content_html) != '') { |
|
| 531 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-user-links">' . $content_html . '</div>'; |
|
| 532 | + } |
|
| 529 | 533 | if ((int)get_option('geodir_disable_user_links_section') != 1) {
|
| 530 | 534 | /** |
| 531 | 535 | * Filter the geodir_edit_post_link() function content. |
@@ -1098,8 +1102,9 @@ discard block |
||
| 1098 | 1102 | */ |
| 1099 | 1103 | do_action('geodir_after_google_analytics');
|
| 1100 | 1104 | $content_html = ob_get_clean(); |
| 1101 | - if (trim($content_html) != '') |
|
| 1102 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-google-analytics">' . $content_html . '</div>'; |
|
| 1105 | + if (trim($content_html) != '') { |
|
| 1106 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-google-analytics">' . $content_html . '</div>'; |
|
| 1107 | + } |
|
| 1103 | 1108 | if ((int)get_option('geodir_disable_google_analytics_section') != 1) {
|
| 1104 | 1109 | /** |
| 1105 | 1110 | * Filter the geodir_edit_post_link() function content. |
@@ -1236,8 +1241,9 @@ discard block |
||
| 1236 | 1241 | do_action('geodir_after_detail_page_more_info');
|
| 1237 | 1242 | |
| 1238 | 1243 | $content_html = ob_get_clean(); |
| 1239 | - if (trim($content_html) != '') |
|
| 1240 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-listing-info">' . $content_html . '</div>'; |
|
| 1244 | + if (trim($content_html) != '') { |
|
| 1245 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-listing-info">' . $content_html . '</div>'; |
|
| 1246 | + } |
|
| 1241 | 1247 | if ((int)get_option('geodir_disable_listing_info_section') != 1) {
|
| 1242 | 1248 | /** |
| 1243 | 1249 | * Filter the output html for function geodir_detail_page_more_info(). |
@@ -1352,8 +1358,9 @@ discard block |
||
| 1352 | 1358 | $arr_alert_msg = apply_filters('geodir_all_js_msg', $arr_alert_msg);
|
| 1353 | 1359 | |
| 1354 | 1360 | foreach ($arr_alert_msg as $key => $value) {
|
| 1355 | - if (!is_scalar($value)) |
|
| 1356 | - continue; |
|
| 1361 | + if (!is_scalar($value)) { |
|
| 1362 | + continue; |
|
| 1363 | + } |
|
| 1357 | 1364 | $arr_alert_msg[$key] = html_entity_decode((string)$value, ENT_QUOTES, 'UTF-8'); |
| 1358 | 1365 | } |
| 1359 | 1366 | |
@@ -1407,17 +1414,19 @@ discard block |
||
| 1407 | 1414 | global $geodir_sidebars; |
| 1408 | 1415 | global $sidebars_widgets; |
| 1409 | 1416 | |
| 1410 | - if (!is_array($sidebars_widgets)) |
|
| 1411 | - $sidebars_widgets = wp_get_sidebars_widgets(); |
|
| 1417 | + if (!is_array($sidebars_widgets)) { |
|
| 1418 | + $sidebars_widgets = wp_get_sidebars_widgets(); |
|
| 1419 | + } |
|
| 1412 | 1420 | $geodir_old_sidebars = array(); |
| 1413 | 1421 | |
| 1414 | 1422 | if (is_array($geodir_sidebars)) {
|
| 1415 | 1423 | foreach ($geodir_sidebars as $val) {
|
| 1416 | 1424 | if (is_array($sidebars_widgets)) {
|
| 1417 | - if (array_key_exists($val, $sidebars_widgets)) |
|
| 1418 | - $geodir_old_sidebars[$val] = $sidebars_widgets[$val]; |
|
| 1419 | - else |
|
| 1420 | - $geodir_old_sidebars[$val] = array(); |
|
| 1425 | + if (array_key_exists($val, $sidebars_widgets)) { |
|
| 1426 | + $geodir_old_sidebars[$val] = $sidebars_widgets[$val]; |
|
| 1427 | + } else { |
|
| 1428 | + $geodir_old_sidebars[$val] = array(); |
|
| 1429 | + } |
|
| 1421 | 1430 | } |
| 1422 | 1431 | } |
| 1423 | 1432 | } |
@@ -1438,16 +1447,19 @@ discard block |
||
| 1438 | 1447 | {
|
| 1439 | 1448 | global $sidebars_widgets; |
| 1440 | 1449 | |
| 1441 | - if (!is_array($sidebars_widgets)) |
|
| 1442 | - $sidebars_widgets = wp_get_sidebars_widgets(); |
|
| 1450 | + if (!is_array($sidebars_widgets)) { |
|
| 1451 | + $sidebars_widgets = wp_get_sidebars_widgets(); |
|
| 1452 | + } |
|
| 1443 | 1453 | |
| 1444 | 1454 | if (is_array($sidebars_widgets)) {
|
| 1445 | 1455 | $geodir_old_sidebars = get_option('geodir_sidebars');
|
| 1446 | 1456 | if (is_array($geodir_old_sidebars)) {
|
| 1447 | 1457 | foreach ($geodir_old_sidebars as $key => $val) {
|
| 1448 | - if(0 === strpos($key, 'geodir_'))// if gd widget |
|
| 1458 | + if(0 === strpos($key, 'geodir_')) { |
|
| 1459 | + // if gd widget |
|
| 1449 | 1460 | {
|
| 1450 | - $sidebars_widgets[$key] = $geodir_old_sidebars[$key]; |
|
| 1461 | + $sidebars_widgets[$key] = $geodir_old_sidebars[$key]; |
|
| 1462 | + } |
|
| 1451 | 1463 | } |
| 1452 | 1464 | |
| 1453 | 1465 | |
@@ -1583,20 +1595,25 @@ discard block |
||
| 1583 | 1595 | } |
| 1584 | 1596 | } |
| 1585 | 1597 | |
| 1586 | - if ($tab == 'post_info') |
|
| 1587 | - $is_display = (!empty($geodir_post_detail_fields)) ? true : false; |
|
| 1598 | + if ($tab == 'post_info') { |
|
| 1599 | + $is_display = (!empty($geodir_post_detail_fields)) ? true : false; |
|
| 1600 | + } |
|
| 1588 | 1601 | |
| 1589 | - if ($tab == 'post_images') |
|
| 1590 | - $is_display = (!empty($post_images)) ? true : false; |
|
| 1602 | + if ($tab == 'post_images') { |
|
| 1603 | + $is_display = (!empty($post_images)) ? true : false; |
|
| 1604 | + } |
|
| 1591 | 1605 | |
| 1592 | - if ($tab == 'post_video') |
|
| 1593 | - $is_display = (!empty($video)) ? true : false; |
|
| 1606 | + if ($tab == 'post_video') { |
|
| 1607 | + $is_display = (!empty($video)) ? true : false; |
|
| 1608 | + } |
|
| 1594 | 1609 | |
| 1595 | - if ($tab == 'special_offers') |
|
| 1596 | - $is_display = (!empty($special_offers)) ? true : false; |
|
| 1610 | + if ($tab == 'special_offers') { |
|
| 1611 | + $is_display = (!empty($special_offers)) ? true : false; |
|
| 1612 | + } |
|
| 1597 | 1613 | |
| 1598 | - if ($tab == 'reviews') |
|
| 1599 | - $is_display = (geodir_is_page('detail')) ? true : false;
|
|
| 1614 | + if ($tab == 'reviews') { |
|
| 1615 | + $is_display = (geodir_is_page('detail')) ? true : false; |
|
| 1616 | + } |
|
| 1600 | 1617 | |
| 1601 | 1618 | if ($tab == 'related_listing') {
|
| 1602 | 1619 | $message = __('No listings found which match your selection.', 'geodirectory');
|
@@ -1830,11 +1847,13 @@ discard block |
||
| 1830 | 1847 | $region_slug = $default_location->region_slug; |
| 1831 | 1848 | $city_slug = $default_location->city_slug; |
| 1832 | 1849 | |
| 1833 | - if ($country_slug == $slug || $region_slug == $slug || $city_slug == $slug) |
|
| 1834 | - return $slug_exists = true; |
|
| 1850 | + if ($country_slug == $slug || $region_slug == $slug || $city_slug == $slug) { |
|
| 1851 | + return $slug_exists = true; |
|
| 1852 | + } |
|
| 1835 | 1853 | |
| 1836 | - if ($wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s AND term_id != %d", array($slug, $term_id))))
|
|
| 1837 | - return $slug_exists = true; |
|
| 1854 | + if ($wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s AND term_id != %d", array($slug, $term_id)))) { |
|
| 1855 | + return $slug_exists = true; |
|
| 1856 | + } |
|
| 1838 | 1857 | |
| 1839 | 1858 | return $slug_exists; |
| 1840 | 1859 | } |
@@ -1876,40 +1895,31 @@ discard block |
||
| 1876 | 1895 | if(geodir_is_page('home')){
|
| 1877 | 1896 | $gd_page = 'home'; |
| 1878 | 1897 | $title = (get_option('geodir_meta_title_homepage')) ? get_option('geodir_meta_title_homepage') : $title;
|
| 1879 | - } |
|
| 1880 | - elseif(geodir_is_page('detail')){
|
|
| 1898 | + } elseif(geodir_is_page('detail')){
|
|
| 1881 | 1899 | $gd_page = 'detail'; |
| 1882 | 1900 | $title = (get_option('geodir_meta_title_detail')) ? get_option('geodir_meta_title_detail') : $title;
|
| 1883 | - } |
|
| 1884 | - elseif(geodir_is_page('pt')){
|
|
| 1901 | + } elseif(geodir_is_page('pt')){
|
|
| 1885 | 1902 | $gd_page = 'pt'; |
| 1886 | 1903 | $title = (get_option('geodir_meta_title_pt')) ? get_option('geodir_meta_title_pt') : $title;
|
| 1887 | - } |
|
| 1888 | - elseif(geodir_is_page('listing')){
|
|
| 1904 | + } elseif(geodir_is_page('listing')){
|
|
| 1889 | 1905 | $gd_page = 'listing'; |
| 1890 | 1906 | $title = (get_option('geodir_meta_title_listing')) ? get_option('geodir_meta_title_listing') : $title;
|
| 1891 | - } |
|
| 1892 | - elseif(geodir_is_page('location')){
|
|
| 1907 | + } elseif(geodir_is_page('location')){
|
|
| 1893 | 1908 | $gd_page = 'location'; |
| 1894 | 1909 | $title = (get_option('geodir_meta_title_location')) ? get_option('geodir_meta_title_location') : $title;
|
| 1895 | - } |
|
| 1896 | - elseif(geodir_is_page('search')){
|
|
| 1910 | + } elseif(geodir_is_page('search')){
|
|
| 1897 | 1911 | $gd_page = 'search'; |
| 1898 | 1912 | $title = (get_option('geodir_meta_title_search')) ? get_option('geodir_meta_title_search') : $title;
|
| 1899 | - } |
|
| 1900 | - elseif(geodir_is_page('add-listing')){
|
|
| 1913 | + } elseif(geodir_is_page('add-listing')){
|
|
| 1901 | 1914 | $gd_page = 'add-listing'; |
| 1902 | 1915 | $title = (get_option('geodir_meta_title_add-listing')) ? get_option('geodir_meta_title_add-listing') : $title;
|
| 1903 | - } |
|
| 1904 | - elseif(geodir_is_page('author')){
|
|
| 1916 | + } elseif(geodir_is_page('author')){
|
|
| 1905 | 1917 | $gd_page = 'author'; |
| 1906 | 1918 | $title = (get_option('geodir_meta_title_author')) ? get_option('geodir_meta_title_author') : $title;
|
| 1907 | - } |
|
| 1908 | - elseif(geodir_is_page('login')){
|
|
| 1919 | + } elseif(geodir_is_page('login')){
|
|
| 1909 | 1920 | $gd_page = 'login'; |
| 1910 | 1921 | $title = (get_option('geodir_meta_title_login')) ? get_option('geodir_meta_title_login') : $title;
|
| 1911 | - } |
|
| 1912 | - elseif(geodir_is_page('listing-success')){
|
|
| 1922 | + } elseif(geodir_is_page('listing-success')){
|
|
| 1913 | 1923 | $gd_page = 'listing-success'; |
| 1914 | 1924 | $title = (get_option('geodir_meta_title_listing-success')) ? get_option('geodir_meta_title_listing-success') : $title;
|
| 1915 | 1925 | } |
@@ -1987,11 +1997,13 @@ discard block |
||
| 1987 | 1997 | |
| 1988 | 1998 | if (!get_option('geodir_remove_url_seperator')) {
|
| 1989 | 1999 | |
| 1990 | - if (get_option('geodir_listingurl_separator'))
|
|
| 1991 | - delete_option('geodir_listingurl_separator');
|
|
| 2000 | + if (get_option('geodir_listingurl_separator')) { |
|
| 2001 | + delete_option('geodir_listingurl_separator'); |
|
| 2002 | + } |
|
| 1992 | 2003 | |
| 1993 | - if (get_option('geodir_detailurl_separator'))
|
|
| 1994 | - delete_option('geodir_detailurl_separator');
|
|
| 2004 | + if (get_option('geodir_detailurl_separator')) { |
|
| 2005 | + delete_option('geodir_detailurl_separator'); |
|
| 2006 | + } |
|
| 1995 | 2007 | |
| 1996 | 2008 | flush_rewrite_rules(false); |
| 1997 | 2009 | |
@@ -2015,8 +2027,9 @@ discard block |
||
| 2015 | 2027 | {
|
| 2016 | 2028 | foreach ($permalink_arr as $key => $value) {
|
| 2017 | 2029 | |
| 2018 | - if ($value['id'] == 'geodir_listingurl_separator' || $value['id'] == 'geodir_detailurl_separator') |
|
| 2019 | - unset($permalink_arr[$key]); |
|
| 2030 | + if ($value['id'] == 'geodir_listingurl_separator' || $value['id'] == 'geodir_detailurl_separator') { |
|
| 2031 | + unset($permalink_arr[$key]); |
|
| 2032 | + } |
|
| 2020 | 2033 | |
| 2021 | 2034 | } |
| 2022 | 2035 | |
@@ -2151,16 +2164,18 @@ discard block |
||
| 2151 | 2164 | |
| 2152 | 2165 | $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_video', $post_type)));
|
| 2153 | 2166 | |
| 2154 | - if (isset($tabs_arr['post_video']['heading_text']) && $field_title != '') |
|
| 2155 | - $tabs_arr['post_video']['heading_text'] = $field_title; |
|
| 2167 | + if (isset($tabs_arr['post_video']['heading_text']) && $field_title != '') { |
|
| 2168 | + $tabs_arr['post_video']['heading_text'] = $field_title; |
|
| 2169 | + } |
|
| 2156 | 2170 | } |
| 2157 | 2171 | |
| 2158 | 2172 | if (array_key_exists('special_offers', $tabs_arr)) {
|
| 2159 | 2173 | |
| 2160 | 2174 | $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_special_offers', $post_type)));
|
| 2161 | 2175 | |
| 2162 | - if (isset($tabs_arr['special_offers']['heading_text']) && $field_title != '') |
|
| 2163 | - $tabs_arr['special_offers']['heading_text'] = $field_title; |
|
| 2176 | + if (isset($tabs_arr['special_offers']['heading_text']) && $field_title != '') { |
|
| 2177 | + $tabs_arr['special_offers']['heading_text'] = $field_title; |
|
| 2178 | + } |
|
| 2164 | 2179 | } |
| 2165 | 2180 | |
| 2166 | 2181 | } |
@@ -2215,8 +2230,9 @@ discard block |
||
| 2215 | 2230 | |
| 2216 | 2231 | $all_postypes = geodir_get_posttypes(); |
| 2217 | 2232 | |
| 2218 | - if (!in_array($post_type, $all_postypes) || !is_admin()) |
|
| 2219 | - return false; |
|
| 2233 | + if (!in_array($post_type, $all_postypes) || !is_admin()) { |
|
| 2234 | + return false; |
|
| 2235 | + } |
|
| 2220 | 2236 | |
| 2221 | 2237 | $uploads = wp_upload_dir(); |
| 2222 | 2238 | |
@@ -2290,8 +2306,9 @@ discard block |
||
| 2290 | 2306 | $file_info = pathinfo($attach->file); |
| 2291 | 2307 | |
| 2292 | 2308 | $sub_dir = ''; |
| 2293 | - if ($file_info['dirname'] != '.' && $file_info['dirname'] != '..') |
|
| 2294 | - $sub_dir = stripslashes_deep($file_info['dirname']); |
|
| 2309 | + if ($file_info['dirname'] != '.' && $file_info['dirname'] != '..') { |
|
| 2310 | + $sub_dir = stripslashes_deep($file_info['dirname']); |
|
| 2311 | + } |
|
| 2295 | 2312 | |
| 2296 | 2313 | $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs |
| 2297 | 2314 | $uploads_path = $uploads['basedir']; |
@@ -2312,8 +2329,9 @@ discard block |
||
| 2312 | 2329 | |
| 2313 | 2330 | if (!empty($attachment_data)) {
|
| 2314 | 2331 | |
| 2315 | - if ($attachment_data->ID) |
|
| 2316 | - $wpdb->query("UPDATE " . GEODIR_ATTACHMENT_TABLE . " SET menu_order=1 WHERE ID=" . $attachment_data->ID);
|
|
| 2332 | + if ($attachment_data->ID) { |
|
| 2333 | + $wpdb->query("UPDATE " . GEODIR_ATTACHMENT_TABLE . " SET menu_order=1 WHERE ID=" . $attachment_data->ID); |
|
| 2334 | + } |
|
| 2317 | 2335 | |
| 2318 | 2336 | } else {
|
| 2319 | 2337 | |
@@ -2566,8 +2584,9 @@ discard block |
||
| 2566 | 2584 | break; |
| 2567 | 2585 | case 'time': {
|
| 2568 | 2586 | $value = ''; |
| 2569 | - if ($post->{$type['htmlvar_name']} != '')
|
|
| 2570 | - $value = date_i18n(get_option('time_format'), strtotime($post->{$type['htmlvar_name']}));
|
|
| 2587 | + if ($post->{$type['htmlvar_name']} != '') { |
|
| 2588 | + $value = date_i18n(get_option('time_format'), strtotime($post->{$type['htmlvar_name']})); |
|
| 2589 | + } |
|
| 2571 | 2590 | |
| 2572 | 2591 | if (strpos($field_icon, 'http') !== false) {
|
| 2573 | 2592 | $field_icon_af = ''; |
@@ -2604,13 +2623,14 @@ discard block |
||
| 2604 | 2623 | $date_format = str_replace($search, $replace, $date_format); |
| 2605 | 2624 | |
| 2606 | 2625 | $post_htmlvar_value = ($date_format == 'd/m/Y' || $date_format == 'j/n/Y' ) ? str_replace('/', '-', $post->{$type['htmlvar_name']}) : $post->{$type['htmlvar_name']}; // PHP doesn't work well with dd/mm/yyyy format
|
| 2607 | - }else{
|
|
| 2626 | + } else{
|
|
| 2608 | 2627 | $post_htmlvar_value = $post->{$type['htmlvar_name']};
|
| 2609 | 2628 | } |
| 2610 | 2629 | |
| 2611 | 2630 | $value = ''; |
| 2612 | - if ($post->{$type['htmlvar_name']} != '')
|
|
| 2613 | - $value = date_i18n($date_format, strtotime($post_htmlvar_value)); |
|
| 2631 | + if ($post->{$type['htmlvar_name']} != '') { |
|
| 2632 | + $value = date_i18n($date_format, strtotime($post_htmlvar_value)); |
|
| 2633 | + } |
|
| 2614 | 2634 | |
| 2615 | 2635 | if (strpos($field_icon, 'http') !== false) {
|
| 2616 | 2636 | $field_icon_af = ''; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | function geodir_get_ajax_url() |
| 21 | 21 | {
|
| 22 | - return admin_url('admin-ajax.php?action=geodir_ajax_action');
|
|
| 22 | + return admin_url('admin-ajax.php?action=geodir_ajax_action');
|
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | ///////////////////// |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | add_filter('query_vars', 'geodir_add_geodir_page_var');
|
| 88 | 88 | add_action('wp', 'geodir_add_page_id_in_query_var'); // problem fix in wordpress 3.8
|
| 89 | 89 | if (get_option('permalink_structure') != '')
|
| 90 | - add_filter('parse_request', 'geodir_set_location_var_in_session_in_core');
|
|
| 90 | + add_filter('parse_request', 'geodir_set_location_var_in_session_in_core');
|
|
| 91 | 91 | |
| 92 | 92 | add_filter('parse_query', 'geodir_modified_query');
|
| 93 | 93 | |
@@ -154,14 +154,14 @@ discard block |
||
| 154 | 154 | /* POST AND LOOP ACTIONS */ |
| 155 | 155 | //////////////////////// |
| 156 | 156 | if (!is_admin()) {
|
| 157 | - add_action('pre_get_posts', 'geodir_exclude_page', 100); /// Will help to exclude virtural page from everywhere
|
|
| 158 | - add_filter('wp_list_pages_excludes', 'exclude_from_wp_list_pages', 100);
|
|
| 159 | - /** Exclude Virtual Pages From Pages List **/ |
|
| 160 | - add_action('pre_get_posts', 'set_listing_request', 0);
|
|
| 161 | - add_action('pre_get_posts', 'geodir_listing_loop_filter', 1);
|
|
| 162 | - add_filter('excerpt_more', 'geodir_excerpt_more', 1000);
|
|
| 163 | - add_filter('excerpt_length', 'geodir_excerpt_length', 1000);
|
|
| 164 | - add_action('the_post', 'create_marker_jason_of_posts'); // Add marker in json array, Map related filter
|
|
| 157 | + add_action('pre_get_posts', 'geodir_exclude_page', 100); /// Will help to exclude virtural page from everywhere
|
|
| 158 | + add_filter('wp_list_pages_excludes', 'exclude_from_wp_list_pages', 100);
|
|
| 159 | + /** Exclude Virtual Pages From Pages List **/ |
|
| 160 | + add_action('pre_get_posts', 'set_listing_request', 0);
|
|
| 161 | + add_action('pre_get_posts', 'geodir_listing_loop_filter', 1);
|
|
| 162 | + add_filter('excerpt_more', 'geodir_excerpt_more', 1000);
|
|
| 163 | + add_filter('excerpt_length', 'geodir_excerpt_length', 1000);
|
|
| 164 | + add_action('the_post', 'create_marker_jason_of_posts'); // Add marker in json array, Map related filter
|
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | |
@@ -222,12 +222,12 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | function geodir_unset_prev_theme_nav_location($newname) |
| 224 | 224 | {
|
| 225 | - $geodir_theme_location = get_option('geodir_theme_location_nav_' . $newname);
|
|
| 226 | - if ($geodir_theme_location) {
|
|
| 227 | - update_option('geodir_theme_location_nav', $geodir_theme_location);
|
|
| 228 | - } else {
|
|
| 229 | - update_option('geodir_theme_location_nav', '');
|
|
| 230 | - } |
|
| 225 | + $geodir_theme_location = get_option('geodir_theme_location_nav_' . $newname);
|
|
| 226 | + if ($geodir_theme_location) {
|
|
| 227 | + update_option('geodir_theme_location_nav', $geodir_theme_location);
|
|
| 228 | + } else {
|
|
| 229 | + update_option('geodir_theme_location_nav', '');
|
|
| 230 | + } |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /// add action for theme switch to blank previous theme navigation location setting |
@@ -248,32 +248,32 @@ discard block |
||
| 248 | 248 | */ |
| 249 | 249 | function geodir_add_post_filters() |
| 250 | 250 | {
|
| 251 | - /** |
|
| 252 | - * Contains all function for filtering listing. |
|
| 253 | - * |
|
| 254 | - * @since 1.0.0 |
|
| 255 | - * @package GeoDirectory |
|
| 256 | - */ |
|
| 257 | - include_once('geodirectory-functions/listing_filters.php');
|
|
| 251 | + /** |
|
| 252 | + * Contains all function for filtering listing. |
|
| 253 | + * |
|
| 254 | + * @since 1.0.0 |
|
| 255 | + * @package GeoDirectory |
|
| 256 | + */ |
|
| 257 | + include_once('geodirectory-functions/listing_filters.php');
|
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | |
| 261 | 261 | if (!function_exists('geodir_init_defaults')) {
|
| 262 | - /** |
|
| 263 | - * Calls the function to register the GeoDirectory default CPT and taxonomies. |
|
| 264 | - * |
|
| 265 | - * @since 1.0.0 |
|
| 266 | - * @package GeoDirectory |
|
| 267 | - */ |
|
| 268 | - function geodir_init_defaults() |
|
| 269 | - {
|
|
| 270 | - if (function_exists('geodir_register_defaults')) {
|
|
| 262 | + /** |
|
| 263 | + * Calls the function to register the GeoDirectory default CPT and taxonomies. |
|
| 264 | + * |
|
| 265 | + * @since 1.0.0 |
|
| 266 | + * @package GeoDirectory |
|
| 267 | + */ |
|
| 268 | + function geodir_init_defaults() |
|
| 269 | + {
|
|
| 270 | + if (function_exists('geodir_register_defaults')) {
|
|
| 271 | 271 | |
| 272 | - geodir_register_defaults(); |
|
| 272 | + geodir_register_defaults(); |
|
| 273 | 273 | |
| 274 | - } |
|
| 274 | + } |
|
| 275 | 275 | |
| 276 | - } |
|
| 276 | + } |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | |
@@ -295,26 +295,26 @@ discard block |
||
| 295 | 295 | // CALLED ON 'sidebars_widgets' FILTER |
| 296 | 296 | |
| 297 | 297 | if (!function_exists('geodir_restrict_widget')) {
|
| 298 | - /** |
|
| 299 | - * Sets global values to be able to tell if the current page is a GeoDirectory listing page or a GeoDirectory details page. |
|
| 300 | - * |
|
| 301 | - * @global bool $is_listing Sets the global value to true if on a GD category page. False if not. |
|
| 302 | - * @global bool $is_single_place Sets the global value to true if on a GD details (post) page. False if not. |
|
| 303 | - * @since 1.0.0 |
|
| 304 | - * @package GeoDirectory |
|
| 305 | - */ |
|
| 306 | - function geodir_restrict_widget() |
|
| 307 | - {
|
|
| 308 | - global $is_listing, $is_single_place; |
|
| 298 | + /** |
|
| 299 | + * Sets global values to be able to tell if the current page is a GeoDirectory listing page or a GeoDirectory details page. |
|
| 300 | + * |
|
| 301 | + * @global bool $is_listing Sets the global value to true if on a GD category page. False if not. |
|
| 302 | + * @global bool $is_single_place Sets the global value to true if on a GD details (post) page. False if not. |
|
| 303 | + * @since 1.0.0 |
|
| 304 | + * @package GeoDirectory |
|
| 305 | + */ |
|
| 306 | + function geodir_restrict_widget() |
|
| 307 | + {
|
|
| 308 | + global $is_listing, $is_single_place; |
|
| 309 | 309 | |
| 310 | - // set is listing |
|
| 311 | - (geodir_is_page('listing')) ? $is_listing = true : $is_listing = false;
|
|
| 310 | + // set is listing |
|
| 311 | + (geodir_is_page('listing')) ? $is_listing = true : $is_listing = false;
|
|
| 312 | 312 | |
| 313 | - // set is single place |
|
| 314 | - (geodir_is_page('place')) ? $is_single_place = true : $is_single_place = false;
|
|
| 313 | + // set is single place |
|
| 314 | + (geodir_is_page('place')) ? $is_single_place = true : $is_single_place = false;
|
|
| 315 | 315 | |
| 316 | 316 | |
| 317 | - } |
|
| 317 | + } |
|
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | |
@@ -335,32 +335,32 @@ discard block |
||
| 335 | 335 | */ |
| 336 | 336 | function geodir_detail_page_sidebar_content_sorting() |
| 337 | 337 | {
|
| 338 | - $arr_detail_page_sidebar_content = |
|
| 339 | - /** |
|
| 340 | - * An array of functions to be called to be displayed on the details (post) page sidebar. |
|
| 341 | - * |
|
| 342 | - * This filter can be used to remove sections of the details page sidebar, |
|
| 343 | - * add new sections or rearrange the order of the sections. |
|
| 344 | - * |
|
| 345 | - * @param array array('geodir_social_sharing_buttons','geodir_share_this_button','geodir_detail_page_google_analytics','geodir_edit_post_link','geodir_detail_page_review_rating','geodir_detail_page_more_info') The array of functions that will be called.
|
|
| 346 | - * @since 1.0.0 |
|
| 347 | - */ |
|
| 348 | - apply_filters('geodir_detail_page_sidebar_content',
|
|
| 349 | - array('geodir_social_sharing_buttons',
|
|
| 350 | - 'geodir_share_this_button', |
|
| 351 | - 'geodir_detail_page_google_analytics', |
|
| 352 | - 'geodir_edit_post_link', |
|
| 353 | - 'geodir_detail_page_review_rating', |
|
| 354 | - 'geodir_detail_page_more_info' |
|
| 355 | - ) // end of array |
|
| 356 | - ); // end of apply filter |
|
| 357 | - if (!empty($arr_detail_page_sidebar_content)) {
|
|
| 358 | - foreach ($arr_detail_page_sidebar_content as $content_function) {
|
|
| 359 | - if (function_exists($content_function)) {
|
|
| 360 | - add_action('geodir_detail_page_sidebar', $content_function);
|
|
| 361 | - } |
|
| 362 | - } |
|
| 363 | - } |
|
| 338 | + $arr_detail_page_sidebar_content = |
|
| 339 | + /** |
|
| 340 | + * An array of functions to be called to be displayed on the details (post) page sidebar. |
|
| 341 | + * |
|
| 342 | + * This filter can be used to remove sections of the details page sidebar, |
|
| 343 | + * add new sections or rearrange the order of the sections. |
|
| 344 | + * |
|
| 345 | + * @param array array('geodir_social_sharing_buttons','geodir_share_this_button','geodir_detail_page_google_analytics','geodir_edit_post_link','geodir_detail_page_review_rating','geodir_detail_page_more_info') The array of functions that will be called.
|
|
| 346 | + * @since 1.0.0 |
|
| 347 | + */ |
|
| 348 | + apply_filters('geodir_detail_page_sidebar_content',
|
|
| 349 | + array('geodir_social_sharing_buttons',
|
|
| 350 | + 'geodir_share_this_button', |
|
| 351 | + 'geodir_detail_page_google_analytics', |
|
| 352 | + 'geodir_edit_post_link', |
|
| 353 | + 'geodir_detail_page_review_rating', |
|
| 354 | + 'geodir_detail_page_more_info' |
|
| 355 | + ) // end of array |
|
| 356 | + ); // end of apply filter |
|
| 357 | + if (!empty($arr_detail_page_sidebar_content)) {
|
|
| 358 | + foreach ($arr_detail_page_sidebar_content as $content_function) {
|
|
| 359 | + if (function_exists($content_function)) {
|
|
| 360 | + add_action('geodir_detail_page_sidebar', $content_function);
|
|
| 361 | + } |
|
| 362 | + } |
|
| 363 | + } |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | add_action('geodir_after_edit_post_link', 'geodir_add_to_favourite_link', 1);
|
@@ -375,14 +375,14 @@ discard block |
||
| 375 | 375 | */ |
| 376 | 376 | function geodir_add_to_favourite_link() |
| 377 | 377 | {
|
| 378 | - global $post, $preview; |
|
| 379 | - if (!$preview && geodir_is_page('detail')) {
|
|
| 380 | - ?> |
|
| 378 | + global $post, $preview; |
|
| 379 | + if (!$preview && geodir_is_page('detail')) {
|
|
| 380 | + ?> |
|
| 381 | 381 | <p class="edit_link"> |
| 382 | 382 | <?php geodir_favourite_html($post->post_author, $post->ID); ?> |
| 383 | 383 | </p> |
| 384 | 384 | <?php |
| 385 | - } |
|
| 385 | + } |
|
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | /** |
@@ -396,41 +396,41 @@ discard block |
||
| 396 | 396 | */ |
| 397 | 397 | function geodir_social_sharing_buttons() |
| 398 | 398 | {
|
| 399 | - global $preview; |
|
| 400 | - ob_start(); // Start buffering; |
|
| 401 | - /** |
|
| 402 | - * This action is called before the social buttons twitter,facebook and google plus are output in a containing div. |
|
| 403 | - * |
|
| 404 | - * @since 1.0.0 |
|
| 405 | - */ |
|
| 406 | - do_action('geodir_before_social_sharing_buttons');
|
|
| 407 | - if (!$preview) {
|
|
| 408 | - ?> |
|
| 399 | + global $preview; |
|
| 400 | + ob_start(); // Start buffering; |
|
| 401 | + /** |
|
| 402 | + * This action is called before the social buttons twitter,facebook and google plus are output in a containing div. |
|
| 403 | + * |
|
| 404 | + * @since 1.0.0 |
|
| 405 | + */ |
|
| 406 | + do_action('geodir_before_social_sharing_buttons');
|
|
| 407 | + if (!$preview) {
|
|
| 408 | + ?> |
|
| 409 | 409 | <div class="likethis"> |
| 410 | 410 | <?php geodir_twitter_tweet_button(); ?> |
| 411 | 411 | <?php geodir_fb_like_button(); ?> |
| 412 | 412 | <?php geodir_google_plus_button(); ?> |
| 413 | 413 | </div> |
| 414 | 414 | <?php |
| 415 | - }// end of if, if its a preview or not |
|
| 416 | - |
|
| 417 | - /** |
|
| 418 | - * This action is called after the social buttons twitter,facebook and google plus are output in a containing div. |
|
| 419 | - * |
|
| 420 | - * @since 1.0.0 |
|
| 421 | - */ |
|
| 422 | - do_action('geodir_after_social_sharing_buttons');
|
|
| 423 | - $content_html = ob_get_clean(); |
|
| 424 | - if (trim($content_html) != '') |
|
| 425 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-social-sharing">' . $content_html . '</div>'; |
|
| 426 | - if ((int)get_option('geodir_disable_tfg_buttons_section') != 1) {
|
|
| 427 | - /** |
|
| 428 | - * Filter the geodir_social_sharing_buttons() function content. |
|
| 429 | - * |
|
| 430 | - * @param string $content_html The output html of the geodir_social_sharing_buttons() function. |
|
| 431 | - */ |
|
| 432 | - echo $content_html = apply_filters('geodir_social_sharing_buttons_html', $content_html);
|
|
| 433 | - } |
|
| 415 | + }// end of if, if its a preview or not |
|
| 416 | + |
|
| 417 | + /** |
|
| 418 | + * This action is called after the social buttons twitter,facebook and google plus are output in a containing div. |
|
| 419 | + * |
|
| 420 | + * @since 1.0.0 |
|
| 421 | + */ |
|
| 422 | + do_action('geodir_after_social_sharing_buttons');
|
|
| 423 | + $content_html = ob_get_clean(); |
|
| 424 | + if (trim($content_html) != '') |
|
| 425 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-social-sharing">' . $content_html . '</div>'; |
|
| 426 | + if ((int)get_option('geodir_disable_tfg_buttons_section') != 1) {
|
|
| 427 | + /** |
|
| 428 | + * Filter the geodir_social_sharing_buttons() function content. |
|
| 429 | + * |
|
| 430 | + * @param string $content_html The output html of the geodir_social_sharing_buttons() function. |
|
| 431 | + */ |
|
| 432 | + echo $content_html = apply_filters('geodir_social_sharing_buttons_html', $content_html);
|
|
| 433 | + } |
|
| 434 | 434 | |
| 435 | 435 | |
| 436 | 436 | } |
@@ -446,39 +446,39 @@ discard block |
||
| 446 | 446 | */ |
| 447 | 447 | function geodir_share_this_button() |
| 448 | 448 | {
|
| 449 | - global $preview; |
|
| 450 | - ob_start(); // Start buffering; |
|
| 451 | - /** |
|
| 452 | - * This is called before the share this html in the function geodir_share_this_button() |
|
| 453 | - * |
|
| 454 | - * @since 1.0.0 |
|
| 455 | - */ |
|
| 456 | - do_action('geodir_before_share_this_button');
|
|
| 457 | - if (!$preview) {
|
|
| 458 | - ?> |
|
| 449 | + global $preview; |
|
| 450 | + ob_start(); // Start buffering; |
|
| 451 | + /** |
|
| 452 | + * This is called before the share this html in the function geodir_share_this_button() |
|
| 453 | + * |
|
| 454 | + * @since 1.0.0 |
|
| 455 | + */ |
|
| 456 | + do_action('geodir_before_share_this_button');
|
|
| 457 | + if (!$preview) {
|
|
| 458 | + ?> |
|
| 459 | 459 | <div class="share clearfix"> |
| 460 | 460 | <?php geodir_share_this_button_code(); ?> |
| 461 | 461 | </div> |
| 462 | 462 | <?php |
| 463 | - }// end of if, if its a preview or not |
|
| 464 | - /** |
|
| 465 | - * This is called after the share this html in the function geodir_share_this_button() |
|
| 466 | - * |
|
| 467 | - * @since 1.0.0 |
|
| 468 | - */ |
|
| 469 | - do_action('geodir_after_share_this_button');
|
|
| 470 | - $content_html = ob_get_clean(); |
|
| 471 | - if (trim($content_html) != '') |
|
| 472 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-sharethis">' . $content_html . '</div>'; |
|
| 473 | - if ((int)get_option('geodir_disable_sharethis_button_section') != 1) {
|
|
| 474 | - /** |
|
| 475 | - * Filter the geodir_share_this_button() function content. |
|
| 476 | - * |
|
| 477 | - * @param string $content_html The output html of the geodir_share_this_button() function. |
|
| 478 | - * @since 1.0.0 |
|
| 479 | - */ |
|
| 480 | - echo $content_html = apply_filters('geodir_share_this_button_html', $content_html);
|
|
| 481 | - } |
|
| 463 | + }// end of if, if its a preview or not |
|
| 464 | + /** |
|
| 465 | + * This is called after the share this html in the function geodir_share_this_button() |
|
| 466 | + * |
|
| 467 | + * @since 1.0.0 |
|
| 468 | + */ |
|
| 469 | + do_action('geodir_after_share_this_button');
|
|
| 470 | + $content_html = ob_get_clean(); |
|
| 471 | + if (trim($content_html) != '') |
|
| 472 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-sharethis">' . $content_html . '</div>'; |
|
| 473 | + if ((int)get_option('geodir_disable_sharethis_button_section') != 1) {
|
|
| 474 | + /** |
|
| 475 | + * Filter the geodir_share_this_button() function content. |
|
| 476 | + * |
|
| 477 | + * @param string $content_html The output html of the geodir_share_this_button() function. |
|
| 478 | + * @since 1.0.0 |
|
| 479 | + */ |
|
| 480 | + echo $content_html = apply_filters('geodir_share_this_button_html', $content_html);
|
|
| 481 | + } |
|
| 482 | 482 | |
| 483 | 483 | } |
| 484 | 484 | |
@@ -494,46 +494,46 @@ discard block |
||
| 494 | 494 | */ |
| 495 | 495 | function geodir_edit_post_link() |
| 496 | 496 | {
|
| 497 | - global $post, $preview; |
|
| 498 | - ob_start(); // Start buffering; |
|
| 499 | - /** |
|
| 500 | - * This is called before the edit post link html in the function geodir_edit_post_link() |
|
| 501 | - * |
|
| 502 | - * @since 1.0.0 |
|
| 503 | - */ |
|
| 504 | - do_action('geodir_before_edit_post_link');
|
|
| 505 | - if (!$preview) {
|
|
| 506 | - $is_current_user_owner = geodir_listing_belong_to_current_user(); |
|
| 497 | + global $post, $preview; |
|
| 498 | + ob_start(); // Start buffering; |
|
| 499 | + /** |
|
| 500 | + * This is called before the edit post link html in the function geodir_edit_post_link() |
|
| 501 | + * |
|
| 502 | + * @since 1.0.0 |
|
| 503 | + */ |
|
| 504 | + do_action('geodir_before_edit_post_link');
|
|
| 505 | + if (!$preview) {
|
|
| 506 | + $is_current_user_owner = geodir_listing_belong_to_current_user(); |
|
| 507 | 507 | |
| 508 | - if ($is_current_user_owner) {
|
|
| 509 | - $post_id = $post->ID; |
|
| 508 | + if ($is_current_user_owner) {
|
|
| 509 | + $post_id = $post->ID; |
|
| 510 | 510 | |
| 511 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
|
|
| 512 | - $post_id = (int)$_REQUEST['pid']; |
|
| 513 | - } |
|
| 511 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') {
|
|
| 512 | + $post_id = (int)$_REQUEST['pid']; |
|
| 513 | + } |
|
| 514 | 514 | |
| 515 | - $postlink = get_permalink(geodir_add_listing_page_id()); |
|
| 516 | - $editlink = geodir_getlink($postlink, array('pid' => $post_id), false);
|
|
| 517 | - echo ' <p class="edit_link"><i class="fa fa-pencil"></i> <a href="' . esc_url($editlink) . '">' . __('Edit this Post', 'geodirectory') . '</a></p>';
|
|
| 518 | - } |
|
| 519 | - }// end of if, if its a preview or not |
|
| 520 | - /** |
|
| 521 | - * This is called after the edit post link html in the function geodir_edit_post_link() |
|
| 522 | - * |
|
| 523 | - * @since 1.0.0 |
|
| 524 | - */ |
|
| 525 | - do_action('geodir_after_edit_post_link');
|
|
| 526 | - $content_html = ob_get_clean(); |
|
| 527 | - if (trim($content_html) != '') |
|
| 528 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-user-links">' . $content_html . '</div>'; |
|
| 529 | - if ((int)get_option('geodir_disable_user_links_section') != 1) {
|
|
| 530 | - /** |
|
| 531 | - * Filter the geodir_edit_post_link() function content. |
|
| 532 | - * |
|
| 533 | - * @param string $content_html The output html of the geodir_edit_post_link() function. |
|
| 534 | - */ |
|
| 535 | - echo $content_html = apply_filters('geodir_edit_post_link_html', $content_html);
|
|
| 536 | - } |
|
| 515 | + $postlink = get_permalink(geodir_add_listing_page_id()); |
|
| 516 | + $editlink = geodir_getlink($postlink, array('pid' => $post_id), false);
|
|
| 517 | + echo ' <p class="edit_link"><i class="fa fa-pencil"></i> <a href="' . esc_url($editlink) . '">' . __('Edit this Post', 'geodirectory') . '</a></p>';
|
|
| 518 | + } |
|
| 519 | + }// end of if, if its a preview or not |
|
| 520 | + /** |
|
| 521 | + * This is called after the edit post link html in the function geodir_edit_post_link() |
|
| 522 | + * |
|
| 523 | + * @since 1.0.0 |
|
| 524 | + */ |
|
| 525 | + do_action('geodir_after_edit_post_link');
|
|
| 526 | + $content_html = ob_get_clean(); |
|
| 527 | + if (trim($content_html) != '') |
|
| 528 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-user-links">' . $content_html . '</div>'; |
|
| 529 | + if ((int)get_option('geodir_disable_user_links_section') != 1) {
|
|
| 530 | + /** |
|
| 531 | + * Filter the geodir_edit_post_link() function content. |
|
| 532 | + * |
|
| 533 | + * @param string $content_html The output html of the geodir_edit_post_link() function. |
|
| 534 | + */ |
|
| 535 | + echo $content_html = apply_filters('geodir_edit_post_link_html', $content_html);
|
|
| 536 | + } |
|
| 537 | 537 | } |
| 538 | 538 | |
| 539 | 539 | /** |
@@ -547,41 +547,41 @@ discard block |
||
| 547 | 547 | */ |
| 548 | 548 | function geodir_detail_page_google_analytics() |
| 549 | 549 | {
|
| 550 | - global $post; |
|
| 551 | - $package_info = array(); |
|
| 552 | - $package_info = geodir_post_package_info($package_info, $post); |
|
| 550 | + global $post; |
|
| 551 | + $package_info = array(); |
|
| 552 | + $package_info = geodir_post_package_info($package_info, $post); |
|
| 553 | 553 | |
| 554 | - $id = trim(get_option('geodir_ga_id'));
|
|
| 554 | + $id = trim(get_option('geodir_ga_id'));
|
|
| 555 | 555 | |
| 556 | - if (!$id) {
|
|
| 557 | - return; //if no Google Analytics ID then bail. |
|
| 558 | - } |
|
| 556 | + if (!$id) {
|
|
| 557 | + return; //if no Google Analytics ID then bail. |
|
| 558 | + } |
|
| 559 | 559 | |
| 560 | - ob_start(); // Start buffering; |
|
| 561 | - /** |
|
| 562 | - * This is called before the edit post link html in the function geodir_detail_page_google_analytics() |
|
| 563 | - * |
|
| 564 | - * @since 1.0.0 |
|
| 565 | - */ |
|
| 566 | - do_action('geodir_before_google_analytics');
|
|
| 560 | + ob_start(); // Start buffering; |
|
| 561 | + /** |
|
| 562 | + * This is called before the edit post link html in the function geodir_detail_page_google_analytics() |
|
| 563 | + * |
|
| 564 | + * @since 1.0.0 |
|
| 565 | + */ |
|
| 566 | + do_action('geodir_before_google_analytics');
|
|
| 567 | 567 | |
| 568 | - $refresh_time = get_option('geodir_ga_refresh_time', 5);
|
|
| 569 | - /** |
|
| 570 | - * Filter the time interval to check & refresh new users results. |
|
| 571 | - * |
|
| 572 | - * @since 1.5.9 |
|
| 573 | - * |
|
| 574 | - * @param int $refresh_time Time interval to check & refresh new users results. |
|
| 575 | - */ |
|
| 576 | - $refresh_time = apply_filters('geodir_google_analytics_refresh_time', $refresh_time);
|
|
| 577 | - $refresh_time = absint($refresh_time * 1000); |
|
| 568 | + $refresh_time = get_option('geodir_ga_refresh_time', 5);
|
|
| 569 | + /** |
|
| 570 | + * Filter the time interval to check & refresh new users results. |
|
| 571 | + * |
|
| 572 | + * @since 1.5.9 |
|
| 573 | + * |
|
| 574 | + * @param int $refresh_time Time interval to check & refresh new users results. |
|
| 575 | + */ |
|
| 576 | + $refresh_time = apply_filters('geodir_google_analytics_refresh_time', $refresh_time);
|
|
| 577 | + $refresh_time = absint($refresh_time * 1000); |
|
| 578 | 578 | |
| 579 | - $hide_refresh = get_option('geodir_ga_auto_refresh');
|
|
| 579 | + $hide_refresh = get_option('geodir_ga_auto_refresh');
|
|
| 580 | 580 | |
| 581 | - $auto_refresh = $hide_refresh && $refresh_time && $refresh_time > 0 ? 1 : 0; |
|
| 582 | - if (get_option('geodir_ga_stats') && is_user_logged_in() && (isset($package_info->google_analytics) && $package_info->google_analytics == '1') && (get_current_user_id()==$post->post_author || current_user_can( 'manage_options' )) ) {
|
|
| 583 | - $page_url = urlencode($_SERVER['REQUEST_URI']); |
|
| 584 | - ?> |
|
| 581 | + $auto_refresh = $hide_refresh && $refresh_time && $refresh_time > 0 ? 1 : 0; |
|
| 582 | + if (get_option('geodir_ga_stats') && is_user_logged_in() && (isset($package_info->google_analytics) && $package_info->google_analytics == '1') && (get_current_user_id()==$post->post_author || current_user_can( 'manage_options' )) ) {
|
|
| 583 | + $page_url = urlencode($_SERVER['REQUEST_URI']); |
|
| 584 | + ?> |
|
| 585 | 585 | <script type="text/javascript"> |
| 586 | 586 | var gd_gaTimeOut; |
| 587 | 587 | var gd_gaTime = parseInt('<?php echo $refresh_time;?>');
|
@@ -833,15 +833,15 @@ discard block |
||
| 833 | 833 | var labels = results[1].rows.map(function(row) { return +row[0]; });
|
| 834 | 834 | |
| 835 | 835 | <?php |
| 836 | - // Here we list the shorthand days of the week so it can be used in translation. |
|
| 837 | - __("Mon",'geodirectory');
|
|
| 838 | - __("Tue",'geodirectory');
|
|
| 839 | - __("Wed",'geodirectory');
|
|
| 840 | - __("Thu",'geodirectory');
|
|
| 841 | - __("Fri",'geodirectory');
|
|
| 842 | - __("Sat",'geodirectory');
|
|
| 843 | - __("Sun",'geodirectory');
|
|
| 844 | - ?> |
|
| 836 | + // Here we list the shorthand days of the week so it can be used in translation. |
|
| 837 | + __("Mon",'geodirectory');
|
|
| 838 | + __("Tue",'geodirectory');
|
|
| 839 | + __("Wed",'geodirectory');
|
|
| 840 | + __("Thu",'geodirectory');
|
|
| 841 | + __("Fri",'geodirectory');
|
|
| 842 | + __("Sat",'geodirectory');
|
|
| 843 | + __("Sun",'geodirectory');
|
|
| 844 | + ?> |
|
| 845 | 845 | |
| 846 | 846 | labels = [ |
| 847 | 847 | "<?php _e(date('D', strtotime("+1 day")),'geodirectory'); ?>",
|
@@ -1090,24 +1090,24 @@ discard block |
||
| 1090 | 1090 | </span> |
| 1091 | 1091 | |
| 1092 | 1092 | <?php |
| 1093 | - } |
|
| 1094 | - /** |
|
| 1095 | - * This is called after the edit post link html in the function geodir_detail_page_google_analytics() |
|
| 1096 | - * |
|
| 1097 | - * @since 1.0.0 |
|
| 1098 | - */ |
|
| 1099 | - do_action('geodir_after_google_analytics');
|
|
| 1100 | - $content_html = ob_get_clean(); |
|
| 1101 | - if (trim($content_html) != '') |
|
| 1102 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-google-analytics">' . $content_html . '</div>'; |
|
| 1103 | - if ((int)get_option('geodir_disable_google_analytics_section') != 1) {
|
|
| 1104 | - /** |
|
| 1105 | - * Filter the geodir_edit_post_link() function content. |
|
| 1106 | - * |
|
| 1107 | - * @param string $content_html The output html of the geodir_edit_post_link() function. |
|
| 1108 | - */ |
|
| 1109 | - echo $content_html = apply_filters('geodir_google_analytic_html', $content_html);
|
|
| 1110 | - } |
|
| 1093 | + } |
|
| 1094 | + /** |
|
| 1095 | + * This is called after the edit post link html in the function geodir_detail_page_google_analytics() |
|
| 1096 | + * |
|
| 1097 | + * @since 1.0.0 |
|
| 1098 | + */ |
|
| 1099 | + do_action('geodir_after_google_analytics');
|
|
| 1100 | + $content_html = ob_get_clean(); |
|
| 1101 | + if (trim($content_html) != '') |
|
| 1102 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-google-analytics">' . $content_html . '</div>'; |
|
| 1103 | + if ((int)get_option('geodir_disable_google_analytics_section') != 1) {
|
|
| 1104 | + /** |
|
| 1105 | + * Filter the geodir_edit_post_link() function content. |
|
| 1106 | + * |
|
| 1107 | + * @param string $content_html The output html of the geodir_edit_post_link() function. |
|
| 1108 | + */ |
|
| 1109 | + echo $content_html = apply_filters('geodir_google_analytic_html', $content_html);
|
|
| 1110 | + } |
|
| 1111 | 1111 | } |
| 1112 | 1112 | |
| 1113 | 1113 | /** |
@@ -1123,90 +1123,90 @@ discard block |
||
| 1123 | 1123 | */ |
| 1124 | 1124 | function geodir_detail_page_review_rating() |
| 1125 | 1125 | {
|
| 1126 | - global $post, $preview, $post_images; |
|
| 1127 | - ob_start(); // Start buffering; |
|
| 1128 | - /** |
|
| 1129 | - * This is called before the rating html in the function geodir_detail_page_review_rating(). |
|
| 1130 | - * |
|
| 1131 | - * This is called outside the check for an actual rating and the check for preview page. |
|
| 1132 | - * |
|
| 1133 | - * @since 1.0.0 |
|
| 1134 | - */ |
|
| 1135 | - do_action('geodir_before_detail_page_review_rating');
|
|
| 1136 | - |
|
| 1137 | - $comment_count = geodir_get_review_count_total($post->ID); |
|
| 1138 | - $post_avgratings = geodir_get_post_rating($post->ID); |
|
| 1139 | - |
|
| 1140 | - if ($post_avgratings != 0 && !$preview) {
|
|
| 1141 | - /** |
|
| 1142 | - * This is called before the rating html in the function geodir_detail_page_review_rating(). |
|
| 1143 | - * |
|
| 1144 | - * This is called inside the check for an actual rating and the check for preview page. |
|
| 1145 | - * |
|
| 1146 | - * @since 1.0.0 |
|
| 1147 | - * @param float $post_avgratings Average rating for the surrent post. |
|
| 1148 | - * @param int $post->ID Current post ID. |
|
| 1149 | - */ |
|
| 1150 | - do_action('geodir_before_review_rating_stars_on_detail', $post_avgratings, $post->ID);
|
|
| 1151 | - |
|
| 1152 | - $html = '<p style=" float:left;">'; |
|
| 1153 | - $html .= geodir_get_rating_stars($post_avgratings, $post->ID); |
|
| 1154 | - $html .= '<div class="average-review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate">'; |
|
| 1155 | - $post_avgratings = (is_float($post_avgratings) || (strpos($post_avgratings, ".", 1) == 1 && strlen($post_avgratings) > 3)) ? number_format($post_avgratings, 1, '.', '') : $post_avgratings; |
|
| 1126 | + global $post, $preview, $post_images; |
|
| 1127 | + ob_start(); // Start buffering; |
|
| 1128 | + /** |
|
| 1129 | + * This is called before the rating html in the function geodir_detail_page_review_rating(). |
|
| 1130 | + * |
|
| 1131 | + * This is called outside the check for an actual rating and the check for preview page. |
|
| 1132 | + * |
|
| 1133 | + * @since 1.0.0 |
|
| 1134 | + */ |
|
| 1135 | + do_action('geodir_before_detail_page_review_rating');
|
|
| 1136 | + |
|
| 1137 | + $comment_count = geodir_get_review_count_total($post->ID); |
|
| 1138 | + $post_avgratings = geodir_get_post_rating($post->ID); |
|
| 1139 | + |
|
| 1140 | + if ($post_avgratings != 0 && !$preview) {
|
|
| 1141 | + /** |
|
| 1142 | + * This is called before the rating html in the function geodir_detail_page_review_rating(). |
|
| 1143 | + * |
|
| 1144 | + * This is called inside the check for an actual rating and the check for preview page. |
|
| 1145 | + * |
|
| 1146 | + * @since 1.0.0 |
|
| 1147 | + * @param float $post_avgratings Average rating for the surrent post. |
|
| 1148 | + * @param int $post->ID Current post ID. |
|
| 1149 | + */ |
|
| 1150 | + do_action('geodir_before_review_rating_stars_on_detail', $post_avgratings, $post->ID);
|
|
| 1151 | + |
|
| 1152 | + $html = '<p style=" float:left;">'; |
|
| 1153 | + $html .= geodir_get_rating_stars($post_avgratings, $post->ID); |
|
| 1154 | + $html .= '<div class="average-review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate">'; |
|
| 1155 | + $post_avgratings = (is_float($post_avgratings) || (strpos($post_avgratings, ".", 1) == 1 && strlen($post_avgratings) > 3)) ? number_format($post_avgratings, 1, '.', '') : $post_avgratings; |
|
| 1156 | 1156 | |
| 1157 | 1157 | $reviews_text = $comment_count > 1 ? __("reviews", 'geodirectory') : __("review", 'geodirectory');
|
| 1158 | 1158 | |
| 1159 | 1159 | $html .= '<span itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating"><span class="rating" itemprop="average" content="' . $post_avgratings . '">' . $post_avgratings . '</span> / <span itemprop="best" content="5">5</span> ' . __("based on", 'geodirectory') . ' </span><span class="count" itemprop="count" content="' . $comment_count . '">' . $comment_count . ' ' . $reviews_text . '</span><br />';
|
| 1160 | 1160 | |
| 1161 | - $html .= '<span class="item">'; |
|
| 1162 | - $html .= '<span class="fn" itemprop="itemreviewed">' . $post->post_title . '</span>'; |
|
| 1161 | + $html .= '<span class="item">'; |
|
| 1162 | + $html .= '<span class="fn" itemprop="itemreviewed">' . $post->post_title . '</span>'; |
|
| 1163 | 1163 | |
| 1164 | - if ($post_images) {
|
|
| 1165 | - foreach ($post_images as $img) {
|
|
| 1166 | - $post_img = $img->src; |
|
| 1167 | - break; |
|
| 1168 | - } |
|
| 1169 | - } |
|
| 1170 | - |
|
| 1171 | - if (isset($post_img) && $post_img) {
|
|
| 1172 | - $html .= '<br /><img src="' . $post_img . '" class="photo" alt="' . esc_attr($post->post_title) . '" itemprop="photo" content="' . $post_img . '" class="photo" />'; |
|
| 1173 | - } |
|
| 1174 | - |
|
| 1175 | - $html .= '</span>'; |
|
| 1176 | - |
|
| 1177 | - echo $html .= '</div>'; |
|
| 1178 | - /** |
|
| 1179 | - * This is called after the rating html in the function geodir_detail_page_review_rating(). |
|
| 1180 | - * |
|
| 1181 | - * This is called inside the check for an actual rating and the check for preview page. |
|
| 1182 | - * |
|
| 1183 | - * @since 1.0.0 |
|
| 1184 | - * @param float $post_avgratings Average rating for the surrent post. |
|
| 1185 | - * @param int $post->ID Current post ID. |
|
| 1186 | - */ |
|
| 1187 | - do_action('geodir_after_review_rating_stars_on_detail', $post_avgratings, $post->ID);
|
|
| 1188 | - } |
|
| 1189 | - /** |
|
| 1190 | - * This is called before the rating html in the function geodir_detail_page_review_rating(). |
|
| 1191 | - * |
|
| 1192 | - * This is called outside the check for an actual rating and the check for preview page. |
|
| 1193 | - * |
|
| 1194 | - * @since 1.0.0 |
|
| 1195 | - */ |
|
| 1196 | - do_action('geodir_after_detail_page_review_rating');
|
|
| 1197 | - $content_html = ob_get_clean(); |
|
| 1198 | - if (trim($content_html) != '') {
|
|
| 1199 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-rating">' . $content_html . '</div>'; |
|
| 1200 | - } |
|
| 1201 | - if ((int)get_option('geodir_disable_rating_info_section') != 1) {
|
|
| 1202 | - /** |
|
| 1203 | - * Filter the geodir_detail_page_review_rating() function content. |
|
| 1204 | - * |
|
| 1205 | - * @since 1.0.0 |
|
| 1206 | - * @param string $content_html The output html of the geodir_detail_page_review_rating() function. |
|
| 1207 | - */ |
|
| 1208 | - echo $content_html = apply_filters('geodir_detail_page_review_rating_html', $content_html);
|
|
| 1209 | - } |
|
| 1164 | + if ($post_images) {
|
|
| 1165 | + foreach ($post_images as $img) {
|
|
| 1166 | + $post_img = $img->src; |
|
| 1167 | + break; |
|
| 1168 | + } |
|
| 1169 | + } |
|
| 1170 | + |
|
| 1171 | + if (isset($post_img) && $post_img) {
|
|
| 1172 | + $html .= '<br /><img src="' . $post_img . '" class="photo" alt="' . esc_attr($post->post_title) . '" itemprop="photo" content="' . $post_img . '" class="photo" />'; |
|
| 1173 | + } |
|
| 1174 | + |
|
| 1175 | + $html .= '</span>'; |
|
| 1176 | + |
|
| 1177 | + echo $html .= '</div>'; |
|
| 1178 | + /** |
|
| 1179 | + * This is called after the rating html in the function geodir_detail_page_review_rating(). |
|
| 1180 | + * |
|
| 1181 | + * This is called inside the check for an actual rating and the check for preview page. |
|
| 1182 | + * |
|
| 1183 | + * @since 1.0.0 |
|
| 1184 | + * @param float $post_avgratings Average rating for the surrent post. |
|
| 1185 | + * @param int $post->ID Current post ID. |
|
| 1186 | + */ |
|
| 1187 | + do_action('geodir_after_review_rating_stars_on_detail', $post_avgratings, $post->ID);
|
|
| 1188 | + } |
|
| 1189 | + /** |
|
| 1190 | + * This is called before the rating html in the function geodir_detail_page_review_rating(). |
|
| 1191 | + * |
|
| 1192 | + * This is called outside the check for an actual rating and the check for preview page. |
|
| 1193 | + * |
|
| 1194 | + * @since 1.0.0 |
|
| 1195 | + */ |
|
| 1196 | + do_action('geodir_after_detail_page_review_rating');
|
|
| 1197 | + $content_html = ob_get_clean(); |
|
| 1198 | + if (trim($content_html) != '') {
|
|
| 1199 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-rating">' . $content_html . '</div>'; |
|
| 1200 | + } |
|
| 1201 | + if ((int)get_option('geodir_disable_rating_info_section') != 1) {
|
|
| 1202 | + /** |
|
| 1203 | + * Filter the geodir_detail_page_review_rating() function content. |
|
| 1204 | + * |
|
| 1205 | + * @since 1.0.0 |
|
| 1206 | + * @param string $content_html The output html of the geodir_detail_page_review_rating() function. |
|
| 1207 | + */ |
|
| 1208 | + echo $content_html = apply_filters('geodir_detail_page_review_rating_html', $content_html);
|
|
| 1209 | + } |
|
| 1210 | 1210 | } |
| 1211 | 1211 | |
| 1212 | 1212 | /** |
@@ -1218,35 +1218,35 @@ discard block |
||
| 1218 | 1218 | */ |
| 1219 | 1219 | function geodir_detail_page_more_info() |
| 1220 | 1220 | {
|
| 1221 | - ob_start(); // Start buffering; |
|
| 1222 | - /** |
|
| 1223 | - * This is called before the info section html. |
|
| 1224 | - * |
|
| 1225 | - * @since 1.0.0 |
|
| 1226 | - */ |
|
| 1227 | - do_action('geodir_before_detail_page_more_info');
|
|
| 1228 | - if ($geodir_post_detail_fields = geodir_show_listing_info('detail')) {
|
|
| 1229 | - echo $geodir_post_detail_fields; |
|
| 1230 | - } |
|
| 1231 | - /** |
|
| 1232 | - * This is called after the info section html. |
|
| 1233 | - * |
|
| 1234 | - * @since 1.0.0 |
|
| 1235 | - */ |
|
| 1236 | - do_action('geodir_after_detail_page_more_info');
|
|
| 1237 | - |
|
| 1238 | - $content_html = ob_get_clean(); |
|
| 1239 | - if (trim($content_html) != '') |
|
| 1240 | - $content_html = '<div class="geodir-company_info geodir-details-sidebar-listing-info">' . $content_html . '</div>'; |
|
| 1241 | - if ((int)get_option('geodir_disable_listing_info_section') != 1) {
|
|
| 1242 | - /** |
|
| 1243 | - * Filter the output html for function geodir_detail_page_more_info(). |
|
| 1244 | - * |
|
| 1245 | - * @since 1.0.0 |
|
| 1246 | - * @param string $content_html The output html of the geodir_detail_page_more_info() function. |
|
| 1247 | - */ |
|
| 1248 | - echo $content_html = apply_filters('geodir_detail_page_more_info_html', $content_html);
|
|
| 1249 | - } |
|
| 1221 | + ob_start(); // Start buffering; |
|
| 1222 | + /** |
|
| 1223 | + * This is called before the info section html. |
|
| 1224 | + * |
|
| 1225 | + * @since 1.0.0 |
|
| 1226 | + */ |
|
| 1227 | + do_action('geodir_before_detail_page_more_info');
|
|
| 1228 | + if ($geodir_post_detail_fields = geodir_show_listing_info('detail')) {
|
|
| 1229 | + echo $geodir_post_detail_fields; |
|
| 1230 | + } |
|
| 1231 | + /** |
|
| 1232 | + * This is called after the info section html. |
|
| 1233 | + * |
|
| 1234 | + * @since 1.0.0 |
|
| 1235 | + */ |
|
| 1236 | + do_action('geodir_after_detail_page_more_info');
|
|
| 1237 | + |
|
| 1238 | + $content_html = ob_get_clean(); |
|
| 1239 | + if (trim($content_html) != '') |
|
| 1240 | + $content_html = '<div class="geodir-company_info geodir-details-sidebar-listing-info">' . $content_html . '</div>'; |
|
| 1241 | + if ((int)get_option('geodir_disable_listing_info_section') != 1) {
|
|
| 1242 | + /** |
|
| 1243 | + * Filter the output html for function geodir_detail_page_more_info(). |
|
| 1244 | + * |
|
| 1245 | + * @since 1.0.0 |
|
| 1246 | + * @param string $content_html The output html of the geodir_detail_page_more_info() function. |
|
| 1247 | + */ |
|
| 1248 | + echo $content_html = apply_filters('geodir_detail_page_more_info_html', $content_html);
|
|
| 1249 | + } |
|
| 1250 | 1250 | } |
| 1251 | 1251 | |
| 1252 | 1252 | |
@@ -1260,15 +1260,15 @@ discard block |
||
| 1260 | 1260 | */ |
| 1261 | 1261 | function geodir_localize_all_js_msg() |
| 1262 | 1262 | {// check_ajax_referer function is used to make sure no files are uplaoded remotly but it will fail if used between https and non https so we do the check below of the urls
|
| 1263 | - if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) {
|
|
| 1264 | - $ajax_url = admin_url('admin-ajax.php');
|
|
| 1265 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) {
|
|
| 1266 | - $ajax_url = admin_url('admin-ajax.php');
|
|
| 1267 | - } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) {
|
|
| 1268 | - $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php'));
|
|
| 1269 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) {
|
|
| 1270 | - $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php'));
|
|
| 1271 | - } |
|
| 1263 | + if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) {
|
|
| 1264 | + $ajax_url = admin_url('admin-ajax.php');
|
|
| 1265 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) {
|
|
| 1266 | + $ajax_url = admin_url('admin-ajax.php');
|
|
| 1267 | + } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) {
|
|
| 1268 | + $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php'));
|
|
| 1269 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) {
|
|
| 1270 | + $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php'));
|
|
| 1271 | + } |
|
| 1272 | 1272 | |
| 1273 | 1273 | /** |
| 1274 | 1274 | * Filter the allowed image type extensions for post images. |
@@ -1278,60 +1278,60 @@ discard block |
||
| 1278 | 1278 | */ |
| 1279 | 1279 | $allowed_img_types = apply_filters('geodir_allowed_post_image_exts', array('jpg', 'jpeg', 'jpe', 'gif', 'png'));
|
| 1280 | 1280 | |
| 1281 | - $default_marker_icon = get_option('geodir_default_marker_icon');
|
|
| 1282 | - $default_marker_size = geodir_get_marker_size($default_marker_icon, array('w' => 20, 'h' => 34));
|
|
| 1283 | - $default_marker_width = $default_marker_size['w']; |
|
| 1284 | - $default_marker_height = $default_marker_size['h']; |
|
| 1281 | + $default_marker_icon = get_option('geodir_default_marker_icon');
|
|
| 1282 | + $default_marker_size = geodir_get_marker_size($default_marker_icon, array('w' => 20, 'h' => 34));
|
|
| 1283 | + $default_marker_width = $default_marker_size['w']; |
|
| 1284 | + $default_marker_height = $default_marker_size['h']; |
|
| 1285 | 1285 | |
| 1286 | - $arr_alert_msg = array( |
|
| 1287 | - 'geodir_plugin_url' => geodir_plugin_url(), |
|
| 1288 | - 'geodir_admin_ajax_url' => $ajax_url, |
|
| 1289 | - 'custom_field_not_blank_var' => __('HTML Variable Name must not be blank', 'geodirectory'),
|
|
| 1290 | - 'custom_field_not_special_char' => __('Please do not use special character and spaces in HTML Variable Name.', 'geodirectory'),
|
|
| 1291 | - 'custom_field_unique_name' => __('HTML Variable Name should be a unique name.', 'geodirectory'),
|
|
| 1292 | - 'custom_field_delete' => __('Are you wish to delete this field?', 'geodirectory'),
|
|
| 1293 | - //start not show alert msg |
|
| 1294 | - 'tax_meta_class_succ_del_msg' => __('File has been successfully deleted.', 'geodirectory'),
|
|
| 1295 | - 'tax_meta_class_not_permission_to_del_msg' => __('You do NOT have permission to delete this file.', 'geodirectory'),
|
|
| 1296 | - 'tax_meta_class_order_save_msg' => __('Order saved!', 'geodirectory'),
|
|
| 1297 | - 'tax_meta_class_not_permission_record_img_msg' => __('You do not have permission to reorder images.', 'geodirectory'),
|
|
| 1298 | - 'address_not_found_on_map_msg' => __('Address not found for:', 'geodirectory'),
|
|
| 1299 | - // end not show alert msg |
|
| 1300 | - 'my_place_listing_del' => __('Are you wish to delete this listing?', 'geodirectory'),
|
|
| 1301 | - 'my_main_listing_del' => __('Deleting the main listing of a franchise will turn all franchises in regular listings. Are you sure wish to delete this main listing?', 'geodirectory'),
|
|
| 1302 | - //start not show alert msg |
|
| 1303 | - 'rating_error_msg' => __('Error : please retry', 'geodirectory'),
|
|
| 1304 | - 'listing_url_prefix_msg' => __('Please enter listing url prefix', 'geodirectory'),
|
|
| 1305 | - 'invalid_listing_prefix_msg' => __('Invalid character in listing url prefix', 'geodirectory'),
|
|
| 1306 | - 'location_url_prefix_msg' => __('Please enter location url prefix', 'geodirectory'),
|
|
| 1307 | - 'invalid_location_prefix_msg' => __('Invalid character in location url prefix', 'geodirectory'),
|
|
| 1308 | - 'location_and_cat_url_separator_msg' => __('Please enter location and category url separator', 'geodirectory'),
|
|
| 1309 | - 'invalid_char_and_cat_url_separator_msg' => __('Invalid character in location and category url separator', 'geodirectory'),
|
|
| 1310 | - 'listing_det_url_separator_msg' => __('Please enter listing detail url separator', 'geodirectory'),
|
|
| 1311 | - 'invalid_char_listing_det_url_separator_msg' => __('Invalid character in listing detail url separator', 'geodirectory'),
|
|
| 1312 | - 'loading_listing_error_favorite' => __('Error loading listing.', 'geodirectory'),
|
|
| 1313 | - 'geodir_field_id_required' => __('This field is required.', 'geodirectory'),
|
|
| 1314 | - 'geodir_valid_email_address_msg' => __('Please enter valid email address.', 'geodirectory'),
|
|
| 1315 | - 'geodir_default_marker_icon' => $default_marker_icon, |
|
| 1316 | - 'geodir_default_marker_w' => $default_marker_width, |
|
| 1317 | - 'geodir_default_marker_h' => $default_marker_height, |
|
| 1318 | - 'geodir_latitude_error_msg' => GEODIR_LATITUDE_ERROR_MSG, |
|
| 1319 | - 'geodir_longgitude_error_msg' => GEODIR_LOGNGITUDE_ERROR_MSG, |
|
| 1320 | - 'geodir_default_rating_star_icon' => get_option('geodir_default_rating_star_icon'),
|
|
| 1321 | - 'gd_cmt_btn_post_reply' => __('Post Reply', 'geodirectory'),
|
|
| 1322 | - 'gd_cmt_btn_reply_text' => __('Reply text', 'geodirectory'),
|
|
| 1323 | - 'gd_cmt_btn_post_review' => __('Post Review', 'geodirectory'),
|
|
| 1324 | - 'gd_cmt_btn_review_text' => __('Review text', 'geodirectory'),
|
|
| 1325 | - 'gd_cmt_err_no_rating' => __("Please select star rating, you can't leave a review without stars.", 'geodirectory'),
|
|
| 1326 | - /* on/off dragging for phone devices */ |
|
| 1327 | - 'geodir_onoff_dragging' => get_option('geodir_map_onoff_dragging') ? true : false,
|
|
| 1328 | - 'geodir_is_mobile' => wp_is_mobile() ? true : false, |
|
| 1329 | - 'geodir_on_dragging_text' => __('Enable Dragging', 'geodirectory'),
|
|
| 1330 | - 'geodir_off_dragging_text' => __('Disable Dragging', 'geodirectory'),
|
|
| 1331 | - 'geodir_err_max_file_size' => __('File size error : You tried to upload a file over %s', 'geodirectory'),
|
|
| 1332 | - 'geodir_err_file_upload_limit' => __('You have reached your upload limit of %s files.', 'geodirectory'),
|
|
| 1333 | - 'geodir_err_pkg_upload_limit' => __('You may only upload %s files with this package, please try again.', 'geodirectory'),
|
|
| 1334 | - 'geodir_action_remove' => __('Remove', 'geodirectory'),
|
|
| 1286 | + $arr_alert_msg = array( |
|
| 1287 | + 'geodir_plugin_url' => geodir_plugin_url(), |
|
| 1288 | + 'geodir_admin_ajax_url' => $ajax_url, |
|
| 1289 | + 'custom_field_not_blank_var' => __('HTML Variable Name must not be blank', 'geodirectory'),
|
|
| 1290 | + 'custom_field_not_special_char' => __('Please do not use special character and spaces in HTML Variable Name.', 'geodirectory'),
|
|
| 1291 | + 'custom_field_unique_name' => __('HTML Variable Name should be a unique name.', 'geodirectory'),
|
|
| 1292 | + 'custom_field_delete' => __('Are you wish to delete this field?', 'geodirectory'),
|
|
| 1293 | + //start not show alert msg |
|
| 1294 | + 'tax_meta_class_succ_del_msg' => __('File has been successfully deleted.', 'geodirectory'),
|
|
| 1295 | + 'tax_meta_class_not_permission_to_del_msg' => __('You do NOT have permission to delete this file.', 'geodirectory'),
|
|
| 1296 | + 'tax_meta_class_order_save_msg' => __('Order saved!', 'geodirectory'),
|
|
| 1297 | + 'tax_meta_class_not_permission_record_img_msg' => __('You do not have permission to reorder images.', 'geodirectory'),
|
|
| 1298 | + 'address_not_found_on_map_msg' => __('Address not found for:', 'geodirectory'),
|
|
| 1299 | + // end not show alert msg |
|
| 1300 | + 'my_place_listing_del' => __('Are you wish to delete this listing?', 'geodirectory'),
|
|
| 1301 | + 'my_main_listing_del' => __('Deleting the main listing of a franchise will turn all franchises in regular listings. Are you sure wish to delete this main listing?', 'geodirectory'),
|
|
| 1302 | + //start not show alert msg |
|
| 1303 | + 'rating_error_msg' => __('Error : please retry', 'geodirectory'),
|
|
| 1304 | + 'listing_url_prefix_msg' => __('Please enter listing url prefix', 'geodirectory'),
|
|
| 1305 | + 'invalid_listing_prefix_msg' => __('Invalid character in listing url prefix', 'geodirectory'),
|
|
| 1306 | + 'location_url_prefix_msg' => __('Please enter location url prefix', 'geodirectory'),
|
|
| 1307 | + 'invalid_location_prefix_msg' => __('Invalid character in location url prefix', 'geodirectory'),
|
|
| 1308 | + 'location_and_cat_url_separator_msg' => __('Please enter location and category url separator', 'geodirectory'),
|
|
| 1309 | + 'invalid_char_and_cat_url_separator_msg' => __('Invalid character in location and category url separator', 'geodirectory'),
|
|
| 1310 | + 'listing_det_url_separator_msg' => __('Please enter listing detail url separator', 'geodirectory'),
|
|
| 1311 | + 'invalid_char_listing_det_url_separator_msg' => __('Invalid character in listing detail url separator', 'geodirectory'),
|
|
| 1312 | + 'loading_listing_error_favorite' => __('Error loading listing.', 'geodirectory'),
|
|
| 1313 | + 'geodir_field_id_required' => __('This field is required.', 'geodirectory'),
|
|
| 1314 | + 'geodir_valid_email_address_msg' => __('Please enter valid email address.', 'geodirectory'),
|
|
| 1315 | + 'geodir_default_marker_icon' => $default_marker_icon, |
|
| 1316 | + 'geodir_default_marker_w' => $default_marker_width, |
|
| 1317 | + 'geodir_default_marker_h' => $default_marker_height, |
|
| 1318 | + 'geodir_latitude_error_msg' => GEODIR_LATITUDE_ERROR_MSG, |
|
| 1319 | + 'geodir_longgitude_error_msg' => GEODIR_LOGNGITUDE_ERROR_MSG, |
|
| 1320 | + 'geodir_default_rating_star_icon' => get_option('geodir_default_rating_star_icon'),
|
|
| 1321 | + 'gd_cmt_btn_post_reply' => __('Post Reply', 'geodirectory'),
|
|
| 1322 | + 'gd_cmt_btn_reply_text' => __('Reply text', 'geodirectory'),
|
|
| 1323 | + 'gd_cmt_btn_post_review' => __('Post Review', 'geodirectory'),
|
|
| 1324 | + 'gd_cmt_btn_review_text' => __('Review text', 'geodirectory'),
|
|
| 1325 | + 'gd_cmt_err_no_rating' => __("Please select star rating, you can't leave a review without stars.", 'geodirectory'),
|
|
| 1326 | + /* on/off dragging for phone devices */ |
|
| 1327 | + 'geodir_onoff_dragging' => get_option('geodir_map_onoff_dragging') ? true : false,
|
|
| 1328 | + 'geodir_is_mobile' => wp_is_mobile() ? true : false, |
|
| 1329 | + 'geodir_on_dragging_text' => __('Enable Dragging', 'geodirectory'),
|
|
| 1330 | + 'geodir_off_dragging_text' => __('Disable Dragging', 'geodirectory'),
|
|
| 1331 | + 'geodir_err_max_file_size' => __('File size error : You tried to upload a file over %s', 'geodirectory'),
|
|
| 1332 | + 'geodir_err_file_upload_limit' => __('You have reached your upload limit of %s files.', 'geodirectory'),
|
|
| 1333 | + 'geodir_err_pkg_upload_limit' => __('You may only upload %s files with this package, please try again.', 'geodirectory'),
|
|
| 1334 | + 'geodir_action_remove' => __('Remove', 'geodirectory'),
|
|
| 1335 | 1335 | 'geodir_txt_all_files' => __('Allowed files', 'geodirectory'),
|
| 1336 | 1336 | 'geodir_err_file_type' => __('File type error. Allowed file types: %s', 'geodirectory'),
|
| 1337 | 1337 | 'gd_allowed_img_types' => !empty($allowed_img_types) ? implode(',', $allowed_img_types) : '',
|
@@ -1339,29 +1339,29 @@ discard block |
||
| 1339 | 1339 | 'geodir_txt_form_searching' => __('Searching...', 'geodirectory'),
|
| 1340 | 1340 | 'fa_rating' => (int)get_option('geodir_reviewrating_enable_font_awesome') == 1 ? 1 : '',
|
| 1341 | 1341 | 'reviewrating' => defined('GEODIRREVIEWRATING_VERSION') ? 1 : '',
|
| 1342 | - 'geodir_map_name' => geodir_map_name(), |
|
| 1343 | - ); |
|
| 1344 | - |
|
| 1345 | - /** |
|
| 1346 | - * Filters the translated JS strings from function geodir_localize_all_js_msg(). |
|
| 1347 | - * |
|
| 1348 | - * With this filter you can add, remove or change translated JS strings. |
|
| 1349 | - * You should add your own translations to this if you are building an addon rather than adding another script block. |
|
| 1350 | - * |
|
| 1351 | - * @since 1.0.0 |
|
| 1352 | - */ |
|
| 1353 | - $arr_alert_msg = apply_filters('geodir_all_js_msg', $arr_alert_msg);
|
|
| 1354 | - |
|
| 1355 | - foreach ($arr_alert_msg as $key => $value) {
|
|
| 1356 | - if (!is_scalar($value)) |
|
| 1357 | - continue; |
|
| 1358 | - $arr_alert_msg[$key] = html_entity_decode((string)$value, ENT_QUOTES, 'UTF-8'); |
|
| 1359 | - } |
|
| 1342 | + 'geodir_map_name' => geodir_map_name(), |
|
| 1343 | + ); |
|
| 1344 | + |
|
| 1345 | + /** |
|
| 1346 | + * Filters the translated JS strings from function geodir_localize_all_js_msg(). |
|
| 1347 | + * |
|
| 1348 | + * With this filter you can add, remove or change translated JS strings. |
|
| 1349 | + * You should add your own translations to this if you are building an addon rather than adding another script block. |
|
| 1350 | + * |
|
| 1351 | + * @since 1.0.0 |
|
| 1352 | + */ |
|
| 1353 | + $arr_alert_msg = apply_filters('geodir_all_js_msg', $arr_alert_msg);
|
|
| 1354 | + |
|
| 1355 | + foreach ($arr_alert_msg as $key => $value) {
|
|
| 1356 | + if (!is_scalar($value)) |
|
| 1357 | + continue; |
|
| 1358 | + $arr_alert_msg[$key] = html_entity_decode((string)$value, ENT_QUOTES, 'UTF-8'); |
|
| 1359 | + } |
|
| 1360 | 1360 | |
| 1361 | - $script = "var geodir_all_js_msg = " . json_encode($arr_alert_msg) . ';'; |
|
| 1362 | - echo '<script>'; |
|
| 1363 | - echo $script; |
|
| 1364 | - echo '</script>'; |
|
| 1361 | + $script = "var geodir_all_js_msg = " . json_encode($arr_alert_msg) . ';'; |
|
| 1362 | + echo '<script>'; |
|
| 1363 | + echo $script; |
|
| 1364 | + echo '</script>'; |
|
| 1365 | 1365 | } |
| 1366 | 1366 | |
| 1367 | 1367 | add_action('admin_bar_menu', 'geodir_admin_bar_site_menu', 31);
|
@@ -1377,11 +1377,11 @@ discard block |
||
| 1377 | 1377 | */ |
| 1378 | 1378 | function geodir_admin_bar_site_menu($wp_admin_bar) |
| 1379 | 1379 | {
|
| 1380 | - if (get_option("geodir_installed")) {
|
|
| 1381 | - if (current_user_can('manage_options')) {
|
|
| 1382 | - $wp_admin_bar->add_menu(array('parent' => 'appearance', 'id' => 'geodirectory', 'title' => __('GeoDirectory', 'geodirectory'), 'href' => admin_url('?page=geodirectory')));
|
|
| 1383 | - } |
|
| 1384 | - } |
|
| 1380 | + if (get_option("geodir_installed")) {
|
|
| 1381 | + if (current_user_can('manage_options')) {
|
|
| 1382 | + $wp_admin_bar->add_menu(array('parent' => 'appearance', 'id' => 'geodirectory', 'title' => __('GeoDirectory', 'geodirectory'), 'href' => admin_url('?page=geodirectory')));
|
|
| 1383 | + } |
|
| 1384 | + } |
|
| 1385 | 1385 | } |
| 1386 | 1386 | |
| 1387 | 1387 | add_action('geodir_before_listing', 'geodir_display_sort_options'); /*function in custom_functions.php*/
|
@@ -1407,25 +1407,25 @@ discard block |
||
| 1407 | 1407 | */ |
| 1408 | 1408 | function geodir_store_sidebars() |
| 1409 | 1409 | {
|
| 1410 | - global $geodir_sidebars; |
|
| 1411 | - global $sidebars_widgets; |
|
| 1412 | - |
|
| 1413 | - if (!is_array($sidebars_widgets)) |
|
| 1414 | - $sidebars_widgets = wp_get_sidebars_widgets(); |
|
| 1415 | - $geodir_old_sidebars = array(); |
|
| 1416 | - |
|
| 1417 | - if (is_array($geodir_sidebars)) {
|
|
| 1418 | - foreach ($geodir_sidebars as $val) {
|
|
| 1419 | - if (is_array($sidebars_widgets)) {
|
|
| 1420 | - if (array_key_exists($val, $sidebars_widgets)) |
|
| 1421 | - $geodir_old_sidebars[$val] = $sidebars_widgets[$val]; |
|
| 1422 | - else |
|
| 1423 | - $geodir_old_sidebars[$val] = array(); |
|
| 1424 | - } |
|
| 1425 | - } |
|
| 1426 | - } |
|
| 1427 | - update_option('geodir_sidebars', $geodir_old_sidebars);
|
|
| 1428 | - geodir_option_version_backup('geodir_sidebars');
|
|
| 1410 | + global $geodir_sidebars; |
|
| 1411 | + global $sidebars_widgets; |
|
| 1412 | + |
|
| 1413 | + if (!is_array($sidebars_widgets)) |
|
| 1414 | + $sidebars_widgets = wp_get_sidebars_widgets(); |
|
| 1415 | + $geodir_old_sidebars = array(); |
|
| 1416 | + |
|
| 1417 | + if (is_array($geodir_sidebars)) {
|
|
| 1418 | + foreach ($geodir_sidebars as $val) {
|
|
| 1419 | + if (is_array($sidebars_widgets)) {
|
|
| 1420 | + if (array_key_exists($val, $sidebars_widgets)) |
|
| 1421 | + $geodir_old_sidebars[$val] = $sidebars_widgets[$val]; |
|
| 1422 | + else |
|
| 1423 | + $geodir_old_sidebars[$val] = array(); |
|
| 1424 | + } |
|
| 1425 | + } |
|
| 1426 | + } |
|
| 1427 | + update_option('geodir_sidebars', $geodir_old_sidebars);
|
|
| 1428 | + geodir_option_version_backup('geodir_sidebars');
|
|
| 1429 | 1429 | |
| 1430 | 1430 | } |
| 1431 | 1431 | |
@@ -1439,28 +1439,28 @@ discard block |
||
| 1439 | 1439 | */ |
| 1440 | 1440 | function geodir_restore_sidebars() |
| 1441 | 1441 | {
|
| 1442 | - global $sidebars_widgets; |
|
| 1443 | - |
|
| 1444 | - if (!is_array($sidebars_widgets)) |
|
| 1445 | - $sidebars_widgets = wp_get_sidebars_widgets(); |
|
| 1446 | - |
|
| 1447 | - if (is_array($sidebars_widgets)) {
|
|
| 1448 | - $geodir_old_sidebars = get_option('geodir_sidebars');
|
|
| 1449 | - if (is_array($geodir_old_sidebars)) {
|
|
| 1450 | - foreach ($geodir_old_sidebars as $key => $val) {
|
|
| 1451 | - if(0 === strpos($key, 'geodir_'))// if gd widget |
|
| 1452 | - {
|
|
| 1453 | - $sidebars_widgets[$key] = $geodir_old_sidebars[$key]; |
|
| 1454 | - } |
|
| 1442 | + global $sidebars_widgets; |
|
| 1455 | 1443 | |
| 1444 | + if (!is_array($sidebars_widgets)) |
|
| 1445 | + $sidebars_widgets = wp_get_sidebars_widgets(); |
|
| 1456 | 1446 | |
| 1457 | - } |
|
| 1458 | - } |
|
| 1447 | + if (is_array($sidebars_widgets)) {
|
|
| 1448 | + $geodir_old_sidebars = get_option('geodir_sidebars');
|
|
| 1449 | + if (is_array($geodir_old_sidebars)) {
|
|
| 1450 | + foreach ($geodir_old_sidebars as $key => $val) {
|
|
| 1451 | + if(0 === strpos($key, 'geodir_'))// if gd widget |
|
| 1452 | + {
|
|
| 1453 | + $sidebars_widgets[$key] = $geodir_old_sidebars[$key]; |
|
| 1454 | + } |
|
| 1459 | 1455 | |
| 1460 | - } |
|
| 1461 | 1456 | |
| 1462 | - update_option('sidebars_widgets', $sidebars_widgets);
|
|
| 1463 | - update_option('geodir_sidebars', '');
|
|
| 1457 | + } |
|
| 1458 | + } |
|
| 1459 | + |
|
| 1460 | + } |
|
| 1461 | + |
|
| 1462 | + update_option('sidebars_widgets', $sidebars_widgets);
|
|
| 1463 | + update_option('geodir_sidebars', '');
|
|
| 1464 | 1464 | } |
| 1465 | 1465 | |
| 1466 | 1466 | add_action('geodir_after_listing_post_gridview', 'geodir_after_listing_post_gridview');
|
@@ -1473,9 +1473,9 @@ discard block |
||
| 1473 | 1473 | */ |
| 1474 | 1474 | function geodir_after_listing_post_gridview() |
| 1475 | 1475 | {
|
| 1476 | - global $gridview_columns; |
|
| 1476 | + global $gridview_columns; |
|
| 1477 | 1477 | |
| 1478 | - $gridview_columns = ''; |
|
| 1478 | + $gridview_columns = ''; |
|
| 1479 | 1479 | |
| 1480 | 1480 | } |
| 1481 | 1481 | |
@@ -1503,11 +1503,11 @@ discard block |
||
| 1503 | 1503 | */ |
| 1504 | 1504 | function so_handle_038($url, $original_url, $_context) |
| 1505 | 1505 | {
|
| 1506 | - if (strstr($url, "maps.google.com/maps/api/js") !== false) {
|
|
| 1507 | - $url = str_replace("&", "&", $url); // or $url = $original_url
|
|
| 1508 | - } |
|
| 1506 | + if (strstr($url, "maps.google.com/maps/api/js") !== false) {
|
|
| 1507 | + $url = str_replace("&", "&", $url); // or $url = $original_url
|
|
| 1508 | + } |
|
| 1509 | 1509 | |
| 1510 | - return $url; |
|
| 1510 | + return $url; |
|
| 1511 | 1511 | } |
| 1512 | 1512 | |
| 1513 | 1513 | |
@@ -1523,34 +1523,34 @@ discard block |
||
| 1523 | 1523 | function geodir_after_main_form_fields() {
|
| 1524 | 1524 | global $gd_session; |
| 1525 | 1525 | |
| 1526 | - if (get_option('geodir_accept_term_condition')) {
|
|
| 1527 | - global $post; |
|
| 1528 | - $term_condition = ''; |
|
| 1529 | - if (isset($_REQUEST['backandedit'])) {
|
|
| 1530 | - $post = (object)$gd_session->get('listing');
|
|
| 1531 | - $term_condition = isset($post->geodir_accept_term_condition) ? $post->geodir_accept_term_condition : ''; |
|
| 1532 | - } |
|
| 1533 | - |
|
| 1534 | - ?> |
|
| 1526 | + if (get_option('geodir_accept_term_condition')) {
|
|
| 1527 | + global $post; |
|
| 1528 | + $term_condition = ''; |
|
| 1529 | + if (isset($_REQUEST['backandedit'])) {
|
|
| 1530 | + $post = (object)$gd_session->get('listing');
|
|
| 1531 | + $term_condition = isset($post->geodir_accept_term_condition) ? $post->geodir_accept_term_condition : ''; |
|
| 1532 | + } |
|
| 1533 | + |
|
| 1534 | + ?> |
|
| 1535 | 1535 | <div id="geodir_accept_term_condition_row" class="required_field geodir_form_row clearfix"> |
| 1536 | 1536 | <label> </label> |
| 1537 | 1537 | |
| 1538 | 1538 | <div class="geodir_taxonomy_field" style="float:left; width:70%;"> |
| 1539 | 1539 | <span style="display:block"> |
| 1540 | 1540 | <input class="main_list_selecter" type="checkbox" <?php if ($term_condition == '1') {
|
| 1541 | - echo 'checked="checked"'; |
|
| 1542 | - } ?> field_type="checkbox" name="geodir_accept_term_condition" id="geodir_accept_term_condition" |
|
| 1541 | + echo 'checked="checked"'; |
|
| 1542 | + } ?> field_type="checkbox" name="geodir_accept_term_condition" id="geodir_accept_term_condition" |
|
| 1543 | 1543 | class="geodir_textfield" value="1" |
| 1544 | 1544 | style="display:inline-block"/><a href="<?php $terms_page = get_option('geodir_term_condition_page'); if($terms_page){ echo get_permalink($terms_page);}?>" target="_blank"><?php _e('Please accept our terms and conditions', 'geodirectory'); ?></a>
|
| 1545 | 1545 | </span> |
| 1546 | 1546 | </div> |
| 1547 | 1547 | <span class="geodir_message_error"><?php if (isset($required_msg)) {
|
| 1548 | - _e($required_msg, 'geodirectory'); |
|
| 1549 | - } ?></span> |
|
| 1548 | + _e($required_msg, 'geodirectory'); |
|
| 1549 | + } ?></span> |
|
| 1550 | 1550 | </div> |
| 1551 | 1551 | <?php |
| 1552 | 1552 | |
| 1553 | - } |
|
| 1553 | + } |
|
| 1554 | 1554 | } |
| 1555 | 1555 | |
| 1556 | 1556 | |
@@ -1575,42 +1575,42 @@ discard block |
||
| 1575 | 1575 | */ |
| 1576 | 1576 | function geodir_detail_page_tab_is_display($is_display, $tab) |
| 1577 | 1577 | {
|
| 1578 | - global $post, $post_images, $video, $special_offers, $related_listing, $geodir_post_detail_fields; |
|
| 1578 | + global $post, $post_images, $video, $special_offers, $related_listing, $geodir_post_detail_fields; |
|
| 1579 | 1579 | |
| 1580 | - if ($tab == 'post_profile') {
|
|
| 1581 | - /** This action is documented in geodirectory_template_actions.php */ |
|
| 1582 | - $desc_limit = apply_filters('geodir_description_field_desc_limit', '');
|
|
| 1580 | + if ($tab == 'post_profile') {
|
|
| 1581 | + /** This action is documented in geodirectory_template_actions.php */ |
|
| 1582 | + $desc_limit = apply_filters('geodir_description_field_desc_limit', '');
|
|
| 1583 | 1583 | |
| 1584 | - if (!($desc_limit === '' || (int)$desc_limit > 0)) {
|
|
| 1585 | - $is_display = false; |
|
| 1586 | - } |
|
| 1587 | - } |
|
| 1584 | + if (!($desc_limit === '' || (int)$desc_limit > 0)) {
|
|
| 1585 | + $is_display = false; |
|
| 1586 | + } |
|
| 1587 | + } |
|
| 1588 | 1588 | |
| 1589 | - if ($tab == 'post_info') |
|
| 1590 | - $is_display = (!empty($geodir_post_detail_fields)) ? true : false; |
|
| 1589 | + if ($tab == 'post_info') |
|
| 1590 | + $is_display = (!empty($geodir_post_detail_fields)) ? true : false; |
|
| 1591 | 1591 | |
| 1592 | - if ($tab == 'post_images') |
|
| 1593 | - $is_display = (!empty($post_images)) ? true : false; |
|
| 1592 | + if ($tab == 'post_images') |
|
| 1593 | + $is_display = (!empty($post_images)) ? true : false; |
|
| 1594 | 1594 | |
| 1595 | - if ($tab == 'post_video') |
|
| 1596 | - $is_display = (!empty($video)) ? true : false; |
|
| 1595 | + if ($tab == 'post_video') |
|
| 1596 | + $is_display = (!empty($video)) ? true : false; |
|
| 1597 | 1597 | |
| 1598 | - if ($tab == 'special_offers') |
|
| 1599 | - $is_display = (!empty($special_offers)) ? true : false; |
|
| 1598 | + if ($tab == 'special_offers') |
|
| 1599 | + $is_display = (!empty($special_offers)) ? true : false; |
|
| 1600 | 1600 | |
| 1601 | - if ($tab == 'reviews') |
|
| 1602 | - $is_display = (geodir_is_page('detail')) ? true : false;
|
|
| 1601 | + if ($tab == 'reviews') |
|
| 1602 | + $is_display = (geodir_is_page('detail')) ? true : false;
|
|
| 1603 | 1603 | |
| 1604 | - if ($tab == 'related_listing') {
|
|
| 1605 | - $message = __('No listings found which match your selection.', 'geodirectory');
|
|
| 1604 | + if ($tab == 'related_listing') {
|
|
| 1605 | + $message = __('No listings found which match your selection.', 'geodirectory');
|
|
| 1606 | 1606 | |
| 1607 | - /** This action is documented in geodirectory-functions/template_functions.php */ |
|
| 1608 | - $message = apply_filters('geodir_message_listing_not_found', $message, 'listing-listview', false);
|
|
| 1607 | + /** This action is documented in geodirectory-functions/template_functions.php */ |
|
| 1608 | + $message = apply_filters('geodir_message_listing_not_found', $message, 'listing-listview', false);
|
|
| 1609 | 1609 | |
| 1610 | - $is_display = ((strpos($related_listing, $message) !== false || $related_listing == '' || !geodir_is_page('detail'))) ? false : true;
|
|
| 1611 | - } |
|
| 1610 | + $is_display = ((strpos($related_listing, $message) !== false || $related_listing == '' || !geodir_is_page('detail'))) ? false : true;
|
|
| 1611 | + } |
|
| 1612 | 1612 | |
| 1613 | - return $is_display; |
|
| 1613 | + return $is_display; |
|
| 1614 | 1614 | } |
| 1615 | 1615 | |
| 1616 | 1616 | |
@@ -1626,69 +1626,69 @@ discard block |
||
| 1626 | 1626 | * @global string $plugin_prefix Geodirectory plugin table prefix. |
| 1627 | 1627 | */ |
| 1628 | 1628 | function geodir_changes_in_custom_fields_table() {
|
| 1629 | - global $wpdb, $plugin_prefix; |
|
| 1629 | + global $wpdb, $plugin_prefix; |
|
| 1630 | 1630 | |
| 1631 | 1631 | // Remove unused virtual page |
| 1632 | 1632 | $listings_page_id = (int)get_option('geodir_listing_page');
|
| 1633 | 1633 | if ($listings_page_id) {
|
| 1634 | 1634 | $wpdb->query($wpdb->prepare("DELETE FROM " . $wpdb->posts . " WHERE ID=%d AND post_name = %s AND post_type=%s", array($listings_page_id, 'listings', 'page')));
|
| 1635 | - delete_option('geodir_listing_page');
|
|
| 1635 | + delete_option('geodir_listing_page');
|
|
| 1636 | 1636 | } |
| 1637 | 1637 | |
| 1638 | - if (!get_option('geodir_changes_in_custom_fields_table')) {
|
|
| 1639 | - $wpdb->query( |
|
| 1640 | - $wpdb->prepare( |
|
| 1641 | - "UPDATE " . GEODIR_CUSTOM_FIELDS_TABLE . " SET is_default=%s, is_admin=%s WHERE is_default=%s", |
|
| 1642 | - array('1', '1', 'admin')
|
|
| 1643 | - ) |
|
| 1644 | - ); |
|
| 1638 | + if (!get_option('geodir_changes_in_custom_fields_table')) {
|
|
| 1639 | + $wpdb->query( |
|
| 1640 | + $wpdb->prepare( |
|
| 1641 | + "UPDATE " . GEODIR_CUSTOM_FIELDS_TABLE . " SET is_default=%s, is_admin=%s WHERE is_default=%s", |
|
| 1642 | + array('1', '1', 'admin')
|
|
| 1643 | + ) |
|
| 1644 | + ); |
|
| 1645 | 1645 | |
| 1646 | 1646 | |
| 1647 | - /* --- terms meta value set --- */ |
|
| 1647 | + /* --- terms meta value set --- */ |
|
| 1648 | 1648 | |
| 1649 | - update_option('geodir_default_marker_icon', geodir_plugin_url() . '/geodirectory-functions/map-functions/icons/pin.png');
|
|
| 1649 | + update_option('geodir_default_marker_icon', geodir_plugin_url() . '/geodirectory-functions/map-functions/icons/pin.png');
|
|
| 1650 | 1650 | |
| 1651 | - $options_data = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "options WHERE option_name LIKE %s", array('%tax_meta_%')));
|
|
| 1651 | + $options_data = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "options WHERE option_name LIKE %s", array('%tax_meta_%')));
|
|
| 1652 | 1652 | |
| 1653 | - if (!empty($options_data)) {
|
|
| 1653 | + if (!empty($options_data)) {
|
|
| 1654 | 1654 | |
| 1655 | - foreach ($options_data as $optobj) {
|
|
| 1655 | + foreach ($options_data as $optobj) {
|
|
| 1656 | 1656 | |
| 1657 | - $option_val = str_replace('tax_meta_', '', $optobj->option_name);
|
|
| 1657 | + $option_val = str_replace('tax_meta_', '', $optobj->option_name);
|
|
| 1658 | 1658 | |
| 1659 | - $taxonomies_data = $wpdb->get_results($wpdb->prepare("SELECT taxonomy FROM " . $wpdb->prefix . "term_taxonomy WHERE taxonomy LIKE %s AND term_id=%d", array('%category%', $option_val)));
|
|
| 1659 | + $taxonomies_data = $wpdb->get_results($wpdb->prepare("SELECT taxonomy FROM " . $wpdb->prefix . "term_taxonomy WHERE taxonomy LIKE %s AND term_id=%d", array('%category%', $option_val)));
|
|
| 1660 | 1660 | |
| 1661 | - if (!empty($taxonomies_data)) {
|
|
| 1661 | + if (!empty($taxonomies_data)) {
|
|
| 1662 | 1662 | |
| 1663 | - foreach ($taxonomies_data as $taxobj) {
|
|
| 1663 | + foreach ($taxonomies_data as $taxobj) {
|
|
| 1664 | 1664 | |
| 1665 | - $taxObject = get_taxonomy($taxobj->taxonomy); |
|
| 1666 | - $post_type = $taxObject->object_type[0]; |
|
| 1665 | + $taxObject = get_taxonomy($taxobj->taxonomy); |
|
| 1666 | + $post_type = $taxObject->object_type[0]; |
|
| 1667 | 1667 | |
| 1668 | - $opt_value = 'tax_meta_' . $post_type . '_' . $option_val; |
|
| 1668 | + $opt_value = 'tax_meta_' . $post_type . '_' . $option_val; |
|
| 1669 | 1669 | |
| 1670 | - $duplicate_data = $wpdb->get_var($wpdb->prepare("SELECT option_id FROM " . $wpdb->prefix . "options WHERE option_name=%s", array('tax_meta_' . $option_val)));
|
|
| 1670 | + $duplicate_data = $wpdb->get_var($wpdb->prepare("SELECT option_id FROM " . $wpdb->prefix . "options WHERE option_name=%s", array('tax_meta_' . $option_val)));
|
|
| 1671 | 1671 | |
| 1672 | - if ($duplicate_data) {
|
|
| 1672 | + if ($duplicate_data) {
|
|
| 1673 | 1673 | |
| 1674 | - $wpdb->query($wpdb->prepare("UPDATE " . $wpdb->prefix . "options SET option_name=%s WHERE option_id=%d", array($opt_value, $optobj->option_id)));
|
|
| 1674 | + $wpdb->query($wpdb->prepare("UPDATE " . $wpdb->prefix . "options SET option_name=%s WHERE option_id=%d", array($opt_value, $optobj->option_id)));
|
|
| 1675 | 1675 | |
| 1676 | - } else {
|
|
| 1676 | + } else {
|
|
| 1677 | 1677 | |
| 1678 | - $wpdb->query($wpdb->prepare("INSERT INTO " . $wpdb->prefix . "options (option_name,option_value,autoload) VALUES (%s, %s, %s)", array($opt_value, $optobj->option_value, $optobj->autoload)));
|
|
| 1678 | + $wpdb->query($wpdb->prepare("INSERT INTO " . $wpdb->prefix . "options (option_name,option_value,autoload) VALUES (%s, %s, %s)", array($opt_value, $optobj->option_value, $optobj->autoload)));
|
|
| 1679 | 1679 | |
| 1680 | - } |
|
| 1680 | + } |
|
| 1681 | 1681 | |
| 1682 | - } |
|
| 1682 | + } |
|
| 1683 | 1683 | |
| 1684 | - } |
|
| 1684 | + } |
|
| 1685 | 1685 | |
| 1686 | - } |
|
| 1687 | - } |
|
| 1686 | + } |
|
| 1687 | + } |
|
| 1688 | 1688 | |
| 1689 | - update_option('geodir_changes_in_custom_fields_table', '1');
|
|
| 1689 | + update_option('geodir_changes_in_custom_fields_table', '1');
|
|
| 1690 | 1690 | |
| 1691 | - } |
|
| 1691 | + } |
|
| 1692 | 1692 | |
| 1693 | 1693 | } |
| 1694 | 1694 | |
@@ -1707,24 +1707,24 @@ discard block |
||
| 1707 | 1707 | function geodir_location_slug_check($slug) |
| 1708 | 1708 | {
|
| 1709 | 1709 | |
| 1710 | - global $wpdb, $table_prefix; |
|
| 1710 | + global $wpdb, $table_prefix; |
|
| 1711 | 1711 | |
| 1712 | - $slug_exists = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s", array($slug)));
|
|
| 1712 | + $slug_exists = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s", array($slug)));
|
|
| 1713 | 1713 | |
| 1714 | - if ($slug_exists) {
|
|
| 1714 | + if ($slug_exists) {
|
|
| 1715 | 1715 | |
| 1716 | - $suffix = 1; |
|
| 1717 | - do {
|
|
| 1718 | - $alt_location_name = _truncate_post_slug($slug, 200 - (strlen($suffix) + 1)) . "-$suffix"; |
|
| 1719 | - $location_slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s", array($alt_location_name)));
|
|
| 1720 | - $suffix++; |
|
| 1721 | - } while ($location_slug_check && $suffix < 100); |
|
| 1716 | + $suffix = 1; |
|
| 1717 | + do {
|
|
| 1718 | + $alt_location_name = _truncate_post_slug($slug, 200 - (strlen($suffix) + 1)) . "-$suffix"; |
|
| 1719 | + $location_slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s", array($alt_location_name)));
|
|
| 1720 | + $suffix++; |
|
| 1721 | + } while ($location_slug_check && $suffix < 100); |
|
| 1722 | 1722 | |
| 1723 | - $slug = $alt_location_name; |
|
| 1723 | + $slug = $alt_location_name; |
|
| 1724 | 1724 | |
| 1725 | - } |
|
| 1725 | + } |
|
| 1726 | 1726 | |
| 1727 | - return $slug; |
|
| 1727 | + return $slug; |
|
| 1728 | 1728 | |
| 1729 | 1729 | } |
| 1730 | 1730 | |
@@ -1749,42 +1749,42 @@ discard block |
||
| 1749 | 1749 | function geodir_update_term_slug($term_id, $tt_id, $taxonomy) |
| 1750 | 1750 | {
|
| 1751 | 1751 | |
| 1752 | - global $wpdb, $plugin_prefix, $table_prefix; |
|
| 1752 | + global $wpdb, $plugin_prefix, $table_prefix; |
|
| 1753 | 1753 | |
| 1754 | - $tern_data = get_term_by('id', $term_id, $taxonomy);
|
|
| 1754 | + $tern_data = get_term_by('id', $term_id, $taxonomy);
|
|
| 1755 | 1755 | |
| 1756 | - $slug = $tern_data->slug; |
|
| 1756 | + $slug = $tern_data->slug; |
|
| 1757 | 1757 | |
| 1758 | - /** |
|
| 1759 | - * Filter if a term slug exists. |
|
| 1760 | - * |
|
| 1761 | - * @since 1.0.0 |
|
| 1762 | - * @package GeoDirectory |
|
| 1763 | - * @param bool $bool Default: false. |
|
| 1764 | - * @param string $slug The term slug. |
|
| 1765 | - * @param int $term_id The term ID. |
|
| 1766 | - */ |
|
| 1767 | - $slug_exists = apply_filters('geodir_term_slug_is_exists', false, $slug, $term_id);
|
|
| 1758 | + /** |
|
| 1759 | + * Filter if a term slug exists. |
|
| 1760 | + * |
|
| 1761 | + * @since 1.0.0 |
|
| 1762 | + * @package GeoDirectory |
|
| 1763 | + * @param bool $bool Default: false. |
|
| 1764 | + * @param string $slug The term slug. |
|
| 1765 | + * @param int $term_id The term ID. |
|
| 1766 | + */ |
|
| 1767 | + $slug_exists = apply_filters('geodir_term_slug_is_exists', false, $slug, $term_id);
|
|
| 1768 | 1768 | |
| 1769 | - if ($slug_exists) {
|
|
| 1769 | + if ($slug_exists) {
|
|
| 1770 | 1770 | |
| 1771 | - $suffix = 1; |
|
| 1772 | - do {
|
|
| 1773 | - $new_slug = _truncate_post_slug($slug, 200 - (strlen($suffix) + 1)) . "-$suffix"; |
|
| 1771 | + $suffix = 1; |
|
| 1772 | + do {
|
|
| 1773 | + $new_slug = _truncate_post_slug($slug, 200 - (strlen($suffix) + 1)) . "-$suffix"; |
|
| 1774 | 1774 | |
| 1775 | - /** This action is documented in geodirectory_hooks_actions.php */ |
|
| 1776 | - $term_slug_check = apply_filters('geodir_term_slug_is_exists', false, $new_slug, $term_id);
|
|
| 1775 | + /** This action is documented in geodirectory_hooks_actions.php */ |
|
| 1776 | + $term_slug_check = apply_filters('geodir_term_slug_is_exists', false, $new_slug, $term_id);
|
|
| 1777 | 1777 | |
| 1778 | - $suffix++; |
|
| 1779 | - } while ($term_slug_check && $suffix < 100); |
|
| 1778 | + $suffix++; |
|
| 1779 | + } while ($term_slug_check && $suffix < 100); |
|
| 1780 | 1780 | |
| 1781 | - $slug = $new_slug; |
|
| 1781 | + $slug = $new_slug; |
|
| 1782 | 1782 | |
| 1783 | - //wp_update_term( $term_id, $taxonomy, array('slug' => $slug) );
|
|
| 1783 | + //wp_update_term( $term_id, $taxonomy, array('slug' => $slug) );
|
|
| 1784 | 1784 | |
| 1785 | - $wpdb->query($wpdb->prepare("UPDATE " . $table_prefix . "terms SET slug=%s WHERE term_id=%d", array($slug, $term_id)));
|
|
| 1785 | + $wpdb->query($wpdb->prepare("UPDATE " . $table_prefix . "terms SET slug=%s WHERE term_id=%d", array($slug, $term_id)));
|
|
| 1786 | 1786 | |
| 1787 | - } |
|
| 1787 | + } |
|
| 1788 | 1788 | |
| 1789 | 1789 | // Update tag in detail table. |
| 1790 | 1790 | $taxonomy_obj = get_taxonomy($taxonomy); |
@@ -1825,21 +1825,21 @@ discard block |
||
| 1825 | 1825 | function geodir_term_slug_is_exists($slug_exists, $slug, $term_id) |
| 1826 | 1826 | {
|
| 1827 | 1827 | |
| 1828 | - global $wpdb, $table_prefix; |
|
| 1828 | + global $wpdb, $table_prefix; |
|
| 1829 | 1829 | |
| 1830 | - $default_location = geodir_get_default_location(); |
|
| 1830 | + $default_location = geodir_get_default_location(); |
|
| 1831 | 1831 | |
| 1832 | - $country_slug = $default_location->country_slug; |
|
| 1833 | - $region_slug = $default_location->region_slug; |
|
| 1834 | - $city_slug = $default_location->city_slug; |
|
| 1832 | + $country_slug = $default_location->country_slug; |
|
| 1833 | + $region_slug = $default_location->region_slug; |
|
| 1834 | + $city_slug = $default_location->city_slug; |
|
| 1835 | 1835 | |
| 1836 | - if ($country_slug == $slug || $region_slug == $slug || $city_slug == $slug) |
|
| 1837 | - return $slug_exists = true; |
|
| 1836 | + if ($country_slug == $slug || $region_slug == $slug || $city_slug == $slug) |
|
| 1837 | + return $slug_exists = true; |
|
| 1838 | 1838 | |
| 1839 | - if ($wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s AND term_id != %d", array($slug, $term_id))))
|
|
| 1840 | - return $slug_exists = true; |
|
| 1839 | + if ($wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $table_prefix . "terms WHERE slug=%s AND term_id != %d", array($slug, $term_id))))
|
|
| 1840 | + return $slug_exists = true; |
|
| 1841 | 1841 | |
| 1842 | - return $slug_exists; |
|
| 1842 | + return $slug_exists; |
|
| 1843 | 1843 | } |
| 1844 | 1844 | |
| 1845 | 1845 | |
@@ -1858,75 +1858,75 @@ discard block |
||
| 1858 | 1858 | */ |
| 1859 | 1859 | function geodir_custom_page_title($title = '', $sep = '') |
| 1860 | 1860 | {
|
| 1861 | - global $wp; |
|
| 1862 | - if (class_exists('WPSEO_Frontend') || class_exists('All_in_One_SEO_Pack')) {
|
|
| 1863 | - return $title; |
|
| 1864 | - } |
|
| 1861 | + global $wp; |
|
| 1862 | + if (class_exists('WPSEO_Frontend') || class_exists('All_in_One_SEO_Pack')) {
|
|
| 1863 | + return $title; |
|
| 1864 | + } |
|
| 1865 | 1865 | |
| 1866 | - if ($sep == '') {
|
|
| 1867 | - /** |
|
| 1868 | - * Filter the page title separator. |
|
| 1869 | - * |
|
| 1870 | - * @since 1.0.0 |
|
| 1871 | - * @package GeoDirectory |
|
| 1872 | - * @param string $sep The separator, default: `|`. |
|
| 1873 | - */ |
|
| 1874 | - $sep = apply_filters('geodir_page_title_separator', '|');
|
|
| 1875 | - } |
|
| 1866 | + if ($sep == '') {
|
|
| 1867 | + /** |
|
| 1868 | + * Filter the page title separator. |
|
| 1869 | + * |
|
| 1870 | + * @since 1.0.0 |
|
| 1871 | + * @package GeoDirectory |
|
| 1872 | + * @param string $sep The separator, default: `|`. |
|
| 1873 | + */ |
|
| 1874 | + $sep = apply_filters('geodir_page_title_separator', '|');
|
|
| 1875 | + } |
|
| 1876 | 1876 | |
| 1877 | 1877 | |
| 1878 | - $gd_page = ''; |
|
| 1879 | - if(geodir_is_page('home')){
|
|
| 1880 | - $gd_page = 'home'; |
|
| 1881 | - $title = (get_option('geodir_meta_title_homepage')) ? get_option('geodir_meta_title_homepage') : $title;
|
|
| 1882 | - } |
|
| 1883 | - elseif(geodir_is_page('detail')){
|
|
| 1884 | - $gd_page = 'detail'; |
|
| 1885 | - $title = (get_option('geodir_meta_title_detail')) ? get_option('geodir_meta_title_detail') : $title;
|
|
| 1886 | - } |
|
| 1887 | - elseif(geodir_is_page('pt')){
|
|
| 1888 | - $gd_page = 'pt'; |
|
| 1889 | - $title = (get_option('geodir_meta_title_pt')) ? get_option('geodir_meta_title_pt') : $title;
|
|
| 1890 | - } |
|
| 1891 | - elseif(geodir_is_page('listing')){
|
|
| 1892 | - $gd_page = 'listing'; |
|
| 1893 | - $title = (get_option('geodir_meta_title_listing')) ? get_option('geodir_meta_title_listing') : $title;
|
|
| 1894 | - } |
|
| 1895 | - elseif(geodir_is_page('location')){
|
|
| 1896 | - $gd_page = 'location'; |
|
| 1897 | - $title = (get_option('geodir_meta_title_location')) ? get_option('geodir_meta_title_location') : $title;
|
|
| 1898 | - } |
|
| 1899 | - elseif(geodir_is_page('search')){
|
|
| 1900 | - $gd_page = 'search'; |
|
| 1901 | - $title = (get_option('geodir_meta_title_search')) ? get_option('geodir_meta_title_search') : $title;
|
|
| 1902 | - } |
|
| 1903 | - elseif(geodir_is_page('add-listing')){
|
|
| 1904 | - $gd_page = 'add-listing'; |
|
| 1905 | - $title = (get_option('geodir_meta_title_add-listing')) ? get_option('geodir_meta_title_add-listing') : $title;
|
|
| 1906 | - } |
|
| 1907 | - elseif(geodir_is_page('author')){
|
|
| 1908 | - $gd_page = 'author'; |
|
| 1909 | - $title = (get_option('geodir_meta_title_author')) ? get_option('geodir_meta_title_author') : $title;
|
|
| 1910 | - } |
|
| 1911 | - elseif(geodir_is_page('login')){
|
|
| 1912 | - $gd_page = 'login'; |
|
| 1913 | - $title = (get_option('geodir_meta_title_login')) ? get_option('geodir_meta_title_login') : $title;
|
|
| 1914 | - } |
|
| 1915 | - elseif(geodir_is_page('listing-success')){
|
|
| 1916 | - $gd_page = 'listing-success'; |
|
| 1917 | - $title = (get_option('geodir_meta_title_listing-success')) ? get_option('geodir_meta_title_listing-success') : $title;
|
|
| 1918 | - } |
|
| 1878 | + $gd_page = ''; |
|
| 1879 | + if(geodir_is_page('home')){
|
|
| 1880 | + $gd_page = 'home'; |
|
| 1881 | + $title = (get_option('geodir_meta_title_homepage')) ? get_option('geodir_meta_title_homepage') : $title;
|
|
| 1882 | + } |
|
| 1883 | + elseif(geodir_is_page('detail')){
|
|
| 1884 | + $gd_page = 'detail'; |
|
| 1885 | + $title = (get_option('geodir_meta_title_detail')) ? get_option('geodir_meta_title_detail') : $title;
|
|
| 1886 | + } |
|
| 1887 | + elseif(geodir_is_page('pt')){
|
|
| 1888 | + $gd_page = 'pt'; |
|
| 1889 | + $title = (get_option('geodir_meta_title_pt')) ? get_option('geodir_meta_title_pt') : $title;
|
|
| 1890 | + } |
|
| 1891 | + elseif(geodir_is_page('listing')){
|
|
| 1892 | + $gd_page = 'listing'; |
|
| 1893 | + $title = (get_option('geodir_meta_title_listing')) ? get_option('geodir_meta_title_listing') : $title;
|
|
| 1894 | + } |
|
| 1895 | + elseif(geodir_is_page('location')){
|
|
| 1896 | + $gd_page = 'location'; |
|
| 1897 | + $title = (get_option('geodir_meta_title_location')) ? get_option('geodir_meta_title_location') : $title;
|
|
| 1898 | + } |
|
| 1899 | + elseif(geodir_is_page('search')){
|
|
| 1900 | + $gd_page = 'search'; |
|
| 1901 | + $title = (get_option('geodir_meta_title_search')) ? get_option('geodir_meta_title_search') : $title;
|
|
| 1902 | + } |
|
| 1903 | + elseif(geodir_is_page('add-listing')){
|
|
| 1904 | + $gd_page = 'add-listing'; |
|
| 1905 | + $title = (get_option('geodir_meta_title_add-listing')) ? get_option('geodir_meta_title_add-listing') : $title;
|
|
| 1906 | + } |
|
| 1907 | + elseif(geodir_is_page('author')){
|
|
| 1908 | + $gd_page = 'author'; |
|
| 1909 | + $title = (get_option('geodir_meta_title_author')) ? get_option('geodir_meta_title_author') : $title;
|
|
| 1910 | + } |
|
| 1911 | + elseif(geodir_is_page('login')){
|
|
| 1912 | + $gd_page = 'login'; |
|
| 1913 | + $title = (get_option('geodir_meta_title_login')) ? get_option('geodir_meta_title_login') : $title;
|
|
| 1914 | + } |
|
| 1915 | + elseif(geodir_is_page('listing-success')){
|
|
| 1916 | + $gd_page = 'listing-success'; |
|
| 1917 | + $title = (get_option('geodir_meta_title_listing-success')) ? get_option('geodir_meta_title_listing-success') : $title;
|
|
| 1918 | + } |
|
| 1919 | 1919 | |
| 1920 | 1920 | |
| 1921 | - /** |
|
| 1922 | - * Filter page meta title to replace variables. |
|
| 1923 | - * |
|
| 1924 | - * @since 1.5.4 |
|
| 1925 | - * @param string $title The page title including variables. |
|
| 1926 | - * @param string $gd_page The GeoDirectory page type if any. |
|
| 1927 | - * @param string $sep The title separator symbol. |
|
| 1928 | - */ |
|
| 1929 | - return apply_filters('geodir_seo_meta_title', __($title, 'geodirectory'), $gd_page, $sep);
|
|
| 1921 | + /** |
|
| 1922 | + * Filter page meta title to replace variables. |
|
| 1923 | + * |
|
| 1924 | + * @since 1.5.4 |
|
| 1925 | + * @param string $title The page title including variables. |
|
| 1926 | + * @param string $gd_page The GeoDirectory page type if any. |
|
| 1927 | + * @param string $sep The title separator symbol. |
|
| 1928 | + */ |
|
| 1929 | + return apply_filters('geodir_seo_meta_title', __($title, 'geodirectory'), $gd_page, $sep);
|
|
| 1930 | 1930 | |
| 1931 | 1931 | } |
| 1932 | 1932 | |
@@ -1942,36 +1942,36 @@ discard block |
||
| 1942 | 1942 | function geodir_set_post_attachment() |
| 1943 | 1943 | {
|
| 1944 | 1944 | |
| 1945 | - if (!get_option('geodir_set_post_attachments')) {
|
|
| 1945 | + if (!get_option('geodir_set_post_attachments')) {
|
|
| 1946 | 1946 | |
| 1947 | - require_once(ABSPATH . 'wp-admin/includes/image.php'); |
|
| 1948 | - require_once(ABSPATH . 'wp-admin/includes/file.php'); |
|
| 1947 | + require_once(ABSPATH . 'wp-admin/includes/image.php'); |
|
| 1948 | + require_once(ABSPATH . 'wp-admin/includes/file.php'); |
|
| 1949 | 1949 | |
| 1950 | - $all_postypes = geodir_get_posttypes(); |
|
| 1950 | + $all_postypes = geodir_get_posttypes(); |
|
| 1951 | 1951 | |
| 1952 | - foreach($all_postypes as $post_type){
|
|
| 1953 | - $args = array( |
|
| 1954 | - 'posts_per_page' => -1, |
|
| 1955 | - 'post_type' => $post_type, |
|
| 1956 | - 'post_status' => 'publish'); |
|
| 1952 | + foreach($all_postypes as $post_type){
|
|
| 1953 | + $args = array( |
|
| 1954 | + 'posts_per_page' => -1, |
|
| 1955 | + 'post_type' => $post_type, |
|
| 1956 | + 'post_status' => 'publish'); |
|
| 1957 | 1957 | |
| 1958 | - $posts_array = get_posts($args); |
|
| 1958 | + $posts_array = get_posts($args); |
|
| 1959 | 1959 | |
| 1960 | - if (!empty($posts_array)) {
|
|
| 1960 | + if (!empty($posts_array)) {
|
|
| 1961 | 1961 | |
| 1962 | - foreach ($posts_array as $post) {
|
|
| 1962 | + foreach ($posts_array as $post) {
|
|
| 1963 | 1963 | |
| 1964 | - geodir_set_wp_featured_image($post->ID); |
|
| 1964 | + geodir_set_wp_featured_image($post->ID); |
|
| 1965 | 1965 | |
| 1966 | - } |
|
| 1966 | + } |
|
| 1967 | 1967 | |
| 1968 | - } |
|
| 1969 | - } |
|
| 1968 | + } |
|
| 1969 | + } |
|
| 1970 | 1970 | |
| 1971 | 1971 | |
| 1972 | - update_option('geodir_set_post_attachments', '1');
|
|
| 1972 | + update_option('geodir_set_post_attachments', '1');
|
|
| 1973 | 1973 | |
| 1974 | - } |
|
| 1974 | + } |
|
| 1975 | 1975 | |
| 1976 | 1976 | } |
| 1977 | 1977 | |
@@ -1988,19 +1988,19 @@ discard block |
||
| 1988 | 1988 | function geodir_remove_url_seperator() |
| 1989 | 1989 | {
|
| 1990 | 1990 | |
| 1991 | - if (!get_option('geodir_remove_url_seperator')) {
|
|
| 1991 | + if (!get_option('geodir_remove_url_seperator')) {
|
|
| 1992 | 1992 | |
| 1993 | - if (get_option('geodir_listingurl_separator'))
|
|
| 1994 | - delete_option('geodir_listingurl_separator');
|
|
| 1993 | + if (get_option('geodir_listingurl_separator'))
|
|
| 1994 | + delete_option('geodir_listingurl_separator');
|
|
| 1995 | 1995 | |
| 1996 | - if (get_option('geodir_detailurl_separator'))
|
|
| 1997 | - delete_option('geodir_detailurl_separator');
|
|
| 1996 | + if (get_option('geodir_detailurl_separator'))
|
|
| 1997 | + delete_option('geodir_detailurl_separator');
|
|
| 1998 | 1998 | |
| 1999 | - flush_rewrite_rules(false); |
|
| 1999 | + flush_rewrite_rules(false); |
|
| 2000 | 2000 | |
| 2001 | - update_option('geodir_remove_url_seperator', '1');
|
|
| 2001 | + update_option('geodir_remove_url_seperator', '1');
|
|
| 2002 | 2002 | |
| 2003 | - } |
|
| 2003 | + } |
|
| 2004 | 2004 | |
| 2005 | 2005 | } |
| 2006 | 2006 | |
@@ -2016,19 +2016,19 @@ discard block |
||
| 2016 | 2016 | */ |
| 2017 | 2017 | function geodir_remove_url_seperator_form_permalink_settings($permalink_arr) |
| 2018 | 2018 | {
|
| 2019 | - foreach ($permalink_arr as $key => $value) {
|
|
| 2019 | + foreach ($permalink_arr as $key => $value) {
|
|
| 2020 | 2020 | |
| 2021 | - if ($value['id'] == 'geodir_listingurl_separator' || $value['id'] == 'geodir_detailurl_separator') |
|
| 2022 | - unset($permalink_arr[$key]); |
|
| 2021 | + if ($value['id'] == 'geodir_listingurl_separator' || $value['id'] == 'geodir_detailurl_separator') |
|
| 2022 | + unset($permalink_arr[$key]); |
|
| 2023 | 2023 | |
| 2024 | - } |
|
| 2024 | + } |
|
| 2025 | 2025 | |
| 2026 | - return $permalink_arr; |
|
| 2026 | + return $permalink_arr; |
|
| 2027 | 2027 | |
| 2028 | 2028 | } |
| 2029 | 2029 | |
| 2030 | 2030 | if (!is_admin()) {
|
| 2031 | - add_filter('posts_results', 'geodir_set_status_draft_to_publish_for_own_post');
|
|
| 2031 | + add_filter('posts_results', 'geodir_set_status_draft_to_publish_for_own_post');
|
|
| 2032 | 2032 | } |
| 2033 | 2033 | /** |
| 2034 | 2034 | * Set status from draft to publish. |
@@ -2041,16 +2041,16 @@ discard block |
||
| 2041 | 2041 | */ |
| 2042 | 2042 | function geodir_set_status_draft_to_publish_for_own_post($post) |
| 2043 | 2043 | {
|
| 2044 | - $user_id = get_current_user_id(); |
|
| 2044 | + $user_id = get_current_user_id(); |
|
| 2045 | 2045 | |
| 2046 | - if(!$user_id){return $post;}
|
|
| 2046 | + if(!$user_id){return $post;}
|
|
| 2047 | 2047 | |
| 2048 | - $gd_post_types = geodir_get_posttypes(); |
|
| 2048 | + $gd_post_types = geodir_get_posttypes(); |
|
| 2049 | 2049 | |
| 2050 | - if (!empty($post) && $post[0]->post_author == $user_id && in_array($post[0]->post_type, $gd_post_types) && !isset($_REQUEST['fl_builder'])) {
|
|
| 2051 | - $post[0]->post_status = 'publish'; |
|
| 2052 | - } |
|
| 2053 | - return $post; |
|
| 2050 | + if (!empty($post) && $post[0]->post_author == $user_id && in_array($post[0]->post_type, $gd_post_types) && !isset($_REQUEST['fl_builder'])) {
|
|
| 2051 | + $post[0]->post_status = 'publish'; |
|
| 2052 | + } |
|
| 2053 | + return $post; |
|
| 2054 | 2054 | } |
| 2055 | 2055 | |
| 2056 | 2056 | |
@@ -2142,33 +2142,33 @@ discard block |
||
| 2142 | 2142 | */ |
| 2143 | 2143 | function geodir_detail_page_tab_headings_change($tabs_arr) |
| 2144 | 2144 | {
|
| 2145 | - global $wpdb; |
|
| 2145 | + global $wpdb; |
|
| 2146 | 2146 | |
| 2147 | - $post_type = geodir_get_current_posttype(); |
|
| 2147 | + $post_type = geodir_get_current_posttype(); |
|
| 2148 | 2148 | |
| 2149 | - $all_postypes = geodir_get_posttypes(); |
|
| 2149 | + $all_postypes = geodir_get_posttypes(); |
|
| 2150 | 2150 | |
| 2151 | - if (!empty($tabs_arr) && $post_type != '' && in_array($post_type, $all_postypes)) {
|
|
| 2151 | + if (!empty($tabs_arr) && $post_type != '' && in_array($post_type, $all_postypes)) {
|
|
| 2152 | 2152 | |
| 2153 | - if (array_key_exists('post_video', $tabs_arr)) {
|
|
| 2153 | + if (array_key_exists('post_video', $tabs_arr)) {
|
|
| 2154 | 2154 | |
| 2155 | - $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_video', $post_type)));
|
|
| 2155 | + $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_video', $post_type)));
|
|
| 2156 | 2156 | |
| 2157 | - if (isset($tabs_arr['post_video']['heading_text']) && $field_title != '') |
|
| 2158 | - $tabs_arr['post_video']['heading_text'] = $field_title; |
|
| 2159 | - } |
|
| 2157 | + if (isset($tabs_arr['post_video']['heading_text']) && $field_title != '') |
|
| 2158 | + $tabs_arr['post_video']['heading_text'] = $field_title; |
|
| 2159 | + } |
|
| 2160 | 2160 | |
| 2161 | - if (array_key_exists('special_offers', $tabs_arr)) {
|
|
| 2161 | + if (array_key_exists('special_offers', $tabs_arr)) {
|
|
| 2162 | 2162 | |
| 2163 | - $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_special_offers', $post_type)));
|
|
| 2163 | + $field_title = $wpdb->get_var($wpdb->prepare("select site_title from " . GEODIR_CUSTOM_FIELDS_TABLE . " where htmlvar_name = %s and post_type = %s ", array('geodir_special_offers', $post_type)));
|
|
| 2164 | 2164 | |
| 2165 | - if (isset($tabs_arr['special_offers']['heading_text']) && $field_title != '') |
|
| 2166 | - $tabs_arr['special_offers']['heading_text'] = $field_title; |
|
| 2167 | - } |
|
| 2165 | + if (isset($tabs_arr['special_offers']['heading_text']) && $field_title != '') |
|
| 2166 | + $tabs_arr['special_offers']['heading_text'] = $field_title; |
|
| 2167 | + } |
|
| 2168 | 2168 | |
| 2169 | - } |
|
| 2169 | + } |
|
| 2170 | 2170 | |
| 2171 | - return $tabs_arr; |
|
| 2171 | + return $tabs_arr; |
|
| 2172 | 2172 | |
| 2173 | 2173 | } |
| 2174 | 2174 | |
@@ -2181,10 +2181,10 @@ discard block |
||
| 2181 | 2181 | */ |
| 2182 | 2182 | function geodir_remove_template_redirect_actions() |
| 2183 | 2183 | {
|
| 2184 | - if (geodir_is_page('login')){
|
|
| 2185 | - remove_all_actions('template_redirect');
|
|
| 2186 | - remove_action('init', 'avia_modify_front', 10);
|
|
| 2187 | - } |
|
| 2184 | + if (geodir_is_page('login')){
|
|
| 2185 | + remove_all_actions('template_redirect');
|
|
| 2186 | + remove_action('init', 'avia_modify_front', 10);
|
|
| 2187 | + } |
|
| 2188 | 2188 | } |
| 2189 | 2189 | |
| 2190 | 2190 | |
@@ -2206,51 +2206,51 @@ discard block |
||
| 2206 | 2206 | function geodirectory_before_featured_image_delete($attachment_id) |
| 2207 | 2207 | {
|
| 2208 | 2208 | |
| 2209 | - global $wpdb, $plugin_prefix; |
|
| 2209 | + global $wpdb, $plugin_prefix; |
|
| 2210 | 2210 | |
| 2211 | - $post_id = get_post_field('post_parent', $attachment_id);
|
|
| 2211 | + $post_id = get_post_field('post_parent', $attachment_id);
|
|
| 2212 | 2212 | |
| 2213 | - $attachment_url = wp_get_attachment_url($attachment_id); |
|
| 2213 | + $attachment_url = wp_get_attachment_url($attachment_id); |
|
| 2214 | 2214 | |
| 2215 | - if ($post_id > 0 && (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete')) {
|
|
| 2215 | + if ($post_id > 0 && (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete')) {
|
|
| 2216 | 2216 | |
| 2217 | - $post_type = get_post_type($post_id); |
|
| 2217 | + $post_type = get_post_type($post_id); |
|
| 2218 | 2218 | |
| 2219 | - $all_postypes = geodir_get_posttypes(); |
|
| 2219 | + $all_postypes = geodir_get_posttypes(); |
|
| 2220 | 2220 | |
| 2221 | - if (!in_array($post_type, $all_postypes) || !is_admin()) |
|
| 2222 | - return false; |
|
| 2221 | + if (!in_array($post_type, $all_postypes) || !is_admin()) |
|
| 2222 | + return false; |
|
| 2223 | 2223 | |
| 2224 | - $uploads = wp_upload_dir(); |
|
| 2224 | + $uploads = wp_upload_dir(); |
|
| 2225 | 2225 | |
| 2226 | - $split_img_path = explode($uploads['baseurl'], $attachment_url); |
|
| 2226 | + $split_img_path = explode($uploads['baseurl'], $attachment_url); |
|
| 2227 | 2227 | |
| 2228 | - $split_img_file_path = isset($split_img_path[1]) ? $split_img_path[1] : ''; |
|
| 2228 | + $split_img_file_path = isset($split_img_path[1]) ? $split_img_path[1] : ''; |
|
| 2229 | 2229 | |
| 2230 | - $wpdb->query( |
|
| 2231 | - $wpdb->prepare("DELETE FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id = %d AND file=%s ",
|
|
| 2232 | - array($post_id, $split_img_file_path) |
|
| 2233 | - ) |
|
| 2234 | - ); |
|
| 2230 | + $wpdb->query( |
|
| 2231 | + $wpdb->prepare("DELETE FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id = %d AND file=%s ",
|
|
| 2232 | + array($post_id, $split_img_file_path) |
|
| 2233 | + ) |
|
| 2234 | + ); |
|
| 2235 | 2235 | |
| 2236 | - $attachment_data = $wpdb->get_row( |
|
| 2237 | - $wpdb->prepare("SELECT ID, MIN(`menu_order`) FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id=%d",
|
|
| 2238 | - array($post_id) |
|
| 2239 | - ) |
|
| 2240 | - ); |
|
| 2236 | + $attachment_data = $wpdb->get_row( |
|
| 2237 | + $wpdb->prepare("SELECT ID, MIN(`menu_order`) FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id=%d",
|
|
| 2238 | + array($post_id) |
|
| 2239 | + ) |
|
| 2240 | + ); |
|
| 2241 | 2241 | |
| 2242 | - if (!empty($attachment_data)) {
|
|
| 2243 | - $wpdb->query("UPDATE " . GEODIR_ATTACHMENT_TABLE . " SET menu_order=1 WHERE ID=" . $attachment_data->ID);
|
|
| 2244 | - } |
|
| 2242 | + if (!empty($attachment_data)) {
|
|
| 2243 | + $wpdb->query("UPDATE " . GEODIR_ATTACHMENT_TABLE . " SET menu_order=1 WHERE ID=" . $attachment_data->ID);
|
|
| 2244 | + } |
|
| 2245 | 2245 | |
| 2246 | 2246 | |
| 2247 | - $table_name = $plugin_prefix . $post_type . '_detail'; |
|
| 2247 | + $table_name = $plugin_prefix . $post_type . '_detail'; |
|
| 2248 | 2248 | |
| 2249 | - $wpdb->query("UPDATE " . $table_name . " SET featured_image='' WHERE post_id =" . $post_id);
|
|
| 2249 | + $wpdb->query("UPDATE " . $table_name . " SET featured_image='' WHERE post_id =" . $post_id);
|
|
| 2250 | 2250 | |
| 2251 | - geodir_set_wp_featured_image($post_id); |
|
| 2251 | + geodir_set_wp_featured_image($post_id); |
|
| 2252 | 2252 | |
| 2253 | - } |
|
| 2253 | + } |
|
| 2254 | 2254 | |
| 2255 | 2255 | } |
| 2256 | 2256 | |
@@ -2268,79 +2268,79 @@ discard block |
||
| 2268 | 2268 | function geodir_temp_set_post_attachment() |
| 2269 | 2269 | {
|
| 2270 | 2270 | |
| 2271 | - global $wpdb, $plugin_prefix; |
|
| 2271 | + global $wpdb, $plugin_prefix; |
|
| 2272 | 2272 | |
| 2273 | - $all_postypes = geodir_get_posttypes(); |
|
| 2273 | + $all_postypes = geodir_get_posttypes(); |
|
| 2274 | 2274 | |
| 2275 | - foreach ($all_postypes as $posttype) {
|
|
| 2275 | + foreach ($all_postypes as $posttype) {
|
|
| 2276 | 2276 | |
| 2277 | - $tablename = $plugin_prefix . $posttype . '_detail'; |
|
| 2277 | + $tablename = $plugin_prefix . $posttype . '_detail'; |
|
| 2278 | 2278 | |
| 2279 | - $get_post_data = $wpdb->get_results("SELECT post_id FROM " . $tablename);
|
|
| 2279 | + $get_post_data = $wpdb->get_results("SELECT post_id FROM " . $tablename);
|
|
| 2280 | 2280 | |
| 2281 | - if (!empty($get_post_data)) {
|
|
| 2281 | + if (!empty($get_post_data)) {
|
|
| 2282 | 2282 | |
| 2283 | - foreach ($get_post_data as $data) {
|
|
| 2283 | + foreach ($get_post_data as $data) {
|
|
| 2284 | 2284 | |
| 2285 | - $post_id = $data->post_id; |
|
| 2285 | + $post_id = $data->post_id; |
|
| 2286 | 2286 | |
| 2287 | - $attachment_data = $wpdb->get_results("SELECT * FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id =" . $post_id . " AND file!=''");
|
|
| 2287 | + $attachment_data = $wpdb->get_results("SELECT * FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id =" . $post_id . " AND file!=''");
|
|
| 2288 | 2288 | |
| 2289 | - if (!empty($attachment_data)) {
|
|
| 2289 | + if (!empty($attachment_data)) {
|
|
| 2290 | 2290 | |
| 2291 | - foreach ($attachment_data as $attach) {
|
|
| 2291 | + foreach ($attachment_data as $attach) {
|
|
| 2292 | 2292 | |
| 2293 | - $file_info = pathinfo($attach->file); |
|
| 2293 | + $file_info = pathinfo($attach->file); |
|
| 2294 | 2294 | |
| 2295 | - $sub_dir = ''; |
|
| 2296 | - if ($file_info['dirname'] != '.' && $file_info['dirname'] != '..') |
|
| 2297 | - $sub_dir = stripslashes_deep($file_info['dirname']); |
|
| 2295 | + $sub_dir = ''; |
|
| 2296 | + if ($file_info['dirname'] != '.' && $file_info['dirname'] != '..') |
|
| 2297 | + $sub_dir = stripslashes_deep($file_info['dirname']); |
|
| 2298 | 2298 | |
| 2299 | - $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs |
|
| 2300 | - $uploads_path = $uploads['basedir']; |
|
| 2299 | + $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs |
|
| 2300 | + $uploads_path = $uploads['basedir']; |
|
| 2301 | 2301 | |
| 2302 | - $file_name = $file_info['basename']; |
|
| 2302 | + $file_name = $file_info['basename']; |
|
| 2303 | 2303 | |
| 2304 | - $img_arr['path'] = $uploads_path . $sub_dir . '/' . $file_name; |
|
| 2304 | + $img_arr['path'] = $uploads_path . $sub_dir . '/' . $file_name; |
|
| 2305 | 2305 | |
| 2306 | - if (!file_exists($img_arr['path'])) {
|
|
| 2306 | + if (!file_exists($img_arr['path'])) {
|
|
| 2307 | 2307 | |
| 2308 | - $wpdb->query("DELETE FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE ID=" . $attach->ID);
|
|
| 2308 | + $wpdb->query("DELETE FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE ID=" . $attach->ID);
|
|
| 2309 | 2309 | |
| 2310 | - } |
|
| 2310 | + } |
|
| 2311 | 2311 | |
| 2312 | - } |
|
| 2312 | + } |
|
| 2313 | 2313 | |
| 2314 | - $attachment_data = $wpdb->get_row("SELECT ID, MIN(`menu_order`) FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id=" . $post_id . " GROUP BY post_id");
|
|
| 2314 | + $attachment_data = $wpdb->get_row("SELECT ID, MIN(`menu_order`) FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE post_id=" . $post_id . " GROUP BY post_id");
|
|
| 2315 | 2315 | |
| 2316 | - if (!empty($attachment_data)) {
|
|
| 2316 | + if (!empty($attachment_data)) {
|
|
| 2317 | 2317 | |
| 2318 | - if ($attachment_data->ID) |
|
| 2319 | - $wpdb->query("UPDATE " . GEODIR_ATTACHMENT_TABLE . " SET menu_order=1 WHERE ID=" . $attachment_data->ID);
|
|
| 2318 | + if ($attachment_data->ID) |
|
| 2319 | + $wpdb->query("UPDATE " . GEODIR_ATTACHMENT_TABLE . " SET menu_order=1 WHERE ID=" . $attachment_data->ID);
|
|
| 2320 | 2320 | |
| 2321 | - } else {
|
|
| 2321 | + } else {
|
|
| 2322 | 2322 | |
| 2323 | - if (has_post_thumbnail($post_id)) {
|
|
| 2323 | + if (has_post_thumbnail($post_id)) {
|
|
| 2324 | 2324 | |
| 2325 | - $post_thumbnail_id = get_post_thumbnail_id($post_id); |
|
| 2325 | + $post_thumbnail_id = get_post_thumbnail_id($post_id); |
|
| 2326 | 2326 | |
| 2327 | - wp_delete_attachment($post_thumbnail_id); |
|
| 2327 | + wp_delete_attachment($post_thumbnail_id); |
|
| 2328 | 2328 | |
| 2329 | - } |
|
| 2329 | + } |
|
| 2330 | 2330 | |
| 2331 | - } |
|
| 2331 | + } |
|
| 2332 | 2332 | |
| 2333 | - $wpdb->query("UPDATE " . $tablename . " SET featured_image='' WHERE post_id =" . $post_id);
|
|
| 2333 | + $wpdb->query("UPDATE " . $tablename . " SET featured_image='' WHERE post_id =" . $post_id);
|
|
| 2334 | 2334 | |
| 2335 | - geodir_set_wp_featured_image($post_id); |
|
| 2335 | + geodir_set_wp_featured_image($post_id); |
|
| 2336 | 2336 | |
| 2337 | - } |
|
| 2337 | + } |
|
| 2338 | 2338 | |
| 2339 | - } |
|
| 2339 | + } |
|
| 2340 | 2340 | |
| 2341 | - } |
|
| 2341 | + } |
|
| 2342 | 2342 | |
| 2343 | - } |
|
| 2343 | + } |
|
| 2344 | 2344 | |
| 2345 | 2345 | } |
| 2346 | 2346 | |
@@ -2358,9 +2358,9 @@ discard block |
||
| 2358 | 2358 | function geodir_default_rating_star_icon() |
| 2359 | 2359 | {
|
| 2360 | 2360 | |
| 2361 | - if (!get_option('geodir_default_rating_star_icon')) {
|
|
| 2362 | - update_option('geodir_default_rating_star_icon', geodir_plugin_url() . '/geodirectory-assets/images/stars.png');
|
|
| 2363 | - } |
|
| 2361 | + if (!get_option('geodir_default_rating_star_icon')) {
|
|
| 2362 | + update_option('geodir_default_rating_star_icon', geodir_plugin_url() . '/geodirectory-assets/images/stars.png');
|
|
| 2363 | + } |
|
| 2364 | 2364 | |
| 2365 | 2365 | } |
| 2366 | 2366 | |
@@ -2378,27 +2378,27 @@ discard block |
||
| 2378 | 2378 | */ |
| 2379 | 2379 | function geodir_user_post_listing_count($user_id=null) |
| 2380 | 2380 | {
|
| 2381 | - global $wpdb, $plugin_prefix, $current_user; |
|
| 2382 | - if(!$user_id){
|
|
| 2383 | - $user_id = $current_user->ID; |
|
| 2384 | - } |
|
| 2381 | + global $wpdb, $plugin_prefix, $current_user; |
|
| 2382 | + if(!$user_id){
|
|
| 2383 | + $user_id = $current_user->ID; |
|
| 2384 | + } |
|
| 2385 | 2385 | |
| 2386 | - $user_id = $current_user->ID; |
|
| 2387 | - $all_postypes = geodir_get_posttypes(); |
|
| 2388 | - $all_posts = get_option('geodir_listing_link_user_dashboard');
|
|
| 2386 | + $user_id = $current_user->ID; |
|
| 2387 | + $all_postypes = geodir_get_posttypes(); |
|
| 2388 | + $all_posts = get_option('geodir_listing_link_user_dashboard');
|
|
| 2389 | 2389 | |
| 2390 | - $user_listing = array(); |
|
| 2391 | - if (is_array($all_posts) && !empty($all_posts)) {
|
|
| 2392 | - foreach ($all_posts as $ptype) {
|
|
| 2393 | - $total_posts = $wpdb->get_var("SELECT count( ID ) FROM " . $wpdb->prefix . "posts WHERE post_author=" . $user_id . " AND post_type='" . $ptype . "' AND ( post_status = 'publish' OR post_status = 'draft' OR post_status = 'private' )");
|
|
| 2390 | + $user_listing = array(); |
|
| 2391 | + if (is_array($all_posts) && !empty($all_posts)) {
|
|
| 2392 | + foreach ($all_posts as $ptype) {
|
|
| 2393 | + $total_posts = $wpdb->get_var("SELECT count( ID ) FROM " . $wpdb->prefix . "posts WHERE post_author=" . $user_id . " AND post_type='" . $ptype . "' AND ( post_status = 'publish' OR post_status = 'draft' OR post_status = 'private' )");
|
|
| 2394 | 2394 | |
| 2395 | - if ($total_posts > 0) {
|
|
| 2396 | - $user_listing[$ptype] = $total_posts; |
|
| 2397 | - } |
|
| 2398 | - } |
|
| 2399 | - } |
|
| 2395 | + if ($total_posts > 0) {
|
|
| 2396 | + $user_listing[$ptype] = $total_posts; |
|
| 2397 | + } |
|
| 2398 | + } |
|
| 2399 | + } |
|
| 2400 | 2400 | |
| 2401 | - return $user_listing; |
|
| 2401 | + return $user_listing; |
|
| 2402 | 2402 | } |
| 2403 | 2403 | |
| 2404 | 2404 | |
@@ -2418,593 +2418,593 @@ discard block |
||
| 2418 | 2418 | */ |
| 2419 | 2419 | function geodir_detail_page_custom_field_tab($tabs_arr) |
| 2420 | 2420 | {
|
| 2421 | - global $post; |
|
| 2422 | - |
|
| 2423 | - $post_type = geodir_get_current_posttype(); |
|
| 2424 | - $all_postypes = geodir_get_posttypes(); |
|
| 2425 | - |
|
| 2426 | - if (!empty($tabs_arr) && $post_type != '' && in_array($post_type, $all_postypes) && (geodir_is_page('detail') || geodir_is_page('preview'))) {
|
|
| 2427 | - $package_info = array(); |
|
| 2428 | - $package_info = geodir_post_package_info($package_info, $post); |
|
| 2429 | - $post_package_id = $package_info->pid; |
|
| 2430 | - $fields_location = 'detail'; |
|
| 2431 | - |
|
| 2432 | - $custom_fields = geodir_post_custom_fields($post_package_id, 'default', $post_type, $fields_location); |
|
| 2433 | - if (!empty($custom_fields)) {
|
|
| 2434 | - $parse_custom_fields = array(); |
|
| 2435 | - foreach ($custom_fields as $field) {
|
|
| 2436 | - $field = stripslashes_deep($field); // strip slashes |
|
| 2421 | + global $post; |
|
| 2422 | + |
|
| 2423 | + $post_type = geodir_get_current_posttype(); |
|
| 2424 | + $all_postypes = geodir_get_posttypes(); |
|
| 2425 | + |
|
| 2426 | + if (!empty($tabs_arr) && $post_type != '' && in_array($post_type, $all_postypes) && (geodir_is_page('detail') || geodir_is_page('preview'))) {
|
|
| 2427 | + $package_info = array(); |
|
| 2428 | + $package_info = geodir_post_package_info($package_info, $post); |
|
| 2429 | + $post_package_id = $package_info->pid; |
|
| 2430 | + $fields_location = 'detail'; |
|
| 2431 | + |
|
| 2432 | + $custom_fields = geodir_post_custom_fields($post_package_id, 'default', $post_type, $fields_location); |
|
| 2433 | + if (!empty($custom_fields)) {
|
|
| 2434 | + $parse_custom_fields = array(); |
|
| 2435 | + foreach ($custom_fields as $field) {
|
|
| 2436 | + $field = stripslashes_deep($field); // strip slashes |
|
| 2437 | 2437 | |
| 2438 | - $type = $field; |
|
| 2439 | - $field_name = $field['htmlvar_name']; |
|
| 2440 | - if (empty($geodir_post_info) && geodir_is_page('preview') && $field_name != '' && !isset($post->{$field_name}) && isset($_REQUEST[$field_name])) {
|
|
| 2441 | - $post->{$field_name} = $_REQUEST[$field_name];
|
|
| 2442 | - } |
|
| 2443 | - |
|
| 2444 | - if (isset($field['show_as_tab']) && $field['show_as_tab'] == 1 && ((isset($post->{$field_name}) && $post->{$field_name} != '') || $field['type'] == 'fieldset') && in_array($field['type'], array('text', 'datepicker', 'textarea', 'time', 'phone', 'email', 'select', 'multiselect', 'url', 'html', 'fieldset', 'radio', 'checkbox', 'file'))) {
|
|
| 2445 | - if ($type['type'] == 'datepicker' && ($post->{$type['htmlvar_name']} == '' || $post->{$type['htmlvar_name']} == '0000-00-00')) {
|
|
| 2446 | - continue; |
|
| 2447 | - } |
|
| 2448 | - |
|
| 2449 | - $parse_custom_fields[] = $field; |
|
| 2450 | - } |
|
| 2451 | - } |
|
| 2452 | - $custom_fields = $parse_custom_fields; |
|
| 2453 | - } |
|
| 2438 | + $type = $field; |
|
| 2439 | + $field_name = $field['htmlvar_name']; |
|
| 2440 | + if (empty($geodir_post_info) && geodir_is_page('preview') && $field_name != '' && !isset($post->{$field_name}) && isset($_REQUEST[$field_name])) {
|
|
| 2441 | + $post->{$field_name} = $_REQUEST[$field_name];
|
|
| 2442 | + } |
|
| 2443 | + |
|
| 2444 | + if (isset($field['show_as_tab']) && $field['show_as_tab'] == 1 && ((isset($post->{$field_name}) && $post->{$field_name} != '') || $field['type'] == 'fieldset') && in_array($field['type'], array('text', 'datepicker', 'textarea', 'time', 'phone', 'email', 'select', 'multiselect', 'url', 'html', 'fieldset', 'radio', 'checkbox', 'file'))) {
|
|
| 2445 | + if ($type['type'] == 'datepicker' && ($post->{$type['htmlvar_name']} == '' || $post->{$type['htmlvar_name']} == '0000-00-00')) {
|
|
| 2446 | + continue; |
|
| 2447 | + } |
|
| 2448 | + |
|
| 2449 | + $parse_custom_fields[] = $field; |
|
| 2450 | + } |
|
| 2451 | + } |
|
| 2452 | + $custom_fields = $parse_custom_fields; |
|
| 2453 | + } |
|
| 2454 | 2454 | |
| 2455 | - if (!empty($custom_fields)) {
|
|
| 2456 | - $post = stripslashes_deep($post); // strip slashes |
|
| 2455 | + if (!empty($custom_fields)) {
|
|
| 2456 | + $post = stripslashes_deep($post); // strip slashes |
|
| 2457 | 2457 | |
| 2458 | - $field_set_start = 0; |
|
| 2459 | - $fieldset_count = 0; |
|
| 2460 | - $fieldset = ''; |
|
| 2461 | - $total_fields = count($custom_fields); |
|
| 2462 | - $count_field = 0; |
|
| 2463 | - $fieldset_arr = array(); |
|
| 2464 | - $i = 0; |
|
| 2465 | - $geodir_post_info = isset($post->ID) && !empty($post->ID) ? geodir_get_post_info($post->ID) : NULL; |
|
| 2466 | - |
|
| 2467 | - foreach ($custom_fields as $field) {
|
|
| 2468 | - $count_field++; |
|
| 2469 | - $field_name = $field['htmlvar_name']; |
|
| 2470 | - if (empty($geodir_post_info) && geodir_is_page('preview') && $field_name != '' && !isset($post->{$field_name}) && isset($_REQUEST[$field_name])) {
|
|
| 2471 | - $post->{$field_name} = $_REQUEST[$field_name];
|
|
| 2472 | - } |
|
| 2473 | - |
|
| 2474 | - if (isset($field['show_as_tab']) && $field['show_as_tab'] == 1 && ((isset($post->{$field_name}) && $post->{$field_name} != '') || $field['type'] == 'fieldset') && in_array($field['type'], array('text', 'datepicker', 'textarea', 'time', 'phone', 'email', 'select', 'multiselect', 'url', 'html', 'fieldset', 'radio', 'checkbox', 'file'))) {
|
|
| 2475 | - $label = $field['site_title'] != '' ? $field['site_title'] : $field['admin_title']; |
|
| 2476 | - $site_title = trim($field['site_title']); |
|
| 2477 | - $type = $field; |
|
| 2478 | - $html = ''; |
|
| 2479 | - $html_var = $field_name; |
|
| 2480 | - $field_icon = ''; |
|
| 2481 | - $variables_array = array(); |
|
| 2482 | - |
|
| 2483 | - if ($type['type'] == 'datepicker' && ($post->{$type['htmlvar_name']} == '' || $post->{$type['htmlvar_name']} == '0000-00-00')) {
|
|
| 2484 | - continue; |
|
| 2485 | - } |
|
| 2486 | - |
|
| 2487 | - if ($type['type'] != 'fieldset') {
|
|
| 2488 | - $i++; |
|
| 2489 | - $variables_array['post_id'] = $post->ID; |
|
| 2490 | - $variables_array['label'] = __($type['site_title'], 'geodirectory'); |
|
| 2491 | - $variables_array['value'] = ''; |
|
| 2492 | - $variables_array['value'] = $post->{$type['htmlvar_name']};
|
|
| 2493 | - } |
|
| 2494 | - |
|
| 2495 | - if (strpos($type['field_icon'], 'http') !== false) {
|
|
| 2496 | - $field_icon = ' background: url(' . $type['field_icon'] . ') no-repeat left center;background-size:18px 18px;padding-left: 21px;';
|
|
| 2497 | - } elseif (strpos($type['field_icon'], 'fa fa-') !== false) {
|
|
| 2498 | - $field_icon = '<i class="' . $type['field_icon'] . '"></i>'; |
|
| 2499 | - } |
|
| 2500 | - |
|
| 2501 | - switch ($type['type']) {
|
|
| 2502 | - case 'fieldset': {
|
|
| 2503 | - $i = 0; |
|
| 2504 | - $fieldset_count++; |
|
| 2505 | - $field_set_start = 1; |
|
| 2506 | - $fieldset_arr[$fieldset_count]['htmlvar_name'] = 'gd_tab_' . $fieldset_count; |
|
| 2507 | - $fieldset_arr[$fieldset_count]['label'] = $label; |
|
| 2508 | - } |
|
| 2509 | - break; |
|
| 2510 | - case 'url': {
|
|
| 2511 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2512 | - $field_icon_af = ''; |
|
| 2513 | - } elseif ($field_icon == '') {
|
|
| 2514 | - |
|
| 2515 | - if ($type['name'] == 'geodir_facebook') {
|
|
| 2516 | - $field_icon_af = '<i class="fa fa-facebook-square"></i>'; |
|
| 2517 | - } elseif ($type['name'] == 'geodir_twitter') {
|
|
| 2518 | - $field_icon_af = '<i class="fa fa-twitter-square"></i>'; |
|
| 2519 | - } else {
|
|
| 2520 | - $field_icon_af = '<i class="fa fa-link"></i>'; |
|
| 2521 | - } |
|
| 2522 | - |
|
| 2523 | - } else {
|
|
| 2524 | - $field_icon_af = $field_icon; |
|
| 2525 | - $field_icon = ''; |
|
| 2526 | - } |
|
| 2458 | + $field_set_start = 0; |
|
| 2459 | + $fieldset_count = 0; |
|
| 2460 | + $fieldset = ''; |
|
| 2461 | + $total_fields = count($custom_fields); |
|
| 2462 | + $count_field = 0; |
|
| 2463 | + $fieldset_arr = array(); |
|
| 2464 | + $i = 0; |
|
| 2465 | + $geodir_post_info = isset($post->ID) && !empty($post->ID) ? geodir_get_post_info($post->ID) : NULL; |
|
| 2466 | + |
|
| 2467 | + foreach ($custom_fields as $field) {
|
|
| 2468 | + $count_field++; |
|
| 2469 | + $field_name = $field['htmlvar_name']; |
|
| 2470 | + if (empty($geodir_post_info) && geodir_is_page('preview') && $field_name != '' && !isset($post->{$field_name}) && isset($_REQUEST[$field_name])) {
|
|
| 2471 | + $post->{$field_name} = $_REQUEST[$field_name];
|
|
| 2472 | + } |
|
| 2473 | + |
|
| 2474 | + if (isset($field['show_as_tab']) && $field['show_as_tab'] == 1 && ((isset($post->{$field_name}) && $post->{$field_name} != '') || $field['type'] == 'fieldset') && in_array($field['type'], array('text', 'datepicker', 'textarea', 'time', 'phone', 'email', 'select', 'multiselect', 'url', 'html', 'fieldset', 'radio', 'checkbox', 'file'))) {
|
|
| 2475 | + $label = $field['site_title'] != '' ? $field['site_title'] : $field['admin_title']; |
|
| 2476 | + $site_title = trim($field['site_title']); |
|
| 2477 | + $type = $field; |
|
| 2478 | + $html = ''; |
|
| 2479 | + $html_var = $field_name; |
|
| 2480 | + $field_icon = ''; |
|
| 2481 | + $variables_array = array(); |
|
| 2482 | + |
|
| 2483 | + if ($type['type'] == 'datepicker' && ($post->{$type['htmlvar_name']} == '' || $post->{$type['htmlvar_name']} == '0000-00-00')) {
|
|
| 2484 | + continue; |
|
| 2485 | + } |
|
| 2486 | + |
|
| 2487 | + if ($type['type'] != 'fieldset') {
|
|
| 2488 | + $i++; |
|
| 2489 | + $variables_array['post_id'] = $post->ID; |
|
| 2490 | + $variables_array['label'] = __($type['site_title'], 'geodirectory'); |
|
| 2491 | + $variables_array['value'] = ''; |
|
| 2492 | + $variables_array['value'] = $post->{$type['htmlvar_name']};
|
|
| 2493 | + } |
|
| 2494 | + |
|
| 2495 | + if (strpos($type['field_icon'], 'http') !== false) {
|
|
| 2496 | + $field_icon = ' background: url(' . $type['field_icon'] . ') no-repeat left center;background-size:18px 18px;padding-left: 21px;';
|
|
| 2497 | + } elseif (strpos($type['field_icon'], 'fa fa-') !== false) {
|
|
| 2498 | + $field_icon = '<i class="' . $type['field_icon'] . '"></i>'; |
|
| 2499 | + } |
|
| 2500 | + |
|
| 2501 | + switch ($type['type']) {
|
|
| 2502 | + case 'fieldset': {
|
|
| 2503 | + $i = 0; |
|
| 2504 | + $fieldset_count++; |
|
| 2505 | + $field_set_start = 1; |
|
| 2506 | + $fieldset_arr[$fieldset_count]['htmlvar_name'] = 'gd_tab_' . $fieldset_count; |
|
| 2507 | + $fieldset_arr[$fieldset_count]['label'] = $label; |
|
| 2508 | + } |
|
| 2509 | + break; |
|
| 2510 | + case 'url': {
|
|
| 2511 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2512 | + $field_icon_af = ''; |
|
| 2513 | + } elseif ($field_icon == '') {
|
|
| 2514 | + |
|
| 2515 | + if ($type['name'] == 'geodir_facebook') {
|
|
| 2516 | + $field_icon_af = '<i class="fa fa-facebook-square"></i>'; |
|
| 2517 | + } elseif ($type['name'] == 'geodir_twitter') {
|
|
| 2518 | + $field_icon_af = '<i class="fa fa-twitter-square"></i>'; |
|
| 2519 | + } else {
|
|
| 2520 | + $field_icon_af = '<i class="fa fa-link"></i>'; |
|
| 2521 | + } |
|
| 2522 | + |
|
| 2523 | + } else {
|
|
| 2524 | + $field_icon_af = $field_icon; |
|
| 2525 | + $field_icon = ''; |
|
| 2526 | + } |
|
| 2527 | 2527 | |
| 2528 | - $a_url = geodir_parse_custom_field_url($post->{$type['htmlvar_name']});
|
|
| 2529 | - |
|
| 2530 | - $website = !empty($a_url['url']) ? $a_url['url'] : ''; |
|
| 2531 | - $title = !empty($a_url['label']) ? $a_url['label'] : $type['site_title']; |
|
| 2532 | - $title = $title != '' ? __(stripslashes($title), 'geodirectory') : ''; |
|
| 2533 | - |
|
| 2534 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2535 | - |
|
| 2536 | - // all search engines that use the nofollow value exclude links that use it from their ranking calculation |
|
| 2537 | - $rel = strpos($website, get_site_url()) !== false ? '' : 'rel="nofollow"'; |
|
| 2538 | - |
|
| 2539 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '"><span class="geodir-i-website" style="' . $field_icon . '">' . $field_icon_af . ' <a href="' . $website . '" target="_blank" ' . $rel . ' ><strong>' . |
|
| 2540 | - /** |
|
| 2541 | - * Filer the custom field website name. |
|
| 2542 | - * |
|
| 2543 | - * @since 1.0.0 |
|
| 2544 | - * @param string $title The field name default: "Website". |
|
| 2545 | - * @param string $website The website address. |
|
| 2546 | - * @param int $post->ID The post ID. |
|
| 2547 | - */ |
|
| 2548 | - apply_filters('geodir_custom_field_website_name', $title, $website, $post->ID) . '</strong></a></span></div>';
|
|
| 2549 | - } |
|
| 2550 | - break; |
|
| 2551 | - case 'phone': {
|
|
| 2552 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2553 | - $field_icon_af = ''; |
|
| 2554 | - } elseif ($field_icon == '') {
|
|
| 2555 | - $field_icon_af = '<i class="fa fa-phone"></i>'; |
|
| 2556 | - } else {
|
|
| 2557 | - $field_icon_af = $field_icon; |
|
| 2558 | - $field_icon = ''; |
|
| 2559 | - } |
|
| 2560 | - |
|
| 2561 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2562 | - |
|
| 2563 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-contact" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2564 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2565 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2566 | - } |
|
| 2567 | - $html .= ' </span>' . $post->{$type['htmlvar_name']} . '</div>';
|
|
| 2568 | - } |
|
| 2569 | - break; |
|
| 2570 | - case 'time': {
|
|
| 2571 | - $value = ''; |
|
| 2572 | - if ($post->{$type['htmlvar_name']} != '')
|
|
| 2573 | - $value = date_i18n(get_option('time_format'), strtotime($post->{$type['htmlvar_name']}));
|
|
| 2574 | - |
|
| 2575 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2576 | - $field_icon_af = ''; |
|
| 2577 | - } elseif ($field_icon == '') {
|
|
| 2578 | - $field_icon_af = '<i class="fa fa-clock-o"></i>'; |
|
| 2579 | - } else {
|
|
| 2580 | - $field_icon_af = $field_icon; |
|
| 2581 | - $field_icon = ''; |
|
| 2582 | - } |
|
| 2583 | - |
|
| 2584 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2585 | - |
|
| 2586 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-time" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2587 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2588 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2589 | - } |
|
| 2590 | - $html .= ' </span>' . $value . '</div>'; |
|
| 2591 | - } |
|
| 2592 | - break; |
|
| 2593 | - case 'datepicker': {
|
|
| 2594 | - $date_format = geodir_default_date_format(); |
|
| 2595 | - if ($type['extra_fields'] != '') {
|
|
| 2596 | - $date_format = unserialize($type['extra_fields']); |
|
| 2597 | - $date_format = $date_format['date_format']; |
|
| 2598 | - } |
|
| 2599 | - |
|
| 2600 | - // check if we need to change the format or not |
|
| 2601 | - $date_format_len = strlen(str_replace(' ', '', $date_format));
|
|
| 2602 | - if($date_format_len>5){// if greater then 5 then it's the old style format.
|
|
| 2603 | - |
|
| 2604 | - $search = array('dd','d','DD','mm','m','MM','yy'); //jQuery UI datepicker format
|
|
| 2605 | - $replace = array('d','j','l','m','n','F','Y');//PHP date format
|
|
| 2606 | - |
|
| 2607 | - $date_format = str_replace($search, $replace, $date_format); |
|
| 2608 | - |
|
| 2609 | - $post_htmlvar_value = ($date_format == 'd/m/Y' || $date_format == 'j/n/Y' ) ? str_replace('/', '-', $post->{$type['htmlvar_name']}) : $post->{$type['htmlvar_name']}; // PHP doesn't work well with dd/mm/yyyy format
|
|
| 2610 | - }else{
|
|
| 2611 | - $post_htmlvar_value = $post->{$type['htmlvar_name']};
|
|
| 2612 | - } |
|
| 2613 | - |
|
| 2614 | - $value = ''; |
|
| 2615 | - if ($post->{$type['htmlvar_name']} != '')
|
|
| 2616 | - $value = date_i18n($date_format, strtotime($post_htmlvar_value)); |
|
| 2617 | - |
|
| 2618 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2619 | - $field_icon_af = ''; |
|
| 2620 | - } elseif ($field_icon == '') {
|
|
| 2621 | - $field_icon_af = '<i class="fa fa-calendar"></i>'; |
|
| 2622 | - } else {
|
|
| 2623 | - $field_icon_af = $field_icon; |
|
| 2624 | - $field_icon = ''; |
|
| 2625 | - } |
|
| 2626 | - |
|
| 2627 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2628 | - |
|
| 2629 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-datepicker" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2630 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2631 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2632 | - } |
|
| 2633 | - $html .= ' </span>' . $value . '</div>'; |
|
| 2634 | - } |
|
| 2635 | - break; |
|
| 2636 | - case 'text': {
|
|
| 2637 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2638 | - $field_icon_af = ''; |
|
| 2639 | - } elseif ($field_icon == '') {
|
|
| 2640 | - $field_icon_af = ''; |
|
| 2641 | - } else {
|
|
| 2642 | - $field_icon_af = $field_icon; |
|
| 2643 | - $field_icon = ''; |
|
| 2644 | - } |
|
| 2645 | - |
|
| 2646 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2647 | - |
|
| 2648 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2649 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2650 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2651 | - } |
|
| 2652 | - $html .= ' </span>' . $post->{$type['htmlvar_name']} . '</div>';
|
|
| 2653 | - } |
|
| 2654 | - break; |
|
| 2655 | - case 'radio': {
|
|
| 2656 | - |
|
| 2657 | - if ($post->{$type['htmlvar_name']} != '') {
|
|
| 2658 | - if ($post->{$type['htmlvar_name']} == 'f' || $post->{$type['htmlvar_name']} == '0') {
|
|
| 2659 | - $html_val = __('No', 'geodirectory');
|
|
| 2660 | - } else if ($post->{$type['htmlvar_name']} == 't' || $post->{$type['htmlvar_name']} == '1') {
|
|
| 2661 | - $html_val = __('Yes', 'geodirectory');
|
|
| 2662 | - } else {
|
|
| 2663 | - $html_val = __($post->{$type['htmlvar_name']}, 'geodirectory');
|
|
| 2528 | + $a_url = geodir_parse_custom_field_url($post->{$type['htmlvar_name']});
|
|
| 2529 | + |
|
| 2530 | + $website = !empty($a_url['url']) ? $a_url['url'] : ''; |
|
| 2531 | + $title = !empty($a_url['label']) ? $a_url['label'] : $type['site_title']; |
|
| 2532 | + $title = $title != '' ? __(stripslashes($title), 'geodirectory') : ''; |
|
| 2533 | + |
|
| 2534 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2535 | + |
|
| 2536 | + // all search engines that use the nofollow value exclude links that use it from their ranking calculation |
|
| 2537 | + $rel = strpos($website, get_site_url()) !== false ? '' : 'rel="nofollow"'; |
|
| 2538 | + |
|
| 2539 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '"><span class="geodir-i-website" style="' . $field_icon . '">' . $field_icon_af . ' <a href="' . $website . '" target="_blank" ' . $rel . ' ><strong>' . |
|
| 2540 | + /** |
|
| 2541 | + * Filer the custom field website name. |
|
| 2542 | + * |
|
| 2543 | + * @since 1.0.0 |
|
| 2544 | + * @param string $title The field name default: "Website". |
|
| 2545 | + * @param string $website The website address. |
|
| 2546 | + * @param int $post->ID The post ID. |
|
| 2547 | + */ |
|
| 2548 | + apply_filters('geodir_custom_field_website_name', $title, $website, $post->ID) . '</strong></a></span></div>';
|
|
| 2549 | + } |
|
| 2550 | + break; |
|
| 2551 | + case 'phone': {
|
|
| 2552 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2553 | + $field_icon_af = ''; |
|
| 2554 | + } elseif ($field_icon == '') {
|
|
| 2555 | + $field_icon_af = '<i class="fa fa-phone"></i>'; |
|
| 2556 | + } else {
|
|
| 2557 | + $field_icon_af = $field_icon; |
|
| 2558 | + $field_icon = ''; |
|
| 2559 | + } |
|
| 2560 | + |
|
| 2561 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2562 | + |
|
| 2563 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-contact" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2564 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2565 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2566 | + } |
|
| 2567 | + $html .= ' </span>' . $post->{$type['htmlvar_name']} . '</div>';
|
|
| 2568 | + } |
|
| 2569 | + break; |
|
| 2570 | + case 'time': {
|
|
| 2571 | + $value = ''; |
|
| 2572 | + if ($post->{$type['htmlvar_name']} != '')
|
|
| 2573 | + $value = date_i18n(get_option('time_format'), strtotime($post->{$type['htmlvar_name']}));
|
|
| 2574 | + |
|
| 2575 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2576 | + $field_icon_af = ''; |
|
| 2577 | + } elseif ($field_icon == '') {
|
|
| 2578 | + $field_icon_af = '<i class="fa fa-clock-o"></i>'; |
|
| 2579 | + } else {
|
|
| 2580 | + $field_icon_af = $field_icon; |
|
| 2581 | + $field_icon = ''; |
|
| 2582 | + } |
|
| 2583 | + |
|
| 2584 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2585 | + |
|
| 2586 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-time" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2587 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2588 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2589 | + } |
|
| 2590 | + $html .= ' </span>' . $value . '</div>'; |
|
| 2591 | + } |
|
| 2592 | + break; |
|
| 2593 | + case 'datepicker': {
|
|
| 2594 | + $date_format = geodir_default_date_format(); |
|
| 2595 | + if ($type['extra_fields'] != '') {
|
|
| 2596 | + $date_format = unserialize($type['extra_fields']); |
|
| 2597 | + $date_format = $date_format['date_format']; |
|
| 2598 | + } |
|
| 2599 | + |
|
| 2600 | + // check if we need to change the format or not |
|
| 2601 | + $date_format_len = strlen(str_replace(' ', '', $date_format));
|
|
| 2602 | + if($date_format_len>5){// if greater then 5 then it's the old style format.
|
|
| 2603 | + |
|
| 2604 | + $search = array('dd','d','DD','mm','m','MM','yy'); //jQuery UI datepicker format
|
|
| 2605 | + $replace = array('d','j','l','m','n','F','Y');//PHP date format
|
|
| 2606 | + |
|
| 2607 | + $date_format = str_replace($search, $replace, $date_format); |
|
| 2608 | + |
|
| 2609 | + $post_htmlvar_value = ($date_format == 'd/m/Y' || $date_format == 'j/n/Y' ) ? str_replace('/', '-', $post->{$type['htmlvar_name']}) : $post->{$type['htmlvar_name']}; // PHP doesn't work well with dd/mm/yyyy format
|
|
| 2610 | + }else{
|
|
| 2611 | + $post_htmlvar_value = $post->{$type['htmlvar_name']};
|
|
| 2612 | + } |
|
| 2613 | + |
|
| 2614 | + $value = ''; |
|
| 2615 | + if ($post->{$type['htmlvar_name']} != '')
|
|
| 2616 | + $value = date_i18n($date_format, strtotime($post_htmlvar_value)); |
|
| 2617 | + |
|
| 2618 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2619 | + $field_icon_af = ''; |
|
| 2620 | + } elseif ($field_icon == '') {
|
|
| 2621 | + $field_icon_af = '<i class="fa fa-calendar"></i>'; |
|
| 2622 | + } else {
|
|
| 2623 | + $field_icon_af = $field_icon; |
|
| 2624 | + $field_icon = ''; |
|
| 2625 | + } |
|
| 2626 | + |
|
| 2627 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2628 | + |
|
| 2629 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-datepicker" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2630 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2631 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2632 | + } |
|
| 2633 | + $html .= ' </span>' . $value . '</div>'; |
|
| 2634 | + } |
|
| 2635 | + break; |
|
| 2636 | + case 'text': {
|
|
| 2637 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2638 | + $field_icon_af = ''; |
|
| 2639 | + } elseif ($field_icon == '') {
|
|
| 2640 | + $field_icon_af = ''; |
|
| 2641 | + } else {
|
|
| 2642 | + $field_icon_af = $field_icon; |
|
| 2643 | + $field_icon = ''; |
|
| 2644 | + } |
|
| 2645 | + |
|
| 2646 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2647 | + |
|
| 2648 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2649 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2650 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2651 | + } |
|
| 2652 | + $html .= ' </span>' . $post->{$type['htmlvar_name']} . '</div>';
|
|
| 2653 | + } |
|
| 2654 | + break; |
|
| 2655 | + case 'radio': {
|
|
| 2656 | + |
|
| 2657 | + if ($post->{$type['htmlvar_name']} != '') {
|
|
| 2658 | + if ($post->{$type['htmlvar_name']} == 'f' || $post->{$type['htmlvar_name']} == '0') {
|
|
| 2659 | + $html_val = __('No', 'geodirectory');
|
|
| 2660 | + } else if ($post->{$type['htmlvar_name']} == 't' || $post->{$type['htmlvar_name']} == '1') {
|
|
| 2661 | + $html_val = __('Yes', 'geodirectory');
|
|
| 2662 | + } else {
|
|
| 2663 | + $html_val = __($post->{$type['htmlvar_name']}, 'geodirectory');
|
|
| 2664 | 2664 | |
| 2665 | - if (!empty($type['option_values'])) {
|
|
| 2666 | - $cf_option_values = geodir_string_values_to_options(stripslashes_deep($type['option_values']), true); |
|
| 2665 | + if (!empty($type['option_values'])) {
|
|
| 2666 | + $cf_option_values = geodir_string_values_to_options(stripslashes_deep($type['option_values']), true); |
|
| 2667 | 2667 | |
| 2668 | - if (!empty($cf_option_values)) {
|
|
| 2669 | - foreach ($cf_option_values as $cf_option_value) {
|
|
| 2670 | - if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$type['htmlvar_name']}) {
|
|
| 2671 | - $html_val = $cf_option_value['label']; |
|
| 2672 | - } |
|
| 2673 | - } |
|
| 2674 | - } |
|
| 2675 | - } |
|
| 2676 | - } |
|
| 2677 | - |
|
| 2678 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2679 | - $field_icon_af = ''; |
|
| 2680 | - } else if ($field_icon == '') {
|
|
| 2681 | - $field_icon_af = ''; |
|
| 2682 | - } else {
|
|
| 2683 | - $field_icon_af = $field_icon; |
|
| 2684 | - $field_icon = ''; |
|
| 2685 | - } |
|
| 2686 | - |
|
| 2687 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2688 | - |
|
| 2689 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-radio" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2690 | - |
|
| 2691 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2692 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2693 | - } |
|
| 2694 | - |
|
| 2695 | - $html .= ' </span>' . $html_val . '</div>'; |
|
| 2696 | - } |
|
| 2697 | - } |
|
| 2698 | - break; |
|
| 2699 | - case 'checkbox': {
|
|
| 2700 | - $html_var = $type['htmlvar_name']; |
|
| 2701 | - $html_val = $type['htmlvar_name']; |
|
| 2702 | - |
|
| 2703 | - if ((int)$post->{$html_var} == 1) {
|
|
| 2704 | - |
|
| 2705 | - if ($post->{$type['htmlvar_name']} == '1') {
|
|
| 2706 | - $html_val = __('Yes', 'geodirectory');
|
|
| 2707 | - } else {
|
|
| 2708 | - $html_val = __('No', 'geodirectory');
|
|
| 2709 | - } |
|
| 2710 | - |
|
| 2711 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2712 | - $field_icon_af = ''; |
|
| 2713 | - } else if ($field_icon == '') {
|
|
| 2714 | - $field_icon_af = ''; |
|
| 2715 | - } else {
|
|
| 2716 | - $field_icon_af = $field_icon; |
|
| 2717 | - $field_icon = ''; |
|
| 2718 | - } |
|
| 2719 | - |
|
| 2720 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2721 | - |
|
| 2722 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-checkbox" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2723 | - |
|
| 2724 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2725 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2726 | - } |
|
| 2727 | - |
|
| 2728 | - $html .= ' </span>' . $html_val . '</div>'; |
|
| 2729 | - } |
|
| 2730 | - } |
|
| 2731 | - break; |
|
| 2732 | - case 'select': {
|
|
| 2733 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2734 | - $field_icon_af = ''; |
|
| 2735 | - } elseif ($field_icon == '') {
|
|
| 2736 | - $field_icon_af = ''; |
|
| 2737 | - } else {
|
|
| 2738 | - $field_icon_af = $field_icon; |
|
| 2739 | - $field_icon = ''; |
|
| 2740 | - } |
|
| 2668 | + if (!empty($cf_option_values)) {
|
|
| 2669 | + foreach ($cf_option_values as $cf_option_value) {
|
|
| 2670 | + if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$type['htmlvar_name']}) {
|
|
| 2671 | + $html_val = $cf_option_value['label']; |
|
| 2672 | + } |
|
| 2673 | + } |
|
| 2674 | + } |
|
| 2675 | + } |
|
| 2676 | + } |
|
| 2677 | + |
|
| 2678 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2679 | + $field_icon_af = ''; |
|
| 2680 | + } else if ($field_icon == '') {
|
|
| 2681 | + $field_icon_af = ''; |
|
| 2682 | + } else {
|
|
| 2683 | + $field_icon_af = $field_icon; |
|
| 2684 | + $field_icon = ''; |
|
| 2685 | + } |
|
| 2686 | + |
|
| 2687 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2688 | + |
|
| 2689 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-radio" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2690 | + |
|
| 2691 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2692 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2693 | + } |
|
| 2694 | + |
|
| 2695 | + $html .= ' </span>' . $html_val . '</div>'; |
|
| 2696 | + } |
|
| 2697 | + } |
|
| 2698 | + break; |
|
| 2699 | + case 'checkbox': {
|
|
| 2700 | + $html_var = $type['htmlvar_name']; |
|
| 2701 | + $html_val = $type['htmlvar_name']; |
|
| 2702 | + |
|
| 2703 | + if ((int)$post->{$html_var} == 1) {
|
|
| 2704 | + |
|
| 2705 | + if ($post->{$type['htmlvar_name']} == '1') {
|
|
| 2706 | + $html_val = __('Yes', 'geodirectory');
|
|
| 2707 | + } else {
|
|
| 2708 | + $html_val = __('No', 'geodirectory');
|
|
| 2709 | + } |
|
| 2710 | + |
|
| 2711 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2712 | + $field_icon_af = ''; |
|
| 2713 | + } else if ($field_icon == '') {
|
|
| 2714 | + $field_icon_af = ''; |
|
| 2715 | + } else {
|
|
| 2716 | + $field_icon_af = $field_icon; |
|
| 2717 | + $field_icon = ''; |
|
| 2718 | + } |
|
| 2719 | + |
|
| 2720 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2721 | + |
|
| 2722 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-checkbox" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2723 | + |
|
| 2724 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2725 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2726 | + } |
|
| 2727 | + |
|
| 2728 | + $html .= ' </span>' . $html_val . '</div>'; |
|
| 2729 | + } |
|
| 2730 | + } |
|
| 2731 | + break; |
|
| 2732 | + case 'select': {
|
|
| 2733 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2734 | + $field_icon_af = ''; |
|
| 2735 | + } elseif ($field_icon == '') {
|
|
| 2736 | + $field_icon_af = ''; |
|
| 2737 | + } else {
|
|
| 2738 | + $field_icon_af = $field_icon; |
|
| 2739 | + $field_icon = ''; |
|
| 2740 | + } |
|
| 2741 | 2741 | |
| 2742 | - $field_value = __($post->{$type['htmlvar_name']}, 'geodirectory');
|
|
| 2742 | + $field_value = __($post->{$type['htmlvar_name']}, 'geodirectory');
|
|
| 2743 | 2743 | |
| 2744 | - if (!empty($type['option_values'])) {
|
|
| 2745 | - $cf_option_values = geodir_string_values_to_options(stripslashes_deep($type['option_values']), true); |
|
| 2744 | + if (!empty($type['option_values'])) {
|
|
| 2745 | + $cf_option_values = geodir_string_values_to_options(stripslashes_deep($type['option_values']), true); |
|
| 2746 | 2746 | |
| 2747 | - if (!empty($cf_option_values)) {
|
|
| 2748 | - foreach ($cf_option_values as $cf_option_value) {
|
|
| 2749 | - if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$type['htmlvar_name']}) {
|
|
| 2750 | - $field_value = $cf_option_value['label']; |
|
| 2751 | - } |
|
| 2752 | - } |
|
| 2753 | - } |
|
| 2754 | - } |
|
| 2755 | - |
|
| 2756 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2757 | - |
|
| 2758 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2759 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2760 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2761 | - } |
|
| 2762 | - $html .= ' </span>' . $field_value . '</div>'; |
|
| 2763 | - } |
|
| 2764 | - break; |
|
| 2765 | - case 'multiselect': {
|
|
| 2766 | - if (is_array($post->{$type['htmlvar_name']})) {
|
|
| 2767 | - $post->{$type['htmlvar_name']} = implode(', ', $post->{$type['htmlvar_name']});
|
|
| 2768 | - } |
|
| 2769 | - |
|
| 2770 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2771 | - $field_icon_af = ''; |
|
| 2772 | - } elseif ($field_icon == '') {
|
|
| 2773 | - $field_icon_af = ''; |
|
| 2774 | - } else {
|
|
| 2775 | - $field_icon_af = $field_icon; |
|
| 2776 | - $field_icon = ''; |
|
| 2777 | - } |
|
| 2778 | - |
|
| 2779 | - $field_values = explode(',', trim($post->{$type['htmlvar_name']}, ","));
|
|
| 2780 | - |
|
| 2781 | - $option_values = array(); |
|
| 2782 | - if (!empty($type['option_values'])) {
|
|
| 2783 | - $cf_option_values = geodir_string_values_to_options(stripslashes_deep($type['option_values']), true); |
|
| 2747 | + if (!empty($cf_option_values)) {
|
|
| 2748 | + foreach ($cf_option_values as $cf_option_value) {
|
|
| 2749 | + if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$type['htmlvar_name']}) {
|
|
| 2750 | + $field_value = $cf_option_value['label']; |
|
| 2751 | + } |
|
| 2752 | + } |
|
| 2753 | + } |
|
| 2754 | + } |
|
| 2755 | + |
|
| 2756 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2757 | + |
|
| 2758 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2759 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2760 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2761 | + } |
|
| 2762 | + $html .= ' </span>' . $field_value . '</div>'; |
|
| 2763 | + } |
|
| 2764 | + break; |
|
| 2765 | + case 'multiselect': {
|
|
| 2766 | + if (is_array($post->{$type['htmlvar_name']})) {
|
|
| 2767 | + $post->{$type['htmlvar_name']} = implode(', ', $post->{$type['htmlvar_name']});
|
|
| 2768 | + } |
|
| 2769 | + |
|
| 2770 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2771 | + $field_icon_af = ''; |
|
| 2772 | + } elseif ($field_icon == '') {
|
|
| 2773 | + $field_icon_af = ''; |
|
| 2774 | + } else {
|
|
| 2775 | + $field_icon_af = $field_icon; |
|
| 2776 | + $field_icon = ''; |
|
| 2777 | + } |
|
| 2778 | + |
|
| 2779 | + $field_values = explode(',', trim($post->{$type['htmlvar_name']}, ","));
|
|
| 2780 | + |
|
| 2781 | + $option_values = array(); |
|
| 2782 | + if (!empty($type['option_values'])) {
|
|
| 2783 | + $cf_option_values = geodir_string_values_to_options(stripslashes_deep($type['option_values']), true); |
|
| 2784 | 2784 | |
| 2785 | - if (!empty($cf_option_values)) {
|
|
| 2786 | - foreach ($cf_option_values as $cf_option_value) {
|
|
| 2787 | - if (isset($cf_option_value['value']) && in_array($cf_option_value['value'], $field_values)) {
|
|
| 2788 | - $option_values[] = $cf_option_value['label']; |
|
| 2789 | - } |
|
| 2790 | - } |
|
| 2791 | - } |
|
| 2792 | - } |
|
| 2793 | - |
|
| 2794 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2795 | - |
|
| 2796 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2797 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2798 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2799 | - } |
|
| 2800 | - $html .= ' </span>'; |
|
| 2801 | - |
|
| 2802 | - $html .= ' <span class="gd-multiselect-value-output gd-val-'.$type['htmlvar_name'].'" >'; |
|
| 2803 | - |
|
| 2804 | - if (count($option_values) > 1) {
|
|
| 2805 | - $html .= "<span>".implode('</span>, <span>',$option_values)."</span>";
|
|
| 2806 | - } else {
|
|
| 2807 | - $vals = explode(",",$post->{$type['htmlvar_name']});
|
|
| 2808 | - $html .= "<span>".implode('</span>, <span>', $vals)."</span>";
|
|
| 2809 | - } |
|
| 2810 | - |
|
| 2811 | - $html .= ' </span>'; |
|
| 2812 | - |
|
| 2813 | - |
|
| 2814 | - |
|
| 2815 | - |
|
| 2816 | - $html .= '</div>'; |
|
| 2817 | - } |
|
| 2818 | - break; |
|
| 2819 | - case 'email': {
|
|
| 2820 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2821 | - $field_icon_af = ''; |
|
| 2822 | - } elseif ($field_icon == '') {
|
|
| 2823 | - $field_icon_af = '<i class="fa fa-envelope"></i>'; |
|
| 2824 | - } else {
|
|
| 2825 | - $field_icon_af = $field_icon; |
|
| 2826 | - $field_icon = ''; |
|
| 2827 | - } |
|
| 2828 | - |
|
| 2829 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2830 | - |
|
| 2831 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-email" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2832 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2833 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2834 | - } |
|
| 2835 | - $html .= ' </span>' . $post->{$type['htmlvar_name']} . '</div>';
|
|
| 2836 | - } |
|
| 2837 | - break; |
|
| 2838 | - case 'textarea': {
|
|
| 2839 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2840 | - $field_icon_af = ''; |
|
| 2841 | - } elseif ($field_icon == '') {
|
|
| 2842 | - $field_icon_af = ''; |
|
| 2843 | - } else {
|
|
| 2844 | - $field_icon_af = $field_icon; |
|
| 2845 | - $field_icon = ''; |
|
| 2846 | - } |
|
| 2847 | - |
|
| 2848 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2849 | - |
|
| 2850 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2851 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2852 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2853 | - } |
|
| 2854 | - $html .= '</span>' . wpautop($post->{$type['htmlvar_name']}) . '</div>';
|
|
| 2855 | - } |
|
| 2856 | - break; |
|
| 2857 | - case 'html': {
|
|
| 2858 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2859 | - $field_icon_af = ''; |
|
| 2860 | - } elseif ($field_icon == '') {
|
|
| 2861 | - $field_icon_af = ''; |
|
| 2862 | - } else {
|
|
| 2863 | - $field_icon_af = $field_icon; |
|
| 2864 | - $field_icon = ''; |
|
| 2865 | - } |
|
| 2866 | - |
|
| 2867 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2868 | - |
|
| 2869 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2870 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2871 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2872 | - } |
|
| 2873 | - $html .= ' </span>' . wpautop($post->{$type['htmlvar_name']}) . '</div>';
|
|
| 2874 | - } |
|
| 2875 | - break; |
|
| 2876 | - case 'file': {
|
|
| 2877 | - $html_var = $type['htmlvar_name']; |
|
| 2878 | - |
|
| 2879 | - if (!empty($post->{$type['htmlvar_name']})) {
|
|
| 2880 | - $files = explode(",", $post->{$type['htmlvar_name']});
|
|
| 2881 | - |
|
| 2882 | - if (!empty($files)) {
|
|
| 2883 | - $extra_fields = !empty($type['extra_fields']) ? maybe_unserialize($type['extra_fields']) : NULL; |
|
| 2884 | - $allowed_file_types = !empty($extra_fields['gd_file_types']) && is_array($extra_fields['gd_file_types']) && !in_array("*", $extra_fields['gd_file_types'] ) ? $extra_fields['gd_file_types'] : '';
|
|
| 2785 | + if (!empty($cf_option_values)) {
|
|
| 2786 | + foreach ($cf_option_values as $cf_option_value) {
|
|
| 2787 | + if (isset($cf_option_value['value']) && in_array($cf_option_value['value'], $field_values)) {
|
|
| 2788 | + $option_values[] = $cf_option_value['label']; |
|
| 2789 | + } |
|
| 2790 | + } |
|
| 2791 | + } |
|
| 2792 | + } |
|
| 2793 | + |
|
| 2794 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2795 | + |
|
| 2796 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2797 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2798 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2799 | + } |
|
| 2800 | + $html .= ' </span>'; |
|
| 2801 | + |
|
| 2802 | + $html .= ' <span class="gd-multiselect-value-output gd-val-'.$type['htmlvar_name'].'" >'; |
|
| 2803 | + |
|
| 2804 | + if (count($option_values) > 1) {
|
|
| 2805 | + $html .= "<span>".implode('</span>, <span>',$option_values)."</span>";
|
|
| 2806 | + } else {
|
|
| 2807 | + $vals = explode(",",$post->{$type['htmlvar_name']});
|
|
| 2808 | + $html .= "<span>".implode('</span>, <span>', $vals)."</span>";
|
|
| 2809 | + } |
|
| 2810 | + |
|
| 2811 | + $html .= ' </span>'; |
|
| 2812 | + |
|
| 2813 | + |
|
| 2814 | + |
|
| 2815 | + |
|
| 2816 | + $html .= '</div>'; |
|
| 2817 | + } |
|
| 2818 | + break; |
|
| 2819 | + case 'email': {
|
|
| 2820 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2821 | + $field_icon_af = ''; |
|
| 2822 | + } elseif ($field_icon == '') {
|
|
| 2823 | + $field_icon_af = '<i class="fa fa-envelope"></i>'; |
|
| 2824 | + } else {
|
|
| 2825 | + $field_icon_af = $field_icon; |
|
| 2826 | + $field_icon = ''; |
|
| 2827 | + } |
|
| 2828 | + |
|
| 2829 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2830 | + |
|
| 2831 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-email" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2832 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2833 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2834 | + } |
|
| 2835 | + $html .= ' </span>' . $post->{$type['htmlvar_name']} . '</div>';
|
|
| 2836 | + } |
|
| 2837 | + break; |
|
| 2838 | + case 'textarea': {
|
|
| 2839 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2840 | + $field_icon_af = ''; |
|
| 2841 | + } elseif ($field_icon == '') {
|
|
| 2842 | + $field_icon_af = ''; |
|
| 2843 | + } else {
|
|
| 2844 | + $field_icon_af = $field_icon; |
|
| 2845 | + $field_icon = ''; |
|
| 2846 | + } |
|
| 2847 | + |
|
| 2848 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2849 | + |
|
| 2850 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2851 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2852 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2853 | + } |
|
| 2854 | + $html .= '</span>' . wpautop($post->{$type['htmlvar_name']}) . '</div>';
|
|
| 2855 | + } |
|
| 2856 | + break; |
|
| 2857 | + case 'html': {
|
|
| 2858 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2859 | + $field_icon_af = ''; |
|
| 2860 | + } elseif ($field_icon == '') {
|
|
| 2861 | + $field_icon_af = ''; |
|
| 2862 | + } else {
|
|
| 2863 | + $field_icon_af = $field_icon; |
|
| 2864 | + $field_icon = ''; |
|
| 2865 | + } |
|
| 2866 | + |
|
| 2867 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2868 | + |
|
| 2869 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af; |
|
| 2870 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2871 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2872 | + } |
|
| 2873 | + $html .= ' </span>' . wpautop($post->{$type['htmlvar_name']}) . '</div>';
|
|
| 2874 | + } |
|
| 2875 | + break; |
|
| 2876 | + case 'file': {
|
|
| 2877 | + $html_var = $type['htmlvar_name']; |
|
| 2878 | + |
|
| 2879 | + if (!empty($post->{$type['htmlvar_name']})) {
|
|
| 2880 | + $files = explode(",", $post->{$type['htmlvar_name']});
|
|
| 2881 | + |
|
| 2882 | + if (!empty($files)) {
|
|
| 2883 | + $extra_fields = !empty($type['extra_fields']) ? maybe_unserialize($type['extra_fields']) : NULL; |
|
| 2884 | + $allowed_file_types = !empty($extra_fields['gd_file_types']) && is_array($extra_fields['gd_file_types']) && !in_array("*", $extra_fields['gd_file_types'] ) ? $extra_fields['gd_file_types'] : '';
|
|
| 2885 | 2885 | |
| 2886 | - $file_paths = ''; |
|
| 2887 | - foreach ($files as $file) {
|
|
| 2888 | - if (!empty($file)) {
|
|
| 2889 | - $image_name_arr = explode('/', $file);
|
|
| 2890 | - $filename = end($image_name_arr); |
|
| 2891 | - |
|
| 2892 | - $arr_file_type = wp_check_filetype($filename); |
|
| 2893 | - if (empty($arr_file_type['ext']) || empty($arr_file_type['type'])) {
|
|
| 2894 | - continue; |
|
| 2895 | - } |
|
| 2896 | - $uploaded_file_type = $arr_file_type['type']; |
|
| 2897 | - $uploaded_file_ext = $arr_file_type['ext']; |
|
| 2886 | + $file_paths = ''; |
|
| 2887 | + foreach ($files as $file) {
|
|
| 2888 | + if (!empty($file)) {
|
|
| 2889 | + $image_name_arr = explode('/', $file);
|
|
| 2890 | + $filename = end($image_name_arr); |
|
| 2891 | + |
|
| 2892 | + $arr_file_type = wp_check_filetype($filename); |
|
| 2893 | + if (empty($arr_file_type['ext']) || empty($arr_file_type['type'])) {
|
|
| 2894 | + continue; |
|
| 2895 | + } |
|
| 2896 | + $uploaded_file_type = $arr_file_type['type']; |
|
| 2897 | + $uploaded_file_ext = $arr_file_type['ext']; |
|
| 2898 | 2898 | |
| 2899 | - if (!empty($allowed_file_types) && !in_array($uploaded_file_ext, $allowed_file_types)) {
|
|
| 2900 | - continue; // Invalid file type. |
|
| 2901 | - } |
|
| 2902 | - |
|
| 2903 | - $image_file_types = array('image/jpg', 'image/jpeg', 'image/gif', 'image/png', 'image/bmp', 'image/x-icon');
|
|
| 2904 | - |
|
| 2905 | - // If the uploaded file is image |
|
| 2906 | - if (in_array($uploaded_file_type, $image_file_types)) {
|
|
| 2907 | - $file_paths .= '<div class="geodir-custom-post-gallery" class="clearfix">'; |
|
| 2908 | - $file_paths .= '<a href="'.$file.'">'; |
|
| 2909 | - $file_paths .= geodir_show_image(array('src' => $file), 'thumbnail', false, false);
|
|
| 2910 | - $file_paths .= '</a>'; |
|
| 2911 | - $file_paths .= '</div>'; |
|
| 2912 | - } else {
|
|
| 2913 | - $ext_path = '_' . $html_var . '_'; |
|
| 2914 | - $filename = explode($ext_path, $filename); |
|
| 2915 | - $file_paths .= '<a href="' . $file . '" target="_blank">' . $filename[count($filename) - 1] . '</a>'; |
|
| 2916 | - } |
|
| 2917 | - } |
|
| 2918 | - } |
|
| 2919 | - |
|
| 2920 | - if (strpos($field_icon, 'http') !== false) {
|
|
| 2921 | - $field_icon_af = ''; |
|
| 2922 | - } else if ($field_icon == '') {
|
|
| 2923 | - $field_icon_af = ''; |
|
| 2924 | - } else {
|
|
| 2925 | - $field_icon_af = $field_icon; |
|
| 2926 | - $field_icon = ''; |
|
| 2927 | - } |
|
| 2928 | - |
|
| 2929 | - $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2930 | - |
|
| 2931 | - |
|
| 2932 | - $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . ' geodir-custom-file-box" style="clear:both;"><span class="geodir-i-file" style="display:inline-block;vertical-align:top;padding-right:14px;' . $field_icon . '">' . $field_icon_af; |
|
| 2933 | - |
|
| 2934 | - if ($field_set_start == 1 && $site_title != '') {
|
|
| 2935 | - $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2936 | - } |
|
| 2937 | - |
|
| 2938 | - $html .= ' </span>' . $file_paths . '</div>'; |
|
| 2939 | - } |
|
| 2940 | - } |
|
| 2941 | - } |
|
| 2942 | - break; |
|
| 2943 | - } |
|
| 2944 | - |
|
| 2945 | - |
|
| 2946 | - /** |
|
| 2947 | - * Filter custom field output in tab. |
|
| 2948 | - * |
|
| 2949 | - * @since 1.5.6 |
|
| 2950 | - * |
|
| 2951 | - * @param string $html_var The HTML variable name for the field. |
|
| 2952 | - * @param string $html Custom field unfiltered HTML. |
|
| 2953 | - * @param array $variables_array Custom field variables array. |
|
| 2954 | - */ |
|
| 2955 | - $html = apply_filters("geodir_tab_show_{$html_var}", $html, $variables_array);
|
|
| 2956 | - |
|
| 2957 | - $fieldset_html = ''; |
|
| 2958 | - if ($field_set_start == 1) {
|
|
| 2959 | - $add_html = false; |
|
| 2960 | - if ($type['type'] == 'fieldset' && $fieldset_count > 1) {
|
|
| 2961 | - if ($fieldset != '') {
|
|
| 2962 | - $add_html = true; |
|
| 2963 | - $label = $fieldset_arr[$fieldset_count - 1]['label']; |
|
| 2964 | - $htmlvar_name = $fieldset_arr[$fieldset_count - 1]['htmlvar_name']; |
|
| 2965 | - } |
|
| 2966 | - $fieldset_html = $fieldset; |
|
| 2967 | - $fieldset = ''; |
|
| 2968 | - } else {
|
|
| 2969 | - $fieldset .= $html; |
|
| 2970 | - if ($total_fields == $count_field && $fieldset != '') {
|
|
| 2971 | - $add_html = true; |
|
| 2972 | - $label = $fieldset_arr[$fieldset_count]['label']; |
|
| 2973 | - $htmlvar_name = $fieldset_arr[$fieldset_count]['htmlvar_name']; |
|
| 2974 | - $fieldset_html = $fieldset; |
|
| 2975 | - } |
|
| 2976 | - } |
|
| 2977 | - |
|
| 2978 | - if ($add_html) {
|
|
| 2979 | - $tabs_arr[$htmlvar_name] = array( |
|
| 2980 | - 'heading_text' => __($label, 'geodirectory'), |
|
| 2981 | - 'is_active_tab' => false, |
|
| 2982 | - /** |
|
| 2983 | - * Filter if a custom field should be displayed on the details page tab. |
|
| 2984 | - * |
|
| 2985 | - * @since 1.0.0 |
|
| 2986 | - * @param string $htmlvar_name The field HTML var name. |
|
| 2987 | - */ |
|
| 2988 | - 'is_display' => apply_filters('geodir_detail_page_tab_is_display', true, $htmlvar_name),
|
|
| 2989 | - 'tab_content' => '<div class="geodir-company_info field-group">' . $fieldset_html . '</html>' |
|
| 2990 | - ); |
|
| 2991 | - } |
|
| 2992 | - } else {
|
|
| 2993 | - if ($html != '') {
|
|
| 2994 | - $tabs_arr[$field['htmlvar_name']] = array( |
|
| 2995 | - 'heading_text' => __($label, 'geodirectory'), |
|
| 2996 | - 'is_active_tab' => false, |
|
| 2997 | - /** This action is documented in geodirectory_hooks_actions.php */ |
|
| 2998 | - 'is_display' => apply_filters('geodir_detail_page_tab_is_display', true, $field['htmlvar_name']),
|
|
| 2999 | - 'tab_content' => $html |
|
| 3000 | - ); |
|
| 3001 | - } |
|
| 3002 | - } |
|
| 3003 | - } |
|
| 3004 | - } |
|
| 3005 | - } |
|
| 3006 | - } |
|
| 3007 | - return $tabs_arr; |
|
| 2899 | + if (!empty($allowed_file_types) && !in_array($uploaded_file_ext, $allowed_file_types)) {
|
|
| 2900 | + continue; // Invalid file type. |
|
| 2901 | + } |
|
| 2902 | + |
|
| 2903 | + $image_file_types = array('image/jpg', 'image/jpeg', 'image/gif', 'image/png', 'image/bmp', 'image/x-icon');
|
|
| 2904 | + |
|
| 2905 | + // If the uploaded file is image |
|
| 2906 | + if (in_array($uploaded_file_type, $image_file_types)) {
|
|
| 2907 | + $file_paths .= '<div class="geodir-custom-post-gallery" class="clearfix">'; |
|
| 2908 | + $file_paths .= '<a href="'.$file.'">'; |
|
| 2909 | + $file_paths .= geodir_show_image(array('src' => $file), 'thumbnail', false, false);
|
|
| 2910 | + $file_paths .= '</a>'; |
|
| 2911 | + $file_paths .= '</div>'; |
|
| 2912 | + } else {
|
|
| 2913 | + $ext_path = '_' . $html_var . '_'; |
|
| 2914 | + $filename = explode($ext_path, $filename); |
|
| 2915 | + $file_paths .= '<a href="' . $file . '" target="_blank">' . $filename[count($filename) - 1] . '</a>'; |
|
| 2916 | + } |
|
| 2917 | + } |
|
| 2918 | + } |
|
| 2919 | + |
|
| 2920 | + if (strpos($field_icon, 'http') !== false) {
|
|
| 2921 | + $field_icon_af = ''; |
|
| 2922 | + } else if ($field_icon == '') {
|
|
| 2923 | + $field_icon_af = ''; |
|
| 2924 | + } else {
|
|
| 2925 | + $field_icon_af = $field_icon; |
|
| 2926 | + $field_icon = ''; |
|
| 2927 | + } |
|
| 2928 | + |
|
| 2929 | + $geodir_odd_even = $field_set_start == 1 && $i % 2 == 0 ? 'geodir_more_info_even' : 'geodir_more_info_odd'; |
|
| 2930 | + |
|
| 2931 | + |
|
| 2932 | + $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . ' geodir-custom-file-box" style="clear:both;"><span class="geodir-i-file" style="display:inline-block;vertical-align:top;padding-right:14px;' . $field_icon . '">' . $field_icon_af; |
|
| 2933 | + |
|
| 2934 | + if ($field_set_start == 1 && $site_title != '') {
|
|
| 2935 | + $html .= ' ' . __($site_title, 'geodirectory') . ': '; |
|
| 2936 | + } |
|
| 2937 | + |
|
| 2938 | + $html .= ' </span>' . $file_paths . '</div>'; |
|
| 2939 | + } |
|
| 2940 | + } |
|
| 2941 | + } |
|
| 2942 | + break; |
|
| 2943 | + } |
|
| 2944 | + |
|
| 2945 | + |
|
| 2946 | + /** |
|
| 2947 | + * Filter custom field output in tab. |
|
| 2948 | + * |
|
| 2949 | + * @since 1.5.6 |
|
| 2950 | + * |
|
| 2951 | + * @param string $html_var The HTML variable name for the field. |
|
| 2952 | + * @param string $html Custom field unfiltered HTML. |
|
| 2953 | + * @param array $variables_array Custom field variables array. |
|
| 2954 | + */ |
|
| 2955 | + $html = apply_filters("geodir_tab_show_{$html_var}", $html, $variables_array);
|
|
| 2956 | + |
|
| 2957 | + $fieldset_html = ''; |
|
| 2958 | + if ($field_set_start == 1) {
|
|
| 2959 | + $add_html = false; |
|
| 2960 | + if ($type['type'] == 'fieldset' && $fieldset_count > 1) {
|
|
| 2961 | + if ($fieldset != '') {
|
|
| 2962 | + $add_html = true; |
|
| 2963 | + $label = $fieldset_arr[$fieldset_count - 1]['label']; |
|
| 2964 | + $htmlvar_name = $fieldset_arr[$fieldset_count - 1]['htmlvar_name']; |
|
| 2965 | + } |
|
| 2966 | + $fieldset_html = $fieldset; |
|
| 2967 | + $fieldset = ''; |
|
| 2968 | + } else {
|
|
| 2969 | + $fieldset .= $html; |
|
| 2970 | + if ($total_fields == $count_field && $fieldset != '') {
|
|
| 2971 | + $add_html = true; |
|
| 2972 | + $label = $fieldset_arr[$fieldset_count]['label']; |
|
| 2973 | + $htmlvar_name = $fieldset_arr[$fieldset_count]['htmlvar_name']; |
|
| 2974 | + $fieldset_html = $fieldset; |
|
| 2975 | + } |
|
| 2976 | + } |
|
| 2977 | + |
|
| 2978 | + if ($add_html) {
|
|
| 2979 | + $tabs_arr[$htmlvar_name] = array( |
|
| 2980 | + 'heading_text' => __($label, 'geodirectory'), |
|
| 2981 | + 'is_active_tab' => false, |
|
| 2982 | + /** |
|
| 2983 | + * Filter if a custom field should be displayed on the details page tab. |
|
| 2984 | + * |
|
| 2985 | + * @since 1.0.0 |
|
| 2986 | + * @param string $htmlvar_name The field HTML var name. |
|
| 2987 | + */ |
|
| 2988 | + 'is_display' => apply_filters('geodir_detail_page_tab_is_display', true, $htmlvar_name),
|
|
| 2989 | + 'tab_content' => '<div class="geodir-company_info field-group">' . $fieldset_html . '</html>' |
|
| 2990 | + ); |
|
| 2991 | + } |
|
| 2992 | + } else {
|
|
| 2993 | + if ($html != '') {
|
|
| 2994 | + $tabs_arr[$field['htmlvar_name']] = array( |
|
| 2995 | + 'heading_text' => __($label, 'geodirectory'), |
|
| 2996 | + 'is_active_tab' => false, |
|
| 2997 | + /** This action is documented in geodirectory_hooks_actions.php */ |
|
| 2998 | + 'is_display' => apply_filters('geodir_detail_page_tab_is_display', true, $field['htmlvar_name']),
|
|
| 2999 | + 'tab_content' => $html |
|
| 3000 | + ); |
|
| 3001 | + } |
|
| 3002 | + } |
|
| 3003 | + } |
|
| 3004 | + } |
|
| 3005 | + } |
|
| 3006 | + } |
|
| 3007 | + return $tabs_arr; |
|
| 3008 | 3008 | } |
| 3009 | 3009 | |
| 3010 | 3010 | /* display add listing page for wpml */ |
@@ -3028,37 +3028,37 @@ discard block |
||
| 3028 | 3028 | */ |
| 3029 | 3029 | function geodir_add_post_status_author_page() |
| 3030 | 3030 | {
|
| 3031 | - global $wpdb, $post; |
|
| 3032 | - |
|
| 3033 | - $html = ''; |
|
| 3034 | - if (get_current_user_id()) {
|
|
| 3035 | - if (geodir_is_page('author') && !empty($post) && isset($post->post_author) && $post->post_author == get_current_user_id()) {
|
|
| 3036 | - |
|
| 3037 | - // we need to query real status direct as we dynamically change the status for author on author page so even non author status can view them. |
|
| 3038 | - $real_status = $wpdb->get_var("SELECT post_status from $wpdb->posts WHERE ID=$post->ID");
|
|
| 3039 | - $status = "<strong>(";
|
|
| 3040 | - $status_icon = '<i class="fa fa-play"></i>'; |
|
| 3041 | - if ($real_status == 'publish') {
|
|
| 3042 | - $status .= __('Published', 'geodirectory');
|
|
| 3043 | - } else {
|
|
| 3044 | - $status .= __('Not published', 'geodirectory');
|
|
| 3045 | - $status_icon = '<i class="fa fa-pause"></i>'; |
|
| 3046 | - } |
|
| 3047 | - $status .= ")</strong>"; |
|
| 3031 | + global $wpdb, $post; |
|
| 3032 | + |
|
| 3033 | + $html = ''; |
|
| 3034 | + if (get_current_user_id()) {
|
|
| 3035 | + if (geodir_is_page('author') && !empty($post) && isset($post->post_author) && $post->post_author == get_current_user_id()) {
|
|
| 3036 | + |
|
| 3037 | + // we need to query real status direct as we dynamically change the status for author on author page so even non author status can view them. |
|
| 3038 | + $real_status = $wpdb->get_var("SELECT post_status from $wpdb->posts WHERE ID=$post->ID");
|
|
| 3039 | + $status = "<strong>(";
|
|
| 3040 | + $status_icon = '<i class="fa fa-play"></i>'; |
|
| 3041 | + if ($real_status == 'publish') {
|
|
| 3042 | + $status .= __('Published', 'geodirectory');
|
|
| 3043 | + } else {
|
|
| 3044 | + $status .= __('Not published', 'geodirectory');
|
|
| 3045 | + $status_icon = '<i class="fa fa-pause"></i>'; |
|
| 3046 | + } |
|
| 3047 | + $status .= ")</strong>"; |
|
| 3048 | 3048 | |
| 3049 | - $html = '<span class="geodir-post-status">' . $status_icon . ' <font class="geodir-status-label">' . __('Status: ', 'geodirectory') . '</font>' . $status . '</span>';
|
|
| 3050 | - } |
|
| 3051 | - } |
|
| 3049 | + $html = '<span class="geodir-post-status">' . $status_icon . ' <font class="geodir-status-label">' . __('Status: ', 'geodirectory') . '</font>' . $status . '</span>';
|
|
| 3050 | + } |
|
| 3051 | + } |
|
| 3052 | 3052 | |
| 3053 | - if ($html != '') {
|
|
| 3054 | - /** |
|
| 3055 | - * Filter the post status text on the author page. |
|
| 3056 | - * |
|
| 3057 | - * @since 1.0.0 |
|
| 3058 | - * @param string $html The HTML of the status. |
|
| 3059 | - */ |
|
| 3060 | - echo apply_filters('geodir_filter_status_text_on_author_page', $html);
|
|
| 3061 | - } |
|
| 3053 | + if ($html != '') {
|
|
| 3054 | + /** |
|
| 3055 | + * Filter the post status text on the author page. |
|
| 3056 | + * |
|
| 3057 | + * @since 1.0.0 |
|
| 3058 | + * @param string $html The HTML of the status. |
|
| 3059 | + */ |
|
| 3060 | + echo apply_filters('geodir_filter_status_text_on_author_page', $html);
|
|
| 3061 | + } |
|
| 3062 | 3062 | |
| 3063 | 3063 | |
| 3064 | 3064 | } |
@@ -3072,21 +3072,21 @@ discard block |
||
| 3072 | 3072 | */ |
| 3073 | 3073 | function geodir_init_no_rating() |
| 3074 | 3074 | {
|
| 3075 | - if (get_option('geodir_disable_rating')) {
|
|
| 3076 | - remove_action('comment_form_logged_in_after', 'geodir_comment_rating_fields');
|
|
| 3077 | - remove_action('comment_form_before_fields', 'geodir_comment_rating_fields');
|
|
| 3078 | - remove_action('comment_form_logged_in_after', 'geodir_reviewrating_comment_rating_fields');
|
|
| 3079 | - remove_action('comment_form_before_fields', 'geodir_reviewrating_comment_rating_fields');
|
|
| 3080 | - remove_action('add_meta_boxes_comment', 'geodir_comment_add_meta_box');
|
|
| 3081 | - remove_action('add_meta_boxes', 'geodir_reviewrating_comment_metabox', 13);
|
|
| 3082 | - remove_filter('comment_text', 'geodir_wrap_comment_text', 40);
|
|
| 3083 | - |
|
| 3084 | - add_action('comment_form_logged_in_after', 'geodir_no_rating_rating_fields');
|
|
| 3085 | - add_action('comment_form_before_fields', 'geodir_no_rating_rating_fields');
|
|
| 3086 | - add_filter('comment_text', 'geodir_no_rating_comment_text', 100, 2);
|
|
| 3087 | - add_filter('geodir_detail_page_review_rating_html', 'geodir_no_rating_review_rating_html', 100);
|
|
| 3088 | - add_filter('geodir_get_sort_options', 'geodir_no_rating_get_sort_options', 100, 2);
|
|
| 3089 | - } |
|
| 3075 | + if (get_option('geodir_disable_rating')) {
|
|
| 3076 | + remove_action('comment_form_logged_in_after', 'geodir_comment_rating_fields');
|
|
| 3077 | + remove_action('comment_form_before_fields', 'geodir_comment_rating_fields');
|
|
| 3078 | + remove_action('comment_form_logged_in_after', 'geodir_reviewrating_comment_rating_fields');
|
|
| 3079 | + remove_action('comment_form_before_fields', 'geodir_reviewrating_comment_rating_fields');
|
|
| 3080 | + remove_action('add_meta_boxes_comment', 'geodir_comment_add_meta_box');
|
|
| 3081 | + remove_action('add_meta_boxes', 'geodir_reviewrating_comment_metabox', 13);
|
|
| 3082 | + remove_filter('comment_text', 'geodir_wrap_comment_text', 40);
|
|
| 3083 | + |
|
| 3084 | + add_action('comment_form_logged_in_after', 'geodir_no_rating_rating_fields');
|
|
| 3085 | + add_action('comment_form_before_fields', 'geodir_no_rating_rating_fields');
|
|
| 3086 | + add_filter('comment_text', 'geodir_no_rating_comment_text', 100, 2);
|
|
| 3087 | + add_filter('geodir_detail_page_review_rating_html', 'geodir_no_rating_review_rating_html', 100);
|
|
| 3088 | + add_filter('geodir_get_sort_options', 'geodir_no_rating_get_sort_options', 100, 2);
|
|
| 3089 | + } |
|
| 3090 | 3090 | } |
| 3091 | 3091 | |
| 3092 | 3092 | /** |
@@ -3098,20 +3098,20 @@ discard block |
||
| 3098 | 3098 | */ |
| 3099 | 3099 | function geodir_no_rating_rating_fields() |
| 3100 | 3100 | {
|
| 3101 | - global $post; |
|
| 3101 | + global $post; |
|
| 3102 | 3102 | |
| 3103 | - $post_types = geodir_get_posttypes(); |
|
| 3103 | + $post_types = geodir_get_posttypes(); |
|
| 3104 | 3104 | |
| 3105 | - if (!empty($post) && isset($post->post_type) && in_array($post->post_type, $post_types)) {
|
|
| 3106 | - if (is_plugin_active('geodir_review_rating_manager/geodir_review_rating_manager.php')) {
|
|
| 3107 | - echo '<input type="hidden" value="1" name="geodir_rating[overall]" />'; |
|
| 3108 | - if (get_option('geodir_reviewrating_enable_images')) {
|
|
| 3109 | - geodir_reviewrating_rating_img_html(); |
|
| 3110 | - } |
|
| 3111 | - } else {
|
|
| 3112 | - echo '<input type="hidden" id="geodir_overallrating" name="geodir_overallrating" value="1" />'; |
|
| 3113 | - } |
|
| 3114 | - } |
|
| 3105 | + if (!empty($post) && isset($post->post_type) && in_array($post->post_type, $post_types)) {
|
|
| 3106 | + if (is_plugin_active('geodir_review_rating_manager/geodir_review_rating_manager.php')) {
|
|
| 3107 | + echo '<input type="hidden" value="1" name="geodir_rating[overall]" />'; |
|
| 3108 | + if (get_option('geodir_reviewrating_enable_images')) {
|
|
| 3109 | + geodir_reviewrating_rating_img_html(); |
|
| 3110 | + } |
|
| 3111 | + } else {
|
|
| 3112 | + echo '<input type="hidden" id="geodir_overallrating" name="geodir_overallrating" value="1" />'; |
|
| 3113 | + } |
|
| 3114 | + } |
|
| 3115 | 3115 | } |
| 3116 | 3116 | |
| 3117 | 3117 | /** |
@@ -3125,11 +3125,11 @@ discard block |
||
| 3125 | 3125 | */ |
| 3126 | 3126 | function geodir_no_rating_comment_text($content, $comment = '') |
| 3127 | 3127 | {
|
| 3128 | - if (!is_admin()) {
|
|
| 3129 | - return '<div class="description">' . $content . '</div>'; |
|
| 3130 | - } else {
|
|
| 3131 | - return $content; |
|
| 3132 | - } |
|
| 3128 | + if (!is_admin()) {
|
|
| 3129 | + return '<div class="description">' . $content . '</div>'; |
|
| 3130 | + } else {
|
|
| 3131 | + return $content; |
|
| 3132 | + } |
|
| 3133 | 3133 | } |
| 3134 | 3134 | |
| 3135 | 3135 | /** |
@@ -3142,7 +3142,7 @@ discard block |
||
| 3142 | 3142 | */ |
| 3143 | 3143 | function geodir_no_rating_review_rating_html($content = '') |
| 3144 | 3144 | {
|
| 3145 | - return NULL; |
|
| 3145 | + return NULL; |
|
| 3146 | 3146 | } |
| 3147 | 3147 | |
| 3148 | 3148 | /** |
@@ -3156,19 +3156,19 @@ discard block |
||
| 3156 | 3156 | */ |
| 3157 | 3157 | function geodir_no_rating_get_sort_options($options, $post_type = '') |
| 3158 | 3158 | {
|
| 3159 | - $new_options = array(); |
|
| 3160 | - if (!empty($options)) {
|
|
| 3161 | - foreach ($options as $option) {
|
|
| 3162 | - if (is_object($option) && isset($option->htmlvar_name) && $option->htmlvar_name == 'overall_rating') {
|
|
| 3163 | - continue; |
|
| 3164 | - } |
|
| 3165 | - $new_options[] = $option; |
|
| 3166 | - } |
|
| 3159 | + $new_options = array(); |
|
| 3160 | + if (!empty($options)) {
|
|
| 3161 | + foreach ($options as $option) {
|
|
| 3162 | + if (is_object($option) && isset($option->htmlvar_name) && $option->htmlvar_name == 'overall_rating') {
|
|
| 3163 | + continue; |
|
| 3164 | + } |
|
| 3165 | + $new_options[] = $option; |
|
| 3166 | + } |
|
| 3167 | 3167 | |
| 3168 | - $options = $new_options; |
|
| 3169 | - } |
|
| 3168 | + $options = $new_options; |
|
| 3169 | + } |
|
| 3170 | 3170 | |
| 3171 | - return $options; |
|
| 3171 | + return $options; |
|
| 3172 | 3172 | } |
| 3173 | 3173 | |
| 3174 | 3174 | add_filter('geodir_all_js_msg', 'geodir_all_js_msg_no_rating', 100);
|
@@ -3182,11 +3182,11 @@ discard block |
||
| 3182 | 3182 | */ |
| 3183 | 3183 | function geodir_all_js_msg_no_rating($msg = array()) |
| 3184 | 3184 | {
|
| 3185 | - if (get_option('geodir_disable_rating')) {
|
|
| 3186 | - $msg['gd_cmt_no_rating'] = true; |
|
| 3187 | - } |
|
| 3185 | + if (get_option('geodir_disable_rating')) {
|
|
| 3186 | + $msg['gd_cmt_no_rating'] = true; |
|
| 3187 | + } |
|
| 3188 | 3188 | |
| 3189 | - return $msg; |
|
| 3189 | + return $msg; |
|
| 3190 | 3190 | } |
| 3191 | 3191 | |
| 3192 | 3192 | add_filter('body_class', 'geodir_body_class_no_rating', 100);
|
@@ -3200,13 +3200,13 @@ discard block |
||
| 3200 | 3200 | */ |
| 3201 | 3201 | function geodir_body_class_no_rating($classes = array()) |
| 3202 | 3202 | {
|
| 3203 | - if (get_option('geodir_disable_rating')) {
|
|
| 3204 | - $classes[] = 'gd-no-rating'; |
|
| 3205 | - } |
|
| 3203 | + if (get_option('geodir_disable_rating')) {
|
|
| 3204 | + $classes[] = 'gd-no-rating'; |
|
| 3205 | + } |
|
| 3206 | 3206 | |
| 3207 | - $classes[] = 'gd-map-' . geodir_map_name(); |
|
| 3207 | + $classes[] = 'gd-map-' . geodir_map_name(); |
|
| 3208 | 3208 | |
| 3209 | - return $classes; |
|
| 3209 | + return $classes; |
|
| 3210 | 3210 | } |
| 3211 | 3211 | |
| 3212 | 3212 | add_filter('admin_body_class', 'geodir_admin_body_class_no_rating', 100);
|
@@ -3220,13 +3220,13 @@ discard block |
||
| 3220 | 3220 | */ |
| 3221 | 3221 | function geodir_admin_body_class_no_rating($class = '') |
| 3222 | 3222 | {
|
| 3223 | - if (get_option('geodir_disable_rating')) {
|
|
| 3224 | - $class .= ' gd-no-rating'; |
|
| 3225 | - } |
|
| 3223 | + if (get_option('geodir_disable_rating')) {
|
|
| 3224 | + $class .= ' gd-no-rating'; |
|
| 3225 | + } |
|
| 3226 | 3226 | |
| 3227 | - $class .= ' gd-map-' . geodir_map_name(); |
|
| 3227 | + $class .= ' gd-map-' . geodir_map_name(); |
|
| 3228 | 3228 | |
| 3229 | - return $class; |
|
| 3229 | + return $class; |
|
| 3230 | 3230 | } |
| 3231 | 3231 | |
| 3232 | 3232 | add_action('wp_head', 'geodir_wp_head_no_rating');
|
@@ -3239,10 +3239,10 @@ discard block |
||
| 3239 | 3239 | */ |
| 3240 | 3240 | function geodir_wp_head_no_rating() |
| 3241 | 3241 | {
|
| 3242 | - if (get_option('geodir_disable_rating')) {
|
|
| 3243 | - echo '<style>body .geodir-rating, body .geodir-bubble-rating, body .gd_ratings_module_box{display:none!important;}</style>';
|
|
| 3244 | - echo '<script type="text/javascript">jQuery(function(){jQuery(".gd_rating_show").parent(".geodir-rating").remove();});</script>';
|
|
| 3245 | - } |
|
| 3242 | + if (get_option('geodir_disable_rating')) {
|
|
| 3243 | + echo '<style>body .geodir-rating, body .geodir-bubble-rating, body .gd_ratings_module_box{display:none!important;}</style>';
|
|
| 3244 | + echo '<script type="text/javascript">jQuery(function(){jQuery(".gd_rating_show").parent(".geodir-rating").remove();});</script>';
|
|
| 3245 | + } |
|
| 3246 | 3246 | } |
| 3247 | 3247 | |
| 3248 | 3248 | add_filter('geodir_load_db_language', 'geodir_load_custom_field_translation');
|
@@ -3259,36 +3259,36 @@ discard block |
||
| 3259 | 3259 | * @return array Translation texts. |
| 3260 | 3260 | */ |
| 3261 | 3261 | function geodir_load_gd_options_text_translation($translation_texts = array()) {
|
| 3262 | - $translation_texts = !empty( $translation_texts ) && is_array( $translation_texts ) ? $translation_texts : array(); |
|
| 3263 | - |
|
| 3264 | - $gd_options = array('geodir_post_submited_success_email_subject_admin', 'geodir_post_submited_success_email_content_admin', 'geodir_post_submited_success_email_subject', 'geodir_post_submited_success_email_content', 'geodir_forgot_password_subject', 'geodir_forgot_password_content', 'geodir_registration_success_email_subject', 'geodir_registration_success_email_content', 'geodir_post_published_email_subject', 'geodir_post_published_email_content', 'geodir_email_friend_subject', 'geodir_email_friend_content', 'geodir_email_enquiry_subject', 'geodir_email_enquiry_content', 'geodir_post_added_success_msg_content', 'geodir_post_edited_email_subject_admin', 'geodir_post_edited_email_content_admin');
|
|
| 3265 | - |
|
| 3266 | - /** |
|
| 3267 | - * Filters the geodirectory option names that requires to add for translation. |
|
| 3268 | - * |
|
| 3269 | - * @since 1.5.7 |
|
| 3270 | - * @package GeoDirectory |
|
| 3271 | - * |
|
| 3272 | - * @param array $gd_options Array of option names. |
|
| 3273 | - */ |
|
| 3274 | - $gd_options = apply_filters('geodir_gd_options_for_translation', $gd_options);
|
|
| 3275 | - $gd_options = array_unique($gd_options); |
|
| 3276 | - |
|
| 3277 | - if (!empty($gd_options)) {
|
|
| 3278 | - foreach ($gd_options as $gd_option) {
|
|
| 3279 | - if ($gd_option != '' && $option_value = get_option($gd_option)) {
|
|
| 3280 | - $option_value = is_string($option_value) ? stripslashes_deep($option_value) : ''; |
|
| 3262 | + $translation_texts = !empty( $translation_texts ) && is_array( $translation_texts ) ? $translation_texts : array(); |
|
| 3263 | + |
|
| 3264 | + $gd_options = array('geodir_post_submited_success_email_subject_admin', 'geodir_post_submited_success_email_content_admin', 'geodir_post_submited_success_email_subject', 'geodir_post_submited_success_email_content', 'geodir_forgot_password_subject', 'geodir_forgot_password_content', 'geodir_registration_success_email_subject', 'geodir_registration_success_email_content', 'geodir_post_published_email_subject', 'geodir_post_published_email_content', 'geodir_email_friend_subject', 'geodir_email_friend_content', 'geodir_email_enquiry_subject', 'geodir_email_enquiry_content', 'geodir_post_added_success_msg_content', 'geodir_post_edited_email_subject_admin', 'geodir_post_edited_email_content_admin');
|
|
| 3265 | + |
|
| 3266 | + /** |
|
| 3267 | + * Filters the geodirectory option names that requires to add for translation. |
|
| 3268 | + * |
|
| 3269 | + * @since 1.5.7 |
|
| 3270 | + * @package GeoDirectory |
|
| 3271 | + * |
|
| 3272 | + * @param array $gd_options Array of option names. |
|
| 3273 | + */ |
|
| 3274 | + $gd_options = apply_filters('geodir_gd_options_for_translation', $gd_options);
|
|
| 3275 | + $gd_options = array_unique($gd_options); |
|
| 3276 | + |
|
| 3277 | + if (!empty($gd_options)) {
|
|
| 3278 | + foreach ($gd_options as $gd_option) {
|
|
| 3279 | + if ($gd_option != '' && $option_value = get_option($gd_option)) {
|
|
| 3280 | + $option_value = is_string($option_value) ? stripslashes_deep($option_value) : ''; |
|
| 3281 | 3281 | |
| 3282 | - if ($option_value != '' && !in_array($option_value, $translation_texts)) {
|
|
| 3283 | - $translation_texts[] = stripslashes_deep($option_value); |
|
| 3284 | - } |
|
| 3285 | - } |
|
| 3286 | - } |
|
| 3287 | - } |
|
| 3282 | + if ($option_value != '' && !in_array($option_value, $translation_texts)) {
|
|
| 3283 | + $translation_texts[] = stripslashes_deep($option_value); |
|
| 3284 | + } |
|
| 3285 | + } |
|
| 3286 | + } |
|
| 3287 | + } |
|
| 3288 | 3288 | |
| 3289 | - $translation_texts = !empty($translation_texts) ? array_unique($translation_texts) : $translation_texts; |
|
| 3289 | + $translation_texts = !empty($translation_texts) ? array_unique($translation_texts) : $translation_texts; |
|
| 3290 | 3290 | |
| 3291 | - return $translation_texts; |
|
| 3291 | + return $translation_texts; |
|
| 3292 | 3292 | } |
| 3293 | 3293 | |
| 3294 | 3294 | add_filter('geodir_load_db_language', 'geodir_load_gd_options_text_translation');
|
@@ -3302,15 +3302,15 @@ discard block |
||
| 3302 | 3302 | |
| 3303 | 3303 | add_filter('get_comments_link', 'gd_get_comments_link', 10, 2);
|
| 3304 | 3304 | function gd_get_comments_link($comments_link, $post_id) {
|
| 3305 | - $post_type = get_post_type($post_id); |
|
| 3305 | + $post_type = get_post_type($post_id); |
|
| 3306 | 3306 | |
| 3307 | - $all_postypes = geodir_get_posttypes(); |
|
| 3308 | - if (in_array($post_type, $all_postypes)) {
|
|
| 3309 | - $comments_link = str_replace('#comments', '#reviews', $comments_link);
|
|
| 3310 | - $comments_link = str_replace('#respond', '#reviews', $comments_link);
|
|
| 3311 | - } |
|
| 3307 | + $all_postypes = geodir_get_posttypes(); |
|
| 3308 | + if (in_array($post_type, $all_postypes)) {
|
|
| 3309 | + $comments_link = str_replace('#comments', '#reviews', $comments_link);
|
|
| 3310 | + $comments_link = str_replace('#respond', '#reviews', $comments_link);
|
|
| 3311 | + } |
|
| 3312 | 3312 | |
| 3313 | - return $comments_link; |
|
| 3313 | + return $comments_link; |
|
| 3314 | 3314 | } |
| 3315 | 3315 | |
| 3316 | 3316 | |
@@ -3328,11 +3328,11 @@ discard block |
||
| 3328 | 3328 | function geodir_add_nav_menu_class( $args ) |
| 3329 | 3329 | {
|
| 3330 | 3330 | |
| 3331 | - if(isset($args['menu_class'])){
|
|
| 3332 | - $args['menu_class'] = $args['menu_class']." gd-menu-z"; |
|
| 3333 | - } |
|
| 3331 | + if(isset($args['menu_class'])){
|
|
| 3332 | + $args['menu_class'] = $args['menu_class']." gd-menu-z"; |
|
| 3333 | + } |
|
| 3334 | 3334 | |
| 3335 | - return $args; |
|
| 3335 | + return $args; |
|
| 3336 | 3336 | } |
| 3337 | 3337 | |
| 3338 | 3338 | add_filter( 'wp_nav_menu_args', 'geodir_add_nav_menu_class' ); |
| 3339 | 3339 | \ No newline at end of file |
@@ -12,27 +12,27 @@ |
||
| 12 | 12 | <div class="clearfix"> |
| 13 | 13 | <div id="geodir_content"> |
| 14 | 14 | <?php |
| 15 | - /** This action is documented in geodirectory-templates/geodir-home.php */ |
|
| 16 | - do_action('geodir_add_page_content', 'before', 'info-page'); |
|
| 17 | - global $information; |
|
| 18 | - echo '<h5 class="geodir_information">'; |
|
| 19 | - echo $information; |
|
| 20 | - echo '</h5>'; |
|
| 21 | - /** This action is documented in geodirectory-templates/geodir-home.php */ |
|
| 22 | - do_action('geodir_add_page_content', 'after', 'info-page'); |
|
| 23 | - ?> |
|
| 15 | + /** This action is documented in geodirectory-templates/geodir-home.php */ |
|
| 16 | + do_action('geodir_add_page_content', 'before', 'info-page'); |
|
| 17 | + global $information; |
|
| 18 | + echo '<h5 class="geodir_information">'; |
|
| 19 | + echo $information; |
|
| 20 | + echo '</h5>'; |
|
| 21 | + /** This action is documented in geodirectory-templates/geodir-home.php */ |
|
| 22 | + do_action('geodir_add_page_content', 'after', 'info-page'); |
|
| 23 | + ?> |
|
| 24 | 24 | </div> |
| 25 | 25 | <!-- geodir_content ends here--> |
| 26 | 26 | <div id="gd-sidebar-wrapper"> |
| 27 | 27 | <div class="geodir-sidebar-main"> |
| 28 | 28 | <div class="geodir-gd-sidebar"> |
| 29 | 29 | <?php |
| 30 | - /** |
|
| 31 | - * Calls the standard sidebar. |
|
| 32 | - * |
|
| 33 | - * @since 1.0.0 |
|
| 34 | - */ |
|
| 35 | - do_action('geodir_sidebar'); ?> |
|
| 30 | + /** |
|
| 31 | + * Calls the standard sidebar. |
|
| 32 | + * |
|
| 33 | + * @since 1.0.0 |
|
| 34 | + */ |
|
| 35 | + do_action('geodir_sidebar'); ?> |
|
| 36 | 36 | </div> |
| 37 | 37 | </div> |
| 38 | 38 | </div> |
@@ -245,13 +245,14 @@ discard block |
||
| 245 | 245 | */ |
| 246 | 246 | function geodir_add_async_forscript($url) |
| 247 | 247 | {
|
| 248 | - if (strpos($url, '#asyncload')===false) |
|
| 249 | - return $url; |
|
| 250 | - else if (is_admin()) |
|
| 251 | - return str_replace('#asyncload', '', $url);
|
|
| 252 | - else |
|
| 253 | - return str_replace('#asyncload', '', $url)."' async='async";
|
|
| 254 | -} |
|
| 248 | + if (strpos($url, '#asyncload')===false) { |
|
| 249 | + return $url; |
|
| 250 | + } else if (is_admin()) { |
|
| 251 | + return str_replace('#asyncload', '', $url); |
|
| 252 | + } else { |
|
| 253 | + return str_replace('#asyncload', '', $url)."' async='async"; |
|
| 254 | + } |
|
| 255 | + } |
|
| 255 | 256 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1);
|
| 256 | 257 | |
| 257 | 258 | /** |
@@ -318,8 +319,10 @@ discard block |
||
| 318 | 319 | |
| 319 | 320 | $half_pages_to_show = round($pages_to_show / 2); |
| 320 | 321 | |
| 321 | - if (geodir_is_page('home') || (get_option('geodir_set_as_home') && is_home())) // dont apply default pagination for geodirectory home page.
|
|
| 322 | - return; |
|
| 322 | + if (geodir_is_page('home') || (get_option('geodir_set_as_home') && is_home())) { |
|
| 323 | + // dont apply default pagination for geodirectory home page. |
|
| 324 | + return; |
|
| 325 | + } |
|
| 323 | 326 | |
| 324 | 327 | if (!is_single()) {
|
| 325 | 328 | if (function_exists('geodir_location_geo_home_link')) {
|
@@ -439,11 +442,21 @@ discard block |
||
| 439 | 442 | } |
| 440 | 443 | $dist_dif = 1000; |
| 441 | 444 | |
| 442 | - if ($dist <= 5000) $dist_dif = 500; |
|
| 443 | - if ($dist <= 1000) $dist_dif = 100; |
|
| 444 | - if ($dist <= 500) $dist_dif = 50; |
|
| 445 | - if ($dist <= 100) $dist_dif = 10; |
|
| 446 | - if ($dist <= 50) $dist_dif = 5; |
|
| 445 | + if ($dist <= 5000) { |
|
| 446 | + $dist_dif = 500; |
|
| 447 | + } |
|
| 448 | + if ($dist <= 1000) { |
|
| 449 | + $dist_dif = 100; |
|
| 450 | + } |
|
| 451 | + if ($dist <= 500) { |
|
| 452 | + $dist_dif = 50; |
|
| 453 | + } |
|
| 454 | + if ($dist <= 100) { |
|
| 455 | + $dist_dif = 10; |
|
| 456 | + } |
|
| 457 | + if ($dist <= 50) { |
|
| 458 | + $dist_dif = 5; |
|
| 459 | + } |
|
| 447 | 460 | |
| 448 | 461 | ?> |
| 449 | 462 | <script type="text/javascript"> |
@@ -505,18 +518,23 @@ discard block |
||
| 505 | 518 | {
|
| 506 | 519 | |
| 507 | 520 | $default_search_for_text = SEARCH_FOR_TEXT; |
| 508 | - if (get_option('geodir_search_field_default_text'))
|
|
| 509 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory');
|
|
| 521 | + if (get_option('geodir_search_field_default_text')) { |
|
| 522 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
| 523 | + } |
|
| 510 | 524 | |
| 511 | 525 | $default_near_text = NEAR_TEXT; |
| 512 | - if (get_option('geodir_near_field_default_text'))
|
|
| 513 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory');
|
|
| 526 | + if (get_option('geodir_near_field_default_text')) { |
|
| 527 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
| 528 | + } |
|
| 514 | 529 | |
| 515 | 530 | ?> |
| 516 | 531 | |
| 517 | 532 | |
| 518 | 533 | <script type="text/javascript"> |
| 519 | - var default_location = '<?php if($search_location = geodir_get_default_location()) echo $search_location->city ;?>'; |
|
| 534 | + var default_location = '<?php if($search_location = geodir_get_default_location()) { |
|
| 535 | + echo $search_location->city ; |
|
| 536 | +} |
|
| 537 | +?>'; |
|
| 520 | 538 | var latlng; |
| 521 | 539 | var address; |
| 522 | 540 | var dist = 0; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | function geodir_core_dequeue_script() |
| 24 | 24 | {
|
| 25 | - wp_dequeue_script('flexslider');
|
|
| 25 | + wp_dequeue_script('flexslider');
|
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | add_action('wp_print_scripts', 'geodir_core_dequeue_script', 100);
|
@@ -35,160 +35,160 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | function geodir_templates_scripts() |
| 37 | 37 | {
|
| 38 | - $is_detail_page = false; |
|
| 39 | - $geodir_map_name = geodir_map_name(); |
|
| 40 | - |
|
| 41 | - if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) {
|
|
| 42 | - $is_detail_page = true; |
|
| 43 | - } |
|
| 44 | - |
|
| 45 | - wp_enqueue_script('jquery');
|
|
| 46 | - |
|
| 47 | - wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION);
|
|
| 48 | - wp_enqueue_script('geodirectory-script');
|
|
| 49 | - |
|
| 50 | - $geodir_vars_data = array( |
|
| 51 | - 'siteurl' => get_option('siteurl'),
|
|
| 52 | - 'geodir_plugin_url' => geodir_plugin_url(), |
|
| 53 | - 'geodir_lazy_load' => get_option('geodir_lazy_load',1),
|
|
| 54 | - 'geodir_ajax_url' => geodir_get_ajax_url(), |
|
| 55 | - 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'),
|
|
| 56 | - 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
|
| 57 | - ); |
|
| 58 | - |
|
| 59 | - /** |
|
| 60 | - * Filter the `geodir_var` data array that outputs the wp_localize_script() translations and variables. |
|
| 61 | - * |
|
| 62 | - * This is used by addons to add JS translatable variables. |
|
| 63 | - * |
|
| 64 | - * @since 1.4.4 |
|
| 65 | - * @param array $geodir_vars_data {
|
|
| 66 | - * geodir var data used by addons to add JS translatable variables. |
|
| 67 | - * |
|
| 68 | - * @type string $siteurl Site url. |
|
| 69 | - * @type string $geodir_plugin_url Geodirectory core plugin url. |
|
| 70 | - * @type string $geodir_ajax_url Geodirectory plugin ajax url. |
|
| 71 | - * @type int $geodir_gd_modal Disable GD modal that displays slideshow images in popup?. |
|
| 72 | - * @type int $is_rtl Checks if current locale is RTL. |
|
| 73 | - * |
|
| 74 | - * } |
|
| 75 | - */ |
|
| 76 | - $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data);
|
|
| 77 | - |
|
| 78 | - wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data);
|
|
| 79 | - |
|
| 80 | - wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 81 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');}
|
|
| 82 | - |
|
| 83 | - wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 84 | - wp_enqueue_script('geodirectory-lightbox-jquery');
|
|
| 85 | - |
|
| 86 | - wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 87 | - if ($is_detail_page) {
|
|
| 88 | - wp_enqueue_script('geodirectory-jquery-simplemodal');
|
|
| 89 | - } |
|
| 90 | - |
|
| 91 | - if (in_array($geodir_map_name, array('auto', 'google'))) {
|
|
| 92 | - $map_lang = "&language=" . geodir_get_map_default_language(); |
|
| 93 | - $map_key = "&key=" . geodir_get_map_api_key(); |
|
| 94 | - /** |
|
| 95 | - * Filter the variables that are added to the end of the google maps script call. |
|
| 96 | - * |
|
| 97 | - * This i used to change things like google maps language etc. |
|
| 98 | - * |
|
| 99 | - * @since 1.0.0 |
|
| 100 | - * @param string $var The string to filter, default is empty string. |
|
| 101 | - */ |
|
| 102 | - $map_extra = apply_filters('geodir_googlemap_script_extra', '');
|
|
| 103 | - wp_enqueue_script('geodirectory-googlemap-script', '//maps.google.com/maps/api/js?' . $map_lang . $map_key . $map_extra , '', NULL);
|
|
| 104 | - } |
|
| 38 | + $is_detail_page = false; |
|
| 39 | + $geodir_map_name = geodir_map_name(); |
|
| 40 | + |
|
| 41 | + if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) {
|
|
| 42 | + $is_detail_page = true; |
|
| 43 | + } |
|
| 44 | + |
|
| 45 | + wp_enqueue_script('jquery');
|
|
| 46 | + |
|
| 47 | + wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION);
|
|
| 48 | + wp_enqueue_script('geodirectory-script');
|
|
| 49 | + |
|
| 50 | + $geodir_vars_data = array( |
|
| 51 | + 'siteurl' => get_option('siteurl'),
|
|
| 52 | + 'geodir_plugin_url' => geodir_plugin_url(), |
|
| 53 | + 'geodir_lazy_load' => get_option('geodir_lazy_load',1),
|
|
| 54 | + 'geodir_ajax_url' => geodir_get_ajax_url(), |
|
| 55 | + 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'),
|
|
| 56 | + 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
|
| 57 | + ); |
|
| 58 | + |
|
| 59 | + /** |
|
| 60 | + * Filter the `geodir_var` data array that outputs the wp_localize_script() translations and variables. |
|
| 61 | + * |
|
| 62 | + * This is used by addons to add JS translatable variables. |
|
| 63 | + * |
|
| 64 | + * @since 1.4.4 |
|
| 65 | + * @param array $geodir_vars_data {
|
|
| 66 | + * geodir var data used by addons to add JS translatable variables. |
|
| 67 | + * |
|
| 68 | + * @type string $siteurl Site url. |
|
| 69 | + * @type string $geodir_plugin_url Geodirectory core plugin url. |
|
| 70 | + * @type string $geodir_ajax_url Geodirectory plugin ajax url. |
|
| 71 | + * @type int $geodir_gd_modal Disable GD modal that displays slideshow images in popup?. |
|
| 72 | + * @type int $is_rtl Checks if current locale is RTL. |
|
| 73 | + * |
|
| 74 | + * } |
|
| 75 | + */ |
|
| 76 | + $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data);
|
|
| 77 | + |
|
| 78 | + wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data);
|
|
| 79 | + |
|
| 80 | + wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 81 | + if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');}
|
|
| 82 | + |
|
| 83 | + wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 84 | + wp_enqueue_script('geodirectory-lightbox-jquery');
|
|
| 85 | + |
|
| 86 | + wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 87 | + if ($is_detail_page) {
|
|
| 88 | + wp_enqueue_script('geodirectory-jquery-simplemodal');
|
|
| 89 | + } |
|
| 90 | + |
|
| 91 | + if (in_array($geodir_map_name, array('auto', 'google'))) {
|
|
| 92 | + $map_lang = "&language=" . geodir_get_map_default_language(); |
|
| 93 | + $map_key = "&key=" . geodir_get_map_api_key(); |
|
| 94 | + /** |
|
| 95 | + * Filter the variables that are added to the end of the google maps script call. |
|
| 96 | + * |
|
| 97 | + * This i used to change things like google maps language etc. |
|
| 98 | + * |
|
| 99 | + * @since 1.0.0 |
|
| 100 | + * @param string $var The string to filter, default is empty string. |
|
| 101 | + */ |
|
| 102 | + $map_extra = apply_filters('geodir_googlemap_script_extra', '');
|
|
| 103 | + wp_enqueue_script('geodirectory-googlemap-script', '//maps.google.com/maps/api/js?' . $map_lang . $map_key . $map_extra , '', NULL);
|
|
| 104 | + } |
|
| 105 | 105 | |
| 106 | - if ($geodir_map_name == 'osm') {
|
|
| 107 | - // Leaflet OpenStreetMap |
|
| 108 | - wp_register_style('geodirectory-leaflet-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION);
|
|
| 109 | - wp_enqueue_style('geodirectory-leaflet-style');
|
|
| 106 | + if ($geodir_map_name == 'osm') {
|
|
| 107 | + // Leaflet OpenStreetMap |
|
| 108 | + wp_register_style('geodirectory-leaflet-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION);
|
|
| 109 | + wp_enqueue_style('geodirectory-leaflet-style');
|
|
| 110 | 110 | |
| 111 | - wp_register_script('geodirectory-leaflet-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 112 | - wp_enqueue_script('geodirectory-leaflet-script');
|
|
| 111 | + wp_register_script('geodirectory-leaflet-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 112 | + wp_enqueue_script('geodirectory-leaflet-script');
|
|
| 113 | 113 | |
| 114 | - wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/osm.geocode.js', array(), GEODIRECTORY_VERSION);
|
|
| 115 | - wp_enqueue_script('geodirectory-leaflet-geo-script');
|
|
| 116 | - } |
|
| 117 | - wp_enqueue_script( 'jquery-ui-autocomplete' ); |
|
| 114 | + wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/osm.geocode.js', array(), GEODIRECTORY_VERSION);
|
|
| 115 | + wp_enqueue_script('geodirectory-leaflet-geo-script');
|
|
| 116 | + } |
|
| 117 | + wp_enqueue_script( 'jquery-ui-autocomplete' ); |
|
| 118 | 118 | |
| 119 | - wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 120 | - wp_enqueue_script('geodirectory-goMap-script');
|
|
| 121 | - |
|
| 122 | - |
|
| 123 | - wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 124 | - wp_enqueue_script('chosen');
|
|
| 125 | - |
|
| 126 | - wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 127 | - wp_enqueue_script('geodirectory-choose-ajax');
|
|
| 128 | - |
|
| 129 | - wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true);
|
|
| 130 | - |
|
| 131 | - if (is_page() && geodir_is_page('add-listing')) {
|
|
| 132 | - // SCRIPT FOR UPLOAD |
|
| 133 | - wp_enqueue_script('plupload-all');
|
|
| 134 | - wp_enqueue_script('jquery-ui-sortable');
|
|
| 135 | - |
|
| 136 | - wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true);
|
|
| 137 | - wp_enqueue_script('geodirectory-plupload-script');
|
|
| 138 | - // SCRIPT FOR UPLOAD END |
|
| 139 | - |
|
| 140 | - // check_ajax_referer function is used to make sure no files are uplaoded remotly but it will fail if used between https and non https so we do the check below of the urls |
|
| 141 | - if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) {
|
|
| 142 | - $ajax_url = admin_url('admin-ajax.php');
|
|
| 143 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) {
|
|
| 144 | - $ajax_url = admin_url('admin-ajax.php');
|
|
| 145 | - } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) {
|
|
| 146 | - $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php'));
|
|
| 147 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) {
|
|
| 148 | - $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php'));
|
|
| 149 | - } else {
|
|
| 150 | - $ajax_url = admin_url('admin-ajax.php');
|
|
| 151 | - } |
|
| 119 | + wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 120 | + wp_enqueue_script('geodirectory-goMap-script');
|
|
| 121 | + |
|
| 122 | + |
|
| 123 | + wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 124 | + wp_enqueue_script('chosen');
|
|
| 125 | + |
|
| 126 | + wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 127 | + wp_enqueue_script('geodirectory-choose-ajax');
|
|
| 128 | + |
|
| 129 | + wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true);
|
|
| 130 | + |
|
| 131 | + if (is_page() && geodir_is_page('add-listing')) {
|
|
| 132 | + // SCRIPT FOR UPLOAD |
|
| 133 | + wp_enqueue_script('plupload-all');
|
|
| 134 | + wp_enqueue_script('jquery-ui-sortable');
|
|
| 135 | + |
|
| 136 | + wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true);
|
|
| 137 | + wp_enqueue_script('geodirectory-plupload-script');
|
|
| 138 | + // SCRIPT FOR UPLOAD END |
|
| 139 | + |
|
| 140 | + // check_ajax_referer function is used to make sure no files are uplaoded remotly but it will fail if used between https and non https so we do the check below of the urls |
|
| 141 | + if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) {
|
|
| 142 | + $ajax_url = admin_url('admin-ajax.php');
|
|
| 143 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) {
|
|
| 144 | + $ajax_url = admin_url('admin-ajax.php');
|
|
| 145 | + } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) {
|
|
| 146 | + $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php'));
|
|
| 147 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) {
|
|
| 148 | + $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php'));
|
|
| 149 | + } else {
|
|
| 150 | + $ajax_url = admin_url('admin-ajax.php');
|
|
| 151 | + } |
|
| 152 | 152 | |
| 153 | - // place js config array for plupload |
|
| 154 | - $plupload_init = array( |
|
| 155 | - 'runtimes' => 'html5,silverlight,flash,browserplus,gears,html4', |
|
| 156 | - 'browse_button' => 'plupload-browse-button', // will be adjusted per uploader |
|
| 157 | - 'container' => 'plupload-upload-ui', // will be adjusted per uploader |
|
| 158 | - 'drop_element' => 'dropbox', // will be adjusted per uploader |
|
| 159 | - 'file_data_name' => 'async-upload', // will be adjusted per uploader |
|
| 160 | - 'multiple_queues' => true, |
|
| 161 | - 'max_file_size' => geodir_max_upload_size(), |
|
| 162 | - 'url' => $ajax_url, |
|
| 163 | - 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'),
|
|
| 164 | - 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'),
|
|
| 165 | - 'filters' => array(array('title' => __('Allowed Files', 'geodirectory'), 'extensions' => '*')),
|
|
| 166 | - 'multipart' => true, |
|
| 167 | - 'urlstream_upload' => true, |
|
| 168 | - 'multi_selection' => false, // will be added per uploader |
|
| 169 | - // additional post data to send to our ajax hook |
|
| 170 | - 'multipart_params' => array( |
|
| 171 | - '_ajax_nonce' => "", // will be added per uploader |
|
| 172 | - 'action' => 'plupload_action', // the ajax action name |
|
| 173 | - 'imgid' => 0 // will be added per uploader |
|
| 174 | - ) |
|
| 175 | - ); |
|
| 176 | - $base_plupload_config = json_encode($plupload_init); |
|
| 177 | - |
|
| 178 | - $gd_plupload_init = array('base_plupload_config' => $base_plupload_config,
|
|
| 179 | - 'upload_img_size' => geodir_max_upload_size()); |
|
| 180 | - |
|
| 181 | - wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init);
|
|
| 182 | - |
|
| 183 | - wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload');
|
|
| 184 | - } // End if for add place page |
|
| 185 | - |
|
| 186 | - wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 187 | - if ($is_detail_page) {
|
|
| 153 | + // place js config array for plupload |
|
| 154 | + $plupload_init = array( |
|
| 155 | + 'runtimes' => 'html5,silverlight,flash,browserplus,gears,html4', |
|
| 156 | + 'browse_button' => 'plupload-browse-button', // will be adjusted per uploader |
|
| 157 | + 'container' => 'plupload-upload-ui', // will be adjusted per uploader |
|
| 158 | + 'drop_element' => 'dropbox', // will be adjusted per uploader |
|
| 159 | + 'file_data_name' => 'async-upload', // will be adjusted per uploader |
|
| 160 | + 'multiple_queues' => true, |
|
| 161 | + 'max_file_size' => geodir_max_upload_size(), |
|
| 162 | + 'url' => $ajax_url, |
|
| 163 | + 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'),
|
|
| 164 | + 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'),
|
|
| 165 | + 'filters' => array(array('title' => __('Allowed Files', 'geodirectory'), 'extensions' => '*')),
|
|
| 166 | + 'multipart' => true, |
|
| 167 | + 'urlstream_upload' => true, |
|
| 168 | + 'multi_selection' => false, // will be added per uploader |
|
| 169 | + // additional post data to send to our ajax hook |
|
| 170 | + 'multipart_params' => array( |
|
| 171 | + '_ajax_nonce' => "", // will be added per uploader |
|
| 172 | + 'action' => 'plupload_action', // the ajax action name |
|
| 173 | + 'imgid' => 0 // will be added per uploader |
|
| 174 | + ) |
|
| 175 | + ); |
|
| 176 | + $base_plupload_config = json_encode($plupload_init); |
|
| 177 | + |
|
| 178 | + $gd_plupload_init = array('base_plupload_config' => $base_plupload_config,
|
|
| 179 | + 'upload_img_size' => geodir_max_upload_size()); |
|
| 180 | + |
|
| 181 | + wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init);
|
|
| 182 | + |
|
| 183 | + wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload');
|
|
| 184 | + } // End if for add place page |
|
| 185 | + |
|
| 186 | + wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 187 | + if ($is_detail_page) {
|
|
| 188 | 188 | wp_enqueue_script('geodirectory-post-custom-js');
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - // font awesome rating script |
|
| 191 | + // font awesome rating script |
|
| 192 | 192 | if (get_option('geodir_reviewrating_enable_font_awesome')) {
|
| 193 | 193 | wp_register_script('geodir-barrating-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true);
|
| 194 | 194 | wp_enqueue_script('geodir-barrating-js');
|
@@ -197,11 +197,11 @@ discard block |
||
| 197 | 197 | wp_enqueue_script('geodir-jRating-js');
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 201 | - wp_enqueue_script('geodir-on-document-load');
|
|
| 200 | + wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 201 | + wp_enqueue_script('geodir-on-document-load');
|
|
| 202 | 202 | |
| 203 | - wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 204 | - wp_enqueue_script('google-geometa');
|
|
| 203 | + wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 204 | + wp_enqueue_script('google-geometa');
|
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
@@ -215,8 +215,8 @@ discard block |
||
| 215 | 215 | */ |
| 216 | 216 | function geodir_header_scripts() |
| 217 | 217 | {
|
| 218 | - echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>';
|
|
| 219 | - echo stripslashes(get_option('geodir_header_scripts'));
|
|
| 218 | + echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>';
|
|
| 219 | + echo stripslashes(get_option('geodir_header_scripts'));
|
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | function geodir_footer_scripts() |
| 233 | 233 | {
|
| 234 | 234 | echo stripslashes(get_option('geodir_ga_tracking_code'));
|
| 235 | - echo stripslashes(get_option('geodir_footer_scripts'));
|
|
| 235 | + echo stripslashes(get_option('geodir_footer_scripts'));
|
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | |
@@ -246,12 +246,12 @@ discard block |
||
| 246 | 246 | */ |
| 247 | 247 | function geodir_add_async_forscript($url) |
| 248 | 248 | {
|
| 249 | - if (strpos($url, '#asyncload')===false) |
|
| 250 | - return $url; |
|
| 251 | - else if (is_admin()) |
|
| 252 | - return str_replace('#asyncload', '', $url);
|
|
| 253 | - else |
|
| 254 | - return str_replace('#asyncload', '', $url)."' async='async";
|
|
| 249 | + if (strpos($url, '#asyncload')===false) |
|
| 250 | + return $url; |
|
| 251 | + else if (is_admin()) |
|
| 252 | + return str_replace('#asyncload', '', $url);
|
|
| 253 | + else |
|
| 254 | + return str_replace('#asyncload', '', $url)."' async='async";
|
|
| 255 | 255 | } |
| 256 | 256 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1);
|
| 257 | 257 | |
@@ -264,17 +264,17 @@ discard block |
||
| 264 | 264 | function geodir_templates_styles() |
| 265 | 265 | {
|
| 266 | 266 | |
| 267 | - wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION);
|
|
| 268 | - wp_enqueue_style('geodir-core-scss');
|
|
| 269 | - wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION);
|
|
| 267 | + wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION);
|
|
| 268 | + wp_enqueue_style('geodir-core-scss');
|
|
| 269 | + wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION);
|
|
| 270 | 270 | |
| 271 | - if(is_rtl()){
|
|
| 272 | - wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION);
|
|
| 273 | - wp_enqueue_style('geodirectory-frontend-rtl-style');
|
|
| 274 | - } |
|
| 271 | + if(is_rtl()){
|
|
| 272 | + wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION);
|
|
| 273 | + wp_enqueue_style('geodirectory-frontend-rtl-style');
|
|
| 274 | + } |
|
| 275 | 275 | |
| 276 | - wp_register_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', array(), GEODIRECTORY_VERSION);
|
|
| 277 | - wp_enqueue_style('font-awesome');
|
|
| 276 | + wp_register_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', array(), GEODIRECTORY_VERSION);
|
|
| 277 | + wp_enqueue_style('font-awesome');
|
|
| 278 | 278 | |
| 279 | 279 | |
| 280 | 280 | } |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | */ |
| 289 | 289 | function geodir_get_sidebar() |
| 290 | 290 | {
|
| 291 | - get_sidebar('geodirectory');
|
|
| 291 | + get_sidebar('geodirectory');
|
|
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | /** |
@@ -307,122 +307,122 @@ discard block |
||
| 307 | 307 | * @param bool $always_show Do you want to show the pagination always? Default: false. |
| 308 | 308 | */ |
| 309 | 309 | function geodir_pagination($before = '', $after = '', $prelabel = '', $nxtlabel = '', $pages_to_show = 5, $always_show = false) {
|
| 310 | - global $wp_query, $posts_per_page, $wpdb, $paged, $blog_id; |
|
| 310 | + global $wp_query, $posts_per_page, $wpdb, $paged, $blog_id; |
|
| 311 | 311 | |
| 312 | - if (empty($prelabel)) {
|
|
| 313 | - $prelabel = '<strong>«</strong>'; |
|
| 314 | - } |
|
| 312 | + if (empty($prelabel)) {
|
|
| 313 | + $prelabel = '<strong>«</strong>'; |
|
| 314 | + } |
|
| 315 | 315 | |
| 316 | - if (empty($nxtlabel)) {
|
|
| 317 | - $nxtlabel = '<strong>»</strong>'; |
|
| 318 | - } |
|
| 316 | + if (empty($nxtlabel)) {
|
|
| 317 | + $nxtlabel = '<strong>»</strong>'; |
|
| 318 | + } |
|
| 319 | 319 | |
| 320 | - $half_pages_to_show = round($pages_to_show / 2); |
|
| 320 | + $half_pages_to_show = round($pages_to_show / 2); |
|
| 321 | 321 | |
| 322 | - if (geodir_is_page('home') || (get_option('geodir_set_as_home') && is_home())) // dont apply default pagination for geodirectory home page.
|
|
| 323 | - return; |
|
| 322 | + if (geodir_is_page('home') || (get_option('geodir_set_as_home') && is_home())) // dont apply default pagination for geodirectory home page.
|
|
| 323 | + return; |
|
| 324 | 324 | |
| 325 | - if (!is_single()) {
|
|
| 326 | - if (function_exists('geodir_location_geo_home_link')) {
|
|
| 327 | - remove_filter('home_url', 'geodir_location_geo_home_link', 100000);
|
|
| 328 | - } |
|
| 329 | - $numposts = $wp_query->found_posts; |
|
| 325 | + if (!is_single()) {
|
|
| 326 | + if (function_exists('geodir_location_geo_home_link')) {
|
|
| 327 | + remove_filter('home_url', 'geodir_location_geo_home_link', 100000);
|
|
| 328 | + } |
|
| 329 | + $numposts = $wp_query->found_posts; |
|
| 330 | 330 | |
| 331 | - $max_page = ceil($numposts / $posts_per_page); |
|
| 331 | + $max_page = ceil($numposts / $posts_per_page); |
|
| 332 | 332 | |
| 333 | - if (empty($paged)) {
|
|
| 334 | - $paged = 1; |
|
| 335 | - } |
|
| 333 | + if (empty($paged)) {
|
|
| 334 | + $paged = 1; |
|
| 335 | + } |
|
| 336 | 336 | |
| 337 | - $post_type = geodir_get_current_posttype(); |
|
| 338 | - $listing_type_name = get_post_type_plural_label($post_type); |
|
| 339 | - if (geodir_is_page('listing') || geodir_is_page('search')) {
|
|
| 340 | - $term = array(); |
|
| 337 | + $post_type = geodir_get_current_posttype(); |
|
| 338 | + $listing_type_name = get_post_type_plural_label($post_type); |
|
| 339 | + if (geodir_is_page('listing') || geodir_is_page('search')) {
|
|
| 340 | + $term = array(); |
|
| 341 | 341 | |
| 342 | - if (is_tax()) {
|
|
| 343 | - $term_id = get_queried_object_id(); |
|
| 344 | - $taxonomy = get_query_var('taxonomy');
|
|
| 342 | + if (is_tax()) {
|
|
| 343 | + $term_id = get_queried_object_id(); |
|
| 344 | + $taxonomy = get_query_var('taxonomy');
|
|
| 345 | 345 | |
| 346 | - if ($term_id && $post_type && get_query_var('taxonomy') == $post_type . 'category' ) {
|
|
| 347 | - $term = get_term($term_id, $post_type . 'category'); |
|
| 348 | - } |
|
| 349 | - } |
|
| 346 | + if ($term_id && $post_type && get_query_var('taxonomy') == $post_type . 'category' ) {
|
|
| 347 | + $term = get_term($term_id, $post_type . 'category'); |
|
| 348 | + } |
|
| 349 | + } |
|
| 350 | 350 | |
| 351 | - if (geodir_is_page('search') && !empty($_REQUEST['s' . $post_type . 'category'])) {
|
|
| 352 | - $taxonomy_search = $_REQUEST['s' . $post_type . 'category']; |
|
| 351 | + if (geodir_is_page('search') && !empty($_REQUEST['s' . $post_type . 'category'])) {
|
|
| 352 | + $taxonomy_search = $_REQUEST['s' . $post_type . 'category']; |
|
| 353 | 353 | |
| 354 | - if (!is_array($taxonomy_search)) {
|
|
| 355 | - $term = get_term((int)$taxonomy_search, $post_type . 'category'); |
|
| 356 | - } else if(is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search
|
|
| 357 | - $term = get_term((int)$taxonomy_search[0], $post_type . 'category'); |
|
| 358 | - } |
|
| 359 | - } |
|
| 354 | + if (!is_array($taxonomy_search)) {
|
|
| 355 | + $term = get_term((int)$taxonomy_search, $post_type . 'category'); |
|
| 356 | + } else if(is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search
|
|
| 357 | + $term = get_term((int)$taxonomy_search[0], $post_type . 'category'); |
|
| 358 | + } |
|
| 359 | + } |
|
| 360 | 360 | |
| 361 | - if (!empty($term) && !is_wp_error($term)) {
|
|
| 362 | - $listing_type_name = $term->name; |
|
| 363 | - } |
|
| 364 | - } |
|
| 361 | + if (!empty($term) && !is_wp_error($term)) {
|
|
| 362 | + $listing_type_name = $term->name; |
|
| 363 | + } |
|
| 364 | + } |
|
| 365 | 365 | |
| 366 | - if ($max_page > 1 || $always_show) {
|
|
| 367 | - // Extra pagination info |
|
| 368 | - $geodir_pagination_more_info = get_option('geodir_pagination_advance_info');
|
|
| 369 | - $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
| 370 | - $end_no = min($paged * $posts_per_page, $numposts); |
|
| 366 | + if ($max_page > 1 || $always_show) {
|
|
| 367 | + // Extra pagination info |
|
| 368 | + $geodir_pagination_more_info = get_option('geodir_pagination_advance_info');
|
|
| 369 | + $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
| 370 | + $end_no = min($paged * $posts_per_page, $numposts); |
|
| 371 | 371 | |
| 372 | - if ($geodir_pagination_more_info != '') {
|
|
| 373 | - if ($listing_type_name) {
|
|
| 374 | - $listing_type_name = __($listing_type_name, 'geodirectory'); |
|
| 375 | - $pegination_desc = wp_sprintf(__('Showing %s %d-%d of %d', 'geodirectory'), $listing_type_name, $start_no, $end_no, $numposts);
|
|
| 376 | - } else {
|
|
| 377 | - $pegination_desc = wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts);
|
|
| 378 | - } |
|
| 379 | - $pagination_info = '<div class="gd-pagination-details">' . $pegination_desc . '</div>'; |
|
| 380 | - /** |
|
| 381 | - * Adds an extra pagination info above/under pagination. |
|
| 382 | - * |
|
| 383 | - * @since 1.5.9 |
|
| 384 | - * |
|
| 385 | - * @param string $pagination_info Extra pagination info content. |
|
| 386 | - * @param string $listing_type_name Listing results type. |
|
| 387 | - * @param string $start_no First result number. |
|
| 388 | - * @param string $end_no Last result number. |
|
| 389 | - * @param string $numposts Total number of listings. |
|
| 390 | - * @param string $post_type The post type. |
|
| 391 | - */ |
|
| 392 | - $pagination_info = apply_filters('geodir_pagination_advance_info', $pagination_info, $listing_type_name, $start_no, $end_no, $numposts, $post_type);
|
|
| 372 | + if ($geodir_pagination_more_info != '') {
|
|
| 373 | + if ($listing_type_name) {
|
|
| 374 | + $listing_type_name = __($listing_type_name, 'geodirectory'); |
|
| 375 | + $pegination_desc = wp_sprintf(__('Showing %s %d-%d of %d', 'geodirectory'), $listing_type_name, $start_no, $end_no, $numposts);
|
|
| 376 | + } else {
|
|
| 377 | + $pegination_desc = wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts);
|
|
| 378 | + } |
|
| 379 | + $pagination_info = '<div class="gd-pagination-details">' . $pegination_desc . '</div>'; |
|
| 380 | + /** |
|
| 381 | + * Adds an extra pagination info above/under pagination. |
|
| 382 | + * |
|
| 383 | + * @since 1.5.9 |
|
| 384 | + * |
|
| 385 | + * @param string $pagination_info Extra pagination info content. |
|
| 386 | + * @param string $listing_type_name Listing results type. |
|
| 387 | + * @param string $start_no First result number. |
|
| 388 | + * @param string $end_no Last result number. |
|
| 389 | + * @param string $numposts Total number of listings. |
|
| 390 | + * @param string $post_type The post type. |
|
| 391 | + */ |
|
| 392 | + $pagination_info = apply_filters('geodir_pagination_advance_info', $pagination_info, $listing_type_name, $start_no, $end_no, $numposts, $post_type);
|
|
| 393 | 393 | |
| 394 | - if ($geodir_pagination_more_info == 'before') {
|
|
| 395 | - $before = $before . $pagination_info; |
|
| 396 | - } else if ($geodir_pagination_more_info == 'after') {
|
|
| 397 | - $after = $pagination_info . $after; |
|
| 398 | - } |
|
| 399 | - } |
|
| 394 | + if ($geodir_pagination_more_info == 'before') {
|
|
| 395 | + $before = $before . $pagination_info; |
|
| 396 | + } else if ($geodir_pagination_more_info == 'after') {
|
|
| 397 | + $after = $pagination_info . $after; |
|
| 398 | + } |
|
| 399 | + } |
|
| 400 | 400 | |
| 401 | - echo "$before <div class='Navi gd-navi'>"; |
|
| 402 | - if ($paged >= ($pages_to_show - 1)) {
|
|
| 403 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>';
|
|
| 404 | - } |
|
| 405 | - previous_posts_link($prelabel); |
|
| 406 | - for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) {
|
|
| 407 | - if ($i >= 1 && $i <= $max_page) {
|
|
| 408 | - if ($i == $paged) {
|
|
| 409 | - echo "<strong class='on'>$i</strong>"; |
|
| 410 | - } else {
|
|
| 411 | - echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> ';
|
|
| 412 | - } |
|
| 413 | - } |
|
| 414 | - } |
|
| 415 | - next_posts_link($nxtlabel, $max_page); |
|
| 416 | - if (($paged + $half_pages_to_show) < ($max_page)) {
|
|
| 417 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>';
|
|
| 418 | - } |
|
| 419 | - echo "</div> $after"; |
|
| 420 | - } |
|
| 401 | + echo "$before <div class='Navi gd-navi'>"; |
|
| 402 | + if ($paged >= ($pages_to_show - 1)) {
|
|
| 403 | + echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>';
|
|
| 404 | + } |
|
| 405 | + previous_posts_link($prelabel); |
|
| 406 | + for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) {
|
|
| 407 | + if ($i >= 1 && $i <= $max_page) {
|
|
| 408 | + if ($i == $paged) {
|
|
| 409 | + echo "<strong class='on'>$i</strong>"; |
|
| 410 | + } else {
|
|
| 411 | + echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> ';
|
|
| 412 | + } |
|
| 413 | + } |
|
| 414 | + } |
|
| 415 | + next_posts_link($nxtlabel, $max_page); |
|
| 416 | + if (($paged + $half_pages_to_show) < ($max_page)) {
|
|
| 417 | + echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>';
|
|
| 418 | + } |
|
| 419 | + echo "</div> $after"; |
|
| 420 | + } |
|
| 421 | 421 | |
| 422 | - if (function_exists('geodir_location_geo_home_link')) {
|
|
| 423 | - add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
|
|
| 424 | - } |
|
| 425 | - } |
|
| 422 | + if (function_exists('geodir_location_geo_home_link')) {
|
|
| 423 | + add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
|
|
| 424 | + } |
|
| 425 | + } |
|
| 426 | 426 | } |
| 427 | 427 | |
| 428 | 428 | /** |
@@ -433,20 +433,20 @@ discard block |
||
| 433 | 433 | */ |
| 434 | 434 | function geodir_listingsearch_scripts() |
| 435 | 435 | {
|
| 436 | - if (get_option('gd_search_dist') != '') {
|
|
| 437 | - $dist = get_option('gd_search_dist');
|
|
| 438 | - } else {
|
|
| 439 | - $dist = 500; |
|
| 440 | - } |
|
| 441 | - $dist_dif = 1000; |
|
| 442 | - |
|
| 443 | - if ($dist <= 5000) $dist_dif = 500; |
|
| 444 | - if ($dist <= 1000) $dist_dif = 100; |
|
| 445 | - if ($dist <= 500) $dist_dif = 50; |
|
| 446 | - if ($dist <= 100) $dist_dif = 10; |
|
| 447 | - if ($dist <= 50) $dist_dif = 5; |
|
| 448 | - |
|
| 449 | - ?> |
|
| 436 | + if (get_option('gd_search_dist') != '') {
|
|
| 437 | + $dist = get_option('gd_search_dist');
|
|
| 438 | + } else {
|
|
| 439 | + $dist = 500; |
|
| 440 | + } |
|
| 441 | + $dist_dif = 1000; |
|
| 442 | + |
|
| 443 | + if ($dist <= 5000) $dist_dif = 500; |
|
| 444 | + if ($dist <= 1000) $dist_dif = 100; |
|
| 445 | + if ($dist <= 500) $dist_dif = 50; |
|
| 446 | + if ($dist <= 100) $dist_dif = 10; |
|
| 447 | + if ($dist <= 50) $dist_dif = 5; |
|
| 448 | + |
|
| 449 | + ?> |
|
| 450 | 450 | <script type="text/javascript"> |
| 451 | 451 | |
| 452 | 452 | jQuery(function ($) {
|
@@ -505,15 +505,15 @@ discard block |
||
| 505 | 505 | function geodir_add_sharelocation_scripts() |
| 506 | 506 | {
|
| 507 | 507 | |
| 508 | - $default_search_for_text = SEARCH_FOR_TEXT; |
|
| 509 | - if (get_option('geodir_search_field_default_text'))
|
|
| 510 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory');
|
|
| 508 | + $default_search_for_text = SEARCH_FOR_TEXT; |
|
| 509 | + if (get_option('geodir_search_field_default_text'))
|
|
| 510 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory');
|
|
| 511 | 511 | |
| 512 | - $default_near_text = NEAR_TEXT; |
|
| 513 | - if (get_option('geodir_near_field_default_text'))
|
|
| 514 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory');
|
|
| 512 | + $default_near_text = NEAR_TEXT; |
|
| 513 | + if (get_option('geodir_near_field_default_text'))
|
|
| 514 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory');
|
|
| 515 | 515 | |
| 516 | - ?> |
|
| 516 | + ?> |
|
| 517 | 517 | |
| 518 | 518 | |
| 519 | 519 | <script type="text/javascript"> |
@@ -594,14 +594,14 @@ discard block |
||
| 594 | 594 | initialise2(); |
| 595 | 595 | } else {
|
| 596 | 596 | <?php |
| 597 | - $near_add = get_option('geodir_search_near_addition');
|
|
| 598 | - /** |
|
| 599 | - * Adds any extra info to the near search box query when trying to geolocate it via google api. |
|
| 600 | - * |
|
| 601 | - * @since 1.0.0 |
|
| 602 | - */ |
|
| 603 | - $near_add2 = apply_filters('geodir_search_near_addition', '');
|
|
| 604 | - ?> |
|
| 597 | + $near_add = get_option('geodir_search_near_addition');
|
|
| 598 | + /** |
|
| 599 | + * Adds any extra info to the near search box query when trying to geolocate it via google api. |
|
| 600 | + * |
|
| 601 | + * @since 1.0.0 |
|
| 602 | + */ |
|
| 603 | + $near_add2 = apply_filters('geodir_search_near_addition', '');
|
|
| 604 | + ?> |
|
| 605 | 605 | if (window.gdMaps === 'google') {
|
| 606 | 606 | Sgeocoder.geocode({'address': address<?php echo ($near_add ? '+", ' . $near_add . '"' : '') . $near_add2;?>},
|
| 607 | 607 | function (results, status) {
|
@@ -704,30 +704,30 @@ discard block |
||
| 704 | 704 | */ |
| 705 | 705 | function geodir_show_badges_on_image($which, $post, $link) |
| 706 | 706 | {
|
| 707 | - $return = ''; |
|
| 708 | - switch ($which) {
|
|
| 709 | - case 'featured': |
|
| 710 | - /** |
|
| 711 | - * Filter the featured image badge html that appears in the listings pages over the thumbnail. |
|
| 712 | - * |
|
| 713 | - * @since 1.0.0 |
|
| 714 | - * @param object $post The post object. |
|
| 715 | - * @param string $link The link to the post. |
|
| 716 | - */ |
|
| 717 | - $return = apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link);
|
|
| 718 | - break; |
|
| 719 | - case 'new' : |
|
| 720 | - /** |
|
| 721 | - * Filter the new image badge html that appears in the listings pages over the thumbnail. |
|
| 722 | - * |
|
| 723 | - * @since 1.0.0 |
|
| 724 | - * @param object $post The post object. |
|
| 725 | - * @param string $link The link to the post. |
|
| 726 | - */ |
|
| 727 | - $return = apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link);
|
|
| 728 | - break; |
|
| 729 | - |
|
| 730 | - } |
|
| 707 | + $return = ''; |
|
| 708 | + switch ($which) {
|
|
| 709 | + case 'featured': |
|
| 710 | + /** |
|
| 711 | + * Filter the featured image badge html that appears in the listings pages over the thumbnail. |
|
| 712 | + * |
|
| 713 | + * @since 1.0.0 |
|
| 714 | + * @param object $post The post object. |
|
| 715 | + * @param string $link The link to the post. |
|
| 716 | + */ |
|
| 717 | + $return = apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link);
|
|
| 718 | + break; |
|
| 719 | + case 'new' : |
|
| 720 | + /** |
|
| 721 | + * Filter the new image badge html that appears in the listings pages over the thumbnail. |
|
| 722 | + * |
|
| 723 | + * @since 1.0.0 |
|
| 724 | + * @param object $post The post object. |
|
| 725 | + * @param string $link The link to the post. |
|
| 726 | + */ |
|
| 727 | + $return = apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link);
|
|
| 728 | + break; |
|
| 729 | + |
|
| 730 | + } |
|
| 731 | 731 | |
| 732 | - return $return; |
|
| 732 | + return $return; |
|
| 733 | 733 | } |
@@ -38,21 +38,21 @@ discard block |
||
| 38 | 38 | $is_detail_page = false; |
| 39 | 39 | $geodir_map_name = geodir_map_name(); |
| 40 | 40 | |
| 41 | - if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) {
|
|
| 41 | + if ((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview'))) {
|
|
| 42 | 42 | $is_detail_page = true; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | wp_enqueue_script('jquery');
|
| 46 | 46 | |
| 47 | - wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION);
|
|
| 47 | + wp_register_script('geodirectory-script', geodir_plugin_url().'/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION);
|
|
| 48 | 48 | wp_enqueue_script('geodirectory-script');
|
| 49 | 49 | |
| 50 | 50 | $geodir_vars_data = array( |
| 51 | 51 | 'siteurl' => get_option('siteurl'),
|
| 52 | 52 | 'geodir_plugin_url' => geodir_plugin_url(), |
| 53 | - 'geodir_lazy_load' => get_option('geodir_lazy_load',1),
|
|
| 53 | + 'geodir_lazy_load' => get_option('geodir_lazy_load', 1),
|
|
| 54 | 54 | 'geodir_ajax_url' => geodir_get_ajax_url(), |
| 55 | - 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'),
|
|
| 55 | + 'geodir_gd_modal' => (int) get_option('geodir_disable_gb_modal'),
|
|
| 56 | 56 | 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
| 57 | 57 | ); |
| 58 | 58 | |
@@ -73,24 +73,24 @@ discard block |
||
| 73 | 73 | * |
| 74 | 74 | * } |
| 75 | 75 | */ |
| 76 | - $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data);
|
|
| 76 | + $geodir_vars_data = apply_filters('geodir_vars_data', $geodir_vars_data);
|
|
| 77 | 77 | |
| 78 | 78 | wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data);
|
| 79 | 79 | |
| 80 | - wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 81 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');}
|
|
| 80 | + wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url().'/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION, true);
|
|
| 81 | + if ($is_detail_page) {wp_enqueue_script('geodirectory-jquery-flexslider-js'); }
|
|
| 82 | 82 | |
| 83 | - wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 83 | + wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url().'/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION, true);
|
|
| 84 | 84 | wp_enqueue_script('geodirectory-lightbox-jquery');
|
| 85 | 85 | |
| 86 | - wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 86 | + wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url().'/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION, true);
|
|
| 87 | 87 | if ($is_detail_page) {
|
| 88 | 88 | wp_enqueue_script('geodirectory-jquery-simplemodal');
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | if (in_array($geodir_map_name, array('auto', 'google'))) {
|
| 92 | - $map_lang = "&language=" . geodir_get_map_default_language(); |
|
| 93 | - $map_key = "&key=" . geodir_get_map_api_key(); |
|
| 92 | + $map_lang = "&language=".geodir_get_map_default_language(); |
|
| 93 | + $map_key = "&key=".geodir_get_map_api_key(); |
|
| 94 | 94 | /** |
| 95 | 95 | * Filter the variables that are added to the end of the google maps script call. |
| 96 | 96 | * |
@@ -100,40 +100,40 @@ discard block |
||
| 100 | 100 | * @param string $var The string to filter, default is empty string. |
| 101 | 101 | */ |
| 102 | 102 | $map_extra = apply_filters('geodir_googlemap_script_extra', '');
|
| 103 | - wp_enqueue_script('geodirectory-googlemap-script', '//maps.google.com/maps/api/js?' . $map_lang . $map_key . $map_extra , '', NULL);
|
|
| 103 | + wp_enqueue_script('geodirectory-googlemap-script', '//maps.google.com/maps/api/js?'.$map_lang.$map_key.$map_extra, '', NULL);
|
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | if ($geodir_map_name == 'osm') {
|
| 107 | 107 | // Leaflet OpenStreetMap |
| 108 | - wp_register_style('geodirectory-leaflet-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION);
|
|
| 108 | + wp_register_style('geodirectory-leaflet-style', geodir_plugin_url().'/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION);
|
|
| 109 | 109 | wp_enqueue_style('geodirectory-leaflet-style');
|
| 110 | 110 | |
| 111 | - wp_register_script('geodirectory-leaflet-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 111 | + wp_register_script('geodirectory-leaflet-script', geodir_plugin_url().'/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 112 | 112 | wp_enqueue_script('geodirectory-leaflet-script');
|
| 113 | 113 | |
| 114 | - wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/osm.geocode.js', array(), GEODIRECTORY_VERSION);
|
|
| 114 | + wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url().'/geodirectory-assets/leaflet/osm.geocode.js', array(), GEODIRECTORY_VERSION);
|
|
| 115 | 115 | wp_enqueue_script('geodirectory-leaflet-geo-script');
|
| 116 | 116 | } |
| 117 | - wp_enqueue_script( 'jquery-ui-autocomplete' ); |
|
| 117 | + wp_enqueue_script('jquery-ui-autocomplete');
|
|
| 118 | 118 | |
| 119 | - wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION,true);
|
|
| 119 | + wp_register_script('geodirectory-goMap-script', geodir_plugin_url().'/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION, true);
|
|
| 120 | 120 | wp_enqueue_script('geodirectory-goMap-script');
|
| 121 | 121 | |
| 122 | 122 | |
| 123 | - wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 123 | + wp_register_script('chosen', geodir_plugin_url().'/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 124 | 124 | wp_enqueue_script('chosen');
|
| 125 | 125 | |
| 126 | - wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 126 | + wp_register_script('geodirectory-choose-ajax', geodir_plugin_url().'/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION);
|
|
| 127 | 127 | wp_enqueue_script('geodirectory-choose-ajax');
|
| 128 | 128 | |
| 129 | - wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true);
|
|
| 129 | + wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url().'/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true);
|
|
| 130 | 130 | |
| 131 | 131 | if (is_page() && geodir_is_page('add-listing')) {
|
| 132 | 132 | // SCRIPT FOR UPLOAD |
| 133 | 133 | wp_enqueue_script('plupload-all');
|
| 134 | 134 | wp_enqueue_script('jquery-ui-sortable');
|
| 135 | 135 | |
| 136 | - wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true);
|
|
| 136 | + wp_register_script('geodirectory-plupload-script', geodir_plugin_url().'/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 137 | 137 | wp_enqueue_script('geodirectory-plupload-script');
|
| 138 | 138 | // SCRIPT FOR UPLOAD END |
| 139 | 139 | |
@@ -180,27 +180,27 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init);
|
| 182 | 182 | |
| 183 | - wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload');
|
|
| 183 | + wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url().'/geodirectory-assets/js/listing_validation.min.js#asyncload');
|
|
| 184 | 184 | } // End if for add place page |
| 185 | 185 | |
| 186 | - wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 186 | + wp_register_script('geodirectory-post-custom-js', geodir_plugin_url().'/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 187 | 187 | if ($is_detail_page) {
|
| 188 | 188 | wp_enqueue_script('geodirectory-post-custom-js');
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | // font awesome rating script |
| 192 | 192 | if (get_option('geodir_reviewrating_enable_font_awesome')) {
|
| 193 | - wp_register_script('geodir-barrating-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true);
|
|
| 193 | + wp_register_script('geodir-barrating-js', geodir_plugin_url().'/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true);
|
|
| 194 | 194 | wp_enqueue_script('geodir-barrating-js');
|
| 195 | 195 | } else { // default rating script
|
| 196 | - wp_register_script('geodir-jRating-js', geodir_plugin_url() . '/geodirectory-assets/js/jRating.jquery.min.js', array(), GEODIRECTORY_VERSION, true);
|
|
| 196 | + wp_register_script('geodir-jRating-js', geodir_plugin_url().'/geodirectory-assets/js/jRating.jquery.min.js', array(), GEODIRECTORY_VERSION, true);
|
|
| 197 | 197 | wp_enqueue_script('geodir-jRating-js');
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | - wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 200 | + wp_register_script('geodir-on-document-load', geodir_plugin_url().'/geodirectory-assets/js/on_document_load.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 201 | 201 | wp_enqueue_script('geodir-on-document-load');
|
| 202 | 202 | |
| 203 | - wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 203 | + wp_register_script('google-geometa', geodir_plugin_url().'/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true);
|
|
| 204 | 204 | wp_enqueue_script('google-geometa');
|
| 205 | 205 | } |
| 206 | 206 | |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | */ |
| 216 | 216 | function geodir_header_scripts() |
| 217 | 217 | {
|
| 218 | - echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>';
|
|
| 218 | + echo '<style>'.stripslashes(get_option('geodir_coustem_css')).'</style>';
|
|
| 219 | 219 | echo stripslashes(get_option('geodir_header_scripts'));
|
| 220 | 220 | } |
| 221 | 221 | |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | */ |
| 247 | 247 | function geodir_add_async_forscript($url) |
| 248 | 248 | {
|
| 249 | - if (strpos($url, '#asyncload')===false) |
|
| 249 | + if (strpos($url, '#asyncload') === false) |
|
| 250 | 250 | return $url; |
| 251 | 251 | else if (is_admin()) |
| 252 | 252 | return str_replace('#asyncload', '', $url);
|
@@ -264,12 +264,12 @@ discard block |
||
| 264 | 264 | function geodir_templates_styles() |
| 265 | 265 | {
|
| 266 | 266 | |
| 267 | - wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION);
|
|
| 267 | + wp_register_style('geodir-core-scss', geodir_plugin_url().'/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION);
|
|
| 268 | 268 | wp_enqueue_style('geodir-core-scss');
|
| 269 | - wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION);
|
|
| 269 | + wp_register_style('geodir-core-scss-footer', geodir_plugin_url().'/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION);
|
|
| 270 | 270 | |
| 271 | - if(is_rtl()){
|
|
| 272 | - wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION);
|
|
| 271 | + if (is_rtl()) {
|
|
| 272 | + wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url().'/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION);
|
|
| 273 | 273 | wp_enqueue_style('geodirectory-frontend-rtl-style');
|
| 274 | 274 | } |
| 275 | 275 | |
@@ -343,18 +343,18 @@ discard block |
||
| 343 | 343 | $term_id = get_queried_object_id(); |
| 344 | 344 | $taxonomy = get_query_var('taxonomy');
|
| 345 | 345 | |
| 346 | - if ($term_id && $post_type && get_query_var('taxonomy') == $post_type . 'category' ) {
|
|
| 347 | - $term = get_term($term_id, $post_type . 'category'); |
|
| 346 | + if ($term_id && $post_type && get_query_var('taxonomy') == $post_type.'category') {
|
|
| 347 | + $term = get_term($term_id, $post_type.'category'); |
|
| 348 | 348 | } |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | - if (geodir_is_page('search') && !empty($_REQUEST['s' . $post_type . 'category'])) {
|
|
| 352 | - $taxonomy_search = $_REQUEST['s' . $post_type . 'category']; |
|
| 351 | + if (geodir_is_page('search') && !empty($_REQUEST['s'.$post_type.'category'])) {
|
|
| 352 | + $taxonomy_search = $_REQUEST['s'.$post_type.'category']; |
|
| 353 | 353 | |
| 354 | 354 | if (!is_array($taxonomy_search)) {
|
| 355 | - $term = get_term((int)$taxonomy_search, $post_type . 'category'); |
|
| 356 | - } else if(is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search
|
|
| 357 | - $term = get_term((int)$taxonomy_search[0], $post_type . 'category'); |
|
| 355 | + $term = get_term((int) $taxonomy_search, $post_type.'category'); |
|
| 356 | + } else if (is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search
|
|
| 357 | + $term = get_term((int) $taxonomy_search[0], $post_type.'category'); |
|
| 358 | 358 | } |
| 359 | 359 | } |
| 360 | 360 | |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | if ($max_page > 1 || $always_show) {
|
| 367 | 367 | // Extra pagination info |
| 368 | 368 | $geodir_pagination_more_info = get_option('geodir_pagination_advance_info');
|
| 369 | - $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
| 369 | + $start_no = ($paged - 1) * $posts_per_page + 1; |
|
| 370 | 370 | $end_no = min($paged * $posts_per_page, $numposts); |
| 371 | 371 | |
| 372 | 372 | if ($geodir_pagination_more_info != '') {
|
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | } else {
|
| 377 | 377 | $pegination_desc = wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts);
|
| 378 | 378 | } |
| 379 | - $pagination_info = '<div class="gd-pagination-details">' . $pegination_desc . '</div>'; |
|
| 379 | + $pagination_info = '<div class="gd-pagination-details">'.$pegination_desc.'</div>'; |
|
| 380 | 380 | /** |
| 381 | 381 | * Adds an extra pagination info above/under pagination. |
| 382 | 382 | * |
@@ -392,15 +392,15 @@ discard block |
||
| 392 | 392 | $pagination_info = apply_filters('geodir_pagination_advance_info', $pagination_info, $listing_type_name, $start_no, $end_no, $numposts, $post_type);
|
| 393 | 393 | |
| 394 | 394 | if ($geodir_pagination_more_info == 'before') {
|
| 395 | - $before = $before . $pagination_info; |
|
| 395 | + $before = $before.$pagination_info; |
|
| 396 | 396 | } else if ($geodir_pagination_more_info == 'after') {
|
| 397 | - $after = $pagination_info . $after; |
|
| 397 | + $after = $pagination_info.$after; |
|
| 398 | 398 | } |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | echo "$before <div class='Navi gd-navi'>"; |
| 402 | 402 | if ($paged >= ($pages_to_show - 1)) {
|
| 403 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>';
|
|
| 403 | + echo '<a href="'.str_replace('&paged', '&paged', get_pagenum_link()).'">«</a>';
|
|
| 404 | 404 | } |
| 405 | 405 | previous_posts_link($prelabel); |
| 406 | 406 | for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) {
|
@@ -408,13 +408,13 @@ discard block |
||
| 408 | 408 | if ($i == $paged) {
|
| 409 | 409 | echo "<strong class='on'>$i</strong>"; |
| 410 | 410 | } else {
|
| 411 | - echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> ';
|
|
| 411 | + echo ' <a href="'.str_replace('&paged', '&paged', get_pagenum_link($i)).'">'.$i.'</a> ';
|
|
| 412 | 412 | } |
| 413 | 413 | } |
| 414 | 414 | } |
| 415 | 415 | next_posts_link($nxtlabel, $max_page); |
| 416 | 416 | if (($paged + $half_pages_to_show) < ($max_page)) {
|
| 417 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>';
|
|
| 417 | + echo '<a href="'.str_replace('&paged', '&paged', get_pagenum_link($max_page)).'">»</a>';
|
|
| 418 | 418 | } |
| 419 | 419 | echo "</div> $after"; |
| 420 | 420 | } |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | jQuery(function ($) {
|
| 453 | 453 | $("#distance_slider").slider({
|
| 454 | 454 | range: true, |
| 455 | - values: [0, <?php echo ($_REQUEST['sdist']!='') ? sanitize_text_field($_REQUEST['sdist']) : "0"; ?>], |
|
| 455 | + values: [0, <?php echo ($_REQUEST['sdist'] != '') ? sanitize_text_field($_REQUEST['sdist']) : "0"; ?>], |
|
| 456 | 456 | min: 0, |
| 457 | 457 | max: <?php echo $dist; ?>, |
| 458 | 458 | step: <?php echo $dist_dif; ?>, |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | |
| 518 | 518 | |
| 519 | 519 | <script type="text/javascript"> |
| 520 | - var default_location = '<?php if($search_location = geodir_get_default_location()) echo $search_location->city ;?>'; |
|
| 520 | + var default_location = '<?php if ($search_location = geodir_get_default_location()) echo $search_location->city; ?>'; |
|
| 521 | 521 | var latlng; |
| 522 | 522 | var address; |
| 523 | 523 | var dist = 0; |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | var $form = jQuery(this).closest('form');
|
| 531 | 531 | |
| 532 | 532 | if (jQuery("#sdist input[type='radio']:checked").length != 0) dist = jQuery("#sdist input[type='radio']:checked").val();
|
| 533 | - if (jQuery('.search_text', $form).val() == '' || jQuery('.search_text', $form).val() == '<?php echo $default_search_for_text;?>') jQuery('.search_text', $form).val(s);
|
|
| 533 | + if (jQuery('.search_text', $form).val() == '' || jQuery('.search_text', $form).val() == '<?php echo $default_search_for_text; ?>') jQuery('.search_text', $form).val(s);
|
|
| 534 | 534 | |
| 535 | 535 | // Disable location based search for disabled location post type. |
| 536 | 536 | if (jQuery('.search_by_post', $form).val() != '' && typeof gd_cpt_no_location == 'function') {
|
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | } |
| 545 | 545 | } |
| 546 | 546 | |
| 547 | - if (dist > 0 || (jQuery('select[name="sort_by"]').val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest') || (jQuery(".snear", $form).val() != '' && jQuery(".snear", $form).val() != '<?php echo $default_near_text;?>')) {
|
|
| 547 | + if (dist > 0 || (jQuery('select[name="sort_by"]').val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest') || (jQuery(".snear", $form).val() != '' && jQuery(".snear", $form).val() != '<?php echo $default_near_text; ?>')) {
|
|
| 548 | 548 | geodir_setsearch($form); |
| 549 | 549 | } else {
|
| 550 | 550 | jQuery(".snear", $form).val('');
|
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | }); |
| 564 | 564 | |
| 565 | 565 | function geodir_setsearch($form) {
|
| 566 | - if ((dist > 0 || (jQuery('select[name="sort_by"]', $form).val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest')) && (jQuery(".snear", $form).val() == '' || jQuery(".snear", $form).val() == '<?php echo $default_near_text;?>')) jQuery(".snear", $form).val(default_location);
|
|
| 566 | + if ((dist > 0 || (jQuery('select[name="sort_by"]', $form).val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest')) && (jQuery(".snear", $form).val() == '' || jQuery(".snear", $form).val() == '<?php echo $default_near_text; ?>')) jQuery(".snear", $form).val(default_location);
|
|
| 567 | 567 | geocodeAddress($form); |
| 568 | 568 | } |
| 569 | 569 | |
@@ -582,15 +582,15 @@ discard block |
||
| 582 | 582 | // Call the geocode function |
| 583 | 583 | Sgeocoder = window.gdMaps == 'google' ? new google.maps.Geocoder() : null; |
| 584 | 584 | |
| 585 | - if (jQuery('.snear', $form).val() == '' || ( jQuery('.sgeo_lat').val() != '' && jQuery('.sgeo_lon').val() != '' ) || jQuery('.snear', $form).val().match("^<?php _e('In:','geodirectory');?>")) {
|
|
| 586 | - if (jQuery('.snear', $form).val().match("^<?php _e('In:','geodirectory');?>")) {
|
|
| 585 | + if (jQuery('.snear', $form).val() == '' || ( jQuery('.sgeo_lat').val() != '' && jQuery('.sgeo_lon').val() != '' ) || jQuery('.snear', $form).val().match("^<?php _e('In:', 'geodirectory'); ?>")) {
|
|
| 586 | + if (jQuery('.snear', $form).val().match("^<?php _e('In:', 'geodirectory'); ?>")) {
|
|
| 587 | 587 | jQuery(".snear", $form).val('');
|
| 588 | 588 | } |
| 589 | 589 | jQuery($form).submit(); |
| 590 | 590 | } else {
|
| 591 | 591 | var address = jQuery(".snear", $form).val();
|
| 592 | 592 | |
| 593 | - if (jQuery('.snear', $form).val() == '<?php echo $default_near_text;?>') {
|
|
| 593 | + if (jQuery('.snear', $form).val() == '<?php echo $default_near_text; ?>') {
|
|
| 594 | 594 | initialise2(); |
| 595 | 595 | } else {
|
| 596 | 596 | <?php |
@@ -603,12 +603,12 @@ discard block |
||
| 603 | 603 | $near_add2 = apply_filters('geodir_search_near_addition', '');
|
| 604 | 604 | ?> |
| 605 | 605 | if (window.gdMaps === 'google') {
|
| 606 | - Sgeocoder.geocode({'address': address<?php echo ($near_add ? '+", ' . $near_add . '"' : '') . $near_add2;?>},
|
|
| 606 | + Sgeocoder.geocode({'address': address<?php echo ($near_add ? '+", '.$near_add.'"' : '').$near_add2; ?>},
|
|
| 607 | 607 | function (results, status) {
|
| 608 | 608 | if (status == google.maps.GeocoderStatus.OK) {
|
| 609 | 609 | updateSearchPosition(results[0].geometry.location, $form); |
| 610 | 610 | } else {
|
| 611 | - alert("<?php esc_attr_e('Search was not successful for the following reason:', 'geodirectory');?>" + status);
|
|
| 611 | + alert("<?php esc_attr_e('Search was not successful for the following reason:', 'geodirectory'); ?>" + status);
|
|
| 612 | 612 | } |
| 613 | 613 | }); |
| 614 | 614 | } else if (window.gdMaps === 'osm') {
|
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | if (typeof geo !== 'undefined' && geo.lat && geo.lon) {
|
| 618 | 618 | updateSearchPosition(geo, $form); |
| 619 | 619 | } else {
|
| 620 | - alert("<?php esc_attr_e('Search was not successful for the requested address.', 'geodirectory');?>");
|
|
| 620 | + alert("<?php esc_attr_e('Search was not successful for the requested address.', 'geodirectory'); ?>");
|
|
| 621 | 621 | } |
| 622 | 622 | }); |
| 623 | 623 | } else {
|
@@ -663,19 +663,19 @@ discard block |
||
| 663 | 663 | var msg; |
| 664 | 664 | switch (err.code) {
|
| 665 | 665 | case err.UNKNOWN_ERROR: |
| 666 | - msg = "<?php _e('Unable to find your location','geodirectory');?>";
|
|
| 666 | + msg = "<?php _e('Unable to find your location', 'geodirectory'); ?>";
|
|
| 667 | 667 | break; |
| 668 | 668 | case err.PERMISSION_DENINED: |
| 669 | - msg = "<?php _e('Permission denied in finding your location','geodirectory');?>";
|
|
| 669 | + msg = "<?php _e('Permission denied in finding your location', 'geodirectory'); ?>";
|
|
| 670 | 670 | break; |
| 671 | 671 | case err.POSITION_UNAVAILABLE: |
| 672 | - msg = "<?php _e('Your location is currently unknown','geodirectory');?>";
|
|
| 672 | + msg = "<?php _e('Your location is currently unknown', 'geodirectory'); ?>";
|
|
| 673 | 673 | break; |
| 674 | 674 | case err.BREAK: |
| 675 | - msg = "<?php _e('Attempt to find location took too long','geodirectory');?>";
|
|
| 675 | + msg = "<?php _e('Attempt to find location took too long', 'geodirectory'); ?>";
|
|
| 676 | 676 | break; |
| 677 | 677 | default: |
| 678 | - msg = "<?php _e('Location detection not supported in browser','geodirectory');?>";
|
|
| 678 | + msg = "<?php _e('Location detection not supported in browser', 'geodirectory'); ?>";
|
|
| 679 | 679 | } |
| 680 | 680 | jQuery('#info').html(msg);
|
| 681 | 681 | } |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | * @param object $post The post object. |
| 715 | 715 | * @param string $link The link to the post. |
| 716 | 716 | */ |
| 717 | - $return = apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link);
|
|
| 717 | + $return = apply_filters('geodir_featured_badge_on_image', '<a href="'.$link.'"><span class="geodir_featured_img"> </span></a>', $post, $link);
|
|
| 718 | 718 | break; |
| 719 | 719 | case 'new' : |
| 720 | 720 | /** |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | * @param object $post The post object. |
| 725 | 725 | * @param string $link The link to the post. |
| 726 | 726 | */ |
| 727 | - $return = apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link);
|
|
| 727 | + $return = apply_filters('geodir_new_badge_on_image', '<a href="'.$link.'"><span class="geodir_new_listing"> </span></a>', $post, $link);
|
|
| 728 | 728 | break; |
| 729 | 729 | |
| 730 | 730 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | define('LISTING_DETAILS_TEXT', __('Enter Listing Details', 'geodirectory'));
|
| 42 | 42 | |
| 43 | 43 | define('PLACE_TITLE_TEXT', __('Listing Title', 'geodirectory')); // depreciated @since 1.6.3
|
| 44 | -define('PLACE_DESC_TEXT', __('Listing Description', 'geodirectory'));// depreciated @since 1.6.3
|
|
| 44 | +define('PLACE_DESC_TEXT', __('Listing Description', 'geodirectory')); // depreciated @since 1.6.3
|
|
| 45 | 45 | |
| 46 | 46 | define('LISTING_ADDRESS_TEXT', __('Listing Address:', 'geodirectory'));
|
| 47 | 47 | define('PLACE_ADDRESS', __('Address:', 'geodirectory'));
|
@@ -202,14 +202,14 @@ discard block |
||
| 202 | 202 | // Add marker cluster |
| 203 | 203 | if (isset($params['marker_cluster']) && gdsc_to_bool_val($params['marker_cluster']) && defined('GDCLUSTER_VERSION')) { |
| 204 | 204 | $map_args['enable_marker_cluster'] = true; |
| 205 | - if(get_option('geodir_marker_cluster_type')) { |
|
| 205 | + if (get_option('geodir_marker_cluster_type')) { |
|
| 206 | 206 | if ($map_args['autozoom']) { |
| 207 | 207 | $map_args['enable_marker_cluster_no_reposition'] = false; |
| 208 | 208 | } else { |
| 209 | 209 | $map_args['enable_marker_cluster_no_reposition'] = true; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - $map_args['enable_marker_cluster_server'] = true ; |
|
| 212 | + $map_args['enable_marker_cluster_server'] = true; |
|
| 213 | 213 | |
| 214 | 214 | } |
| 215 | 215 | } else { |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | // if lat and long set in shortcode, hack it so the map is not repositioned |
| 220 | - if(!empty($params['latitude']) && !empty($params['longitude']) ){ |
|
| 220 | + if (!empty($params['latitude']) && !empty($params['longitude'])) { |
|
| 221 | 221 | $map_args['enable_marker_cluster_no_reposition'] = true; |
| 222 | 222 | } |
| 223 | 223 | |
@@ -890,20 +890,20 @@ discard block |
||
| 890 | 890 | |
| 891 | 891 | $show_adv_search = isset($params['show_adv_search']) && in_array($params['show_adv_search'], array('default', 'always', 'searched')) ? $params['show_adv_search'] : ''; |
| 892 | 892 | |
| 893 | - if ($show_adv_search != '' ) { |
|
| 894 | - $show_adv_class = 'geodir-advance-search-' . $show_adv_search . ' '; |
|
| 893 | + if ($show_adv_search != '') { |
|
| 894 | + $show_adv_class = 'geodir-advance-search-'.$show_adv_search.' '; |
|
| 895 | 895 | if ($show_adv_search == 'searched' && geodir_is_page('search')) { |
| 896 | 896 | $show_adv_search = 'search'; |
| 897 | 897 | } |
| 898 | - $show_adv_attrs = 'data-show-adv="' . $show_adv_search . '"'; |
|
| 898 | + $show_adv_attrs = 'data-show-adv="'.$show_adv_search.'"'; |
|
| 899 | 899 | |
| 900 | - $params['before_widget'] = str_replace('class="', $show_adv_attrs . ' class="' . $show_adv_class, $params['before_widget']); |
|
| 900 | + $params['before_widget'] = str_replace('class="', $show_adv_attrs.' class="'.$show_adv_class, $params['before_widget']); |
|
| 901 | 901 | } |
| 902 | 902 | |
| 903 | 903 | ob_start(); |
| 904 | 904 | |
| 905 | 905 | //geodir_get_template_part('listing', 'filter-form'); |
| 906 | - the_widget('geodir_advance_search_widget', $params, $params ); |
|
| 906 | + the_widget('geodir_advance_search_widget', $params, $params); |
|
| 907 | 907 | |
| 908 | 908 | $output = ob_get_contents(); |
| 909 | 909 | ob_end_clean(); |
@@ -1103,7 +1103,7 @@ discard block |
||
| 1103 | 1103 | |
| 1104 | 1104 | // Validate character_count |
| 1105 | 1105 | //todo: is this necessary? |
| 1106 | - $params['character_count'] = $params['character_count']; |
|
| 1106 | + $params['character_count'] = $params['character_count']; |
|
| 1107 | 1107 | |
| 1108 | 1108 | // Validate our layout choice |
| 1109 | 1109 | // Outside of the norm, I added some more simple terms to match the existing |
@@ -1115,7 +1115,7 @@ discard block |
||
| 1115 | 1115 | |
| 1116 | 1116 | // Validate Listing width, used in the template widget-listing-listview.php |
| 1117 | 1117 | // The context is in width=$listing_width% - So we need a positive number between 0 & 100 |
| 1118 | - $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
| 1118 | + $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
| 1119 | 1119 | |
| 1120 | 1120 | // Validate the checkboxes used on the widget |
| 1121 | 1121 | $params['add_location_filter'] = gdsc_to_bool_val($params['add_location_filter']); |
@@ -1131,7 +1131,7 @@ discard block |
||
| 1131 | 1131 | if (!empty($params['tags'])) { |
| 1132 | 1132 | if (!is_array($params['tags'])) { |
| 1133 | 1133 | $comma = _x(',', 'tag delimiter'); |
| 1134 | - if ( ',' !== $comma ) { |
|
| 1134 | + if (',' !== $comma) { |
|
| 1135 | 1135 | $params['tags'] = str_replace($comma, ',', $params['tags']); |
| 1136 | 1136 | } |
| 1137 | 1137 | $params['tags'] = explode(',', trim($params['tags'], " \n\t\r\0\x0B,")); |
@@ -1153,13 +1153,13 @@ discard block |
||
| 1153 | 1153 | unset($atts['pageno']); |
| 1154 | 1154 | } |
| 1155 | 1155 | |
| 1156 | - if ( !empty($atts['shortcode_content']) ) { |
|
| 1156 | + if (!empty($atts['shortcode_content'])) { |
|
| 1157 | 1157 | $content = $atts['shortcode_content']; |
| 1158 | 1158 | } |
| 1159 | 1159 | $params['shortcode_content'] = trim($content); |
| 1160 | 1160 | $atts['shortcode_content'] = trim($content); |
| 1161 | 1161 | |
| 1162 | - $params['shortcode_atts'] = $atts; |
|
| 1162 | + $params['shortcode_atts'] = $atts; |
|
| 1163 | 1163 | |
| 1164 | 1164 | $output = geodir_sc_gd_listings_output($params); |
| 1165 | 1165 | |
@@ -1226,8 +1226,8 @@ discard block |
||
| 1226 | 1226 | // Validate the checkboxes used on the widget |
| 1227 | 1227 | $params['hide_empty'] = gdsc_to_bool_val($params['hide_empty']); |
| 1228 | 1228 | $params['show_count'] = gdsc_to_bool_val($params['show_count']); |
| 1229 | - $params['hide_icon'] = gdsc_to_bool_val($params['hide_icon']); |
|
| 1230 | - $params['cpt_left'] = gdsc_to_bool_val($params['cpt_left']); |
|
| 1229 | + $params['hide_icon'] = gdsc_to_bool_val($params['hide_icon']); |
|
| 1230 | + $params['cpt_left'] = gdsc_to_bool_val($params['cpt_left']); |
|
| 1231 | 1231 | |
| 1232 | 1232 | if ($params['max_count'] != 'all') { |
| 1233 | 1233 | $params['max_count'] = absint($params['max_count']); |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | */ |
| 8 | 8 | // If this file is called directly, abort. |
| 9 | 9 | if (!defined('WPINC')) { |
| 10 | - die; |
|
| 10 | + die; |
|
| 11 | 11 | } |
| 12 | 12 | require_once('geodirectory-functions/shortcode_functions.php'); |
| 13 | 13 | |
@@ -32,43 +32,43 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | function geodir_sc_add_listing($atts) |
| 34 | 34 | { |
| 35 | - ob_start(); |
|
| 36 | - $defaults = array( |
|
| 37 | - 'pid' => '', |
|
| 38 | - 'listing_type' => 'gd_place', |
|
| 39 | - 'login_msg' => __('You must login to post.', 'geodirectory'), |
|
| 40 | - 'show_login' => false, |
|
| 41 | - ); |
|
| 42 | - $params = shortcode_atts($defaults, $atts); |
|
| 43 | - |
|
| 44 | - foreach ($params as $key => $value) { |
|
| 45 | - $_REQUEST[$key] = $value; |
|
| 46 | - } |
|
| 47 | - |
|
| 48 | - $user_id = get_current_user_id(); |
|
| 49 | - if (!$user_id) { |
|
| 50 | - echo $params['login_msg']; |
|
| 51 | - if ($params['show_login']) { |
|
| 52 | - echo "<br />"; |
|
| 53 | - $defaults = array( |
|
| 54 | - 'before_widget' => '', |
|
| 55 | - 'after_widget' => '', |
|
| 56 | - 'before_title' => '', |
|
| 57 | - 'after_title' => '', |
|
| 58 | - ); |
|
| 59 | - |
|
| 60 | - geodir_loginwidget_output($defaults, $defaults); |
|
| 61 | - } |
|
| 62 | - |
|
| 63 | - |
|
| 64 | - } else { |
|
| 65 | - // Add listing page will be used if shortcode is detected in page content, no need to call it here |
|
| 66 | - } |
|
| 67 | - $output = ob_get_contents(); |
|
| 68 | - |
|
| 69 | - ob_end_clean(); |
|
| 70 | - |
|
| 71 | - return $output; |
|
| 35 | + ob_start(); |
|
| 36 | + $defaults = array( |
|
| 37 | + 'pid' => '', |
|
| 38 | + 'listing_type' => 'gd_place', |
|
| 39 | + 'login_msg' => __('You must login to post.', 'geodirectory'), |
|
| 40 | + 'show_login' => false, |
|
| 41 | + ); |
|
| 42 | + $params = shortcode_atts($defaults, $atts); |
|
| 43 | + |
|
| 44 | + foreach ($params as $key => $value) { |
|
| 45 | + $_REQUEST[$key] = $value; |
|
| 46 | + } |
|
| 47 | + |
|
| 48 | + $user_id = get_current_user_id(); |
|
| 49 | + if (!$user_id) { |
|
| 50 | + echo $params['login_msg']; |
|
| 51 | + if ($params['show_login']) { |
|
| 52 | + echo "<br />"; |
|
| 53 | + $defaults = array( |
|
| 54 | + 'before_widget' => '', |
|
| 55 | + 'after_widget' => '', |
|
| 56 | + 'before_title' => '', |
|
| 57 | + 'after_title' => '', |
|
| 58 | + ); |
|
| 59 | + |
|
| 60 | + geodir_loginwidget_output($defaults, $defaults); |
|
| 61 | + } |
|
| 62 | + |
|
| 63 | + |
|
| 64 | + } else { |
|
| 65 | + // Add listing page will be used if shortcode is detected in page content, no need to call it here |
|
| 66 | + } |
|
| 67 | + $output = ob_get_contents(); |
|
| 68 | + |
|
| 69 | + ob_end_clean(); |
|
| 70 | + |
|
| 71 | + return $output; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -96,136 +96,136 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | function geodir_sc_home_map($atts) |
| 98 | 98 | { |
| 99 | - ob_start(); |
|
| 100 | - $defaults = array( |
|
| 101 | - 'width' => '960', |
|
| 102 | - 'height' => '425', |
|
| 103 | - 'maptype' => 'ROADMAP', |
|
| 104 | - 'zoom' => '13', |
|
| 105 | - 'autozoom' => '', |
|
| 106 | - 'child_collapse' => '0', |
|
| 107 | - 'scrollwheel' => '0', |
|
| 99 | + ob_start(); |
|
| 100 | + $defaults = array( |
|
| 101 | + 'width' => '960', |
|
| 102 | + 'height' => '425', |
|
| 103 | + 'maptype' => 'ROADMAP', |
|
| 104 | + 'zoom' => '13', |
|
| 105 | + 'autozoom' => '', |
|
| 106 | + 'child_collapse' => '0', |
|
| 107 | + 'scrollwheel' => '0', |
|
| 108 | 108 | 'marker_cluster' => false, |
| 109 | - 'latitude' => '', |
|
| 110 | - 'longitude' => '' |
|
| 111 | - ); |
|
| 112 | - |
|
| 113 | - $params = shortcode_atts($defaults, $atts); |
|
| 114 | - |
|
| 115 | - $params = gdsc_validate_map_args($params); |
|
| 116 | - |
|
| 117 | - $map_args = array( |
|
| 118 | - 'map_canvas_name' => 'gd_home_map', |
|
| 119 | - 'latitude' => $params['latitude'], |
|
| 120 | - 'longitude' => $params['longitude'], |
|
| 121 | - |
|
| 122 | - /** |
|
| 123 | - * Filter the widget width of the map on home/listings page. |
|
| 124 | - * |
|
| 125 | - * @since 1.0.0 |
|
| 126 | - * @param mixed(string|int|float) $params['width'] The map width. |
|
| 127 | - */ |
|
| 128 | - 'width' => apply_filters('widget_width', $params['width']), |
|
| 129 | - /** |
|
| 130 | - * Filter the widget height of the map on home/listings page. |
|
| 131 | - * |
|
| 132 | - * @since 1.0.0 |
|
| 133 | - * @param mixed(string|int|float) $params['height'] The map height. |
|
| 134 | - */ |
|
| 135 | - 'height' => apply_filters('widget_heigh', $params['height']), |
|
| 136 | - /** |
|
| 137 | - * Filter the widget maptype of the map on home/listings page. |
|
| 138 | - * |
|
| 139 | - * @since 1.0.0 |
|
| 109 | + 'latitude' => '', |
|
| 110 | + 'longitude' => '' |
|
| 111 | + ); |
|
| 112 | + |
|
| 113 | + $params = shortcode_atts($defaults, $atts); |
|
| 114 | + |
|
| 115 | + $params = gdsc_validate_map_args($params); |
|
| 116 | + |
|
| 117 | + $map_args = array( |
|
| 118 | + 'map_canvas_name' => 'gd_home_map', |
|
| 119 | + 'latitude' => $params['latitude'], |
|
| 120 | + 'longitude' => $params['longitude'], |
|
| 121 | + |
|
| 122 | + /** |
|
| 123 | + * Filter the widget width of the map on home/listings page. |
|
| 124 | + * |
|
| 125 | + * @since 1.0.0 |
|
| 126 | + * @param mixed(string|int|float) $params['width'] The map width. |
|
| 127 | + */ |
|
| 128 | + 'width' => apply_filters('widget_width', $params['width']), |
|
| 129 | + /** |
|
| 130 | + * Filter the widget height of the map on home/listings page. |
|
| 131 | + * |
|
| 132 | + * @since 1.0.0 |
|
| 133 | + * @param mixed(string|int|float) $params['height'] The map height. |
|
| 134 | + */ |
|
| 135 | + 'height' => apply_filters('widget_heigh', $params['height']), |
|
| 136 | + /** |
|
| 137 | + * Filter the widget maptype of the map on home/listings page. |
|
| 138 | + * |
|
| 139 | + * @since 1.0.0 |
|
| 140 | 140 | * @since 1.5.2 Added TERRAIN map type. |
| 141 | - * @param string $params['maptype'] The map type. Can be ROADMAP | SATELLITE | HYBRID | TERRAIN. |
|
| 142 | - */ |
|
| 143 | - 'maptype' => apply_filters('widget_maptype', $params['maptype']), |
|
| 144 | - /** |
|
| 145 | - * Filter the widget scrollwheel value of the map on home/listings page. |
|
| 146 | - * |
|
| 147 | - * Should the scrollwheel zoom the map or not. |
|
| 148 | - * |
|
| 149 | - * @since 1.0.0 |
|
| 150 | - * @param bool $params['scrollwheel'] True to allow scroll wheel to scroll map or false if not. |
|
| 151 | - */ |
|
| 152 | - 'scrollwheel' => apply_filters('widget_scrollwheel', $params['scrollwheel']), |
|
| 153 | - /** |
|
| 154 | - * Filter the widget zoom level of the map on home/listings page. |
|
| 155 | - * |
|
| 156 | - * @since 1.0.0 |
|
| 157 | - * @param int $params['zoom'] The zoom level of the map. Between 1-19. |
|
| 158 | - */ |
|
| 159 | - 'zoom' => apply_filters('widget_zoom', $params['zoom']), |
|
| 160 | - /** |
|
| 161 | - * Filter the widget auto zoom value of the map on home/listings page. |
|
| 162 | - * |
|
| 163 | - * If the map should autozoom to fit the markers shown. |
|
| 164 | - * |
|
| 165 | - * @since 1.0.0 |
|
| 166 | - * @param bool $params['autozoom'] True if the map should autozoom, false if not. |
|
| 167 | - */ |
|
| 168 | - 'autozoom' => apply_filters('widget_autozoom', $params['autozoom']), |
|
| 169 | - /** |
|
| 170 | - * Filter the widget child_collapse value of the map on home/listings page. |
|
| 171 | - * |
|
| 172 | - * If the map should auto collapse the child categories if the category bar is present. |
|
| 173 | - * |
|
| 174 | - * @since 1.0.0 |
|
| 175 | - * @param bool $params['child_collapse'] True if the map should collapse the categories, false if not. |
|
| 176 | - */ |
|
| 177 | - 'child_collapse' => apply_filters('widget_child_collapse', $params['child_collapse']), |
|
| 178 | - 'enable_cat_filters' => true, |
|
| 179 | - 'enable_text_search' => true, |
|
| 180 | - 'enable_post_type_filters' => true, |
|
| 181 | - /** |
|
| 182 | - * Filter the widget enable_location_filters value of the map on home/listings page. |
|
| 183 | - * |
|
| 184 | - * This is used when the location addon is used. |
|
| 185 | - * |
|
| 186 | - * @since 1.0.0 |
|
| 187 | - * @param bool $val True if location filters should be used, false if not. |
|
| 188 | - */ |
|
| 189 | - 'enable_location_filters' => apply_filters('geodir_home_map_enable_location_filters', false), |
|
| 190 | - 'enable_jason_on_load' => false, |
|
| 191 | - 'enable_marker_cluster' => false, |
|
| 192 | - 'enable_map_resize_button' => true, |
|
| 193 | - 'map_class_name' => 'geodir-map-home-page', |
|
| 194 | - 'is_geodir_home_map_widget' => true, |
|
| 195 | - ); |
|
| 141 | + * @param string $params['maptype'] The map type. Can be ROADMAP | SATELLITE | HYBRID | TERRAIN. |
|
| 142 | + */ |
|
| 143 | + 'maptype' => apply_filters('widget_maptype', $params['maptype']), |
|
| 144 | + /** |
|
| 145 | + * Filter the widget scrollwheel value of the map on home/listings page. |
|
| 146 | + * |
|
| 147 | + * Should the scrollwheel zoom the map or not. |
|
| 148 | + * |
|
| 149 | + * @since 1.0.0 |
|
| 150 | + * @param bool $params['scrollwheel'] True to allow scroll wheel to scroll map or false if not. |
|
| 151 | + */ |
|
| 152 | + 'scrollwheel' => apply_filters('widget_scrollwheel', $params['scrollwheel']), |
|
| 153 | + /** |
|
| 154 | + * Filter the widget zoom level of the map on home/listings page. |
|
| 155 | + * |
|
| 156 | + * @since 1.0.0 |
|
| 157 | + * @param int $params['zoom'] The zoom level of the map. Between 1-19. |
|
| 158 | + */ |
|
| 159 | + 'zoom' => apply_filters('widget_zoom', $params['zoom']), |
|
| 160 | + /** |
|
| 161 | + * Filter the widget auto zoom value of the map on home/listings page. |
|
| 162 | + * |
|
| 163 | + * If the map should autozoom to fit the markers shown. |
|
| 164 | + * |
|
| 165 | + * @since 1.0.0 |
|
| 166 | + * @param bool $params['autozoom'] True if the map should autozoom, false if not. |
|
| 167 | + */ |
|
| 168 | + 'autozoom' => apply_filters('widget_autozoom', $params['autozoom']), |
|
| 169 | + /** |
|
| 170 | + * Filter the widget child_collapse value of the map on home/listings page. |
|
| 171 | + * |
|
| 172 | + * If the map should auto collapse the child categories if the category bar is present. |
|
| 173 | + * |
|
| 174 | + * @since 1.0.0 |
|
| 175 | + * @param bool $params['child_collapse'] True if the map should collapse the categories, false if not. |
|
| 176 | + */ |
|
| 177 | + 'child_collapse' => apply_filters('widget_child_collapse', $params['child_collapse']), |
|
| 178 | + 'enable_cat_filters' => true, |
|
| 179 | + 'enable_text_search' => true, |
|
| 180 | + 'enable_post_type_filters' => true, |
|
| 181 | + /** |
|
| 182 | + * Filter the widget enable_location_filters value of the map on home/listings page. |
|
| 183 | + * |
|
| 184 | + * This is used when the location addon is used. |
|
| 185 | + * |
|
| 186 | + * @since 1.0.0 |
|
| 187 | + * @param bool $val True if location filters should be used, false if not. |
|
| 188 | + */ |
|
| 189 | + 'enable_location_filters' => apply_filters('geodir_home_map_enable_location_filters', false), |
|
| 190 | + 'enable_jason_on_load' => false, |
|
| 191 | + 'enable_marker_cluster' => false, |
|
| 192 | + 'enable_map_resize_button' => true, |
|
| 193 | + 'map_class_name' => 'geodir-map-home-page', |
|
| 194 | + 'is_geodir_home_map_widget' => true, |
|
| 195 | + ); |
|
| 196 | 196 | |
| 197 | 197 | // Add marker cluster |
| 198 | 198 | if (isset($params['marker_cluster']) && gdsc_to_bool_val($params['marker_cluster']) && defined('GDCLUSTER_VERSION')) { |
| 199 | - $map_args['enable_marker_cluster'] = true; |
|
| 200 | - if(get_option('geodir_marker_cluster_type')) { |
|
| 201 | - if ($map_args['autozoom']) { |
|
| 202 | - $map_args['enable_marker_cluster_no_reposition'] = false; |
|
| 203 | - } else { |
|
| 204 | - $map_args['enable_marker_cluster_no_reposition'] = true; |
|
| 205 | - } |
|
| 199 | + $map_args['enable_marker_cluster'] = true; |
|
| 200 | + if(get_option('geodir_marker_cluster_type')) { |
|
| 201 | + if ($map_args['autozoom']) { |
|
| 202 | + $map_args['enable_marker_cluster_no_reposition'] = false; |
|
| 203 | + } else { |
|
| 204 | + $map_args['enable_marker_cluster_no_reposition'] = true; |
|
| 205 | + } |
|
| 206 | 206 | |
| 207 | - $map_args['enable_marker_cluster_server'] = true ; |
|
| 207 | + $map_args['enable_marker_cluster_server'] = true ; |
|
| 208 | 208 | |
| 209 | - } |
|
| 209 | + } |
|
| 210 | 210 | } else { |
| 211 | 211 | $map_args['enable_marker_cluster'] = false; |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | - // if lat and long set in shortcode, hack it so the map is not repositioned |
|
| 215 | - if(!empty($params['latitude']) && !empty($params['longitude']) ){ |
|
| 216 | - $map_args['enable_marker_cluster_no_reposition'] = true; |
|
| 217 | - } |
|
| 214 | + // if lat and long set in shortcode, hack it so the map is not repositioned |
|
| 215 | + if(!empty($params['latitude']) && !empty($params['longitude']) ){ |
|
| 216 | + $map_args['enable_marker_cluster_no_reposition'] = true; |
|
| 217 | + } |
|
| 218 | 218 | |
| 219 | 219 | |
| 220 | - geodir_draw_map($map_args); |
|
| 220 | + geodir_draw_map($map_args); |
|
| 221 | 221 | |
| 222 | - add_action('wp_footer', 'geodir_home_map_add_script', 100); |
|
| 222 | + add_action('wp_footer', 'geodir_home_map_add_script', 100); |
|
| 223 | 223 | |
| 224 | - $output = ob_get_contents(); |
|
| 224 | + $output = ob_get_contents(); |
|
| 225 | 225 | |
| 226 | - ob_end_clean(); |
|
| 226 | + ob_end_clean(); |
|
| 227 | 227 | |
| 228 | - return $output; |
|
| 228 | + return $output; |
|
| 229 | 229 | } |
| 230 | 230 | add_shortcode('gd_homepage_map', 'geodir_sc_home_map'); |
| 231 | 231 | |
@@ -259,77 +259,77 @@ discard block |
||
| 259 | 259 | */ |
| 260 | 260 | function geodir_sc_listing_map($atts) |
| 261 | 261 | { |
| 262 | - ob_start(); |
|
| 263 | - add_action('wp_head', 'init_listing_map_script'); // Initialize the map object and marker array |
|
| 264 | - |
|
| 265 | - add_action('the_post', 'create_list_jsondata'); // Add marker in json array |
|
| 266 | - |
|
| 267 | - add_action('wp_footer', 'show_listing_widget_map'); // Show map for listings with markers |
|
| 268 | - |
|
| 269 | - $defaults = array( |
|
| 270 | - 'width' => '294', |
|
| 271 | - 'height' => '370', |
|
| 272 | - 'zoom' => '13', |
|
| 273 | - 'autozoom' => '', |
|
| 274 | - 'sticky' => '', |
|
| 275 | - 'showall' => '0', |
|
| 276 | - 'scrollwheel' => '0', |
|
| 277 | - 'maptype' => 'ROADMAP', |
|
| 278 | - 'child_collapse' => 0, |
|
| 262 | + ob_start(); |
|
| 263 | + add_action('wp_head', 'init_listing_map_script'); // Initialize the map object and marker array |
|
| 264 | + |
|
| 265 | + add_action('the_post', 'create_list_jsondata'); // Add marker in json array |
|
| 266 | + |
|
| 267 | + add_action('wp_footer', 'show_listing_widget_map'); // Show map for listings with markers |
|
| 268 | + |
|
| 269 | + $defaults = array( |
|
| 270 | + 'width' => '294', |
|
| 271 | + 'height' => '370', |
|
| 272 | + 'zoom' => '13', |
|
| 273 | + 'autozoom' => '', |
|
| 274 | + 'sticky' => '', |
|
| 275 | + 'showall' => '0', |
|
| 276 | + 'scrollwheel' => '0', |
|
| 277 | + 'maptype' => 'ROADMAP', |
|
| 278 | + 'child_collapse' => 0, |
|
| 279 | 279 | 'marker_cluster' => false |
| 280 | - ); |
|
| 281 | - |
|
| 282 | - $params = shortcode_atts($defaults, $atts); |
|
| 283 | - |
|
| 284 | - $params = gdsc_validate_map_args($params); |
|
| 285 | - |
|
| 286 | - $map_args = array( |
|
| 287 | - 'map_canvas_name' => 'gd_listing_map', |
|
| 288 | - 'width' => $params['width'], |
|
| 289 | - 'height' => $params['height'], |
|
| 290 | - 'zoom' => $params['zoom'], |
|
| 291 | - 'autozoom' => $params['autozoom'], |
|
| 292 | - 'sticky' => $params['sticky'], |
|
| 293 | - 'showall' => $params['showall'], |
|
| 294 | - 'scrollwheel' => $params['scrollwheel'], |
|
| 295 | - 'child_collapse' => 0, |
|
| 296 | - 'enable_cat_filters' => false, |
|
| 297 | - 'enable_text_search' => false, |
|
| 298 | - 'enable_post_type_filters' => false, |
|
| 299 | - 'enable_location_filters' => false, |
|
| 300 | - 'enable_jason_on_load' => true, |
|
| 301 | - ); |
|
| 302 | - |
|
| 303 | - if (is_single()) { |
|
| 304 | - |
|
| 305 | - global $post; |
|
| 306 | - $map_default_lat = $address_latitude = $post->post_latitude; |
|
| 307 | - $map_default_lng = $address_longitude = $post->post_longitude; |
|
| 308 | - $mapview = $post->post_mapview; |
|
| 309 | - $map_args['zoom'] = $post->post_mapzoom; |
|
| 310 | - $map_args['map_class_name'] = 'geodir-map-listing-page-single'; |
|
| 311 | - |
|
| 312 | - } else { |
|
| 313 | - $default_location = geodir_get_default_location(); |
|
| 314 | - |
|
| 315 | - $map_default_lat = isset($default_location->city_latitude) ? $default_location->city_latitude : ''; |
|
| 316 | - $map_default_lng = isset($default_location->city_longitude) ? $default_location->city_longitude : ''; |
|
| 317 | - $map_args['map_class_name'] = 'geodir-map-listing-page'; |
|
| 318 | - } |
|
| 319 | - |
|
| 320 | - if (empty($mapview)) { |
|
| 321 | - $mapview = 'ROADMAP'; |
|
| 322 | - } |
|
| 323 | - |
|
| 324 | - // Set default map options |
|
| 325 | - $map_args['ajax_url'] = geodir_get_ajax_url(); |
|
| 326 | - $map_args['latitude'] = $map_default_lat; |
|
| 327 | - $map_args['longitude'] = $map_default_lng; |
|
| 328 | - $map_args['streetViewControl'] = true; |
|
| 329 | - $map_args['maptype'] = $mapview; |
|
| 330 | - $map_args['showPreview'] = '0'; |
|
| 331 | - $map_args['maxZoom'] = 21; |
|
| 332 | - $map_args['bubble_size'] = 'small'; |
|
| 280 | + ); |
|
| 281 | + |
|
| 282 | + $params = shortcode_atts($defaults, $atts); |
|
| 283 | + |
|
| 284 | + $params = gdsc_validate_map_args($params); |
|
| 285 | + |
|
| 286 | + $map_args = array( |
|
| 287 | + 'map_canvas_name' => 'gd_listing_map', |
|
| 288 | + 'width' => $params['width'], |
|
| 289 | + 'height' => $params['height'], |
|
| 290 | + 'zoom' => $params['zoom'], |
|
| 291 | + 'autozoom' => $params['autozoom'], |
|
| 292 | + 'sticky' => $params['sticky'], |
|
| 293 | + 'showall' => $params['showall'], |
|
| 294 | + 'scrollwheel' => $params['scrollwheel'], |
|
| 295 | + 'child_collapse' => 0, |
|
| 296 | + 'enable_cat_filters' => false, |
|
| 297 | + 'enable_text_search' => false, |
|
| 298 | + 'enable_post_type_filters' => false, |
|
| 299 | + 'enable_location_filters' => false, |
|
| 300 | + 'enable_jason_on_load' => true, |
|
| 301 | + ); |
|
| 302 | + |
|
| 303 | + if (is_single()) { |
|
| 304 | + |
|
| 305 | + global $post; |
|
| 306 | + $map_default_lat = $address_latitude = $post->post_latitude; |
|
| 307 | + $map_default_lng = $address_longitude = $post->post_longitude; |
|
| 308 | + $mapview = $post->post_mapview; |
|
| 309 | + $map_args['zoom'] = $post->post_mapzoom; |
|
| 310 | + $map_args['map_class_name'] = 'geodir-map-listing-page-single'; |
|
| 311 | + |
|
| 312 | + } else { |
|
| 313 | + $default_location = geodir_get_default_location(); |
|
| 314 | + |
|
| 315 | + $map_default_lat = isset($default_location->city_latitude) ? $default_location->city_latitude : ''; |
|
| 316 | + $map_default_lng = isset($default_location->city_longitude) ? $default_location->city_longitude : ''; |
|
| 317 | + $map_args['map_class_name'] = 'geodir-map-listing-page'; |
|
| 318 | + } |
|
| 319 | + |
|
| 320 | + if (empty($mapview)) { |
|
| 321 | + $mapview = 'ROADMAP'; |
|
| 322 | + } |
|
| 323 | + |
|
| 324 | + // Set default map options |
|
| 325 | + $map_args['ajax_url'] = geodir_get_ajax_url(); |
|
| 326 | + $map_args['latitude'] = $map_default_lat; |
|
| 327 | + $map_args['longitude'] = $map_default_lng; |
|
| 328 | + $map_args['streetViewControl'] = true; |
|
| 329 | + $map_args['maptype'] = $mapview; |
|
| 330 | + $map_args['showPreview'] = '0'; |
|
| 331 | + $map_args['maxZoom'] = 21; |
|
| 332 | + $map_args['bubble_size'] = 'small'; |
|
| 333 | 333 | |
| 334 | 334 | // Add marker cluster |
| 335 | 335 | if (isset($params['marker_cluster']) && gdsc_to_bool_val($params['marker_cluster']) && defined('GDCLUSTER_VERSION')) { |
@@ -338,13 +338,13 @@ discard block |
||
| 338 | 338 | $map_args['enable_marker_cluster'] = false; |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | - geodir_draw_map($map_args); |
|
| 341 | + geodir_draw_map($map_args); |
|
| 342 | 342 | |
| 343 | - $output = ob_get_contents(); |
|
| 343 | + $output = ob_get_contents(); |
|
| 344 | 344 | |
| 345 | - ob_end_clean(); |
|
| 345 | + ob_end_clean(); |
|
| 346 | 346 | |
| 347 | - return $output; |
|
| 347 | + return $output; |
|
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | add_shortcode('gd_listing_slider', 'geodir_sc_listing_slider'); |
@@ -377,120 +377,120 @@ discard block |
||
| 377 | 377 | */ |
| 378 | 378 | function geodir_sc_listing_slider($atts) |
| 379 | 379 | { |
| 380 | - ob_start(); |
|
| 381 | - $defaults = array( |
|
| 382 | - 'post_type' => 'gd_place', |
|
| 383 | - 'category' => '0', |
|
| 384 | - 'post_number' => '5', |
|
| 385 | - 'slideshow' => '0', |
|
| 386 | - 'animation_loop' => 0, |
|
| 387 | - 'direction_nav' => 0, |
|
| 388 | - 'slideshow_speed' => 5000, |
|
| 389 | - 'animation_speed' => 600, |
|
| 390 | - 'animation' => 'slide', |
|
| 391 | - 'order_by' => 'latest', |
|
| 392 | - 'show_title' => '', |
|
| 393 | - 'show_featured_only' => '', |
|
| 394 | - 'title' => '', |
|
| 395 | - ); |
|
| 396 | - |
|
| 397 | - $params = shortcode_atts($defaults, $atts); |
|
| 398 | - |
|
| 399 | - |
|
| 400 | - /* |
|
| 380 | + ob_start(); |
|
| 381 | + $defaults = array( |
|
| 382 | + 'post_type' => 'gd_place', |
|
| 383 | + 'category' => '0', |
|
| 384 | + 'post_number' => '5', |
|
| 385 | + 'slideshow' => '0', |
|
| 386 | + 'animation_loop' => 0, |
|
| 387 | + 'direction_nav' => 0, |
|
| 388 | + 'slideshow_speed' => 5000, |
|
| 389 | + 'animation_speed' => 600, |
|
| 390 | + 'animation' => 'slide', |
|
| 391 | + 'order_by' => 'latest', |
|
| 392 | + 'show_title' => '', |
|
| 393 | + 'show_featured_only' => '', |
|
| 394 | + 'title' => '', |
|
| 395 | + ); |
|
| 396 | + |
|
| 397 | + $params = shortcode_atts($defaults, $atts); |
|
| 398 | + |
|
| 399 | + |
|
| 400 | + /* |
|
| 401 | 401 | * |
| 402 | 402 | * Now we begin the validation of the attributes. |
| 403 | 403 | */ |
| 404 | - // Check we have a valid post_type |
|
| 405 | - if (!(gdsc_is_post_type_valid($params['post_type']))) { |
|
| 406 | - $params['post_type'] = 'gd_place'; |
|
| 407 | - } |
|
| 408 | - |
|
| 409 | - // Check we have a valid sort_order |
|
| 410 | - $params['order_by'] = gdsc_validate_sort_choice($params['order_by']); |
|
| 411 | - |
|
| 412 | - // Match the chosen animation to our options |
|
| 413 | - $animation_list = array('slide', 'fade'); |
|
| 414 | - if (!(in_array($params['animation'], $animation_list))) { |
|
| 415 | - $params['animation'] = 'slide'; |
|
| 416 | - } |
|
| 417 | - |
|
| 418 | - // Post_number needs to be a positive integer |
|
| 419 | - $params['post_number'] = absint($params['post_number']); |
|
| 420 | - if (0 == $params['post_number']) { |
|
| 421 | - $params['post_number'] = 1; |
|
| 422 | - } |
|
| 423 | - |
|
| 424 | - // Manage the entered categories |
|
| 425 | - if (0 != $params['category'] || '' != $params['category']) { |
|
| 426 | - $params['category'] = gdsc_manage_category_choice($params['post_type'], $params['category']); |
|
| 427 | - } |
|
| 428 | - // Convert show_title to a bool |
|
| 429 | - $params['show_title'] = intval(gdsc_to_bool_val($params['show_title'])); |
|
| 430 | - |
|
| 431 | - // Convert show_featured_only to a bool |
|
| 432 | - $params['show_featured_only'] = intval(gdsc_to_bool_val($params['show_featured_only'])); |
|
| 433 | - |
|
| 434 | - /* |
|
| 404 | + // Check we have a valid post_type |
|
| 405 | + if (!(gdsc_is_post_type_valid($params['post_type']))) { |
|
| 406 | + $params['post_type'] = 'gd_place'; |
|
| 407 | + } |
|
| 408 | + |
|
| 409 | + // Check we have a valid sort_order |
|
| 410 | + $params['order_by'] = gdsc_validate_sort_choice($params['order_by']); |
|
| 411 | + |
|
| 412 | + // Match the chosen animation to our options |
|
| 413 | + $animation_list = array('slide', 'fade'); |
|
| 414 | + if (!(in_array($params['animation'], $animation_list))) { |
|
| 415 | + $params['animation'] = 'slide'; |
|
| 416 | + } |
|
| 417 | + |
|
| 418 | + // Post_number needs to be a positive integer |
|
| 419 | + $params['post_number'] = absint($params['post_number']); |
|
| 420 | + if (0 == $params['post_number']) { |
|
| 421 | + $params['post_number'] = 1; |
|
| 422 | + } |
|
| 423 | + |
|
| 424 | + // Manage the entered categories |
|
| 425 | + if (0 != $params['category'] || '' != $params['category']) { |
|
| 426 | + $params['category'] = gdsc_manage_category_choice($params['post_type'], $params['category']); |
|
| 427 | + } |
|
| 428 | + // Convert show_title to a bool |
|
| 429 | + $params['show_title'] = intval(gdsc_to_bool_val($params['show_title'])); |
|
| 430 | + |
|
| 431 | + // Convert show_featured_only to a bool |
|
| 432 | + $params['show_featured_only'] = intval(gdsc_to_bool_val($params['show_featured_only'])); |
|
| 433 | + |
|
| 434 | + /* |
|
| 435 | 435 | * Hopefully all attributes are now valid, and safe to pass forward |
| 436 | 436 | */ |
| 437 | 437 | |
| 438 | - // redeclare vars after validation |
|
| 439 | - |
|
| 440 | - if (isset($params['direction_nav'])) { |
|
| 441 | - $params['directionNav'] = $params['direction_nav']; |
|
| 442 | - } |
|
| 443 | - if (isset($params['animation_loop'])) { |
|
| 444 | - $params['animationLoop'] = $params['animation_loop']; |
|
| 445 | - } |
|
| 446 | - if (isset($params['slideshow_speed'])) { |
|
| 447 | - $params['slideshowSpeed'] = $params['slideshow_speed']; |
|
| 448 | - } |
|
| 449 | - if (isset($params['animation_speed'])) { |
|
| 450 | - $params['animationSpeed'] = $params['animation_speed']; |
|
| 451 | - } |
|
| 452 | - if (isset($params['order_by'])) { |
|
| 453 | - $params['list_sort'] = $params['order_by']; |
|
| 454 | - } |
|
| 455 | - |
|
| 456 | - $query_args = array( |
|
| 457 | - 'post_number' => $params['post_number'], |
|
| 458 | - 'is_geodir_loop' => true, |
|
| 459 | - 'post_type' => $params['post_type'], |
|
| 460 | - 'order_by' => $params['order_by'] |
|
| 461 | - ); |
|
| 462 | - |
|
| 463 | - if (1 == $params['show_featured_only']) { |
|
| 464 | - $query_args['show_featured_only'] = 1; |
|
| 465 | - } |
|
| 466 | - |
|
| 467 | - if (0 != $params['category'] && '' != $params['category']) { |
|
| 468 | - $category_taxonomy = geodir_get_taxonomies($params['post_type']); |
|
| 469 | - $tax_query = array( |
|
| 470 | - 'taxonomy' => $category_taxonomy[0], |
|
| 471 | - 'field' => 'id', |
|
| 472 | - 'terms' => $params['category'], |
|
| 473 | - ); |
|
| 474 | - |
|
| 475 | - $query_args['tax_query'] = array($tax_query); |
|
| 476 | - } |
|
| 477 | - |
|
| 478 | - $defaults = array( |
|
| 479 | - 'before_widget' => '', |
|
| 480 | - 'after_widget' => '', |
|
| 481 | - 'before_title' => '', |
|
| 482 | - 'after_title' => '', |
|
| 483 | - ); |
|
| 484 | - |
|
| 485 | - $query_args = array_merge($query_args, $params); |
|
| 486 | - |
|
| 487 | - geodir_listing_slider_widget_output($defaults, $query_args); |
|
| 488 | - |
|
| 489 | - $output = ob_get_contents(); |
|
| 490 | - |
|
| 491 | - ob_end_clean(); |
|
| 492 | - |
|
| 493 | - return $output; |
|
| 438 | + // redeclare vars after validation |
|
| 439 | + |
|
| 440 | + if (isset($params['direction_nav'])) { |
|
| 441 | + $params['directionNav'] = $params['direction_nav']; |
|
| 442 | + } |
|
| 443 | + if (isset($params['animation_loop'])) { |
|
| 444 | + $params['animationLoop'] = $params['animation_loop']; |
|
| 445 | + } |
|
| 446 | + if (isset($params['slideshow_speed'])) { |
|
| 447 | + $params['slideshowSpeed'] = $params['slideshow_speed']; |
|
| 448 | + } |
|
| 449 | + if (isset($params['animation_speed'])) { |
|
| 450 | + $params['animationSpeed'] = $params['animation_speed']; |
|
| 451 | + } |
|
| 452 | + if (isset($params['order_by'])) { |
|
| 453 | + $params['list_sort'] = $params['order_by']; |
|
| 454 | + } |
|
| 455 | + |
|
| 456 | + $query_args = array( |
|
| 457 | + 'post_number' => $params['post_number'], |
|
| 458 | + 'is_geodir_loop' => true, |
|
| 459 | + 'post_type' => $params['post_type'], |
|
| 460 | + 'order_by' => $params['order_by'] |
|
| 461 | + ); |
|
| 462 | + |
|
| 463 | + if (1 == $params['show_featured_only']) { |
|
| 464 | + $query_args['show_featured_only'] = 1; |
|
| 465 | + } |
|
| 466 | + |
|
| 467 | + if (0 != $params['category'] && '' != $params['category']) { |
|
| 468 | + $category_taxonomy = geodir_get_taxonomies($params['post_type']); |
|
| 469 | + $tax_query = array( |
|
| 470 | + 'taxonomy' => $category_taxonomy[0], |
|
| 471 | + 'field' => 'id', |
|
| 472 | + 'terms' => $params['category'], |
|
| 473 | + ); |
|
| 474 | + |
|
| 475 | + $query_args['tax_query'] = array($tax_query); |
|
| 476 | + } |
|
| 477 | + |
|
| 478 | + $defaults = array( |
|
| 479 | + 'before_widget' => '', |
|
| 480 | + 'after_widget' => '', |
|
| 481 | + 'before_title' => '', |
|
| 482 | + 'after_title' => '', |
|
| 483 | + ); |
|
| 484 | + |
|
| 485 | + $query_args = array_merge($query_args, $params); |
|
| 486 | + |
|
| 487 | + geodir_listing_slider_widget_output($defaults, $query_args); |
|
| 488 | + |
|
| 489 | + $output = ob_get_contents(); |
|
| 490 | + |
|
| 491 | + ob_end_clean(); |
|
| 492 | + |
|
| 493 | + return $output; |
|
| 494 | 494 | } |
| 495 | 495 | |
| 496 | 496 | add_shortcode('gd_login_box', 'geodir_sc_login_box'); |
@@ -514,22 +514,22 @@ discard block |
||
| 514 | 514 | */ |
| 515 | 515 | function geodir_sc_login_box($atts) |
| 516 | 516 | { |
| 517 | - ob_start(); |
|
| 517 | + ob_start(); |
|
| 518 | 518 | |
| 519 | - $defaults = array( |
|
| 520 | - 'before_widget' => '', |
|
| 521 | - 'after_widget' => '', |
|
| 522 | - 'before_title' => '', |
|
| 523 | - 'after_title' => '', |
|
| 524 | - ); |
|
| 519 | + $defaults = array( |
|
| 520 | + 'before_widget' => '', |
|
| 521 | + 'after_widget' => '', |
|
| 522 | + 'before_title' => '', |
|
| 523 | + 'after_title' => '', |
|
| 524 | + ); |
|
| 525 | 525 | |
| 526 | - geodir_loginwidget_output($defaults, $defaults); |
|
| 526 | + geodir_loginwidget_output($defaults, $defaults); |
|
| 527 | 527 | |
| 528 | - $output = ob_get_contents(); |
|
| 528 | + $output = ob_get_contents(); |
|
| 529 | 529 | |
| 530 | - ob_end_clean(); |
|
| 530 | + ob_end_clean(); |
|
| 531 | 531 | |
| 532 | - return $output; |
|
| 532 | + return $output; |
|
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | add_shortcode('gd_popular_post_category', 'geodir_sc_popular_post_category'); |
@@ -558,28 +558,28 @@ discard block |
||
| 558 | 558 | */ |
| 559 | 559 | function geodir_sc_popular_post_category($atts) |
| 560 | 560 | { |
| 561 | - ob_start(); |
|
| 562 | - global $geodir_post_category_str; |
|
| 563 | - $defaults = array( |
|
| 564 | - 'category_limit' => 15, |
|
| 565 | - 'before_widget' => '', |
|
| 566 | - 'after_widget' => '', |
|
| 567 | - 'before_title' => '', |
|
| 568 | - 'after_title' => '', |
|
| 569 | - 'title' => '', |
|
| 561 | + ob_start(); |
|
| 562 | + global $geodir_post_category_str; |
|
| 563 | + $defaults = array( |
|
| 564 | + 'category_limit' => 15, |
|
| 565 | + 'before_widget' => '', |
|
| 566 | + 'after_widget' => '', |
|
| 567 | + 'before_title' => '', |
|
| 568 | + 'after_title' => '', |
|
| 569 | + 'title' => '', |
|
| 570 | 570 | 'default_post_type' => '', |
| 571 | - ); |
|
| 571 | + ); |
|
| 572 | 572 | |
| 573 | - $params = shortcode_atts($defaults, $atts, 'popular_post_category'); |
|
| 574 | - $params['category_limit'] = absint($params['category_limit']); |
|
| 573 | + $params = shortcode_atts($defaults, $atts, 'popular_post_category'); |
|
| 574 | + $params['category_limit'] = absint($params['category_limit']); |
|
| 575 | 575 | $params['default_post_type'] = gdsc_is_post_type_valid($params['default_post_type']) ? $params['default_post_type'] : ''; |
| 576 | - geodir_popular_post_category_output($params, $params); |
|
| 576 | + geodir_popular_post_category_output($params, $params); |
|
| 577 | 577 | |
| 578 | - $output = ob_get_contents(); |
|
| 578 | + $output = ob_get_contents(); |
|
| 579 | 579 | |
| 580 | - ob_end_clean(); |
|
| 580 | + ob_end_clean(); |
|
| 581 | 581 | |
| 582 | - return $output; |
|
| 582 | + return $output; |
|
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | add_shortcode('gd_popular_post_view', 'geodir_sc_popular_post_view'); |
@@ -619,97 +619,97 @@ discard block |
||
| 619 | 619 | */ |
| 620 | 620 | function geodir_sc_popular_post_view($atts) |
| 621 | 621 | { |
| 622 | - ob_start(); |
|
| 623 | - $defaults = array( |
|
| 624 | - 'post_type' => 'gd_place', |
|
| 625 | - 'category' => '0', |
|
| 626 | - 'post_number' => '5', |
|
| 627 | - 'layout' => 'gridview_onehalf', |
|
| 628 | - 'add_location_filter' => '0', |
|
| 629 | - 'list_sort' => 'latest', |
|
| 630 | - 'use_viewing_post_type' => '1', |
|
| 631 | - 'character_count' => '20', |
|
| 632 | - 'listing_width' => '', |
|
| 633 | - 'show_featured_only' => '0', |
|
| 634 | - 'show_special_only' => '0', |
|
| 635 | - 'with_pics_only' => '0', |
|
| 636 | - 'with_videos_only' => '0', |
|
| 637 | - 'before_widget' => '', |
|
| 638 | - 'after_widget' => '', |
|
| 639 | - 'before_title' => '<h3 class="widget-title">', |
|
| 640 | - 'after_title' => '</h3>', |
|
| 641 | - 'title' => '', |
|
| 642 | - 'category_title' => '', |
|
| 643 | - ); |
|
| 644 | - |
|
| 645 | - $params = shortcode_atts($defaults, $atts); |
|
| 646 | - |
|
| 647 | - /** |
|
| 648 | - * Validate our incoming params |
|
| 649 | - */ |
|
| 622 | + ob_start(); |
|
| 623 | + $defaults = array( |
|
| 624 | + 'post_type' => 'gd_place', |
|
| 625 | + 'category' => '0', |
|
| 626 | + 'post_number' => '5', |
|
| 627 | + 'layout' => 'gridview_onehalf', |
|
| 628 | + 'add_location_filter' => '0', |
|
| 629 | + 'list_sort' => 'latest', |
|
| 630 | + 'use_viewing_post_type' => '1', |
|
| 631 | + 'character_count' => '20', |
|
| 632 | + 'listing_width' => '', |
|
| 633 | + 'show_featured_only' => '0', |
|
| 634 | + 'show_special_only' => '0', |
|
| 635 | + 'with_pics_only' => '0', |
|
| 636 | + 'with_videos_only' => '0', |
|
| 637 | + 'before_widget' => '', |
|
| 638 | + 'after_widget' => '', |
|
| 639 | + 'before_title' => '<h3 class="widget-title">', |
|
| 640 | + 'after_title' => '</h3>', |
|
| 641 | + 'title' => '', |
|
| 642 | + 'category_title' => '', |
|
| 643 | + ); |
|
| 650 | 644 | |
| 651 | - // Validate the selected post type, default to gd_place on fail |
|
| 652 | - if (!(gdsc_is_post_type_valid($params['post_type']))) { |
|
| 653 | - $params['post_type'] = 'gd_place'; |
|
| 654 | - } |
|
| 655 | - |
|
| 656 | - // Validate the selected category/ies - Grab the current list based on post_type |
|
| 657 | - $category_taxonomy = geodir_get_taxonomies($params['post_type']); |
|
| 658 | - $categories = get_terms($category_taxonomy, array('orderby' => 'count', 'order' => 'DESC', 'fields' => 'ids')); |
|
| 659 | - |
|
| 660 | - // Make sure we have an array |
|
| 661 | - if (!(is_array($params['category']))) { |
|
| 662 | - $params['category'] = explode(',', $params['category']); |
|
| 663 | - } |
|
| 664 | - |
|
| 665 | - // Array_intersect returns only the items in $params['category'] that are also in our category list |
|
| 666 | - // Otherwise it becomes empty and later on that will mean "All" |
|
| 667 | - $params['category'] = array_intersect($params['category'], $categories); |
|
| 668 | - |
|
| 669 | - // Post_number needs to be a positive integer |
|
| 670 | - $params['post_number'] = absint($params['post_number']); |
|
| 671 | - if (0 == $params['post_number']) { |
|
| 672 | - $params['post_number'] = 1; |
|
| 673 | - } |
|
| 674 | - |
|
| 675 | - // Validate our layout choice |
|
| 676 | - // Outside of the norm, I added some more simple terms to match the existing |
|
| 677 | - // So now I just run the switch to set it properly. |
|
| 678 | - $params['layout'] = gdsc_validate_layout_choice($params['layout']); |
|
| 679 | - |
|
| 680 | - // Validate our sorting choice |
|
| 681 | - $params['list_sort'] = gdsc_validate_sort_choice($params['list_sort']); |
|
| 682 | - |
|
| 683 | - // Validate character_count |
|
| 684 | - $params['character_count'] = absint($params['character_count']); |
|
| 685 | - if (20 > $params['character_count']) { |
|
| 686 | - $params['character_count'] = 20; |
|
| 687 | - } |
|
| 688 | - |
|
| 689 | - // Validate Listing width, used in the template widget-listing-listview.php |
|
| 690 | - // The context is in width=$listing_width% - So we need a positive number between 0 & 100 |
|
| 691 | - $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
| 692 | - |
|
| 693 | - // Validate the checkboxes used on the widget |
|
| 694 | - $params['add_location_filter'] = gdsc_to_bool_val($params['add_location_filter']); |
|
| 695 | - $params['show_featured_only'] = gdsc_to_bool_val($params['show_featured_only']); |
|
| 696 | - $params['show_special_only'] = gdsc_to_bool_val($params['show_special_only']); |
|
| 697 | - $params['with_pics_only'] = gdsc_to_bool_val($params['with_pics_only']); |
|
| 698 | - $params['with_videos_only'] = gdsc_to_bool_val($params['with_videos_only']); |
|
| 699 | - $params['use_viewing_post_type'] = gdsc_to_bool_val($params['use_viewing_post_type']); |
|
| 700 | - |
|
| 701 | - /** |
|
| 702 | - * End of validation |
|
| 703 | - */ |
|
| 645 | + $params = shortcode_atts($defaults, $atts); |
|
| 646 | + |
|
| 647 | + /** |
|
| 648 | + * Validate our incoming params |
|
| 649 | + */ |
|
| 650 | + |
|
| 651 | + // Validate the selected post type, default to gd_place on fail |
|
| 652 | + if (!(gdsc_is_post_type_valid($params['post_type']))) { |
|
| 653 | + $params['post_type'] = 'gd_place'; |
|
| 654 | + } |
|
| 655 | + |
|
| 656 | + // Validate the selected category/ies - Grab the current list based on post_type |
|
| 657 | + $category_taxonomy = geodir_get_taxonomies($params['post_type']); |
|
| 658 | + $categories = get_terms($category_taxonomy, array('orderby' => 'count', 'order' => 'DESC', 'fields' => 'ids')); |
|
| 659 | + |
|
| 660 | + // Make sure we have an array |
|
| 661 | + if (!(is_array($params['category']))) { |
|
| 662 | + $params['category'] = explode(',', $params['category']); |
|
| 663 | + } |
|
| 664 | + |
|
| 665 | + // Array_intersect returns only the items in $params['category'] that are also in our category list |
|
| 666 | + // Otherwise it becomes empty and later on that will mean "All" |
|
| 667 | + $params['category'] = array_intersect($params['category'], $categories); |
|
| 668 | + |
|
| 669 | + // Post_number needs to be a positive integer |
|
| 670 | + $params['post_number'] = absint($params['post_number']); |
|
| 671 | + if (0 == $params['post_number']) { |
|
| 672 | + $params['post_number'] = 1; |
|
| 673 | + } |
|
| 674 | + |
|
| 675 | + // Validate our layout choice |
|
| 676 | + // Outside of the norm, I added some more simple terms to match the existing |
|
| 677 | + // So now I just run the switch to set it properly. |
|
| 678 | + $params['layout'] = gdsc_validate_layout_choice($params['layout']); |
|
| 679 | + |
|
| 680 | + // Validate our sorting choice |
|
| 681 | + $params['list_sort'] = gdsc_validate_sort_choice($params['list_sort']); |
|
| 704 | 682 | |
| 705 | - geodir_popular_postview_output($params, $params); |
|
| 683 | + // Validate character_count |
|
| 684 | + $params['character_count'] = absint($params['character_count']); |
|
| 685 | + if (20 > $params['character_count']) { |
|
| 686 | + $params['character_count'] = 20; |
|
| 687 | + } |
|
| 688 | + |
|
| 689 | + // Validate Listing width, used in the template widget-listing-listview.php |
|
| 690 | + // The context is in width=$listing_width% - So we need a positive number between 0 & 100 |
|
| 691 | + $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
| 692 | + |
|
| 693 | + // Validate the checkboxes used on the widget |
|
| 694 | + $params['add_location_filter'] = gdsc_to_bool_val($params['add_location_filter']); |
|
| 695 | + $params['show_featured_only'] = gdsc_to_bool_val($params['show_featured_only']); |
|
| 696 | + $params['show_special_only'] = gdsc_to_bool_val($params['show_special_only']); |
|
| 697 | + $params['with_pics_only'] = gdsc_to_bool_val($params['with_pics_only']); |
|
| 698 | + $params['with_videos_only'] = gdsc_to_bool_val($params['with_videos_only']); |
|
| 699 | + $params['use_viewing_post_type'] = gdsc_to_bool_val($params['use_viewing_post_type']); |
|
| 700 | + |
|
| 701 | + /** |
|
| 702 | + * End of validation |
|
| 703 | + */ |
|
| 704 | + |
|
| 705 | + geodir_popular_postview_output($params, $params); |
|
| 706 | 706 | |
| 707 | 707 | |
| 708 | - $output = ob_get_contents(); |
|
| 708 | + $output = ob_get_contents(); |
|
| 709 | 709 | |
| 710 | - ob_end_clean(); |
|
| 710 | + ob_end_clean(); |
|
| 711 | 711 | |
| 712 | - return $output; |
|
| 712 | + return $output; |
|
| 713 | 713 | } |
| 714 | 714 | |
| 715 | 715 | add_shortcode('gd_recent_reviews', 'geodir_sc_recent_reviews'); |
@@ -731,37 +731,37 @@ discard block |
||
| 731 | 731 | * @return string Recent reviews HTML. |
| 732 | 732 | */ |
| 733 | 733 | function geodir_sc_recent_reviews($atts) { |
| 734 | - ob_start(); |
|
| 735 | - $defaults = array( |
|
| 734 | + ob_start(); |
|
| 735 | + $defaults = array( |
|
| 736 | 736 | 'title' => '', |
| 737 | 737 | 'count' => 5, |
| 738 | - ); |
|
| 738 | + ); |
|
| 739 | 739 | |
| 740 | - $params = shortcode_atts($defaults, $atts); |
|
| 740 | + $params = shortcode_atts($defaults, $atts); |
|
| 741 | 741 | |
| 742 | - $count = absint($params['count']); |
|
| 743 | - if (0 == $count) { |
|
| 744 | - $count = 1; |
|
| 745 | - } |
|
| 742 | + $count = absint($params['count']); |
|
| 743 | + if (0 == $count) { |
|
| 744 | + $count = 1; |
|
| 745 | + } |
|
| 746 | 746 | |
| 747 | 747 | $title = !empty($params['title']) ? __($params['title'], 'geodirectory') : ''; |
| 748 | 748 | |
| 749 | - $comments_li = geodir_get_recent_reviews(30, $count, 100, false); |
|
| 749 | + $comments_li = geodir_get_recent_reviews(30, $count, 100, false); |
|
| 750 | 750 | |
| 751 | - if ($comments_li) { |
|
| 752 | - if ($title != '') { ?> |
|
| 751 | + if ($comments_li) { |
|
| 752 | + if ($title != '') { ?> |
|
| 753 | 753 | <h3 class="geodir-sc-recent-reviews-title widget-title"><?php echo $title; ?></h3> |
| 754 | 754 | <?php } ?> |
| 755 | 755 | <div class="geodir_sc_recent_reviews_section"> |
| 756 | 756 | <ul class="geodir_sc_recent_reviews"><?php echo $comments_li; ?></ul> |
| 757 | 757 | </div> |
| 758 | 758 | <?php |
| 759 | - } |
|
| 760 | - $output = ob_get_contents(); |
|
| 759 | + } |
|
| 760 | + $output = ob_get_contents(); |
|
| 761 | 761 | |
| 762 | - ob_end_clean(); |
|
| 762 | + ob_end_clean(); |
|
| 763 | 763 | |
| 764 | - return $output; |
|
| 764 | + return $output; |
|
| 765 | 765 | } |
| 766 | 766 | |
| 767 | 767 | add_shortcode('gd_related_listings', 'geodir_sc_related_listings'); |
@@ -791,64 +791,64 @@ discard block |
||
| 791 | 791 | */ |
| 792 | 792 | function geodir_sc_related_listings($atts) |
| 793 | 793 | { |
| 794 | - ob_start(); |
|
| 795 | - $defaults = array( |
|
| 796 | - 'post_number' => 5, |
|
| 797 | - 'relate_to' => 'category', |
|
| 798 | - 'layout' => 'gridview_onehalf', |
|
| 799 | - 'add_location_filter' => 0, |
|
| 800 | - 'listing_width' => '', |
|
| 801 | - 'list_sort' => 'latest', |
|
| 802 | - 'character_count' => 20, |
|
| 803 | - 'is_widget' => 1, |
|
| 804 | - 'before_title' => '<style type="text/css">.geodir_category_list_view li{margin:0px!important}</style>', |
|
| 805 | - ); |
|
| 806 | - // The "before_title" code is an ugly & terrible hack. But it works for now. I should enqueue a new stylesheet. |
|
| 807 | - |
|
| 808 | - $params = shortcode_atts($defaults, $atts); |
|
| 809 | - |
|
| 810 | - /** |
|
| 811 | - * Begin validating parameters |
|
| 812 | - */ |
|
| 794 | + ob_start(); |
|
| 795 | + $defaults = array( |
|
| 796 | + 'post_number' => 5, |
|
| 797 | + 'relate_to' => 'category', |
|
| 798 | + 'layout' => 'gridview_onehalf', |
|
| 799 | + 'add_location_filter' => 0, |
|
| 800 | + 'listing_width' => '', |
|
| 801 | + 'list_sort' => 'latest', |
|
| 802 | + 'character_count' => 20, |
|
| 803 | + 'is_widget' => 1, |
|
| 804 | + 'before_title' => '<style type="text/css">.geodir_category_list_view li{margin:0px!important}</style>', |
|
| 805 | + ); |
|
| 806 | + // The "before_title" code is an ugly & terrible hack. But it works for now. I should enqueue a new stylesheet. |
|
| 807 | + |
|
| 808 | + $params = shortcode_atts($defaults, $atts); |
|
| 813 | 809 | |
| 814 | - // Validate that post_number is a number and is 1 or higher |
|
| 815 | - $params['post_number'] = absint($params['post_number']); |
|
| 816 | - if (0 === $params['post_number']) { |
|
| 817 | - $params['post_number'] = 1; |
|
| 818 | - } |
|
| 810 | + /** |
|
| 811 | + * Begin validating parameters |
|
| 812 | + */ |
|
| 813 | + |
|
| 814 | + // Validate that post_number is a number and is 1 or higher |
|
| 815 | + $params['post_number'] = absint($params['post_number']); |
|
| 816 | + if (0 === $params['post_number']) { |
|
| 817 | + $params['post_number'] = 1; |
|
| 818 | + } |
|
| 819 | 819 | |
| 820 | - // Validate relate_to - only category or tags |
|
| 821 | - $params['relate_to'] = geodir_strtolower($params['relate_to']); |
|
| 822 | - if ('category' != $params['relate_to'] && 'tags' != $params['relate_to']) { |
|
| 823 | - $params['relate_to'] = 'category'; |
|
| 824 | - } |
|
| 820 | + // Validate relate_to - only category or tags |
|
| 821 | + $params['relate_to'] = geodir_strtolower($params['relate_to']); |
|
| 822 | + if ('category' != $params['relate_to'] && 'tags' != $params['relate_to']) { |
|
| 823 | + $params['relate_to'] = 'category'; |
|
| 824 | + } |
|
| 825 | 825 | |
| 826 | - // Validate layout selection |
|
| 827 | - $params['layout'] = gdsc_validate_layout_choice($params['layout']); |
|
| 826 | + // Validate layout selection |
|
| 827 | + $params['layout'] = gdsc_validate_layout_choice($params['layout']); |
|
| 828 | 828 | |
| 829 | - // Validate sorting option |
|
| 830 | - $params['list_sort'] = gdsc_validate_sort_choice($params['list_sort']); |
|
| 829 | + // Validate sorting option |
|
| 830 | + $params['list_sort'] = gdsc_validate_sort_choice($params['list_sort']); |
|
| 831 | 831 | |
| 832 | - // Validate add_location_filter |
|
| 833 | - $params['add_location_filter'] = gdsc_to_bool_val($params['add_location_filter']); |
|
| 832 | + // Validate add_location_filter |
|
| 833 | + $params['add_location_filter'] = gdsc_to_bool_val($params['add_location_filter']); |
|
| 834 | 834 | |
| 835 | - // Validate listing_width |
|
| 836 | - $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
| 835 | + // Validate listing_width |
|
| 836 | + $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
| 837 | 837 | |
| 838 | - // Validate character_count |
|
| 839 | - $params['character_count'] = absint($params['character_count']); |
|
| 840 | - if (20 > $params['character_count']) { |
|
| 841 | - $params['character_count'] = 20; |
|
| 842 | - } |
|
| 838 | + // Validate character_count |
|
| 839 | + $params['character_count'] = absint($params['character_count']); |
|
| 840 | + if (20 > $params['character_count']) { |
|
| 841 | + $params['character_count'] = 20; |
|
| 842 | + } |
|
| 843 | 843 | |
| 844 | - if ($related_display = geodir_related_posts_display($params)) { |
|
| 845 | - echo $related_display; |
|
| 846 | - } |
|
| 847 | - $output = ob_get_contents(); |
|
| 844 | + if ($related_display = geodir_related_posts_display($params)) { |
|
| 845 | + echo $related_display; |
|
| 846 | + } |
|
| 847 | + $output = ob_get_contents(); |
|
| 848 | 848 | |
| 849 | - ob_end_clean(); |
|
| 849 | + ob_end_clean(); |
|
| 850 | 850 | |
| 851 | - return $output; |
|
| 851 | + return $output; |
|
| 852 | 852 | } |
| 853 | 853 | |
| 854 | 854 | /** |
@@ -872,12 +872,12 @@ discard block |
||
| 872 | 872 | * @return string Advanced search widget HTML. |
| 873 | 873 | */ |
| 874 | 874 | function geodir_sc_advanced_search($atts) { |
| 875 | - $defaults = array( |
|
| 875 | + $defaults = array( |
|
| 876 | 876 | 'title' => '', |
| 877 | 877 | 'before_widget' => '<section id="geodir_advanced_search-1" class="widget geodir-widget geodir_advance_search_widget">', |
| 878 | - 'after_widget' => '</section>', |
|
| 879 | - 'before_title' => '<h3 class="widget-title">', |
|
| 880 | - 'after_title' => '</h3>', |
|
| 878 | + 'after_widget' => '</section>', |
|
| 879 | + 'before_title' => '<h3 class="widget-title">', |
|
| 880 | + 'after_title' => '</h3>', |
|
| 881 | 881 | 'show_adv_search' => 'default' |
| 882 | 882 | ); |
| 883 | 883 | |
@@ -901,9 +901,9 @@ discard block |
||
| 901 | 901 | the_widget('geodir_advance_search_widget', $params, $params ); |
| 902 | 902 | |
| 903 | 903 | $output = ob_get_contents(); |
| 904 | - ob_end_clean(); |
|
| 904 | + ob_end_clean(); |
|
| 905 | 905 | |
| 906 | - return $output; |
|
| 906 | + return $output; |
|
| 907 | 907 | } |
| 908 | 908 | add_shortcode('gd_advanced_search', 'geodir_sc_advanced_search'); |
| 909 | 909 | |
@@ -949,48 +949,48 @@ discard block |
||
| 949 | 949 | 'add_location_filter' => '1', |
| 950 | 950 | 'tab_layout' => 'bestof-tabs-on-top', |
| 951 | 951 | 'before_widget' => '<section id="bestof_widget-1" class="widget geodir-widget geodir_bestof_widget geodir_sc_bestof_widget">', |
| 952 | - 'after_widget' => '</section>', |
|
| 953 | - 'before_title' => '<h3 class="widget-title">', |
|
| 954 | - 'after_title' => '</h3>', |
|
| 952 | + 'after_widget' => '</section>', |
|
| 953 | + 'before_title' => '<h3 class="widget-title">', |
|
| 954 | + 'after_title' => '</h3>', |
|
| 955 | 955 | ); |
| 956 | 956 | $params = shortcode_atts($defaults, $atts); |
| 957 | 957 | |
| 958 | - /** |
|
| 959 | - * Validate our incoming params |
|
| 960 | - */ |
|
| 958 | + /** |
|
| 959 | + * Validate our incoming params |
|
| 960 | + */ |
|
| 961 | 961 | |
| 962 | - // Validate the selected post type, default to gd_place on fail |
|
| 963 | - if (!(gdsc_is_post_type_valid($params['post_type']))) { |
|
| 964 | - $params['post_type'] = 'gd_place'; |
|
| 965 | - } |
|
| 962 | + // Validate the selected post type, default to gd_place on fail |
|
| 963 | + if (!(gdsc_is_post_type_valid($params['post_type']))) { |
|
| 964 | + $params['post_type'] = 'gd_place'; |
|
| 965 | + } |
|
| 966 | 966 | |
| 967 | 967 | // Post limit needs to be a positive integer |
| 968 | - $params['post_limit'] = absint($params['post_limit']); |
|
| 969 | - if (0 == $params['post_limit']) { |
|
| 970 | - $params['post_limit'] = 5; |
|
| 971 | - } |
|
| 968 | + $params['post_limit'] = absint($params['post_limit']); |
|
| 969 | + if (0 == $params['post_limit']) { |
|
| 970 | + $params['post_limit'] = 5; |
|
| 971 | + } |
|
| 972 | 972 | |
| 973 | 973 | // Category limit needs to be a positive integer |
| 974 | - $params['categ_limit'] = absint($params['categ_limit']); |
|
| 975 | - if (0 == $params['categ_limit']) { |
|
| 976 | - $params['categ_limit'] = 3; |
|
| 977 | - } |
|
| 974 | + $params['categ_limit'] = absint($params['categ_limit']); |
|
| 975 | + if (0 == $params['categ_limit']) { |
|
| 976 | + $params['categ_limit'] = 3; |
|
| 977 | + } |
|
| 978 | 978 | |
| 979 | 979 | // Tab layout validation |
| 980 | - $params['tab_layout'] = $params['tab_layout']; |
|
| 981 | - if (!in_array($params['tab_layout'], array('bestof-tabs-on-top', 'bestof-tabs-on-left', 'bestof-tabs-as-dropdown'))) { |
|
| 982 | - $params['tab_layout'] = 'bestof-tabs-on-top'; |
|
| 983 | - } |
|
| 980 | + $params['tab_layout'] = $params['tab_layout']; |
|
| 981 | + if (!in_array($params['tab_layout'], array('bestof-tabs-on-top', 'bestof-tabs-on-left', 'bestof-tabs-as-dropdown'))) { |
|
| 982 | + $params['tab_layout'] = 'bestof-tabs-on-top'; |
|
| 983 | + } |
|
| 984 | 984 | |
| 985 | 985 | // Validate character_count |
| 986 | - $params['character_count'] = $params['character_count']; |
|
| 986 | + $params['character_count'] = $params['character_count']; |
|
| 987 | 987 | |
| 988 | 988 | ob_start(); |
| 989 | 989 | the_widget('geodir_bestof_widget', $params, $params); |
| 990 | - $output = ob_get_contents(); |
|
| 991 | - ob_end_clean(); |
|
| 990 | + $output = ob_get_contents(); |
|
| 991 | + ob_end_clean(); |
|
| 992 | 992 | |
| 993 | - return $output; |
|
| 993 | + return $output; |
|
| 994 | 994 | } |
| 995 | 995 | add_shortcode('gd_bestof_widget', 'geodir_sc_bestof_widget'); |
| 996 | 996 | |
@@ -1038,127 +1038,127 @@ discard block |
||
| 1038 | 1038 | * @return string HTML content to display geodirectory listings. |
| 1039 | 1039 | */ |
| 1040 | 1040 | function geodir_sc_gd_listings($atts, $content = '') { |
| 1041 | - global $post; |
|
| 1042 | - $defaults = array( |
|
| 1043 | - 'title' => '', |
|
| 1044 | - 'post_type' => 'gd_place', |
|
| 1045 | - 'category' => 0, |
|
| 1046 | - 'list_sort' => 'latest', |
|
| 1047 | - 'event_type' => '', |
|
| 1048 | - 'post_number' => 10, |
|
| 1049 | - 'post_author' => '', |
|
| 1050 | - 'layout' => 'gridview_onehalf', |
|
| 1051 | - 'listing_width' => '', |
|
| 1052 | - 'character_count' => 20, |
|
| 1053 | - 'add_location_filter' => 1, |
|
| 1054 | - 'show_featured_only' => '', |
|
| 1055 | - 'show_special_only' => '', |
|
| 1056 | - 'with_pics_only' => '', |
|
| 1057 | - 'with_videos_only' => '', |
|
| 1058 | - 'with_pagination' => '1', |
|
| 1059 | - 'top_pagination' => '0', |
|
| 1060 | - 'bottom_pagination' => '1', |
|
| 1061 | - 'without_no_results' => 0, |
|
| 1062 | - 'tags' => '' |
|
| 1063 | - ); |
|
| 1064 | - $params = shortcode_atts($defaults, $atts); |
|
| 1065 | - |
|
| 1066 | - $params['title'] = wp_strip_all_tags($params['title']); |
|
| 1067 | - $params['post_type'] = gdsc_is_post_type_valid($params['post_type']) ? $params['post_type'] : 'gd_place'; |
|
| 1068 | - |
|
| 1069 | - // Validate the selected category/ies - Grab the current list based on post_type |
|
| 1070 | - $category_taxonomy = geodir_get_taxonomies($params['post_type']); |
|
| 1071 | - $categories = get_terms($category_taxonomy, array('orderby' => 'count', 'order' => 'DESC', 'fields' => 'ids')); |
|
| 1072 | - |
|
| 1073 | - // Make sure we have an array |
|
| 1074 | - if (!(is_array($params['category']))) { |
|
| 1075 | - $params['category'] = explode(',', $params['category']); |
|
| 1076 | - } |
|
| 1077 | - |
|
| 1078 | - // Array_intersect returns only the items in $params['category'] that are also in our category list |
|
| 1079 | - // Otherwise it becomes empty and later on that will mean "All" |
|
| 1080 | - $params['category'] = array_intersect($params['category'], $categories); |
|
| 1081 | - |
|
| 1082 | - // Post_number needs to be a positive integer |
|
| 1083 | - $params['post_number'] = absint($params['post_number']); |
|
| 1084 | - $params['post_number'] = $params['post_number'] > 0 ? $params['post_number'] : 10; |
|
| 1041 | + global $post; |
|
| 1042 | + $defaults = array( |
|
| 1043 | + 'title' => '', |
|
| 1044 | + 'post_type' => 'gd_place', |
|
| 1045 | + 'category' => 0, |
|
| 1046 | + 'list_sort' => 'latest', |
|
| 1047 | + 'event_type' => '', |
|
| 1048 | + 'post_number' => 10, |
|
| 1049 | + 'post_author' => '', |
|
| 1050 | + 'layout' => 'gridview_onehalf', |
|
| 1051 | + 'listing_width' => '', |
|
| 1052 | + 'character_count' => 20, |
|
| 1053 | + 'add_location_filter' => 1, |
|
| 1054 | + 'show_featured_only' => '', |
|
| 1055 | + 'show_special_only' => '', |
|
| 1056 | + 'with_pics_only' => '', |
|
| 1057 | + 'with_videos_only' => '', |
|
| 1058 | + 'with_pagination' => '1', |
|
| 1059 | + 'top_pagination' => '0', |
|
| 1060 | + 'bottom_pagination' => '1', |
|
| 1061 | + 'without_no_results' => 0, |
|
| 1062 | + 'tags' => '' |
|
| 1063 | + ); |
|
| 1064 | + $params = shortcode_atts($defaults, $atts); |
|
| 1065 | + |
|
| 1066 | + $params['title'] = wp_strip_all_tags($params['title']); |
|
| 1067 | + $params['post_type'] = gdsc_is_post_type_valid($params['post_type']) ? $params['post_type'] : 'gd_place'; |
|
| 1068 | + |
|
| 1069 | + // Validate the selected category/ies - Grab the current list based on post_type |
|
| 1070 | + $category_taxonomy = geodir_get_taxonomies($params['post_type']); |
|
| 1071 | + $categories = get_terms($category_taxonomy, array('orderby' => 'count', 'order' => 'DESC', 'fields' => 'ids')); |
|
| 1072 | + |
|
| 1073 | + // Make sure we have an array |
|
| 1074 | + if (!(is_array($params['category']))) { |
|
| 1075 | + $params['category'] = explode(',', $params['category']); |
|
| 1076 | + } |
|
| 1077 | + |
|
| 1078 | + // Array_intersect returns only the items in $params['category'] that are also in our category list |
|
| 1079 | + // Otherwise it becomes empty and later on that will mean "All" |
|
| 1080 | + $params['category'] = array_intersect($params['category'], $categories); |
|
| 1081 | + |
|
| 1082 | + // Post_number needs to be a positive integer |
|
| 1083 | + $params['post_number'] = absint($params['post_number']); |
|
| 1084 | + $params['post_number'] = $params['post_number'] > 0 ? $params['post_number'] : 10; |
|
| 1085 | 1085 | |
| 1086 | - // Post_number needs to be a positive integer |
|
| 1087 | - if (!empty($atts['post_author'])) { |
|
| 1088 | - if ($atts['post_author'] == 'current' && !empty($post) && isset($post->post_author) && $post->post_type != 'page') { |
|
| 1089 | - $params['post_author'] = $post->post_author; |
|
| 1090 | - } else if ($atts['post_author'] != 'current' && absint($atts['post_author']) > 0) { |
|
| 1091 | - $params['post_author'] = absint($atts['post_author']); |
|
| 1092 | - } else { |
|
| 1093 | - unset($params['post_author']); |
|
| 1094 | - } |
|
| 1095 | - } else { |
|
| 1096 | - unset($params['post_author']); |
|
| 1097 | - } |
|
| 1098 | - |
|
| 1099 | - // Validate character_count |
|
| 1100 | - //todo: is this necessary? |
|
| 1101 | - $params['character_count'] = $params['character_count']; |
|
| 1102 | - |
|
| 1103 | - // Validate our layout choice |
|
| 1104 | - // Outside of the norm, I added some more simple terms to match the existing |
|
| 1105 | - // So now I just run the switch to set it properly. |
|
| 1106 | - $params['layout'] = gdsc_validate_layout_choice($params['layout']); |
|
| 1107 | - |
|
| 1108 | - // Validate our sorting choice |
|
| 1109 | - $params['list_sort'] = gdsc_validate_sort_choice($params['list_sort']); |
|
| 1110 | - |
|
| 1111 | - // Validate Listing width, used in the template widget-listing-listview.php |
|
| 1112 | - // The context is in width=$listing_width% - So we need a positive number between 0 & 100 |
|
| 1113 | - $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
| 1114 | - |
|
| 1115 | - // Validate the checkboxes used on the widget |
|
| 1116 | - $params['add_location_filter'] = gdsc_to_bool_val($params['add_location_filter']); |
|
| 1117 | - $params['show_featured_only'] = gdsc_to_bool_val($params['show_featured_only']); |
|
| 1118 | - $params['show_special_only'] = gdsc_to_bool_val($params['show_special_only']); |
|
| 1119 | - $params['with_pics_only'] = gdsc_to_bool_val($params['with_pics_only']); |
|
| 1120 | - $params['with_videos_only'] = gdsc_to_bool_val($params['with_videos_only']); |
|
| 1121 | - $params['with_pagination'] = gdsc_to_bool_val($params['with_pagination']); |
|
| 1122 | - $params['top_pagination'] = gdsc_to_bool_val($params['top_pagination']); |
|
| 1123 | - $params['bottom_pagination'] = gdsc_to_bool_val($params['bottom_pagination']); |
|
| 1124 | - |
|
| 1125 | - // Clean tags |
|
| 1126 | - if (!empty($params['tags'])) { |
|
| 1127 | - if (!is_array($params['tags'])) { |
|
| 1128 | - $comma = _x(',', 'tag delimiter'); |
|
| 1129 | - if ( ',' !== $comma ) { |
|
| 1130 | - $params['tags'] = str_replace($comma, ',', $params['tags']); |
|
| 1131 | - } |
|
| 1132 | - $params['tags'] = explode(',', trim($params['tags'], " \n\t\r\0\x0B,")); |
|
| 1133 | - $params['tags'] = array_map('trim', $params['tags']); |
|
| 1134 | - } |
|
| 1135 | - } else { |
|
| 1136 | - $params['tags'] = array(); |
|
| 1137 | - } |
|
| 1138 | - |
|
| 1139 | - /** |
|
| 1140 | - * End of validation |
|
| 1141 | - */ |
|
| 1142 | - if (isset($atts['geodir_ajax'])) { |
|
| 1143 | - $params['geodir_ajax'] = $atts['geodir_ajax']; |
|
| 1144 | - unset($atts['geodir_ajax']); |
|
| 1145 | - } |
|
| 1146 | - if (isset($atts['pageno'])) { |
|
| 1147 | - $params['pageno'] = $atts['pageno']; |
|
| 1148 | - unset($atts['pageno']); |
|
| 1149 | - } |
|
| 1150 | - |
|
| 1151 | - if ( !empty($atts['shortcode_content']) ) { |
|
| 1152 | - $content = $atts['shortcode_content']; |
|
| 1153 | - } |
|
| 1154 | - $params['shortcode_content'] = trim($content); |
|
| 1155 | - $atts['shortcode_content'] = trim($content); |
|
| 1086 | + // Post_number needs to be a positive integer |
|
| 1087 | + if (!empty($atts['post_author'])) { |
|
| 1088 | + if ($atts['post_author'] == 'current' && !empty($post) && isset($post->post_author) && $post->post_type != 'page') { |
|
| 1089 | + $params['post_author'] = $post->post_author; |
|
| 1090 | + } else if ($atts['post_author'] != 'current' && absint($atts['post_author']) > 0) { |
|
| 1091 | + $params['post_author'] = absint($atts['post_author']); |
|
| 1092 | + } else { |
|
| 1093 | + unset($params['post_author']); |
|
| 1094 | + } |
|
| 1095 | + } else { |
|
| 1096 | + unset($params['post_author']); |
|
| 1097 | + } |
|
| 1098 | + |
|
| 1099 | + // Validate character_count |
|
| 1100 | + //todo: is this necessary? |
|
| 1101 | + $params['character_count'] = $params['character_count']; |
|
| 1102 | + |
|
| 1103 | + // Validate our layout choice |
|
| 1104 | + // Outside of the norm, I added some more simple terms to match the existing |
|
| 1105 | + // So now I just run the switch to set it properly. |
|
| 1106 | + $params['layout'] = gdsc_validate_layout_choice($params['layout']); |
|
| 1107 | + |
|
| 1108 | + // Validate our sorting choice |
|
| 1109 | + $params['list_sort'] = gdsc_validate_sort_choice($params['list_sort']); |
|
| 1110 | + |
|
| 1111 | + // Validate Listing width, used in the template widget-listing-listview.php |
|
| 1112 | + // The context is in width=$listing_width% - So we need a positive number between 0 & 100 |
|
| 1113 | + $params['listing_width'] = gdsc_validate_listing_width($params['listing_width']); |
|
| 1114 | + |
|
| 1115 | + // Validate the checkboxes used on the widget |
|
| 1116 | + $params['add_location_filter'] = gdsc_to_bool_val($params['add_location_filter']); |
|
| 1117 | + $params['show_featured_only'] = gdsc_to_bool_val($params['show_featured_only']); |
|
| 1118 | + $params['show_special_only'] = gdsc_to_bool_val($params['show_special_only']); |
|
| 1119 | + $params['with_pics_only'] = gdsc_to_bool_val($params['with_pics_only']); |
|
| 1120 | + $params['with_videos_only'] = gdsc_to_bool_val($params['with_videos_only']); |
|
| 1121 | + $params['with_pagination'] = gdsc_to_bool_val($params['with_pagination']); |
|
| 1122 | + $params['top_pagination'] = gdsc_to_bool_val($params['top_pagination']); |
|
| 1123 | + $params['bottom_pagination'] = gdsc_to_bool_val($params['bottom_pagination']); |
|
| 1124 | + |
|
| 1125 | + // Clean tags |
|
| 1126 | + if (!empty($params['tags'])) { |
|
| 1127 | + if (!is_array($params['tags'])) { |
|
| 1128 | + $comma = _x(',', 'tag delimiter'); |
|
| 1129 | + if ( ',' !== $comma ) { |
|
| 1130 | + $params['tags'] = str_replace($comma, ',', $params['tags']); |
|
| 1131 | + } |
|
| 1132 | + $params['tags'] = explode(',', trim($params['tags'], " \n\t\r\0\x0B,")); |
|
| 1133 | + $params['tags'] = array_map('trim', $params['tags']); |
|
| 1134 | + } |
|
| 1135 | + } else { |
|
| 1136 | + $params['tags'] = array(); |
|
| 1137 | + } |
|
| 1138 | + |
|
| 1139 | + /** |
|
| 1140 | + * End of validation |
|
| 1141 | + */ |
|
| 1142 | + if (isset($atts['geodir_ajax'])) { |
|
| 1143 | + $params['geodir_ajax'] = $atts['geodir_ajax']; |
|
| 1144 | + unset($atts['geodir_ajax']); |
|
| 1145 | + } |
|
| 1146 | + if (isset($atts['pageno'])) { |
|
| 1147 | + $params['pageno'] = $atts['pageno']; |
|
| 1148 | + unset($atts['pageno']); |
|
| 1149 | + } |
|
| 1150 | + |
|
| 1151 | + if ( !empty($atts['shortcode_content']) ) { |
|
| 1152 | + $content = $atts['shortcode_content']; |
|
| 1153 | + } |
|
| 1154 | + $params['shortcode_content'] = trim($content); |
|
| 1155 | + $atts['shortcode_content'] = trim($content); |
|
| 1156 | 1156 | |
| 1157 | - $params['shortcode_atts'] = $atts; |
|
| 1157 | + $params['shortcode_atts'] = $atts; |
|
| 1158 | 1158 | |
| 1159 | - $output = geodir_sc_gd_listings_output($params); |
|
| 1159 | + $output = geodir_sc_gd_listings_output($params); |
|
| 1160 | 1160 | |
| 1161 | - return $output; |
|
| 1161 | + return $output; |
|
| 1162 | 1162 | } |
| 1163 | 1163 | add_shortcode('gd_listings', 'geodir_sc_gd_listings'); |
| 1164 | 1164 | |
@@ -1198,56 +1198,56 @@ discard block |
||
| 1198 | 1198 | * @return string HTML content to display CPT categories. |
| 1199 | 1199 | */ |
| 1200 | 1200 | function geodir_sc_cpt_categories_widget($atts, $content = '') { |
| 1201 | - $defaults = array( |
|
| 1202 | - 'title' => '', |
|
| 1203 | - 'post_type' => '', // NULL for all |
|
| 1204 | - 'hide_empty' => '', |
|
| 1205 | - 'show_count' => '', |
|
| 1206 | - 'hide_icon' => '', |
|
| 1207 | - 'cpt_left' => '', |
|
| 1208 | - 'sort_by' => 'count', |
|
| 1209 | - 'max_count' => 'all', |
|
| 1210 | - 'max_level' => '1', |
|
| 1211 | - 'no_cpt_filter' => '', |
|
| 1212 | - 'no_cat_filter' => '', |
|
| 1213 | - 'before_widget' => '<section id="geodir_cpt_categories_widget-1" class="widget geodir-widget geodir_cpt_categories_widget geodir_sc_cpt_categories_widget">', |
|
| 1214 | - 'after_widget' => '</section>', |
|
| 1215 | - 'before_title' => '<h3 class="widget-title">', |
|
| 1216 | - 'after_title' => '</h3>', |
|
| 1217 | - ); |
|
| 1218 | - $params = shortcode_atts($defaults, $atts); |
|
| 1219 | - |
|
| 1220 | - /** |
|
| 1221 | - * Validate our incoming params |
|
| 1222 | - */ |
|
| 1223 | - // Make sure we have an array |
|
| 1224 | - $params['post_type'] = !is_array($params['post_type']) && trim($params['post_type']) != '' ? explode(',', trim($params['post_type'])) : array(); |
|
| 1225 | - |
|
| 1226 | - // Validate the checkboxes used on the widget |
|
| 1227 | - $params['hide_empty'] = gdsc_to_bool_val($params['hide_empty']); |
|
| 1228 | - $params['show_count'] = gdsc_to_bool_val($params['show_count']); |
|
| 1229 | - $params['hide_icon'] = gdsc_to_bool_val($params['hide_icon']); |
|
| 1230 | - $params['cpt_left'] = gdsc_to_bool_val($params['cpt_left']); |
|
| 1201 | + $defaults = array( |
|
| 1202 | + 'title' => '', |
|
| 1203 | + 'post_type' => '', // NULL for all |
|
| 1204 | + 'hide_empty' => '', |
|
| 1205 | + 'show_count' => '', |
|
| 1206 | + 'hide_icon' => '', |
|
| 1207 | + 'cpt_left' => '', |
|
| 1208 | + 'sort_by' => 'count', |
|
| 1209 | + 'max_count' => 'all', |
|
| 1210 | + 'max_level' => '1', |
|
| 1211 | + 'no_cpt_filter' => '', |
|
| 1212 | + 'no_cat_filter' => '', |
|
| 1213 | + 'before_widget' => '<section id="geodir_cpt_categories_widget-1" class="widget geodir-widget geodir_cpt_categories_widget geodir_sc_cpt_categories_widget">', |
|
| 1214 | + 'after_widget' => '</section>', |
|
| 1215 | + 'before_title' => '<h3 class="widget-title">', |
|
| 1216 | + 'after_title' => '</h3>', |
|
| 1217 | + ); |
|
| 1218 | + $params = shortcode_atts($defaults, $atts); |
|
| 1231 | 1219 | |
| 1232 | - if ($params['max_count'] != 'all') { |
|
| 1233 | - $params['max_count'] = absint($params['max_count']); |
|
| 1234 | - } |
|
| 1220 | + /** |
|
| 1221 | + * Validate our incoming params |
|
| 1222 | + */ |
|
| 1223 | + // Make sure we have an array |
|
| 1224 | + $params['post_type'] = !is_array($params['post_type']) && trim($params['post_type']) != '' ? explode(',', trim($params['post_type'])) : array(); |
|
| 1225 | + |
|
| 1226 | + // Validate the checkboxes used on the widget |
|
| 1227 | + $params['hide_empty'] = gdsc_to_bool_val($params['hide_empty']); |
|
| 1228 | + $params['show_count'] = gdsc_to_bool_val($params['show_count']); |
|
| 1229 | + $params['hide_icon'] = gdsc_to_bool_val($params['hide_icon']); |
|
| 1230 | + $params['cpt_left'] = gdsc_to_bool_val($params['cpt_left']); |
|
| 1231 | + |
|
| 1232 | + if ($params['max_count'] != 'all') { |
|
| 1233 | + $params['max_count'] = absint($params['max_count']); |
|
| 1234 | + } |
|
| 1235 | 1235 | |
| 1236 | - if ($params['max_level'] != 'all') { |
|
| 1237 | - $params['max_level'] = absint($params['max_level']); |
|
| 1238 | - } |
|
| 1236 | + if ($params['max_level'] != 'all') { |
|
| 1237 | + $params['max_level'] = absint($params['max_level']); |
|
| 1238 | + } |
|
| 1239 | 1239 | |
| 1240 | - $params['no_cpt_filter'] = gdsc_to_bool_val($params['no_cpt_filter']); |
|
| 1241 | - $params['no_cat_filter'] = gdsc_to_bool_val($params['no_cat_filter']); |
|
| 1240 | + $params['no_cpt_filter'] = gdsc_to_bool_val($params['no_cpt_filter']); |
|
| 1241 | + $params['no_cat_filter'] = gdsc_to_bool_val($params['no_cat_filter']); |
|
| 1242 | 1242 | |
| 1243 | - $params['sort_by'] = $params['sort_by'] == 'az' ? 'az' : 'count'; |
|
| 1243 | + $params['sort_by'] = $params['sort_by'] == 'az' ? 'az' : 'count'; |
|
| 1244 | 1244 | |
| 1245 | - ob_start(); |
|
| 1246 | - the_widget('geodir_cpt_categories_widget', $params, $params); |
|
| 1247 | - $output = ob_get_contents(); |
|
| 1248 | - ob_end_clean(); |
|
| 1245 | + ob_start(); |
|
| 1246 | + the_widget('geodir_cpt_categories_widget', $params, $params); |
|
| 1247 | + $output = ob_get_contents(); |
|
| 1248 | + ob_end_clean(); |
|
| 1249 | 1249 | |
| 1250 | - return $output; |
|
| 1250 | + return $output; |
|
| 1251 | 1251 | } |
| 1252 | 1252 | add_shortcode('gd_cpt_categories', 'geodir_sc_cpt_categories_widget'); |
| 1253 | 1253 | |
@@ -1262,7 +1262,7 @@ discard block |
||
| 1262 | 1262 | * @return string HTML code. |
| 1263 | 1263 | */ |
| 1264 | 1264 | function geodir_sc_responsive_videos($atts, $content) { |
| 1265 | - return '<div class="geodir-video-wrapper">'.$content.'</div>'; |
|
| 1265 | + return '<div class="geodir-video-wrapper">'.$content.'</div>'; |
|
| 1266 | 1266 | } |
| 1267 | 1267 | add_shortcode('gd_video', 'geodir_sc_responsive_videos'); |
| 1268 | 1268 | ?> |
| 1269 | 1269 | \ No newline at end of file |
@@ -12,32 +12,32 @@ discard block |
||
| 12 | 12 | $post_meta = array(); |
| 13 | 13 | |
| 14 | 14 | if (geodir_dummy_folder_exists()) |
| 15 | - $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
| 15 | + $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
| 16 | 16 | else |
| 17 | - $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
| 17 | + $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
| 18 | 18 | |
| 19 | 19 | $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url);
|
| 20 | 20 | |
| 21 | 21 | switch ($dummy_post_index) {
|
| 22 | 22 | |
| 23 | - case(1): |
|
| 24 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 25 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 26 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 27 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 28 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 29 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 30 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 31 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 32 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 33 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 34 | - $image_array[] = "$dummy_image_url/a11.jpg"; |
|
| 35 | - |
|
| 36 | - |
|
| 37 | - $post_info[] = array( |
|
| 38 | - "listing_type" => 'gd_place', |
|
| 39 | - "post_title" => 'Franklin Square', |
|
| 40 | - "post_desc" => ' <h3> Location </h3> |
|
| 23 | + case(1): |
|
| 24 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 25 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 26 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 27 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 28 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 29 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 30 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 31 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 32 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 33 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 34 | + $image_array[] = "$dummy_image_url/a11.jpg"; |
|
| 35 | + |
|
| 36 | + |
|
| 37 | + $post_info[] = array( |
|
| 38 | + "listing_type" => 'gd_place', |
|
| 39 | + "post_title" => 'Franklin Square', |
|
| 40 | + "post_desc" => ' <h3> Location </h3> |
|
| 41 | 41 | |
| 42 | 42 | 6th and Race Streets in Historic Philadelphia |
| 43 | 43 | <h3>The Experience</h3> |
@@ -72,42 +72,42 @@ discard block |
||
| 72 | 72 | Just in time for summer, Franklin Square has opened SquareBurger, a Stephen Starr-run “burger shack” selling summer staples: hot dogs, fries, milkshakes (made with Tasty Kakes) and, of course, hamburgers and cheeseburgers. |
| 73 | 73 | |
| 74 | 74 | SquareBurger is open until October - perfect for a couple bites between rounds of miniature golf!', |
| 75 | - "post_images" => $image_array, |
|
| 76 | - "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
|
|
| 77 | - "post_tags" => array('Tags', 'Sample Tags'),
|
|
| 78 | - "geodir_video" => '', |
|
| 79 | - "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
| 80 | - "geodir_contact" => '(111) 677-4444', |
|
| 81 | - "geodir_email" => '[email protected]', |
|
| 82 | - "geodir_website" => 'http://franklinsquare.com', |
|
| 83 | - "geodir_twitter" => 'http://twitter.com/franklinsquare', |
|
| 84 | - "geodir_facebook" => 'http://facebook.com/franklinsquare', |
|
| 85 | - "post_dummy" => '1' |
|
| 86 | - ); |
|
| 87 | - |
|
| 88 | - |
|
| 89 | - break; |
|
| 90 | - case 2: |
|
| 91 | - $image_array = array(); |
|
| 92 | - $post_meta = array(); |
|
| 93 | - |
|
| 94 | - /// Attractions ////post start 2/// |
|
| 95 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 96 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 97 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 98 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 99 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 100 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 101 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 102 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 103 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 104 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 105 | - $image_array[] = "$dummy_image_url/a11.jpg"; |
|
| 106 | - |
|
| 107 | - $post_info[] = array( |
|
| 108 | - "listing_type" => 'gd_place', |
|
| 109 | - "post_title" => 'Please Touch Museum', |
|
| 110 | - "post_desc" => '<h3>New Location! </h3> |
|
| 75 | + "post_images" => $image_array, |
|
| 76 | + "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
|
|
| 77 | + "post_tags" => array('Tags', 'Sample Tags'),
|
|
| 78 | + "geodir_video" => '', |
|
| 79 | + "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
| 80 | + "geodir_contact" => '(111) 677-4444', |
|
| 81 | + "geodir_email" => '[email protected]', |
|
| 82 | + "geodir_website" => 'http://franklinsquare.com', |
|
| 83 | + "geodir_twitter" => 'http://twitter.com/franklinsquare', |
|
| 84 | + "geodir_facebook" => 'http://facebook.com/franklinsquare', |
|
| 85 | + "post_dummy" => '1' |
|
| 86 | + ); |
|
| 87 | + |
|
| 88 | + |
|
| 89 | + break; |
|
| 90 | + case 2: |
|
| 91 | + $image_array = array(); |
|
| 92 | + $post_meta = array(); |
|
| 93 | + |
|
| 94 | + /// Attractions ////post start 2/// |
|
| 95 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 96 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 97 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 98 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 99 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 100 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 101 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 102 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 103 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 104 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 105 | + $image_array[] = "$dummy_image_url/a11.jpg"; |
|
| 106 | + |
|
| 107 | + $post_info[] = array( |
|
| 108 | + "listing_type" => 'gd_place', |
|
| 109 | + "post_title" => 'Please Touch Museum', |
|
| 110 | + "post_desc" => '<h3>New Location! </h3> |
|
| 111 | 111 | |
| 112 | 112 | Who doesn´t love the Please Touch Museum? And now, taking kids to the Museum is better than ever. The nation´s premier children´s museum - which has been a beloved landmark since it opened in 1976 - has a new home in Fairmount Park, opening its doors to a world of educational, hands-on fun. |
| 113 | 113 | |
@@ -139,42 +139,42 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | You can buy admission tickets to the Please Touch Museum online through our partners at the Independence Visitor Center. Just click the button below.', |
| 141 | 141 | |
| 142 | - "post_images" => $image_array, |
|
| 143 | - "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
|
|
| 144 | - "post_tags" => array('Tags', 'Sample Tags'),
|
|
| 145 | - "geodir_video" => '', |
|
| 146 | - "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
| 147 | - "geodir_contact" => '(222) 777-1111', |
|
| 148 | - "geodir_email" => '[email protected]', |
|
| 149 | - "geodir_website" => 'http://pleasetouchmuseum.com', |
|
| 150 | - "geodir_twitter" => 'http://twitter.com/pleasetouchmuseum', |
|
| 151 | - "geodir_facebook" => 'http://facebook.com/pleasetouchmuseum', |
|
| 152 | - "post_dummy" => '1' |
|
| 153 | - ); |
|
| 154 | - |
|
| 155 | - break; |
|
| 156 | - case 3: |
|
| 157 | - $image_array = array(); |
|
| 158 | - $post_meta = array(); |
|
| 159 | - |
|
| 160 | - ////post end/// |
|
| 161 | - /// Attractions ////post start 3/// |
|
| 162 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 163 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 164 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 165 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 166 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 167 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 168 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 169 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 170 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 171 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 172 | - $image_array[] = "$dummy_image_url/a11.jpg"; |
|
| 173 | - |
|
| 174 | - $post_info[] = array( |
|
| 175 | - "listing_type" => 'gd_place', |
|
| 176 | - "post_title" => 'Longwood Gardens', |
|
| 177 | - "post_desc" => '<h3>The Experience </h3> |
|
| 142 | + "post_images" => $image_array, |
|
| 143 | + "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
|
|
| 144 | + "post_tags" => array('Tags', 'Sample Tags'),
|
|
| 145 | + "geodir_video" => '', |
|
| 146 | + "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
| 147 | + "geodir_contact" => '(222) 777-1111', |
|
| 148 | + "geodir_email" => '[email protected]', |
|
| 149 | + "geodir_website" => 'http://pleasetouchmuseum.com', |
|
| 150 | + "geodir_twitter" => 'http://twitter.com/pleasetouchmuseum', |
|
| 151 | + "geodir_facebook" => 'http://facebook.com/pleasetouchmuseum', |
|
| 152 | + "post_dummy" => '1' |
|
| 153 | + ); |
|
| 154 | + |
|
| 155 | + break; |
|
| 156 | + case 3: |
|
| 157 | + $image_array = array(); |
|
| 158 | + $post_meta = array(); |
|
| 159 | + |
|
| 160 | + ////post end/// |
|
| 161 | + /// Attractions ////post start 3/// |
|
| 162 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 163 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 164 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 165 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 166 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 167 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 168 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 169 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 170 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 171 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 172 | + $image_array[] = "$dummy_image_url/a11.jpg"; |
|
| 173 | + |
|
| 174 | + $post_info[] = array( |
|
| 175 | + "listing_type" => 'gd_place', |
|
| 176 | + "post_title" => 'Longwood Gardens', |
|
| 177 | + "post_desc" => '<h3>The Experience </h3> |
|
| 178 | 178 | |
| 179 | 179 | When you´re at Longwood Gardens, it´s easy to imagine that you´re at a giant, royal garden in Europe. Stroll along the many paths through acres of exquisitely maintained grounds featuring 11,000 different types of plants. |
| 180 | 180 | |
@@ -199,42 +199,42 @@ discard block |
||
| 199 | 199 | <h3>Buy Tickets Online In Advance </h3> |
| 200 | 200 | |
| 201 | 201 | You can buy admission tickets to Longwood Gardens online through our partners at the Independence Visitor Center. Just click the button below.', |
| 202 | - "post_images" => $image_array, |
|
| 203 | - "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 204 | - "post_tags" => array('wood', 'garden'),
|
|
| 205 | - "geodir_video" => '', |
|
| 206 | - "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
| 207 | - "geodir_contact" => '(111) 888-1111', |
|
| 208 | - "geodir_email" => '[email protected]', |
|
| 209 | - "geodir_website" => 'http://longwoodgardens.com', |
|
| 210 | - "geodir_twitter" => 'http://twitter.com/longwoodgardens', |
|
| 211 | - "geodir_facebook" => 'http://facebook.com/longwoodgardens', |
|
| 212 | - "post_dummy" => '1' |
|
| 213 | - ); |
|
| 214 | - break; |
|
| 215 | - ////post end/// |
|
| 216 | - /// Attractions ////post start 4/// |
|
| 217 | - |
|
| 218 | - case 4: |
|
| 219 | - |
|
| 220 | - $image_array = array(); |
|
| 221 | - $post_meta = array(); |
|
| 222 | - $image_array[] = "$dummy_image_url/a11.jpg"; |
|
| 223 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 224 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 225 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 226 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 227 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 228 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 229 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 230 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 231 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 232 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 233 | - |
|
| 234 | - $post_info[] = array( |
|
| 235 | - "listing_type" => 'gd_place', |
|
| 236 | - "post_title" => 'The Philadelphia Zoo', |
|
| 237 | - "post_desc" => '<h3>The Zoo 150th Birthday</h3> |
|
| 202 | + "post_images" => $image_array, |
|
| 203 | + "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 204 | + "post_tags" => array('wood', 'garden'),
|
|
| 205 | + "geodir_video" => '', |
|
| 206 | + "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
| 207 | + "geodir_contact" => '(111) 888-1111', |
|
| 208 | + "geodir_email" => '[email protected]', |
|
| 209 | + "geodir_website" => 'http://longwoodgardens.com', |
|
| 210 | + "geodir_twitter" => 'http://twitter.com/longwoodgardens', |
|
| 211 | + "geodir_facebook" => 'http://facebook.com/longwoodgardens', |
|
| 212 | + "post_dummy" => '1' |
|
| 213 | + ); |
|
| 214 | + break; |
|
| 215 | + ////post end/// |
|
| 216 | + /// Attractions ////post start 4/// |
|
| 217 | + |
|
| 218 | + case 4: |
|
| 219 | + |
|
| 220 | + $image_array = array(); |
|
| 221 | + $post_meta = array(); |
|
| 222 | + $image_array[] = "$dummy_image_url/a11.jpg"; |
|
| 223 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 224 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 225 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 226 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 227 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 228 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 229 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 230 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 231 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 232 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 233 | + |
|
| 234 | + $post_info[] = array( |
|
| 235 | + "listing_type" => 'gd_place', |
|
| 236 | + "post_title" => 'The Philadelphia Zoo', |
|
| 237 | + "post_desc" => '<h3>The Zoo 150th Birthday</h3> |
|
| 238 | 238 | |
| 239 | 239 | The Philadelphia Zoo celebrated its 150th anniversary in 2009. So stop by and celebrate this major achievement at America´s first zoo! |
| 240 | 240 | |
@@ -269,45 +269,45 @@ discard block |
||
| 269 | 269 | The nation´s oldest zoo was chartered in 1859, but the impending Civil War delayed its opening until 1874. In addition to its animals, the zoo is known for its historic architecture, which includes the country home of William Penn´s grandson; its botanical collections of over 500 plant species; its groundbreaking research and its fine veterinary facilities. |
| 270 | 270 | |
| 271 | 271 | The Primate Reserve, Carnivore Kingdom, and Rare Animal Conservation Center, with its tree kangaroos and blue-eyed lemurs, are brand new, but there´s still fun to be had in the historic, old-style bird, pachyderm and carnivore houses. In the Treehouse, kids can investigate the world from an animal´s perspective; outdoors, the Zoo Balloon lifts passengers 400 feet into the air for a bird´s-eye view of the zoo.', |
| 272 | - "post_images" => $image_array, |
|
| 273 | - "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 274 | - "post_tags" => array('wood', 'garden'),
|
|
| 275 | - "geodir_video" => '', |
|
| 276 | - "geodir_timing" => 'Open today until 11.30 a.m., Sunday 11 am to 7 pm', |
|
| 277 | - "geodir_contact" => '(211) 143-1900', |
|
| 278 | - "geodir_email" => '[email protected]', |
|
| 279 | - "geodir_website" => 'http://philadelphiazoo.com', |
|
| 280 | - "geodir_twitter" => 'http://twitter.com/philadelphiazoo', |
|
| 281 | - "geodir_facebook" => 'http://facebook.com/philadelphiazoo', |
|
| 282 | - "post_dummy" => '1' |
|
| 283 | - ); |
|
| 284 | - |
|
| 285 | - ////post end/// |
|
| 286 | - /// Attractions ////post start 4/// |
|
| 287 | - break; |
|
| 288 | - case 5: |
|
| 289 | - |
|
| 290 | - |
|
| 291 | - $image_array = array(); |
|
| 292 | - $post_meta = array(); |
|
| 293 | - |
|
| 294 | - /// Attractions ////post start 5/// |
|
| 295 | - $image_array[] = "$dummy_image_url/a12.jpg"; |
|
| 296 | - $image_array[] = "$dummy_image_url/a13.jpg"; |
|
| 297 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 298 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 299 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 300 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 301 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 302 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 303 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 304 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 305 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 306 | - |
|
| 307 | - $post_info[] = array( |
|
| 308 | - "listing_type" => 'gd_place', |
|
| 309 | - "post_title" => 'National Constitution Center', |
|
| 310 | - "post_desc" => '<h3>The Experience</h3> |
|
| 272 | + "post_images" => $image_array, |
|
| 273 | + "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 274 | + "post_tags" => array('wood', 'garden'),
|
|
| 275 | + "geodir_video" => '', |
|
| 276 | + "geodir_timing" => 'Open today until 11.30 a.m., Sunday 11 am to 7 pm', |
|
| 277 | + "geodir_contact" => '(211) 143-1900', |
|
| 278 | + "geodir_email" => '[email protected]', |
|
| 279 | + "geodir_website" => 'http://philadelphiazoo.com', |
|
| 280 | + "geodir_twitter" => 'http://twitter.com/philadelphiazoo', |
|
| 281 | + "geodir_facebook" => 'http://facebook.com/philadelphiazoo', |
|
| 282 | + "post_dummy" => '1' |
|
| 283 | + ); |
|
| 284 | + |
|
| 285 | + ////post end/// |
|
| 286 | + /// Attractions ////post start 4/// |
|
| 287 | + break; |
|
| 288 | + case 5: |
|
| 289 | + |
|
| 290 | + |
|
| 291 | + $image_array = array(); |
|
| 292 | + $post_meta = array(); |
|
| 293 | + |
|
| 294 | + /// Attractions ////post start 5/// |
|
| 295 | + $image_array[] = "$dummy_image_url/a12.jpg"; |
|
| 296 | + $image_array[] = "$dummy_image_url/a13.jpg"; |
|
| 297 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 298 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 299 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 300 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 301 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 302 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 303 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 304 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 305 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 306 | + |
|
| 307 | + $post_info[] = array( |
|
| 308 | + "listing_type" => 'gd_place', |
|
| 309 | + "post_title" => 'National Constitution Center', |
|
| 310 | + "post_desc" => '<h3>The Experience</h3> |
|
| 311 | 311 | |
| 312 | 312 | It only four pages long, but the U.S. Constitution is among the most influential and important documents in the history of the world. |
| 313 | 313 | |
@@ -329,45 +329,45 @@ discard block |
||
| 329 | 329 | <h3>Kids Stuff </h3> |
| 330 | 330 | |
| 331 | 331 | The Center frequently hosts special events with a focus on children that include informative and engaging hands-on activities. For specific information, check out the Center website.', |
| 332 | - "post_images" => $image_array, |
|
| 333 | - "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
|
|
| 334 | - "post_tags" => array('Tag', 'Center'),
|
|
| 335 | - "geodir_video" => '', |
|
| 336 | - "geodir_timing" => 'Open today until 9.30 a.m., Sunday 11 am to 7 pm', |
|
| 337 | - "geodir_contact" => '(111) 111-1111', |
|
| 338 | - "geodir_email" => '[email protected]', |
|
| 339 | - "geodir_website" => 'http://ncc.com', |
|
| 340 | - "geodir_twitter" => 'http://twitter.com/ncc', |
|
| 341 | - "geodir_facebook" => 'http://facebook.com/ncc', |
|
| 342 | - "post_dummy" => '1' |
|
| 343 | - ); |
|
| 344 | - |
|
| 345 | - ////post end/// |
|
| 346 | - /// Attractions ////post start 5/// |
|
| 347 | - break; |
|
| 348 | - case 6: |
|
| 349 | - |
|
| 350 | - |
|
| 351 | - $image_array = array(); |
|
| 352 | - $post_meta = array(); |
|
| 353 | - |
|
| 354 | - /// Attractions ////post start 6/// |
|
| 355 | - $image_array[] = "$dummy_image_url/a14.jpg"; |
|
| 356 | - $image_array[] = "$dummy_image_url/a13.jpg"; |
|
| 357 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 358 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 359 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 360 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 361 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 362 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 363 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 364 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 365 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 366 | - |
|
| 367 | - $post_info[] = array( |
|
| 368 | - "listing_type" => 'gd_place', |
|
| 369 | - "post_title" => 'Sadsbury Woods Preserve', |
|
| 370 | - "post_desc" => 'A more than 500-acre nature preserve ideal for walking and hiking, Sadsbury Woods is also an important habitat for interior nesting birds and small mammals. An increasingly rare area of interior woodlands, defined as an area at least 300 feet from any road, lawn or meadow, provides a critical habitat for many species of birds, especially neo-tropical migrant songbirds. |
|
| 332 | + "post_images" => $image_array, |
|
| 333 | + "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
|
|
| 334 | + "post_tags" => array('Tag', 'Center'),
|
|
| 335 | + "geodir_video" => '', |
|
| 336 | + "geodir_timing" => 'Open today until 9.30 a.m., Sunday 11 am to 7 pm', |
|
| 337 | + "geodir_contact" => '(111) 111-1111', |
|
| 338 | + "geodir_email" => '[email protected]', |
|
| 339 | + "geodir_website" => 'http://ncc.com', |
|
| 340 | + "geodir_twitter" => 'http://twitter.com/ncc', |
|
| 341 | + "geodir_facebook" => 'http://facebook.com/ncc', |
|
| 342 | + "post_dummy" => '1' |
|
| 343 | + ); |
|
| 344 | + |
|
| 345 | + ////post end/// |
|
| 346 | + /// Attractions ////post start 5/// |
|
| 347 | + break; |
|
| 348 | + case 6: |
|
| 349 | + |
|
| 350 | + |
|
| 351 | + $image_array = array(); |
|
| 352 | + $post_meta = array(); |
|
| 353 | + |
|
| 354 | + /// Attractions ////post start 6/// |
|
| 355 | + $image_array[] = "$dummy_image_url/a14.jpg"; |
|
| 356 | + $image_array[] = "$dummy_image_url/a13.jpg"; |
|
| 357 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 358 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 359 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 360 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 361 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 362 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 363 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 364 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 365 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 366 | + |
|
| 367 | + $post_info[] = array( |
|
| 368 | + "listing_type" => 'gd_place', |
|
| 369 | + "post_title" => 'Sadsbury Woods Preserve', |
|
| 370 | + "post_desc" => 'A more than 500-acre nature preserve ideal for walking and hiking, Sadsbury Woods is also an important habitat for interior nesting birds and small mammals. An increasingly rare area of interior woodlands, defined as an area at least 300 feet from any road, lawn or meadow, provides a critical habitat for many species of birds, especially neo-tropical migrant songbirds. |
|
| 371 | 371 | |
| 372 | 372 | Situated on the western edge of Chester County, the land remains much as it did centuries ago, and now serves as a permanent refuge in an area facing dramatically increasing development pressure. |
| 373 | 373 | |
@@ -383,45 +383,45 @@ discard block |
||
| 383 | 383 | Outsider Tip |
| 384 | 384 | |
| 385 | 385 | The deep forest is a great place for spotting neo-tropical songbirds in the spring and summer months', |
| 386 | - "post_images" => $image_array, |
|
| 387 | - "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 388 | - "post_tags" => array('sample', 'tags'),
|
|
| 389 | - "geodir_video" => '', |
|
| 390 | - "geodir_timing" => 'Open today until 12.30 p.m., Sunday 12 pm to 7 pm', |
|
| 391 | - "geodir_contact" => '(222) 999-9999', |
|
| 392 | - "geodir_email" => '[email protected]', |
|
| 393 | - "geodir_website" => 'http://swp.com', |
|
| 394 | - "geodir_twitter" => 'http://twitter.com/swp', |
|
| 395 | - "geodir_facebook" => 'http://facebook.com/swp', |
|
| 396 | - "post_dummy" => '1' |
|
| 397 | - ); |
|
| 398 | - |
|
| 399 | - ////post end/// |
|
| 400 | - /// Attractions ////post start 6/// |
|
| 401 | - |
|
| 402 | - break; |
|
| 403 | - case 7: |
|
| 404 | - |
|
| 405 | - $image_array = array(); |
|
| 406 | - $post_meta = array(); |
|
| 407 | - |
|
| 408 | - /// Attractions ////post start 7/// |
|
| 409 | - $image_array[] = "$dummy_image_url/a15.jpg"; |
|
| 410 | - $image_array[] = "$dummy_image_url/a16.jpg"; |
|
| 411 | - $image_array[] = "$dummy_image_url/a17.jpg"; |
|
| 412 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 413 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 414 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 415 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 416 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 417 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 418 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 419 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 420 | - |
|
| 421 | - $post_info[] = array( |
|
| 422 | - "listing_type" => 'gd_place', |
|
| 423 | - "post_title" => 'Museum Without Walls', |
|
| 424 | - "post_desc" => '<h3>The Experience </h3> |
|
| 386 | + "post_images" => $image_array, |
|
| 387 | + "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 388 | + "post_tags" => array('sample', 'tags'),
|
|
| 389 | + "geodir_video" => '', |
|
| 390 | + "geodir_timing" => 'Open today until 12.30 p.m., Sunday 12 pm to 7 pm', |
|
| 391 | + "geodir_contact" => '(222) 999-9999', |
|
| 392 | + "geodir_email" => '[email protected]', |
|
| 393 | + "geodir_website" => 'http://swp.com', |
|
| 394 | + "geodir_twitter" => 'http://twitter.com/swp', |
|
| 395 | + "geodir_facebook" => 'http://facebook.com/swp', |
|
| 396 | + "post_dummy" => '1' |
|
| 397 | + ); |
|
| 398 | + |
|
| 399 | + ////post end/// |
|
| 400 | + /// Attractions ////post start 6/// |
|
| 401 | + |
|
| 402 | + break; |
|
| 403 | + case 7: |
|
| 404 | + |
|
| 405 | + $image_array = array(); |
|
| 406 | + $post_meta = array(); |
|
| 407 | + |
|
| 408 | + /// Attractions ////post start 7/// |
|
| 409 | + $image_array[] = "$dummy_image_url/a15.jpg"; |
|
| 410 | + $image_array[] = "$dummy_image_url/a16.jpg"; |
|
| 411 | + $image_array[] = "$dummy_image_url/a17.jpg"; |
|
| 412 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 413 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 414 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 415 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 416 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 417 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 418 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 419 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 420 | + |
|
| 421 | + $post_info[] = array( |
|
| 422 | + "listing_type" => 'gd_place', |
|
| 423 | + "post_title" => 'Museum Without Walls', |
|
| 424 | + "post_desc" => '<h3>The Experience </h3> |
|
| 425 | 425 | |
| 426 | 426 | Museum Without Walls: AUDIO is a multi-platform, interactive audio tour, designed to allow locals and visitors alike to experience Philadelphia extensive collection of public art and outdoor sculpture along the Benjamin Franklin Parkway and Kelly Drive. This innovative program invites passersby to stop, look, listen and see this city public art in a new way. Discover the untold histories of the 51 outdoor sculptures at 35 stops through these professionally produced three-minute interpretive audio segments. The many narratives have been spoken by more than 100 individuals, all with personal connections to the pieces of art. |
| 427 | 427 | |
@@ -431,45 +431,45 @@ discard block |
||
| 431 | 431 | <h3>History </h3> |
| 432 | 432 | |
| 433 | 433 | Philadelphia has more outdoor sculpture than any other American city, yet this extensive collection often goes unnoticed. This program is intended to reveal the distinct stories behind each of these works, that have become visual white noise for so many of the city residents and visitors. ', |
| 434 | - "post_images" => $image_array, |
|
| 435 | - "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 436 | - "post_tags" => array('Museum'),
|
|
| 437 | - "geodir_video" => '', |
|
| 438 | - "geodir_timing" => 'Open today until 10.30 a.m., Sunday 10 am to 7 pm', |
|
| 439 | - "geodir_contact" => '(222) 999-9999', |
|
| 440 | - "geodir_email" => '[email protected]', |
|
| 441 | - "geodir_website" => 'http://museumwithoutwallsaudio.org/', |
|
| 442 | - "geodir_twitter" => 'http://twitter.com/mwwalls', |
|
| 443 | - "geodir_facebook" => 'http://facebook.com/mwwalls', |
|
| 444 | - "post_dummy" => '1' |
|
| 445 | - ); |
|
| 446 | - |
|
| 447 | - ////post end/// |
|
| 448 | - /// Attractions ////post start 7/// |
|
| 449 | - |
|
| 450 | - break; |
|
| 451 | - case 8: |
|
| 452 | - |
|
| 453 | - $image_array = array(); |
|
| 454 | - $post_meta = array(); |
|
| 455 | - |
|
| 456 | - /// Attractions ////post start 8/// |
|
| 457 | - $image_array[] = "$dummy_image_url/a18.jpg"; |
|
| 458 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 459 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 460 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 461 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 462 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 463 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 464 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 465 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 466 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 467 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 468 | - |
|
| 469 | - $post_info[] = array( |
|
| 470 | - "listing_type" => 'gd_place', |
|
| 471 | - "post_title" => 'Audacious Freedom', |
|
| 472 | - "post_desc" => 'Audacious Freedom, the major, new exhibit at the African American Museum in Philadelphia , explores the lives of people of African descent living in Philadelphia between 1776 and 1876. |
|
| 434 | + "post_images" => $image_array, |
|
| 435 | + "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 436 | + "post_tags" => array('Museum'),
|
|
| 437 | + "geodir_video" => '', |
|
| 438 | + "geodir_timing" => 'Open today until 10.30 a.m., Sunday 10 am to 7 pm', |
|
| 439 | + "geodir_contact" => '(222) 999-9999', |
|
| 440 | + "geodir_email" => '[email protected]', |
|
| 441 | + "geodir_website" => 'http://museumwithoutwallsaudio.org/', |
|
| 442 | + "geodir_twitter" => 'http://twitter.com/mwwalls', |
|
| 443 | + "geodir_facebook" => 'http://facebook.com/mwwalls', |
|
| 444 | + "post_dummy" => '1' |
|
| 445 | + ); |
|
| 446 | + |
|
| 447 | + ////post end/// |
|
| 448 | + /// Attractions ////post start 7/// |
|
| 449 | + |
|
| 450 | + break; |
|
| 451 | + case 8: |
|
| 452 | + |
|
| 453 | + $image_array = array(); |
|
| 454 | + $post_meta = array(); |
|
| 455 | + |
|
| 456 | + /// Attractions ////post start 8/// |
|
| 457 | + $image_array[] = "$dummy_image_url/a18.jpg"; |
|
| 458 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
| 459 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 460 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 461 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 462 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 463 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 464 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 465 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 466 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 467 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 468 | + |
|
| 469 | + $post_info[] = array( |
|
| 470 | + "listing_type" => 'gd_place', |
|
| 471 | + "post_title" => 'Audacious Freedom', |
|
| 472 | + "post_desc" => 'Audacious Freedom, the major, new exhibit at the African American Museum in Philadelphia , explores the lives of people of African descent living in Philadelphia between 1776 and 1876. |
|
| 473 | 473 | |
| 474 | 474 | Discover how African Americans in Philadelphia lived and worked while helping to shape the young nation in its formative stages. |
| 475 | 475 | |
@@ -477,45 +477,45 @@ discard block |
||
| 477 | 477 | |
| 478 | 478 | The groundbreaking exhibit allows visitors to “walk the streets” of Historic Philadelphia using a large-scale map. Young children can join the action with Children´s Corner, which highlights the daily lives of children during that period. |
| 479 | 479 | ', |
| 480 | - "post_images" => $image_array, |
|
| 481 | - "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 482 | - "post_tags" => array('Tag1'),
|
|
| 483 | - "geodir_video" => '', |
|
| 484 | - "geodir_timing" => 'Open today until 11.30 a.m., Sunday 1 pm to 7 pm', |
|
| 485 | - "geodir_contact" => '(777) 777-7777', |
|
| 486 | - "geodir_email" => '[email protected]', |
|
| 487 | - "geodir_website" => 'http://www.aampmuseum.org/', |
|
| 488 | - "geodir_twitter" => 'http://twitter.com/aampmuseum', |
|
| 489 | - "geodir_facebook" => 'http://facebook.com/aampmuseum', |
|
| 490 | - "post_dummy" => '1' |
|
| 491 | - ); |
|
| 492 | - |
|
| 493 | - ////post end/// |
|
| 494 | - /// Attractions ////post start 8/// |
|
| 495 | - |
|
| 496 | - |
|
| 497 | - break; |
|
| 498 | - case 9: |
|
| 499 | - $image_array = array(); |
|
| 500 | - $post_meta = array(); |
|
| 501 | - |
|
| 502 | - /// Attractions ////post start 9/// |
|
| 503 | - $image_array[] = "$dummy_image_url/a19.jpg"; |
|
| 504 | - $image_array[] = "$dummy_image_url/a20.jpg"; |
|
| 505 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 506 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 507 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 508 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 509 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 510 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 511 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 512 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 513 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 514 | - |
|
| 515 | - $post_info[] = array( |
|
| 516 | - "listing_type" => 'gd_place', |
|
| 517 | - "post_title" => 'The Liberty Bell Center', |
|
| 518 | - "post_desc" => '<h3>The Experience </h3> |
|
| 480 | + "post_images" => $image_array, |
|
| 481 | + "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 482 | + "post_tags" => array('Tag1'),
|
|
| 483 | + "geodir_video" => '', |
|
| 484 | + "geodir_timing" => 'Open today until 11.30 a.m., Sunday 1 pm to 7 pm', |
|
| 485 | + "geodir_contact" => '(777) 777-7777', |
|
| 486 | + "geodir_email" => '[email protected]', |
|
| 487 | + "geodir_website" => 'http://www.aampmuseum.org/', |
|
| 488 | + "geodir_twitter" => 'http://twitter.com/aampmuseum', |
|
| 489 | + "geodir_facebook" => 'http://facebook.com/aampmuseum', |
|
| 490 | + "post_dummy" => '1' |
|
| 491 | + ); |
|
| 492 | + |
|
| 493 | + ////post end/// |
|
| 494 | + /// Attractions ////post start 8/// |
|
| 495 | + |
|
| 496 | + |
|
| 497 | + break; |
|
| 498 | + case 9: |
|
| 499 | + $image_array = array(); |
|
| 500 | + $post_meta = array(); |
|
| 501 | + |
|
| 502 | + /// Attractions ////post start 9/// |
|
| 503 | + $image_array[] = "$dummy_image_url/a19.jpg"; |
|
| 504 | + $image_array[] = "$dummy_image_url/a20.jpg"; |
|
| 505 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 506 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 507 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 508 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 509 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 510 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 511 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 512 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 513 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 514 | + |
|
| 515 | + $post_info[] = array( |
|
| 516 | + "listing_type" => 'gd_place', |
|
| 517 | + "post_title" => 'The Liberty Bell Center', |
|
| 518 | + "post_desc" => '<h3>The Experience </h3> |
|
| 519 | 519 | |
| 520 | 520 | The Liberty Bell has a new home, and it is as powerful and dramatic as the Bell itself. Throughout the expansive, light-filled Center, larger-than-life historic documents and graphic images explore the facts and the myths surrounding the Bell. |
| 521 | 521 | |
@@ -536,45 +536,45 @@ discard block |
||
| 536 | 536 | The Bell is suspended from what is believed to be its original yoke, made of American elm. |
| 537 | 537 | |
| 538 | 538 | The Liberty Bell weighs 2,080 pounds. The yoke weighs about 100 pounds.', |
| 539 | - "post_images" => $image_array, |
|
| 540 | - "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
|
|
| 541 | - "post_tags" => array(''),
|
|
| 542 | - "geodir_video" => '', |
|
| 543 | - "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.', |
|
| 544 | - "geodir_contact" => '(777) 666-6666', |
|
| 545 | - "geodir_email" => '[email protected]', |
|
| 546 | - "geodir_website" => 'http://www.nps.gov/inde', |
|
| 547 | - "geodir_twitter" => 'http://twitter.com/nps', |
|
| 548 | - "geodir_facebook" => 'http://facebook.com/nps', |
|
| 549 | - "post_dummy" => '1' |
|
| 550 | - ); |
|
| 551 | - |
|
| 552 | - ////post end/// |
|
| 553 | - /// Attractions ////post start 9/// |
|
| 554 | - break; |
|
| 555 | - case 10: |
|
| 556 | - |
|
| 557 | - |
|
| 558 | - $image_array = array(); |
|
| 559 | - $post_meta = array(); |
|
| 560 | - |
|
| 561 | - /// Attractions ////post start 10/// |
|
| 562 | - $image_array[] = "$dummy_image_url/a19.jpg"; |
|
| 563 | - $image_array[] = "$dummy_image_url/a20.jpg"; |
|
| 564 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 565 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 566 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 567 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 568 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 569 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 570 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 571 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 572 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 573 | - |
|
| 574 | - $post_info[] = array( |
|
| 575 | - "listing_type" => 'gd_place', |
|
| 576 | - "post_title" => 'Rittenhouse Square', |
|
| 577 | - "post_desc" => ' |
|
| 539 | + "post_images" => $image_array, |
|
| 540 | + "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
|
|
| 541 | + "post_tags" => array(''),
|
|
| 542 | + "geodir_video" => '', |
|
| 543 | + "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.', |
|
| 544 | + "geodir_contact" => '(777) 666-6666', |
|
| 545 | + "geodir_email" => '[email protected]', |
|
| 546 | + "geodir_website" => 'http://www.nps.gov/inde', |
|
| 547 | + "geodir_twitter" => 'http://twitter.com/nps', |
|
| 548 | + "geodir_facebook" => 'http://facebook.com/nps', |
|
| 549 | + "post_dummy" => '1' |
|
| 550 | + ); |
|
| 551 | + |
|
| 552 | + ////post end/// |
|
| 553 | + /// Attractions ////post start 9/// |
|
| 554 | + break; |
|
| 555 | + case 10: |
|
| 556 | + |
|
| 557 | + |
|
| 558 | + $image_array = array(); |
|
| 559 | + $post_meta = array(); |
|
| 560 | + |
|
| 561 | + /// Attractions ////post start 10/// |
|
| 562 | + $image_array[] = "$dummy_image_url/a19.jpg"; |
|
| 563 | + $image_array[] = "$dummy_image_url/a20.jpg"; |
|
| 564 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
| 565 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
| 566 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
| 567 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
| 568 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
| 569 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
| 570 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
| 571 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
| 572 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
| 573 | + |
|
| 574 | + $post_info[] = array( |
|
| 575 | + "listing_type" => 'gd_place', |
|
| 576 | + "post_title" => 'Rittenhouse Square', |
|
| 577 | + "post_desc" => ' |
|
| 578 | 578 | |
| 579 | 579 | Unlike the other squares, the early Southwest Square was never used as a burial ground, although it offered pasturage for local livestock and a convenient dumping spot for “night soil”. |
| 580 | 580 | <h3> History </h3> |
@@ -607,45 +607,45 @@ discard block |
||
| 607 | 607 | |
| 608 | 608 | Meanwhile, several more restaurants, bars and clubs have opened along the surrounding blocks in recent years, like Parc, Tria, Continental Midtown, Alfa, Walnut Room, and Twenty Manning just to name a few. |
| 609 | 609 | ', |
| 610 | - "post_images" => $image_array, |
|
| 611 | - "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 612 | - "post_tags" => array('Museum'),
|
|
| 613 | - "geodir_video" => '', |
|
| 614 | - "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.', |
|
| 615 | - "geodir_contact" => '(777) 666-6666', |
|
| 616 | - "geodir_email" => '[email protected]', |
|
| 617 | - "geodir_website" => 'http://www.fairmountpark.org/rittenhousesquare.asp', |
|
| 618 | - "geodir_twitter" => 'http://twitter.com/fairmountpark', |
|
| 619 | - "geodir_facebook" => 'http://facebook.com/fairmountpark', |
|
| 620 | - "post_dummy" => '1' |
|
| 621 | - ); |
|
| 622 | - |
|
| 623 | - ////post end/// |
|
| 624 | - /// Attractions ////post start 10/// |
|
| 625 | - break; |
|
| 626 | - case 11: |
|
| 627 | - |
|
| 628 | - |
|
| 629 | - $image_array = array(); |
|
| 630 | - $post_meta = array(); |
|
| 631 | - |
|
| 632 | - /// Hotels ////post start 1/// |
|
| 633 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 634 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 635 | - $image_array[] = "$dummy_image_url/hotels3.jpg"; |
|
| 636 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 637 | - $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
| 638 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 639 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 640 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 641 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 642 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 643 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 644 | - |
|
| 645 | - $post_info[] = array( |
|
| 646 | - "listing_type" => 'gd_place', |
|
| 647 | - "post_title" => 'Loews Philadelphia Hotel', |
|
| 648 | - "post_desc" => ' |
|
| 610 | + "post_images" => $image_array, |
|
| 611 | + "post_category" => array('gd_placecategory' => array('Attractions')),
|
|
| 612 | + "post_tags" => array('Museum'),
|
|
| 613 | + "geodir_video" => '', |
|
| 614 | + "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.', |
|
| 615 | + "geodir_contact" => '(777) 666-6666', |
|
| 616 | + "geodir_email" => '[email protected]', |
|
| 617 | + "geodir_website" => 'http://www.fairmountpark.org/rittenhousesquare.asp', |
|
| 618 | + "geodir_twitter" => 'http://twitter.com/fairmountpark', |
|
| 619 | + "geodir_facebook" => 'http://facebook.com/fairmountpark', |
|
| 620 | + "post_dummy" => '1' |
|
| 621 | + ); |
|
| 622 | + |
|
| 623 | + ////post end/// |
|
| 624 | + /// Attractions ////post start 10/// |
|
| 625 | + break; |
|
| 626 | + case 11: |
|
| 627 | + |
|
| 628 | + |
|
| 629 | + $image_array = array(); |
|
| 630 | + $post_meta = array(); |
|
| 631 | + |
|
| 632 | + /// Hotels ////post start 1/// |
|
| 633 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 634 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 635 | + $image_array[] = "$dummy_image_url/hotels3.jpg"; |
|
| 636 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 637 | + $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
| 638 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 639 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 640 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 641 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 642 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 643 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 644 | + |
|
| 645 | + $post_info[] = array( |
|
| 646 | + "listing_type" => 'gd_place', |
|
| 647 | + "post_title" => 'Loews Philadelphia Hotel', |
|
| 648 | + "post_desc" => ' |
|
| 649 | 649 | |
| 650 | 650 | <h3>OVERVIEW </h3> |
| 651 | 651 | |
@@ -712,45 +712,45 @@ discard block |
||
| 712 | 712 | |
| 713 | 713 | SoleFood Restaurant is proud to be serving Starbucks. Come in and enjoy a fresh cup of coffee during your morning rush. The Coffee Bar also offer small breakfast items for your enjoyment. |
| 714 | 714 | ', |
| 715 | - "post_images" => $image_array, |
|
| 716 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
|
|
| 717 | - "post_tags" => array(''),
|
|
| 718 | - "geodir_video" => '', |
|
| 719 | - "geodir_timing" => 'Daily, 6:30 am – 12:00 pm', |
|
| 720 | - "geodir_contact" => '(111) 111-0000', |
|
| 721 | - "geodir_email" => '[email protected]', |
|
| 722 | - "geodir_website" => 'http://www.loewshotels.com/en/hotels/philadelphia-hotel/overview.aspx', |
|
| 723 | - "geodir_twitter" => 'http://twitter.com/loewshotels', |
|
| 724 | - "geodir_facebook" => 'http://facebook.com/loewshotels', |
|
| 725 | - "post_dummy" => '1' |
|
| 726 | - ); |
|
| 727 | - |
|
| 728 | - ////post end/// |
|
| 729 | - /// Hotels ////post start 1/// |
|
| 730 | - break; |
|
| 731 | - case 12: |
|
| 732 | - |
|
| 733 | - |
|
| 734 | - $image_array = array(); |
|
| 735 | - $post_meta = array(); |
|
| 736 | - |
|
| 737 | - /// Hotels ////post start 2/// |
|
| 738 | - $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
| 739 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 740 | - $image_array[] = "$dummy_image_url/hotels3.jpg"; |
|
| 741 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 742 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 743 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 744 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 745 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 746 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 747 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 748 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 749 | - |
|
| 750 | - $post_info[] = array( |
|
| 751 | - "listing_type" => 'gd_place', |
|
| 752 | - "post_title" => 'Embassy Suites Philadelphia', |
|
| 753 | - "post_desc" => ' |
|
| 715 | + "post_images" => $image_array, |
|
| 716 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
|
|
| 717 | + "post_tags" => array(''),
|
|
| 718 | + "geodir_video" => '', |
|
| 719 | + "geodir_timing" => 'Daily, 6:30 am – 12:00 pm', |
|
| 720 | + "geodir_contact" => '(111) 111-0000', |
|
| 721 | + "geodir_email" => '[email protected]', |
|
| 722 | + "geodir_website" => 'http://www.loewshotels.com/en/hotels/philadelphia-hotel/overview.aspx', |
|
| 723 | + "geodir_twitter" => 'http://twitter.com/loewshotels', |
|
| 724 | + "geodir_facebook" => 'http://facebook.com/loewshotels', |
|
| 725 | + "post_dummy" => '1' |
|
| 726 | + ); |
|
| 727 | + |
|
| 728 | + ////post end/// |
|
| 729 | + /// Hotels ////post start 1/// |
|
| 730 | + break; |
|
| 731 | + case 12: |
|
| 732 | + |
|
| 733 | + |
|
| 734 | + $image_array = array(); |
|
| 735 | + $post_meta = array(); |
|
| 736 | + |
|
| 737 | + /// Hotels ////post start 2/// |
|
| 738 | + $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
| 739 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 740 | + $image_array[] = "$dummy_image_url/hotels3.jpg"; |
|
| 741 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 742 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 743 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 744 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 745 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 746 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 747 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 748 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 749 | + |
|
| 750 | + $post_info[] = array( |
|
| 751 | + "listing_type" => 'gd_place', |
|
| 752 | + "post_title" => 'Embassy Suites Philadelphia', |
|
| 753 | + "post_desc" => ' |
|
| 754 | 754 | The newly renovated Embassy Suites Philadelphia – Center City hotel is conveniently situated in the heart of downtown Philadelphia, Pennsylvania and Philadelphia´s Center City business district. This hotel in Philadelphia is located only eight miles from Philadelphia International Airport and just minutes from top Philadelphia attractions, including: |
| 755 | 755 | |
| 756 | 756 | Philadelphia Museum of Art |
@@ -766,45 +766,45 @@ discard block |
||
| 766 | 766 | |
| 767 | 767 | A delicious, complimentary cooked-to-order breakfast is offered each morning, and a hotel Manager´s Reception every night – featuring complimentary refreshments and great company. |
| 768 | 768 | ', |
| 769 | - "post_images" => $image_array, |
|
| 770 | - "post_category" => array('gd_placecategory' => array('Hotels')),
|
|
| 771 | - "post_tags" => array(''),
|
|
| 772 | - "geodir_video" => '', |
|
| 773 | - "geodir_timing" => 'Daily, 10:30 am – 10 pm', |
|
| 774 | - "geodir_contact" => '(111) 111-0000', |
|
| 775 | - "geodir_email" => '[email protected]', |
|
| 776 | - "geodir_website" => 'http://embassysuites1.hilton.com/en_US/es/hotel/PHLDTES-Embassy-Suites-Philadelphia-Center-City-Pennsylvania/index.do', |
|
| 777 | - "geodir_twitter" => 'http://twitter.com/embassysuites1', |
|
| 778 | - "geodir_facebook" => 'http://facebook.com/embassysuites1', |
|
| 779 | - "post_dummy" => '1' |
|
| 780 | - ); |
|
| 781 | - |
|
| 782 | - ////post end/// |
|
| 783 | - /// Hotels ////post start 2/// |
|
| 784 | - |
|
| 785 | - break; |
|
| 786 | - case 13: |
|
| 787 | - |
|
| 788 | - $image_array = array(); |
|
| 789 | - $post_meta = array(); |
|
| 790 | - |
|
| 791 | - /// Hotels ////post start 3/// |
|
| 792 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 793 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 794 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 795 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 796 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 797 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 798 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 799 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 800 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 801 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 802 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 803 | - |
|
| 804 | - $post_info[] = array( |
|
| 805 | - "listing_type" => 'gd_place', |
|
| 806 | - "post_title" => 'Doubletree Hotel Philadelphia', |
|
| 807 | - "post_desc" => ' |
|
| 769 | + "post_images" => $image_array, |
|
| 770 | + "post_category" => array('gd_placecategory' => array('Hotels')),
|
|
| 771 | + "post_tags" => array(''),
|
|
| 772 | + "geodir_video" => '', |
|
| 773 | + "geodir_timing" => 'Daily, 10:30 am – 10 pm', |
|
| 774 | + "geodir_contact" => '(111) 111-0000', |
|
| 775 | + "geodir_email" => '[email protected]', |
|
| 776 | + "geodir_website" => 'http://embassysuites1.hilton.com/en_US/es/hotel/PHLDTES-Embassy-Suites-Philadelphia-Center-City-Pennsylvania/index.do', |
|
| 777 | + "geodir_twitter" => 'http://twitter.com/embassysuites1', |
|
| 778 | + "geodir_facebook" => 'http://facebook.com/embassysuites1', |
|
| 779 | + "post_dummy" => '1' |
|
| 780 | + ); |
|
| 781 | + |
|
| 782 | + ////post end/// |
|
| 783 | + /// Hotels ////post start 2/// |
|
| 784 | + |
|
| 785 | + break; |
|
| 786 | + case 13: |
|
| 787 | + |
|
| 788 | + $image_array = array(); |
|
| 789 | + $post_meta = array(); |
|
| 790 | + |
|
| 791 | + /// Hotels ////post start 3/// |
|
| 792 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 793 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 794 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 795 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 796 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 797 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 798 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 799 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 800 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 801 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 802 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 803 | + |
|
| 804 | + $post_info[] = array( |
|
| 805 | + "listing_type" => 'gd_place', |
|
| 806 | + "post_title" => 'Doubletree Hotel Philadelphia', |
|
| 807 | + "post_desc" => ' |
|
| 808 | 808 | With 434 rooms, the Doubletree Hotel is a great option for your upcoming stay in Philadelphia. |
| 809 | 809 | |
| 810 | 810 | <h3>Location </h3> |
@@ -834,47 +834,47 @@ discard block |
||
| 834 | 834 | Stop in the restaurant - which serves lunch and dinner daily - for a drink and some light fare. With its location right on Broad Street, you´re close to everything you could ever want in a night on the town. |
| 835 | 835 | ', |
| 836 | 836 | |
| 837 | - "post_images" => $image_array, |
|
| 838 | - |
|
| 839 | - "post_category" => array('gd_placecategory' => array('Hotels')),
|
|
| 840 | - "post_tags" => array(''),
|
|
| 841 | - "geodir_video" => '', |
|
| 842 | - "geodir_timing" => 'Daily, 10:30 am – 10 pm', |
|
| 843 | - "geodir_contact" => '(111) 111-0000', |
|
| 844 | - "geodir_email" => '[email protected]', |
|
| 845 | - "geodir_website" => 'http://doubletree1.hilton.com/en_US/dt/hotel/PHLBLDT-Doubletree-Hotel-Philadelphia-Pennsylvania/index.do', |
|
| 846 | - "geodir_twitter" => 'http://twitter.com/doubletree1', |
|
| 847 | - "geodir_facebook" => 'http://facebook.com/doubletree1', |
|
| 848 | - "post_dummy" => '1' |
|
| 849 | - ); |
|
| 850 | - |
|
| 851 | - ////post end/// |
|
| 852 | - /// Hotels ////post start 3/// |
|
| 853 | - |
|
| 854 | - break; |
|
| 855 | - case 14: |
|
| 856 | - |
|
| 857 | - |
|
| 858 | - $image_array = array(); |
|
| 859 | - $post_meta = array(); |
|
| 860 | - |
|
| 861 | - /// Hotels ////post start 4/// |
|
| 862 | - $image_array[] = "$dummy_image_url/hotels15.jpg"; |
|
| 863 | - $image_array[] = "$dummy_image_url/hotels16.jpg"; |
|
| 864 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 865 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 866 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 867 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 868 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 869 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 870 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 871 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 872 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 873 | - |
|
| 874 | - $post_info[] = array( |
|
| 875 | - "listing_type" => 'gd_place', |
|
| 876 | - "post_title" => 'Philadelphia Marriott Downtown', |
|
| 877 | - "post_desc" => ' |
|
| 837 | + "post_images" => $image_array, |
|
| 838 | + |
|
| 839 | + "post_category" => array('gd_placecategory' => array('Hotels')),
|
|
| 840 | + "post_tags" => array(''),
|
|
| 841 | + "geodir_video" => '', |
|
| 842 | + "geodir_timing" => 'Daily, 10:30 am – 10 pm', |
|
| 843 | + "geodir_contact" => '(111) 111-0000', |
|
| 844 | + "geodir_email" => '[email protected]', |
|
| 845 | + "geodir_website" => 'http://doubletree1.hilton.com/en_US/dt/hotel/PHLBLDT-Doubletree-Hotel-Philadelphia-Pennsylvania/index.do', |
|
| 846 | + "geodir_twitter" => 'http://twitter.com/doubletree1', |
|
| 847 | + "geodir_facebook" => 'http://facebook.com/doubletree1', |
|
| 848 | + "post_dummy" => '1' |
|
| 849 | + ); |
|
| 850 | + |
|
| 851 | + ////post end/// |
|
| 852 | + /// Hotels ////post start 3/// |
|
| 853 | + |
|
| 854 | + break; |
|
| 855 | + case 14: |
|
| 856 | + |
|
| 857 | + |
|
| 858 | + $image_array = array(); |
|
| 859 | + $post_meta = array(); |
|
| 860 | + |
|
| 861 | + /// Hotels ////post start 4/// |
|
| 862 | + $image_array[] = "$dummy_image_url/hotels15.jpg"; |
|
| 863 | + $image_array[] = "$dummy_image_url/hotels16.jpg"; |
|
| 864 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 865 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 866 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 867 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 868 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 869 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 870 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 871 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 872 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 873 | + |
|
| 874 | + $post_info[] = array( |
|
| 875 | + "listing_type" => 'gd_place', |
|
| 876 | + "post_title" => 'Philadelphia Marriott Downtown', |
|
| 877 | + "post_desc" => ' |
|
| 878 | 878 | Get ready to stay and play at the new aloft Philadelphia Airport! |
| 879 | 879 | |
| 880 | 880 | This incredibly modern hotel is located just five minutes from Philadelphia International Airport, offering a great convenience to travelers looking for fresh and fun accommodations. |
@@ -901,45 +901,45 @@ discard block |
||
| 901 | 901 | |
| 902 | 902 | Aahh…breathe deep at Aloft. This hotel is smoke-free. |
| 903 | 903 | ', |
| 904 | - "post_images" => $image_array, |
|
| 905 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
|
|
| 906 | - "post_tags" => array(''),
|
|
| 907 | - "geodir_video" => '', |
|
| 908 | - "geodir_timing" => '24 Hours', |
|
| 909 | - "geodir_contact" => '(123) 111-2222', |
|
| 910 | - "geodir_email" => '[email protected]', |
|
| 911 | - "geodir_website" => 'http://www.marriott.com/hotels/travel/phldt-philadelphia-marriott-downtown/', |
|
| 912 | - "geodir_twitter" => 'http://twitter.com/marriott', |
|
| 913 | - "geodir_facebook" => 'http://facebook.com/marriott', |
|
| 914 | - "post_dummy" => '1' |
|
| 915 | - ); |
|
| 916 | - |
|
| 917 | - ////post end/// |
|
| 918 | - /// Hotels ////post start 4/// |
|
| 919 | - break; |
|
| 920 | - case 15: |
|
| 921 | - |
|
| 922 | - |
|
| 923 | - $image_array = array(); |
|
| 924 | - $post_meta = array(); |
|
| 925 | - |
|
| 926 | - /// Hotels ////post start 5/// |
|
| 927 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 928 | - $image_array[] = "$dummy_image_url/hotels16.jpg"; |
|
| 929 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 930 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 931 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 932 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 933 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 934 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 935 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 936 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 937 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 938 | - |
|
| 939 | - $post_info[] = array( |
|
| 940 | - "listing_type" => 'gd_place', |
|
| 941 | - "post_title" => 'Hilton Inn at Penn', |
|
| 942 | - "post_desc" => ' |
|
| 904 | + "post_images" => $image_array, |
|
| 905 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
|
|
| 906 | + "post_tags" => array(''),
|
|
| 907 | + "geodir_video" => '', |
|
| 908 | + "geodir_timing" => '24 Hours', |
|
| 909 | + "geodir_contact" => '(123) 111-2222', |
|
| 910 | + "geodir_email" => '[email protected]', |
|
| 911 | + "geodir_website" => 'http://www.marriott.com/hotels/travel/phldt-philadelphia-marriott-downtown/', |
|
| 912 | + "geodir_twitter" => 'http://twitter.com/marriott', |
|
| 913 | + "geodir_facebook" => 'http://facebook.com/marriott', |
|
| 914 | + "post_dummy" => '1' |
|
| 915 | + ); |
|
| 916 | + |
|
| 917 | + ////post end/// |
|
| 918 | + /// Hotels ////post start 4/// |
|
| 919 | + break; |
|
| 920 | + case 15: |
|
| 921 | + |
|
| 922 | + |
|
| 923 | + $image_array = array(); |
|
| 924 | + $post_meta = array(); |
|
| 925 | + |
|
| 926 | + /// Hotels ////post start 5/// |
|
| 927 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 928 | + $image_array[] = "$dummy_image_url/hotels16.jpg"; |
|
| 929 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 930 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 931 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 932 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 933 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 934 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 935 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 936 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 937 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 938 | + |
|
| 939 | + $post_info[] = array( |
|
| 940 | + "listing_type" => 'gd_place', |
|
| 941 | + "post_title" => 'Hilton Inn at Penn', |
|
| 942 | + "post_desc" => ' |
|
| 943 | 943 | Located in the heart of Penn´s campus in the beautiful University City neighborhood of Philadelphia, The Hilton Inn at Penn is a great choice for accommodations during your upcoming visit to Philadelphia. |
| 944 | 944 | |
| 945 | 945 | The location puts you right in the middle of the prestigious University of Pennsylvania and its many nearby educational, medical and corporate centers. And Center City Philadelphia is only a short cab ride away. So if you want to get out and explore the city, you are set. |
@@ -955,45 +955,45 @@ discard block |
||
| 955 | 955 | |
| 956 | 956 | The pasta is handmade right in front of you and then dished up along side delectable entrées such as grilled veal tenderloin and honey glazed sea scallops. And the wine bar offers more than 30 varieties by the glass and more than 100 by the bottle. |
| 957 | 957 | ', |
| 958 | - "post_images" => $image_array, |
|
| 959 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
|
|
| 960 | - "post_tags" => array(''),
|
|
| 961 | - "geodir_video" => '', |
|
| 962 | - "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
| 963 | - "geodir_contact" => '(888) 888-8888', |
|
| 964 | - "geodir_email" => '[email protected]', |
|
| 965 | - "geodir_website" => 'http://www.theinnatpenn.com/', |
|
| 966 | - "geodir_twitter" => 'http://twitter.com/theinnatpenn', |
|
| 967 | - "geodir_facebook" => 'http://facebook.com/theinnatpenn', |
|
| 968 | - "post_dummy" => '1' |
|
| 969 | - ); |
|
| 970 | - |
|
| 971 | - ////post end/// |
|
| 972 | - /// Hotels ////post start 5/// |
|
| 973 | - break; |
|
| 974 | - case 16: |
|
| 975 | - |
|
| 976 | - |
|
| 977 | - $image_array = array(); |
|
| 978 | - $post_meta = array(); |
|
| 979 | - |
|
| 980 | - /// Hotels ////post start 6/// |
|
| 981 | - $image_array[] = "$dummy_image_url/hotels17.jpg"; |
|
| 982 | - $image_array[] = "$dummy_image_url/hotels18.jpg"; |
|
| 983 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 984 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 985 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 986 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 987 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 988 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 989 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 990 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 991 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 992 | - |
|
| 993 | - $post_info[] = array( |
|
| 994 | - "listing_type" => 'gd_place', |
|
| 995 | - "post_title" => 'Courtyard Philadelphia Downtown', |
|
| 996 | - "post_desc" => ' |
|
| 958 | + "post_images" => $image_array, |
|
| 959 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
|
|
| 960 | + "post_tags" => array(''),
|
|
| 961 | + "geodir_video" => '', |
|
| 962 | + "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
| 963 | + "geodir_contact" => '(888) 888-8888', |
|
| 964 | + "geodir_email" => '[email protected]', |
|
| 965 | + "geodir_website" => 'http://www.theinnatpenn.com/', |
|
| 966 | + "geodir_twitter" => 'http://twitter.com/theinnatpenn', |
|
| 967 | + "geodir_facebook" => 'http://facebook.com/theinnatpenn', |
|
| 968 | + "post_dummy" => '1' |
|
| 969 | + ); |
|
| 970 | + |
|
| 971 | + ////post end/// |
|
| 972 | + /// Hotels ////post start 5/// |
|
| 973 | + break; |
|
| 974 | + case 16: |
|
| 975 | + |
|
| 976 | + |
|
| 977 | + $image_array = array(); |
|
| 978 | + $post_meta = array(); |
|
| 979 | + |
|
| 980 | + /// Hotels ////post start 6/// |
|
| 981 | + $image_array[] = "$dummy_image_url/hotels17.jpg"; |
|
| 982 | + $image_array[] = "$dummy_image_url/hotels18.jpg"; |
|
| 983 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 984 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 985 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 986 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 987 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 988 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 989 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 990 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 991 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 992 | + |
|
| 993 | + $post_info[] = array( |
|
| 994 | + "listing_type" => 'gd_place', |
|
| 995 | + "post_title" => 'Courtyard Philadelphia Downtown', |
|
| 996 | + "post_desc" => ' |
|
| 997 | 997 | <h3>Overview </h3> |
| 998 | 998 | |
| 999 | 999 | The Philadelphia Downtown Courtyard opened it´s doors after a grand $75 million restoration, recapturing the grandeur of its 1926 origins while incorporating state of the art systems throughout. |
@@ -1023,45 +1023,45 @@ discard block |
||
| 1023 | 1023 | |
| 1024 | 1024 | Recently featured on WE TV´s “My Fair Wedding”, the Courtyard Marriott Philadelphia is one of the city´s leading venues for corporate and social affairs with over 10,000 sq ft of flexible meeting space, including two Grand Ballrooms each with over 3,000 square feet accommodating up to 250 people. In addition, the hotel has a total of 11 meeting rooms making it an ideal home for all occasions. The hotel boasts an experienced full-service Event and Culinary Teams, ready to take care of all the details and ensure your event is not only a success, but a lasting memory. |
| 1025 | 1025 | ', |
| 1026 | - "post_images" => $image_array, |
|
| 1027 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
|
|
| 1028 | - "post_tags" => array(''),
|
|
| 1029 | - "geodir_video" => '', |
|
| 1030 | - "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
| 1031 | - "geodir_contact" => '(888) 888-8888', |
|
| 1032 | - "geodir_email" => '[email protected]', |
|
| 1033 | - "geodir_website" => 'http://www.theinnatpenn.com/', |
|
| 1034 | - "geodir_twitter" => 'http://twitter.com/theinnatpenn', |
|
| 1035 | - "geodir_facebook" => 'http://facebook.com/theinnatpenn', |
|
| 1036 | - "post_dummy" => '1' |
|
| 1037 | - ); |
|
| 1038 | - |
|
| 1039 | - ////post end/// |
|
| 1040 | - /// Hotels ////post start 6/// |
|
| 1041 | - |
|
| 1042 | - break; |
|
| 1043 | - case 17: |
|
| 1044 | - |
|
| 1045 | - $image_array = array(); |
|
| 1046 | - $post_meta = array(); |
|
| 1047 | - |
|
| 1048 | - /// Hotels ////post start 7/// |
|
| 1049 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 1050 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 1051 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1052 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 1053 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1054 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 1055 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 1056 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 1057 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 1058 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1059 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 1060 | - |
|
| 1061 | - $post_info[] = array( |
|
| 1062 | - "listing_type" => 'gd_place', |
|
| 1063 | - "post_title" => 'Four Seasons Philadelphia', |
|
| 1064 | - "post_desc" => ' |
|
| 1026 | + "post_images" => $image_array, |
|
| 1027 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
|
|
| 1028 | + "post_tags" => array(''),
|
|
| 1029 | + "geodir_video" => '', |
|
| 1030 | + "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
| 1031 | + "geodir_contact" => '(888) 888-8888', |
|
| 1032 | + "geodir_email" => '[email protected]', |
|
| 1033 | + "geodir_website" => 'http://www.theinnatpenn.com/', |
|
| 1034 | + "geodir_twitter" => 'http://twitter.com/theinnatpenn', |
|
| 1035 | + "geodir_facebook" => 'http://facebook.com/theinnatpenn', |
|
| 1036 | + "post_dummy" => '1' |
|
| 1037 | + ); |
|
| 1038 | + |
|
| 1039 | + ////post end/// |
|
| 1040 | + /// Hotels ////post start 6/// |
|
| 1041 | + |
|
| 1042 | + break; |
|
| 1043 | + case 17: |
|
| 1044 | + |
|
| 1045 | + $image_array = array(); |
|
| 1046 | + $post_meta = array(); |
|
| 1047 | + |
|
| 1048 | + /// Hotels ////post start 7/// |
|
| 1049 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 1050 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 1051 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1052 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 1053 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1054 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 1055 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 1056 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 1057 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 1058 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1059 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 1060 | + |
|
| 1061 | + $post_info[] = array( |
|
| 1062 | + "listing_type" => 'gd_place', |
|
| 1063 | + "post_title" => 'Four Seasons Philadelphia', |
|
| 1064 | + "post_desc" => ' |
|
| 1065 | 1065 | <h3>Overview </h3> |
| 1066 | 1066 | |
| 1067 | 1067 | The Philadelphia Downtown Courtyard opened it´s doors after a grand $75 million restoration, recapturing the grandeur of its 1926 origins while incorporating state of the art systems throughout. |
@@ -1091,45 +1091,45 @@ discard block |
||
| 1091 | 1091 | |
| 1092 | 1092 | Recently featured on WE TV´s “My Fair Wedding”, the Courtyard Marriott Philadelphia is one of the city´s leading venues for corporate and social affairs with over 10,000 sq ft of flexible meeting space, including two Grand Ballrooms each with over 3,000 square feet accommodating up to 250 people. In addition, the hotel has a total of 11 meeting rooms making it an ideal home for all occasions. The hotel boasts an experienced full-service Event and Culinary Teams, ready to take care of all the details and ensure your event is not only a success, but a lasting memory. |
| 1093 | 1093 | ', |
| 1094 | - "post_images" => $image_array, |
|
| 1095 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
|
|
| 1096 | - "post_tags" => array(''),
|
|
| 1097 | - "geodir_video" => '', |
|
| 1098 | - "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
| 1099 | - "geodir_contact" => '(143) 888-8888', |
|
| 1100 | - "geodir_email" => '[email protected]', |
|
| 1101 | - "geodir_website" => 'http://www.fourseasons.com/philadelphia/', |
|
| 1102 | - "geodir_twitter" => 'http://twitter.com/fourseasons', |
|
| 1103 | - "geodir_facebook" => 'http://facebook.com/fourseasons', |
|
| 1104 | - "post_dummy" => '1' |
|
| 1105 | - ); |
|
| 1106 | - |
|
| 1107 | - ////post end/// |
|
| 1108 | - /// Hotels ////post start 7/// |
|
| 1109 | - break; |
|
| 1110 | - case 18: |
|
| 1111 | - |
|
| 1112 | - |
|
| 1113 | - $image_array = array(); |
|
| 1114 | - $post_meta = array(); |
|
| 1115 | - |
|
| 1116 | - /// Hotels ////post start 8/// |
|
| 1117 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 1118 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 1119 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1120 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 1121 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1122 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 1123 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 1124 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 1125 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 1126 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1127 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 1128 | - |
|
| 1129 | - $post_info[] = array( |
|
| 1130 | - "listing_type" => 'gd_place', |
|
| 1131 | - "post_title" => 'Alexander Inn', |
|
| 1132 | - "post_desc" => ' |
|
| 1094 | + "post_images" => $image_array, |
|
| 1095 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
|
|
| 1096 | + "post_tags" => array(''),
|
|
| 1097 | + "geodir_video" => '', |
|
| 1098 | + "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
| 1099 | + "geodir_contact" => '(143) 888-8888', |
|
| 1100 | + "geodir_email" => '[email protected]', |
|
| 1101 | + "geodir_website" => 'http://www.fourseasons.com/philadelphia/', |
|
| 1102 | + "geodir_twitter" => 'http://twitter.com/fourseasons', |
|
| 1103 | + "geodir_facebook" => 'http://facebook.com/fourseasons', |
|
| 1104 | + "post_dummy" => '1' |
|
| 1105 | + ); |
|
| 1106 | + |
|
| 1107 | + ////post end/// |
|
| 1108 | + /// Hotels ////post start 7/// |
|
| 1109 | + break; |
|
| 1110 | + case 18: |
|
| 1111 | + |
|
| 1112 | + |
|
| 1113 | + $image_array = array(); |
|
| 1114 | + $post_meta = array(); |
|
| 1115 | + |
|
| 1116 | + /// Hotels ////post start 8/// |
|
| 1117 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
| 1118 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 1119 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1120 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 1121 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1122 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 1123 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 1124 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 1125 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 1126 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1127 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 1128 | + |
|
| 1129 | + $post_info[] = array( |
|
| 1130 | + "listing_type" => 'gd_place', |
|
| 1131 | + "post_title" => 'Alexander Inn', |
|
| 1132 | + "post_desc" => ' |
|
| 1133 | 1133 | The Alexander Inn is one of Philadelphia´s most popular and reasonably priced small hotels. |
| 1134 | 1134 | |
| 1135 | 1135 | Conveniently located in the heart of the Washington Square West neighborhood in Center City Philadelphia, the Alexander Inn is a great place to base your stay in Philadelphia. |
@@ -1138,45 +1138,45 @@ discard block |
||
| 1138 | 1138 | |
| 1139 | 1139 | Rooms are also fitted with DirecTV (including many complimentary channels like CNN, ESPN, eight movie channels, etc.) and telephones with modem ports and direct dial. You will also have access to the hotel´s free 24-hour fitness and e-mail centers. |
| 1140 | 1140 | ', |
| 1141 | - "post_images" => $image_array, |
|
| 1142 | - "post_category" => array('gd_placecategory' => array('Hotels')),
|
|
| 1143 | - "post_tags" => array(''),
|
|
| 1144 | - "geodir_video" => '', |
|
| 1145 | - "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
| 1146 | - "geodir_contact" => '(143) 888-8888', |
|
| 1147 | - "geodir_email" => '[email protected]', |
|
| 1148 | - "geodir_website" => 'http://www.alexanderinn.com/', |
|
| 1149 | - "geodir_twitter" => 'http://twitter.com/alexanderinn', |
|
| 1150 | - "geodir_facebook" => 'http://facebook.com/alexanderinn', |
|
| 1151 | - "post_dummy" => '1' |
|
| 1152 | - ); |
|
| 1153 | - |
|
| 1154 | - ////post end/// |
|
| 1155 | - /// Hotels ////post start 8/// |
|
| 1156 | - break; |
|
| 1157 | - case 19: |
|
| 1158 | - |
|
| 1159 | - |
|
| 1160 | - $image_array = array(); |
|
| 1161 | - $post_meta = array(); |
|
| 1162 | - |
|
| 1163 | - /// Hotels ////post start 9/// |
|
| 1164 | - $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
| 1165 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 1166 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1167 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 1168 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1169 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 1170 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 1171 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 1172 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 1173 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1174 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 1175 | - |
|
| 1176 | - $post_info[] = array( |
|
| 1177 | - "listing_type" => 'gd_place', |
|
| 1178 | - "post_title" => 'Best Western Center City Hotel', |
|
| 1179 | - "post_desc" => ' |
|
| 1141 | + "post_images" => $image_array, |
|
| 1142 | + "post_category" => array('gd_placecategory' => array('Hotels')),
|
|
| 1143 | + "post_tags" => array(''),
|
|
| 1144 | + "geodir_video" => '', |
|
| 1145 | + "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
| 1146 | + "geodir_contact" => '(143) 888-8888', |
|
| 1147 | + "geodir_email" => '[email protected]', |
|
| 1148 | + "geodir_website" => 'http://www.alexanderinn.com/', |
|
| 1149 | + "geodir_twitter" => 'http://twitter.com/alexanderinn', |
|
| 1150 | + "geodir_facebook" => 'http://facebook.com/alexanderinn', |
|
| 1151 | + "post_dummy" => '1' |
|
| 1152 | + ); |
|
| 1153 | + |
|
| 1154 | + ////post end/// |
|
| 1155 | + /// Hotels ////post start 8/// |
|
| 1156 | + break; |
|
| 1157 | + case 19: |
|
| 1158 | + |
|
| 1159 | + |
|
| 1160 | + $image_array = array(); |
|
| 1161 | + $post_meta = array(); |
|
| 1162 | + |
|
| 1163 | + /// Hotels ////post start 9/// |
|
| 1164 | + $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
| 1165 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 1166 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1167 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 1168 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1169 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 1170 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 1171 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 1172 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 1173 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1174 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 1175 | + |
|
| 1176 | + $post_info[] = array( |
|
| 1177 | + "listing_type" => 'gd_place', |
|
| 1178 | + "post_title" => 'Best Western Center City Hotel', |
|
| 1179 | + "post_desc" => ' |
|
| 1180 | 1180 | The Alexander Inn is one of Philadelphia´s most popular and reasonably priced small hotels. |
| 1181 | 1181 | |
| 1182 | 1182 | Conveniently located in the heart of the Washington Square West neighborhood in Center City Philadelphia, the Alexander Inn is a great place to base your stay in Philadelphia. |
@@ -1185,91 +1185,91 @@ discard block |
||
| 1185 | 1185 | |
| 1186 | 1186 | Rooms are also fitted with DirecTV (including many complimentary channels like CNN, ESPN, eight movie channels, etc.) and telephones with modem ports and direct dial. You will also have access to the hotel´s free 24-hour fitness and e-mail centers. |
| 1187 | 1187 | ', |
| 1188 | - "post_images" => $image_array, |
|
| 1189 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
|
|
| 1190 | - "post_tags" => array(''),
|
|
| 1191 | - "geodir_video" => '', |
|
| 1192 | - "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
| 1193 | - "geodir_contact" => '(243) 222-12344', |
|
| 1194 | - "geodir_email" => '[email protected]', |
|
| 1195 | - "geodir_website" => 'http://book.bestwestern.com/bestwestern/productInfo.do?propertyCode=39087', |
|
| 1196 | - "geodir_twitter" => 'http://twitter.com/bestwestern', |
|
| 1197 | - "geodir_facebook" => 'http://facebook.com/bestwestern', |
|
| 1198 | - "post_dummy" => '1' |
|
| 1199 | - ); |
|
| 1200 | - |
|
| 1201 | - ////post end/// |
|
| 1202 | - /// Hotels ////post start 9/// |
|
| 1203 | - break; |
|
| 1204 | - case 20: |
|
| 1205 | - |
|
| 1206 | - |
|
| 1207 | - $image_array = array(); |
|
| 1208 | - $post_meta = array(); |
|
| 1209 | - |
|
| 1210 | - /// Hotels ////post start 10/// |
|
| 1211 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 1212 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 1213 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1214 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 1215 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1216 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 1217 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1218 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 1219 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 1220 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1221 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 1222 | - |
|
| 1223 | - $post_info[] = array( |
|
| 1224 | - "listing_type" => 'gd_place', |
|
| 1225 | - "post_title" => 'Chestnut Hill Hotel', |
|
| 1226 | - "post_desc" => ' |
|
| 1188 | + "post_images" => $image_array, |
|
| 1189 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
|
|
| 1190 | + "post_tags" => array(''),
|
|
| 1191 | + "geodir_video" => '', |
|
| 1192 | + "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
| 1193 | + "geodir_contact" => '(243) 222-12344', |
|
| 1194 | + "geodir_email" => '[email protected]', |
|
| 1195 | + "geodir_website" => 'http://book.bestwestern.com/bestwestern/productInfo.do?propertyCode=39087', |
|
| 1196 | + "geodir_twitter" => 'http://twitter.com/bestwestern', |
|
| 1197 | + "geodir_facebook" => 'http://facebook.com/bestwestern', |
|
| 1198 | + "post_dummy" => '1' |
|
| 1199 | + ); |
|
| 1200 | + |
|
| 1201 | + ////post end/// |
|
| 1202 | + /// Hotels ////post start 9/// |
|
| 1203 | + break; |
|
| 1204 | + case 20: |
|
| 1205 | + |
|
| 1206 | + |
|
| 1207 | + $image_array = array(); |
|
| 1208 | + $post_meta = array(); |
|
| 1209 | + |
|
| 1210 | + /// Hotels ////post start 10/// |
|
| 1211 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
| 1212 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
| 1213 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1214 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
| 1215 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1216 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
| 1217 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
| 1218 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
| 1219 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
| 1220 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
| 1221 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
| 1222 | + |
|
| 1223 | + $post_info[] = array( |
|
| 1224 | + "listing_type" => 'gd_place', |
|
| 1225 | + "post_title" => 'Chestnut Hill Hotel', |
|
| 1226 | + "post_desc" => ' |
|
| 1227 | 1227 | The Chestnut Hill Hotel is located in the historic community of Chestnut Hill, approximately nine miles northwest from Center City Philadelphia. Although Chestnut Hill is close to Center City by today´s standards, it was originally a distant “suburb” on the outskirts of the Philadelphia countryside. |
| 1228 | 1228 | |
| 1229 | 1229 | Today, it is one of the region´s most charming neighborhoods. Tree-lined streets and grand estates surround its main street, Germantown Avenue, where you can stroll and shop at more than 200 specialty shops and restaurants, along with trendy salons and other modern boutiques. |
| 1230 | 1230 | |
| 1231 | 1231 | The Chestnut Hill Hotel fits perfectly in this setting - the hotel´s 36 rooms and suites, decorated in an 18th-century style, hold the hotel to its boutique roots. It´s a perfect place at which to enjoy a romantic getaway in Philadelphia. |
| 1232 | 1232 | ', |
| 1233 | - "post_images" => $image_array, |
|
| 1234 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
|
|
| 1235 | - "post_tags" => array(''),
|
|
| 1236 | - "geodir_video" => '', |
|
| 1237 | - "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
| 1238 | - "geodir_contact" => '(243) 222-12344', |
|
| 1239 | - "geodir_email" => '[email protected]', |
|
| 1240 | - "geodir_website" => 'http://www.chestnuthillhotel.com/', |
|
| 1241 | - "geodir_twitter" => 'http://twitter.com/chestnuthillhotel', |
|
| 1242 | - "geodir_facebook" => 'http://facebook.com/chestnuthillhotel', |
|
| 1243 | - "post_dummy" => '1' |
|
| 1244 | - ); |
|
| 1245 | - |
|
| 1246 | - ////post end/// |
|
| 1247 | - /// Hotels ////post start 10/// |
|
| 1248 | - |
|
| 1249 | - break; |
|
| 1250 | - case 21: |
|
| 1251 | - |
|
| 1252 | - |
|
| 1253 | - $image_array = array(); |
|
| 1254 | - $post_meta = array(); |
|
| 1255 | - |
|
| 1256 | - /// Restaurants ////post start 1// |
|
| 1257 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1258 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1259 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1260 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1261 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1262 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1263 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1264 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1265 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1266 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1267 | - $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
| 1268 | - |
|
| 1269 | - $post_info[] = array( |
|
| 1270 | - "listing_type" => 'gd_place', |
|
| 1271 | - "post_title" => 'Village Whiskey', |
|
| 1272 | - "post_desc" => ' |
|
| 1233 | + "post_images" => $image_array, |
|
| 1234 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
|
|
| 1235 | + "post_tags" => array(''),
|
|
| 1236 | + "geodir_video" => '', |
|
| 1237 | + "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
| 1238 | + "geodir_contact" => '(243) 222-12344', |
|
| 1239 | + "geodir_email" => '[email protected]', |
|
| 1240 | + "geodir_website" => 'http://www.chestnuthillhotel.com/', |
|
| 1241 | + "geodir_twitter" => 'http://twitter.com/chestnuthillhotel', |
|
| 1242 | + "geodir_facebook" => 'http://facebook.com/chestnuthillhotel', |
|
| 1243 | + "post_dummy" => '1' |
|
| 1244 | + ); |
|
| 1245 | + |
|
| 1246 | + ////post end/// |
|
| 1247 | + /// Hotels ////post start 10/// |
|
| 1248 | + |
|
| 1249 | + break; |
|
| 1250 | + case 21: |
|
| 1251 | + |
|
| 1252 | + |
|
| 1253 | + $image_array = array(); |
|
| 1254 | + $post_meta = array(); |
|
| 1255 | + |
|
| 1256 | + /// Restaurants ////post start 1// |
|
| 1257 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1258 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1259 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1260 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1261 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1262 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1263 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1264 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1265 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1266 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1267 | + $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
| 1268 | + |
|
| 1269 | + $post_info[] = array( |
|
| 1270 | + "listing_type" => 'gd_place', |
|
| 1271 | + "post_title" => 'Village Whiskey', |
|
| 1272 | + "post_desc" => ' |
|
| 1273 | 1273 | |
| 1274 | 1274 | |
| 1275 | 1275 | Located in a Rittenhouse Square space evoking the free-wheeling spirit of a speakeasy, Village Whiskey is prolific Chef Jose Garces’ intimate, 30-seat tribute to the time-honored liquor. |
@@ -1295,45 +1295,45 @@ discard block |
||
| 1295 | 1295 | |
| 1296 | 1296 | During the warmer months, diners can sit at large, wooden tables placed along Sansom Street for whiskey alfresco. |
| 1297 | 1297 | ', |
| 1298 | - "post_images" => $image_array, |
|
| 1299 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')),
|
|
| 1300 | - "post_tags" => array('Sample Tag1'),
|
|
| 1301 | - "geodir_video" => '', |
|
| 1302 | - "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
| 1303 | - "geodir_contact" => '(243) 222-12344', |
|
| 1304 | - "geodir_email" => '[email protected]', |
|
| 1305 | - "geodir_website" => 'http://www.villagewhiskey.com/', |
|
| 1306 | - "geodir_twitter" => 'http://twitter.com/villagewhiskey', |
|
| 1307 | - "geodir_facebook" => 'http://facebook.com/villagewhiskey', |
|
| 1308 | - "post_dummy" => '1' |
|
| 1309 | - ); |
|
| 1310 | - |
|
| 1311 | - ////post end/// |
|
| 1312 | - /// Restaurants ////post start 1/// |
|
| 1313 | - break; |
|
| 1314 | - case 22: |
|
| 1315 | - |
|
| 1316 | - |
|
| 1317 | - $image_array = array(); |
|
| 1318 | - $post_meta = array(); |
|
| 1319 | - |
|
| 1320 | - /// Restaurants ////post start 2// |
|
| 1321 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1322 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1323 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1324 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1325 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1326 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1327 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1328 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1329 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1330 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1331 | - $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
| 1332 | - |
|
| 1333 | - $post_info[] = array( |
|
| 1334 | - "listing_type" => 'gd_place', |
|
| 1335 | - "post_title" => 'Zavino Pizzeria and Wine Bar', |
|
| 1336 | - "post_desc" => ' |
|
| 1298 | + "post_images" => $image_array, |
|
| 1299 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')),
|
|
| 1300 | + "post_tags" => array('Sample Tag1'),
|
|
| 1301 | + "geodir_video" => '', |
|
| 1302 | + "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
| 1303 | + "geodir_contact" => '(243) 222-12344', |
|
| 1304 | + "geodir_email" => '[email protected]', |
|
| 1305 | + "geodir_website" => 'http://www.villagewhiskey.com/', |
|
| 1306 | + "geodir_twitter" => 'http://twitter.com/villagewhiskey', |
|
| 1307 | + "geodir_facebook" => 'http://facebook.com/villagewhiskey', |
|
| 1308 | + "post_dummy" => '1' |
|
| 1309 | + ); |
|
| 1310 | + |
|
| 1311 | + ////post end/// |
|
| 1312 | + /// Restaurants ////post start 1/// |
|
| 1313 | + break; |
|
| 1314 | + case 22: |
|
| 1315 | + |
|
| 1316 | + |
|
| 1317 | + $image_array = array(); |
|
| 1318 | + $post_meta = array(); |
|
| 1319 | + |
|
| 1320 | + /// Restaurants ////post start 2// |
|
| 1321 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1322 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1323 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1324 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1325 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1326 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1327 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1328 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1329 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1330 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1331 | + $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
| 1332 | + |
|
| 1333 | + $post_info[] = array( |
|
| 1334 | + "listing_type" => 'gd_place', |
|
| 1335 | + "post_title" => 'Zavino Pizzeria and Wine Bar', |
|
| 1336 | + "post_desc" => ' |
|
| 1337 | 1337 | Zavino is a new pizzeria and wine bar located at the epicenter of the city´s trendy Midtown Village neighborhood. The restaurant features a seasonal menu, classic cocktails, an approachable selection of wine and beer and some of the best late night menu offerings in the area. |
| 1338 | 1338 | |
| 1339 | 1339 | The restaurant´s interior looks great - it has a simple, rustic feel with an original brick wall, large picture windows, a long bar and a large outdoor cafe coming this spring. |
@@ -1352,46 +1352,46 @@ discard block |
||
| 1352 | 1352 | |
| 1353 | 1353 | Pizzas vary in price from $8 to $12. |
| 1354 | 1354 | ', |
| 1355 | - "post_images" => $image_array, |
|
| 1356 | - "post_category" => array('gd_placecategory' => array('Restaurants')),
|
|
| 1357 | - "post_tags" => array('Sample Tag1'),
|
|
| 1358 | - "geodir_video" => '', |
|
| 1359 | - "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
| 1360 | - "geodir_contact" => '(243) 222-12344', |
|
| 1361 | - "geodir_email" => '[email protected]', |
|
| 1362 | - "geodir_website" => 'http://www.villagewhiskey.com/', |
|
| 1363 | - "geodir_twitter" => 'http://twitter.com/villagewhiskey', |
|
| 1364 | - "geodir_facebook" => 'http://facebook.com/villagewhiskey', |
|
| 1365 | - "post_dummy" => '1' |
|
| 1366 | - ); |
|
| 1367 | - |
|
| 1368 | - ////post end/// |
|
| 1369 | - /// Restaurants ////post start 2/// |
|
| 1370 | - |
|
| 1371 | - break; |
|
| 1372 | - case 23: |
|
| 1373 | - |
|
| 1374 | - |
|
| 1375 | - $image_array = array(); |
|
| 1376 | - $post_meta = array(); |
|
| 1377 | - |
|
| 1378 | - /// Restaurants ////post start 3// |
|
| 1379 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1380 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1381 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1382 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1383 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1384 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1385 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1386 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1387 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1388 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1389 | - $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
| 1390 | - |
|
| 1391 | - $post_info[] = array( |
|
| 1392 | - "listing_type" => 'gd_place', |
|
| 1393 | - "post_title" => 'Parc', |
|
| 1394 | - "post_desc" => ' |
|
| 1355 | + "post_images" => $image_array, |
|
| 1356 | + "post_category" => array('gd_placecategory' => array('Restaurants')),
|
|
| 1357 | + "post_tags" => array('Sample Tag1'),
|
|
| 1358 | + "geodir_video" => '', |
|
| 1359 | + "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
| 1360 | + "geodir_contact" => '(243) 222-12344', |
|
| 1361 | + "geodir_email" => '[email protected]', |
|
| 1362 | + "geodir_website" => 'http://www.villagewhiskey.com/', |
|
| 1363 | + "geodir_twitter" => 'http://twitter.com/villagewhiskey', |
|
| 1364 | + "geodir_facebook" => 'http://facebook.com/villagewhiskey', |
|
| 1365 | + "post_dummy" => '1' |
|
| 1366 | + ); |
|
| 1367 | + |
|
| 1368 | + ////post end/// |
|
| 1369 | + /// Restaurants ////post start 2/// |
|
| 1370 | + |
|
| 1371 | + break; |
|
| 1372 | + case 23: |
|
| 1373 | + |
|
| 1374 | + |
|
| 1375 | + $image_array = array(); |
|
| 1376 | + $post_meta = array(); |
|
| 1377 | + |
|
| 1378 | + /// Restaurants ////post start 3// |
|
| 1379 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1380 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1381 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1382 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1383 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1384 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1385 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1386 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1387 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1388 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1389 | + $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
| 1390 | + |
|
| 1391 | + $post_info[] = array( |
|
| 1392 | + "listing_type" => 'gd_place', |
|
| 1393 | + "post_title" => 'Parc', |
|
| 1394 | + "post_desc" => ' |
|
| 1395 | 1395 | If you love Paris in the springtime, Parc is a veritable grand cru. |
| 1396 | 1396 | |
| 1397 | 1397 | With Parc, famed restaurateur Stephen Starr brings a certain je ne sais quoi to Rittenhouse Square. Parc offers an authentic French bistro experience, fully equipped with a chic Parisian ambiance and gorgeous sidewalk seating overlooking the Square. |
@@ -1419,45 +1419,45 @@ discard block |
||
| 1419 | 1419 | |
| 1420 | 1420 | To put it simply, Parc is nothing short of an authentic Parisian dining experience - right here in the heart of Rittenhouse Square. |
| 1421 | 1421 | ', |
| 1422 | - "post_images" => $image_array, |
|
| 1423 | - "post_category" => array('gd_placecategory' => array('Restaurants')),
|
|
| 1424 | - "post_tags" => array('Sample Tag1'),
|
|
| 1425 | - "geodir_video" => '', |
|
| 1426 | - "geodir_timing" => 'Daily : 10 am to 12 pm', |
|
| 1427 | - "geodir_contact" => '(143) 222-12344', |
|
| 1428 | - "geodir_email" => '[email protected]', |
|
| 1429 | - "geodir_website" => 'http://www.parc-restaurant.com/', |
|
| 1430 | - "geodir_twitter" => 'http://twitter.com/parc-restaurant', |
|
| 1431 | - "geodir_facebook" => 'http://facebook.com/parc-restaurant', |
|
| 1432 | - "post_dummy" => '1' |
|
| 1433 | - ); |
|
| 1434 | - |
|
| 1435 | - ////post end/// |
|
| 1436 | - /// Restaurants ////post start 3/// |
|
| 1437 | - break; |
|
| 1438 | - case 24: |
|
| 1439 | - |
|
| 1440 | - |
|
| 1441 | - $image_array = array(); |
|
| 1442 | - $post_meta = array(); |
|
| 1443 | - |
|
| 1444 | - /// Restaurants ////post start 4// |
|
| 1445 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1446 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1447 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1448 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1449 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1450 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1451 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1452 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1453 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1454 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1455 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1456 | - |
|
| 1457 | - $post_info[] = array( |
|
| 1458 | - "listing_type" => 'gd_place', |
|
| 1459 | - "post_title" => 'Percy Street Barbecue', |
|
| 1460 | - "post_desc" => ' |
|
| 1422 | + "post_images" => $image_array, |
|
| 1423 | + "post_category" => array('gd_placecategory' => array('Restaurants')),
|
|
| 1424 | + "post_tags" => array('Sample Tag1'),
|
|
| 1425 | + "geodir_video" => '', |
|
| 1426 | + "geodir_timing" => 'Daily : 10 am to 12 pm', |
|
| 1427 | + "geodir_contact" => '(143) 222-12344', |
|
| 1428 | + "geodir_email" => '[email protected]', |
|
| 1429 | + "geodir_website" => 'http://www.parc-restaurant.com/', |
|
| 1430 | + "geodir_twitter" => 'http://twitter.com/parc-restaurant', |
|
| 1431 | + "geodir_facebook" => 'http://facebook.com/parc-restaurant', |
|
| 1432 | + "post_dummy" => '1' |
|
| 1433 | + ); |
|
| 1434 | + |
|
| 1435 | + ////post end/// |
|
| 1436 | + /// Restaurants ////post start 3/// |
|
| 1437 | + break; |
|
| 1438 | + case 24: |
|
| 1439 | + |
|
| 1440 | + |
|
| 1441 | + $image_array = array(); |
|
| 1442 | + $post_meta = array(); |
|
| 1443 | + |
|
| 1444 | + /// Restaurants ////post start 4// |
|
| 1445 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1446 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1447 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1448 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1449 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1450 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1451 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1452 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1453 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1454 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1455 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1456 | + |
|
| 1457 | + $post_info[] = array( |
|
| 1458 | + "listing_type" => 'gd_place', |
|
| 1459 | + "post_title" => 'Percy Street Barbecue', |
|
| 1460 | + "post_desc" => ' |
|
| 1461 | 1461 | Percy Street Barbecue sees the South Street debut of restaurateurs Steven Cook and Michael Solomonov (Zahav, Xochitl). |
| 1462 | 1462 | |
| 1463 | 1463 | Serving a straightforward selection of slowly smoked meats and homey side dishes alongside craft beers and tasty cocktails, Percy Street is an ideal venue for Chef Erin OShea much-lauded Southern cooking, and is on its way to become the city top spot for barbecue. |
@@ -1483,46 +1483,46 @@ discard block |
||
| 1483 | 1483 | |
| 1484 | 1484 | Seating in the form of repurposed church pews, and bare light bulbs overhead in the dining room lend to the restaurant Texas-esque aesthetic. |
| 1485 | 1485 | ', |
| 1486 | - "post_images" => $image_array, |
|
| 1487 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')),
|
|
| 1488 | - "post_tags" => array('Sample Tag1'),
|
|
| 1489 | - "geodir_video" => '', |
|
| 1490 | - "geodir_timing" => 'Percy Street is closed on Mondays. The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.', |
|
| 1491 | - "geodir_contact" => '(143) 222-12344', |
|
| 1492 | - "geodir_email" => '[email protected]', |
|
| 1493 | - "geodir_website" => 'http://www.percystreet.com/', |
|
| 1494 | - "geodir_twitter" => 'http://twitter.com/percystreet', |
|
| 1495 | - "geodir_facebook" => 'http://facebook.com/percystreet', |
|
| 1496 | - "post_dummy" => '1' |
|
| 1497 | - ); |
|
| 1498 | - |
|
| 1499 | - ////post end/// |
|
| 1500 | - /// Restaurants ////post start 4/// |
|
| 1501 | - |
|
| 1502 | - break; |
|
| 1503 | - case 25: |
|
| 1504 | - |
|
| 1505 | - |
|
| 1506 | - $image_array = array(); |
|
| 1507 | - $post_meta = array(); |
|
| 1508 | - |
|
| 1509 | - /// Restaurants ////post start 5// |
|
| 1510 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1511 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1512 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1513 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1514 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1515 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1516 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1517 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1518 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1519 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1520 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1521 | - |
|
| 1522 | - $post_info[] = array( |
|
| 1523 | - "listing_type" => 'gd_place', |
|
| 1524 | - "post_title" => 'The Fountain Restaurant', |
|
| 1525 | - "post_desc" => ' |
|
| 1486 | + "post_images" => $image_array, |
|
| 1487 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')),
|
|
| 1488 | + "post_tags" => array('Sample Tag1'),
|
|
| 1489 | + "geodir_video" => '', |
|
| 1490 | + "geodir_timing" => 'Percy Street is closed on Mondays. The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.', |
|
| 1491 | + "geodir_contact" => '(143) 222-12344', |
|
| 1492 | + "geodir_email" => '[email protected]', |
|
| 1493 | + "geodir_website" => 'http://www.percystreet.com/', |
|
| 1494 | + "geodir_twitter" => 'http://twitter.com/percystreet', |
|
| 1495 | + "geodir_facebook" => 'http://facebook.com/percystreet', |
|
| 1496 | + "post_dummy" => '1' |
|
| 1497 | + ); |
|
| 1498 | + |
|
| 1499 | + ////post end/// |
|
| 1500 | + /// Restaurants ////post start 4/// |
|
| 1501 | + |
|
| 1502 | + break; |
|
| 1503 | + case 25: |
|
| 1504 | + |
|
| 1505 | + |
|
| 1506 | + $image_array = array(); |
|
| 1507 | + $post_meta = array(); |
|
| 1508 | + |
|
| 1509 | + /// Restaurants ////post start 5// |
|
| 1510 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1511 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1512 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1513 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1514 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1515 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1516 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1517 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1518 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1519 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1520 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1521 | + |
|
| 1522 | + $post_info[] = array( |
|
| 1523 | + "listing_type" => 'gd_place', |
|
| 1524 | + "post_title" => 'The Fountain Restaurant', |
|
| 1525 | + "post_desc" => ' |
|
| 1526 | 1526 | The Fountain Restaurant in the Four Seasons Hotel Philadelphia has received seemingly every type of accolade there is, from top honors in Gourmet magazine to Forbes Travel Guide´s 2010 Five Star award to a perfect Five Diamond rating from AAA. It´s been a Philadelphia favorite for special occasion meals for decades. |
| 1527 | 1527 | |
| 1528 | 1528 | Additionally rated as the best restaurant in Philadelphia by Zagat´s, the Fountain Restaurant overlooks the majestic Swann Memorial Fountain sculpture by Alexander Stirling Calder in the center of Logan Square. You´ll also enjoy sweeping views of the grand Benjamin Franklin Parkway and its gorgeous Beaux Arts architecture. |
@@ -1532,45 +1532,45 @@ discard block |
||
| 1532 | 1532 | You can order a la carte or select the prix fix option to enjoy the “spontaneous tastes” menu which gives the chef control of a few courses. The menu changes regularly, but you can expect to see globaly influenced items like Pan-fried Veal Sweetbreads, Braised Dover Sole Roulade, Sautéed Venison Medallions and Roasted Australian Lamb Saddle. |
| 1533 | 1533 | |
| 1534 | 1534 | ', |
| 1535 | - "post_images" => $image_array, |
|
| 1536 | - "post_category" => array('gd_placecategory' => array('Restaurants')),
|
|
| 1537 | - "post_tags" => array('food'),
|
|
| 1538 | - "geodir_video" => '', |
|
| 1539 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.', |
|
| 1540 | - "geodir_contact" => '(103) 100-12344', |
|
| 1541 | - "geodir_email" => '[email protected]', |
|
| 1542 | - "geodir_website" => 'http://www.fourseasons.com/philadelphia/dining', |
|
| 1543 | - "geodir_twitter" => 'http://twitter.com/fourseasons', |
|
| 1544 | - "geodir_facebook" => 'http://facebook.com/fourseasons', |
|
| 1545 | - "post_dummy" => '1' |
|
| 1546 | - ); |
|
| 1547 | - |
|
| 1548 | - ////post end/// |
|
| 1549 | - /// Restaurants ////post start 5/// |
|
| 1550 | - break; |
|
| 1551 | - case 26: |
|
| 1552 | - |
|
| 1553 | - |
|
| 1554 | - $image_array = array(); |
|
| 1555 | - $post_meta = array(); |
|
| 1556 | - |
|
| 1557 | - /// Restaurants ////post start 6// |
|
| 1558 | - $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
| 1559 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1560 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1561 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1562 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1563 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1564 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1565 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1566 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1567 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1568 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1569 | - |
|
| 1570 | - $post_info[] = array( |
|
| 1571 | - "listing_type" => 'gd_place', |
|
| 1572 | - "post_title" => 'Lacroix at The Rittenhouse', |
|
| 1573 | - "post_desc" => ' |
|
| 1535 | + "post_images" => $image_array, |
|
| 1536 | + "post_category" => array('gd_placecategory' => array('Restaurants')),
|
|
| 1537 | + "post_tags" => array('food'),
|
|
| 1538 | + "geodir_video" => '', |
|
| 1539 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.', |
|
| 1540 | + "geodir_contact" => '(103) 100-12344', |
|
| 1541 | + "geodir_email" => '[email protected]', |
|
| 1542 | + "geodir_website" => 'http://www.fourseasons.com/philadelphia/dining', |
|
| 1543 | + "geodir_twitter" => 'http://twitter.com/fourseasons', |
|
| 1544 | + "geodir_facebook" => 'http://facebook.com/fourseasons', |
|
| 1545 | + "post_dummy" => '1' |
|
| 1546 | + ); |
|
| 1547 | + |
|
| 1548 | + ////post end/// |
|
| 1549 | + /// Restaurants ////post start 5/// |
|
| 1550 | + break; |
|
| 1551 | + case 26: |
|
| 1552 | + |
|
| 1553 | + |
|
| 1554 | + $image_array = array(); |
|
| 1555 | + $post_meta = array(); |
|
| 1556 | + |
|
| 1557 | + /// Restaurants ////post start 6// |
|
| 1558 | + $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
| 1559 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
| 1560 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
| 1561 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
| 1562 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1563 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1564 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1565 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1566 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1567 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1568 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1569 | + |
|
| 1570 | + $post_info[] = array( |
|
| 1571 | + "listing_type" => 'gd_place', |
|
| 1572 | + "post_title" => 'Lacroix at The Rittenhouse', |
|
| 1573 | + "post_desc" => ' |
|
| 1574 | 1574 | A deluxe hotel like The Rittenhouse deserves a deluxe restaurant, a fitting description for Lacroix, named “Restaurant of the Year” in 2003 by Esquire magazine. |
| 1575 | 1575 | |
| 1576 | 1576 | Located on the second floor of the Rittenhouse Hotel, Lacroix features elegant décor and a broad view of Rittenhouse Square, which combine to make the ambiance at Lacroix as enjoyable as the meal itself. |
@@ -1581,46 +1581,46 @@ discard block |
||
| 1581 | 1581 | |
| 1582 | 1582 | Sunday Brunch at Lacroix - which features such delectable dishes as baby lamb chops with garlic crust and banyuls sauce, niman ranch smoked bacon, quail eggs with artichoke, golden beet and shiitakes, and french baguette toast with apple, raspberry and rosemary jam - is also highly recommended. |
| 1583 | 1583 | ', |
| 1584 | - "post_images" => $image_array, |
|
| 1585 | - "post_category" => array('gd_placecategory' => array('Restaurants')),
|
|
| 1586 | - "post_tags" => array('food'),
|
|
| 1587 | - "geodir_video" => '', |
|
| 1588 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1589 | - "geodir_contact" => '(113) 121-12344', |
|
| 1590 | - "geodir_email" => '[email protected]', |
|
| 1591 | - "geodir_website" => 'http://www.rittenhousehotel.com/lacroix.cfm', |
|
| 1592 | - "geodir_twitter" => 'http://twitter.com/rittenhousehotel', |
|
| 1593 | - "geodir_facebook" => 'http://facebook.com/rittenhousehotel', |
|
| 1594 | - "post_dummy" => '1' |
|
| 1595 | - ); |
|
| 1596 | - |
|
| 1597 | - ////post end/// |
|
| 1598 | - /// Restaurants ////post start 6/// |
|
| 1599 | - |
|
| 1600 | - break; |
|
| 1601 | - case 27: |
|
| 1602 | - |
|
| 1603 | - |
|
| 1604 | - $image_array = array(); |
|
| 1605 | - $post_meta = array(); |
|
| 1606 | - |
|
| 1607 | - /// Restaurants ////post start 7// |
|
| 1608 | - $image_array[] = "$dummy_image_url/restaurants12.jpg"; |
|
| 1609 | - $image_array[] = "$dummy_image_url/restaurants13.jpg"; |
|
| 1610 | - $image_array[] = "$dummy_image_url/restaurants14.jpg"; |
|
| 1611 | - $image_array[] = "$dummy_image_url/restaurants15.jpg"; |
|
| 1612 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1613 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1614 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1615 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1616 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1617 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1618 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1619 | - |
|
| 1620 | - $post_info[] = array( |
|
| 1621 | - "listing_type" => 'gd_place', |
|
| 1622 | - "post_title" => 'Lacroix at The Rittenhouse', |
|
| 1623 | - "post_desc" => ' |
|
| 1584 | + "post_images" => $image_array, |
|
| 1585 | + "post_category" => array('gd_placecategory' => array('Restaurants')),
|
|
| 1586 | + "post_tags" => array('food'),
|
|
| 1587 | + "geodir_video" => '', |
|
| 1588 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1589 | + "geodir_contact" => '(113) 121-12344', |
|
| 1590 | + "geodir_email" => '[email protected]', |
|
| 1591 | + "geodir_website" => 'http://www.rittenhousehotel.com/lacroix.cfm', |
|
| 1592 | + "geodir_twitter" => 'http://twitter.com/rittenhousehotel', |
|
| 1593 | + "geodir_facebook" => 'http://facebook.com/rittenhousehotel', |
|
| 1594 | + "post_dummy" => '1' |
|
| 1595 | + ); |
|
| 1596 | + |
|
| 1597 | + ////post end/// |
|
| 1598 | + /// Restaurants ////post start 6/// |
|
| 1599 | + |
|
| 1600 | + break; |
|
| 1601 | + case 27: |
|
| 1602 | + |
|
| 1603 | + |
|
| 1604 | + $image_array = array(); |
|
| 1605 | + $post_meta = array(); |
|
| 1606 | + |
|
| 1607 | + /// Restaurants ////post start 7// |
|
| 1608 | + $image_array[] = "$dummy_image_url/restaurants12.jpg"; |
|
| 1609 | + $image_array[] = "$dummy_image_url/restaurants13.jpg"; |
|
| 1610 | + $image_array[] = "$dummy_image_url/restaurants14.jpg"; |
|
| 1611 | + $image_array[] = "$dummy_image_url/restaurants15.jpg"; |
|
| 1612 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1613 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1614 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1615 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1616 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1617 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1618 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1619 | + |
|
| 1620 | + $post_info[] = array( |
|
| 1621 | + "listing_type" => 'gd_place', |
|
| 1622 | + "post_title" => 'Lacroix at The Rittenhouse', |
|
| 1623 | + "post_desc" => ' |
|
| 1624 | 1624 | A deluxe hotel like The Rittenhouse deserves a deluxe restaurant, a fitting description for Lacroix, named “Restaurant of the Year” in 2003 by Esquire magazine. |
| 1625 | 1625 | |
| 1626 | 1626 | Located on the second floor of the Rittenhouse Hotel, Lacroix features elegant décor and a broad view of Rittenhouse Square, which combine to make the ambiance at Lacroix as enjoyable as the meal itself. |
@@ -1631,45 +1631,45 @@ discard block |
||
| 1631 | 1631 | |
| 1632 | 1632 | Sunday Brunch at Lacroix - which features such delectable dishes as baby lamb chops with garlic crust and banyuls sauce, niman ranch smoked bacon, quail eggs with artichoke, golden beet and shiitakes, and french baguette toast with apple, raspberry and rosemary jam - is also highly recommended. |
| 1633 | 1633 | ', |
| 1634 | - "post_images" => $image_array, |
|
| 1635 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
|
|
| 1636 | - "post_tags" => array('food'),
|
|
| 1637 | - "geodir_video" => '', |
|
| 1638 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1639 | - "geodir_contact" => '(113) 121-12344', |
|
| 1640 | - "geodir_email" => '[email protected]', |
|
| 1641 | - "geodir_website" => 'http://www.zamarestaurant.com/', |
|
| 1642 | - "geodir_twitter" => 'http://twitter.com/zamarestaurant', |
|
| 1643 | - "geodir_facebook" => 'http://facebook.com/zamarestaurant', |
|
| 1644 | - "post_dummy" => '1' |
|
| 1645 | - ); |
|
| 1646 | - |
|
| 1647 | - ////post end/// |
|
| 1648 | - /// Restaurants ////post start 7/// |
|
| 1649 | - |
|
| 1650 | - break; |
|
| 1651 | - case 28: |
|
| 1652 | - |
|
| 1653 | - $image_array = array(); |
|
| 1654 | - $post_meta = array(); |
|
| 1655 | - |
|
| 1656 | - /// Restaurants ////post start 8// |
|
| 1657 | - $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
| 1658 | - $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
| 1659 | - $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
| 1660 | - $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
| 1661 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1662 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1663 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1664 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1665 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1666 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1667 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1668 | - |
|
| 1669 | - $post_info[] = array( |
|
| 1670 | - "listing_type" => 'gd_place', |
|
| 1671 | - "post_title" => 'Sampan', |
|
| 1672 | - "post_desc" => ' |
|
| 1634 | + "post_images" => $image_array, |
|
| 1635 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
|
|
| 1636 | + "post_tags" => array('food'),
|
|
| 1637 | + "geodir_video" => '', |
|
| 1638 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1639 | + "geodir_contact" => '(113) 121-12344', |
|
| 1640 | + "geodir_email" => '[email protected]', |
|
| 1641 | + "geodir_website" => 'http://www.zamarestaurant.com/', |
|
| 1642 | + "geodir_twitter" => 'http://twitter.com/zamarestaurant', |
|
| 1643 | + "geodir_facebook" => 'http://facebook.com/zamarestaurant', |
|
| 1644 | + "post_dummy" => '1' |
|
| 1645 | + ); |
|
| 1646 | + |
|
| 1647 | + ////post end/// |
|
| 1648 | + /// Restaurants ////post start 7/// |
|
| 1649 | + |
|
| 1650 | + break; |
|
| 1651 | + case 28: |
|
| 1652 | + |
|
| 1653 | + $image_array = array(); |
|
| 1654 | + $post_meta = array(); |
|
| 1655 | + |
|
| 1656 | + /// Restaurants ////post start 8// |
|
| 1657 | + $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
| 1658 | + $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
| 1659 | + $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
| 1660 | + $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
| 1661 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1662 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1663 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1664 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1665 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1666 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1667 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1668 | + |
|
| 1669 | + $post_info[] = array( |
|
| 1670 | + "listing_type" => 'gd_place', |
|
| 1671 | + "post_title" => 'Sampan', |
|
| 1672 | + "post_desc" => ' |
|
| 1673 | 1673 | Chef and charismatic television star Michael Schulson returns to Philadelphia with the opening of Sampan, a modern Asian restaurant where he serves the acclaimed cuisine that has made him one of the country´s highly sought-after culinary talents. |
| 1674 | 1674 | |
| 1675 | 1675 | Schulson returns to Philadelphia after having opened Buddakan in New York City for Stephen Starr and Izakaya at the Borgata in Atlantic City and then having gone on to star in Style network´s popular series Pantry Raid and TLC Ultimate Cake Off. |
@@ -1688,45 +1688,45 @@ discard block |
||
| 1688 | 1688 | |
| 1689 | 1689 | Prices range from $5 to $19. |
| 1690 | 1690 | ', |
| 1691 | - "post_images" => $image_array, |
|
| 1692 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
|
|
| 1693 | - "post_tags" => array('restaurant'),
|
|
| 1694 | - "geodir_video" => '', |
|
| 1695 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1696 | - "geodir_contact" => '(000) 111-2222', |
|
| 1697 | - "geodir_email" => '[email protected]', |
|
| 1698 | - "geodir_website" => 'http://www.sampanphilly.com/', |
|
| 1699 | - "geodir_twitter" => 'http://twitter.com/sampanphilly', |
|
| 1700 | - "geodir_facebook" => 'http://facebook.com/sampanphilly', |
|
| 1701 | - "post_dummy" => '1' |
|
| 1702 | - ); |
|
| 1703 | - |
|
| 1704 | - ////post end/// |
|
| 1705 | - /// Restaurants ////post start 8/// |
|
| 1706 | - |
|
| 1707 | - break; |
|
| 1708 | - case 29: |
|
| 1709 | - |
|
| 1710 | - $image_array = array(); |
|
| 1711 | - $post_meta = array(); |
|
| 1712 | - |
|
| 1713 | - /// Restaurants ////post start 9// |
|
| 1714 | - $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
| 1715 | - $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
| 1716 | - $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
| 1717 | - $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
| 1718 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1719 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1720 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1721 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1722 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1723 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1724 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1725 | - |
|
| 1726 | - $post_info[] = array( |
|
| 1727 | - "listing_type" => 'gd_place', |
|
| 1728 | - "post_title" => 'Morimoto', |
|
| 1729 | - "post_desc" => ' |
|
| 1691 | + "post_images" => $image_array, |
|
| 1692 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
|
|
| 1693 | + "post_tags" => array('restaurant'),
|
|
| 1694 | + "geodir_video" => '', |
|
| 1695 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1696 | + "geodir_contact" => '(000) 111-2222', |
|
| 1697 | + "geodir_email" => '[email protected]', |
|
| 1698 | + "geodir_website" => 'http://www.sampanphilly.com/', |
|
| 1699 | + "geodir_twitter" => 'http://twitter.com/sampanphilly', |
|
| 1700 | + "geodir_facebook" => 'http://facebook.com/sampanphilly', |
|
| 1701 | + "post_dummy" => '1' |
|
| 1702 | + ); |
|
| 1703 | + |
|
| 1704 | + ////post end/// |
|
| 1705 | + /// Restaurants ////post start 8/// |
|
| 1706 | + |
|
| 1707 | + break; |
|
| 1708 | + case 29: |
|
| 1709 | + |
|
| 1710 | + $image_array = array(); |
|
| 1711 | + $post_meta = array(); |
|
| 1712 | + |
|
| 1713 | + /// Restaurants ////post start 9// |
|
| 1714 | + $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
| 1715 | + $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
| 1716 | + $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
| 1717 | + $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
| 1718 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1719 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1720 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1721 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1722 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1723 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1724 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1725 | + |
|
| 1726 | + $post_info[] = array( |
|
| 1727 | + "listing_type" => 'gd_place', |
|
| 1728 | + "post_title" => 'Morimoto', |
|
| 1729 | + "post_desc" => ' |
|
| 1730 | 1730 | Stephen Starr creative Japanese restaurant has garnered all kinds of national and international attention since opening a few years back. Located a block from Independence Hall on Chestnut Street, Morimoto has an interior - awash in glass and colors - that is both striking and serene in its design. |
| 1731 | 1731 | |
| 1732 | 1732 | The restaurant´s namesake and head chef, Morimoto (of Food Network´s Iron Chef fame), has created a menu offering the very best in contemporary Japanese cusine. While regulars flock here for the exquisitely prepared sushi, Morimoto offers diners a broad spectrum of flavors that delve beyond nigiri and sashimi. |
@@ -1739,45 +1739,45 @@ discard block |
||
| 1739 | 1739 | |
| 1740 | 1740 | The mezzanine level lounge is a great spot to have a pre-meal cocktail while waiting for your table. You can enjoy a sake or try a “Sakura” - a cosmo made with Sake - in the sleek space that overlooks the brilliant restaurant below. |
| 1741 | 1741 | ', |
| 1742 | - "post_images" => $image_array, |
|
| 1743 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife', 'Feature')),
|
|
| 1744 | - "post_tags" => array('America'),
|
|
| 1745 | - "geodir_video" => '', |
|
| 1746 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1747 | - "geodir_contact" => '(000) 111-2222', |
|
| 1748 | - "geodir_email" => '[email protected]', |
|
| 1749 | - "geodir_website" => 'http://www.morimotorestaurant.com/', |
|
| 1750 | - "geodir_twitter" => 'http://twitter.com/morimotorestaurant', |
|
| 1751 | - "geodir_facebook" => 'http://facebook.com/morimotorestaurant', |
|
| 1752 | - "post_dummy" => '1' |
|
| 1753 | - ); |
|
| 1754 | - |
|
| 1755 | - ////post end/// |
|
| 1756 | - /// Restaurants ////post start 9/// |
|
| 1757 | - break; |
|
| 1758 | - case 30: |
|
| 1759 | - |
|
| 1760 | - |
|
| 1761 | - $image_array = array(); |
|
| 1762 | - $post_meta = array(); |
|
| 1763 | - |
|
| 1764 | - /// Restaurants ////post start 10// |
|
| 1765 | - $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
| 1766 | - $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
| 1767 | - $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
| 1768 | - $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
| 1769 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1770 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1771 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1772 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1773 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1774 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1775 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1776 | - |
|
| 1777 | - $post_info[] = array( |
|
| 1778 | - "listing_type" => 'gd_place', |
|
| 1779 | - "post_title" => 'Buddakan', |
|
| 1780 | - "post_desc" => ' |
|
| 1742 | + "post_images" => $image_array, |
|
| 1743 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife', 'Feature')),
|
|
| 1744 | + "post_tags" => array('America'),
|
|
| 1745 | + "geodir_video" => '', |
|
| 1746 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1747 | + "geodir_contact" => '(000) 111-2222', |
|
| 1748 | + "geodir_email" => '[email protected]', |
|
| 1749 | + "geodir_website" => 'http://www.morimotorestaurant.com/', |
|
| 1750 | + "geodir_twitter" => 'http://twitter.com/morimotorestaurant', |
|
| 1751 | + "geodir_facebook" => 'http://facebook.com/morimotorestaurant', |
|
| 1752 | + "post_dummy" => '1' |
|
| 1753 | + ); |
|
| 1754 | + |
|
| 1755 | + ////post end/// |
|
| 1756 | + /// Restaurants ////post start 9/// |
|
| 1757 | + break; |
|
| 1758 | + case 30: |
|
| 1759 | + |
|
| 1760 | + |
|
| 1761 | + $image_array = array(); |
|
| 1762 | + $post_meta = array(); |
|
| 1763 | + |
|
| 1764 | + /// Restaurants ////post start 10// |
|
| 1765 | + $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
| 1766 | + $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
| 1767 | + $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
| 1768 | + $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
| 1769 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
| 1770 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
| 1771 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
| 1772 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
| 1773 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
| 1774 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
| 1775 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
| 1776 | + |
|
| 1777 | + $post_info[] = array( |
|
| 1778 | + "listing_type" => 'gd_place', |
|
| 1779 | + "post_title" => 'Buddakan', |
|
| 1780 | + "post_desc" => ' |
|
| 1781 | 1781 | <h3>The Experience </h3> |
| 1782 | 1782 | |
| 1783 | 1783 | A towering gilded statue of the Buddha generates elegant calm in this 175-seat, Pan Asian restaurant with sleek, modern decor. Immensely popular, Buddakan is a restaurant that is great for both large parties and intimate dinners. |
@@ -1788,86 +1788,86 @@ discard block |
||
| 1788 | 1788 | |
| 1789 | 1789 | Be sure to make your reservation before coming to town as Buddakan fills up quickly especially on weekends. Better yet, make your reservation right now . |
| 1790 | 1790 | ', |
| 1791 | - "post_images" => $image_array, |
|
| 1792 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
|
|
| 1793 | - "post_tags" => array('America'),
|
|
| 1794 | - "geodir_video" => '', |
|
| 1795 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1796 | - "geodir_contact" => '(000) 111-2222', |
|
| 1797 | - "geodir_email" => '[email protected]', |
|
| 1798 | - "geodir_website" => 'http://www.buddakan.com/', |
|
| 1799 | - "geodir_twitter" => 'http://twitter.com/buddakan', |
|
| 1800 | - "geodir_facebook" => 'http://facebook.com/buddakan', |
|
| 1801 | - "post_dummy" => '1' |
|
| 1802 | - ); |
|
| 1803 | - break; |
|
| 1804 | - |
|
| 1805 | - ////post end/// |
|
| 1806 | - /// Restaurants ////post start 10/// |
|
| 1791 | + "post_images" => $image_array, |
|
| 1792 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
|
|
| 1793 | + "post_tags" => array('America'),
|
|
| 1794 | + "geodir_video" => '', |
|
| 1795 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
| 1796 | + "geodir_contact" => '(000) 111-2222', |
|
| 1797 | + "geodir_email" => '[email protected]', |
|
| 1798 | + "geodir_website" => 'http://www.buddakan.com/', |
|
| 1799 | + "geodir_twitter" => 'http://twitter.com/buddakan', |
|
| 1800 | + "geodir_facebook" => 'http://facebook.com/buddakan', |
|
| 1801 | + "post_dummy" => '1' |
|
| 1802 | + ); |
|
| 1803 | + break; |
|
| 1804 | + |
|
| 1805 | + ////post end/// |
|
| 1806 | + /// Restaurants ////post start 10/// |
|
| 1807 | 1807 | } // end of switch |
| 1808 | 1808 | |
| 1809 | 1809 | |
| 1810 | 1810 | foreach ($post_info as $post_info) {
|
| 1811 | - $default_location = geodir_get_default_location(); |
|
| 1812 | - if ($city_bound_lat1 > $city_bound_lat2) |
|
| 1813 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
| 1814 | - else |
|
| 1815 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
| 1811 | + $default_location = geodir_get_default_location(); |
|
| 1812 | + if ($city_bound_lat1 > $city_bound_lat2) |
|
| 1813 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
| 1814 | + else |
|
| 1815 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
| 1816 | 1816 | |
| 1817 | 1817 | |
| 1818 | - if ($city_bound_lng1 > $city_bound_lng2) |
|
| 1819 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
| 1820 | - else |
|
| 1821 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
| 1818 | + if ($city_bound_lng1 > $city_bound_lng2) |
|
| 1819 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
| 1820 | + else |
|
| 1821 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
| 1822 | 1822 | |
| 1823 | - $load_map = get_option('geodir_load_map');
|
|
| 1823 | + $load_map = get_option('geodir_load_map');
|
|
| 1824 | 1824 | |
| 1825 | - if ($load_map == 'osm') {
|
|
| 1826 | - $post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
| 1827 | - } else {
|
|
| 1828 | - $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
| 1829 | - } |
|
| 1830 | - |
|
| 1831 | - $postal_code = ''; |
|
| 1832 | - if (!empty($post_address)) {
|
|
| 1833 | - if ($load_map == 'osm') {
|
|
| 1834 | - $address = !empty($post_address->formatted_address) ? $post_address->formatted_address : ''; |
|
| 1835 | - $postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : ''; |
|
| 1836 | - } else {
|
|
| 1837 | - $addresses = array(); |
|
| 1838 | - $addresses_default = array(); |
|
| 1825 | + if ($load_map == 'osm') {
|
|
| 1826 | + $post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
| 1827 | + } else {
|
|
| 1828 | + $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
| 1829 | + } |
|
| 1830 | + |
|
| 1831 | + $postal_code = ''; |
|
| 1832 | + if (!empty($post_address)) {
|
|
| 1833 | + if ($load_map == 'osm') {
|
|
| 1834 | + $address = !empty($post_address->formatted_address) ? $post_address->formatted_address : ''; |
|
| 1835 | + $postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : ''; |
|
| 1836 | + } else {
|
|
| 1837 | + $addresses = array(); |
|
| 1838 | + $addresses_default = array(); |
|
| 1839 | 1839 | |
| 1840 | - foreach ($post_address as $add_key => $add_value) {
|
|
| 1841 | - if ($add_key < 2 && !empty($add_value->long_name)) {
|
|
| 1842 | - $addresses_default[] = $add_value->long_name; |
|
| 1843 | - } |
|
| 1844 | - if ($add_value->types[0] == 'postal_code') {
|
|
| 1845 | - $postal_code = $add_value->long_name; |
|
| 1846 | - } |
|
| 1847 | - if ($add_value->types[0] == 'street_number') {
|
|
| 1848 | - $addresses[] = $add_value->long_name; |
|
| 1849 | - } |
|
| 1850 | - if ($add_value->types[0] == 'route') {
|
|
| 1851 | - $addresses[] = $add_value->long_name; |
|
| 1852 | - } |
|
| 1853 | - if ($add_value->types[0] == 'neighborhood') {
|
|
| 1854 | - $addresses[] = $add_value->long_name; |
|
| 1855 | - } |
|
| 1856 | - if ($add_value->types[0] == 'sublocality') {
|
|
| 1857 | - $addresses[] = $add_value->long_name; |
|
| 1858 | - } |
|
| 1859 | - } |
|
| 1860 | - $address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : '');
|
|
| 1861 | - } |
|
| 1862 | - |
|
| 1863 | - $post_info['post_address'] = !empty($address) ? $address : $default_location->city; |
|
| 1864 | - $post_info['post_city'] = $default_location->city; |
|
| 1865 | - $post_info['post_region'] = $default_location->region; |
|
| 1866 | - $post_info['post_country'] = $default_location->country; |
|
| 1867 | - $post_info['post_zip'] = $postal_code; |
|
| 1868 | - $post_info['post_latitude'] = $dummy_post_latitude; |
|
| 1869 | - $post_info['post_longitude'] = $dummy_post_longitude; |
|
| 1870 | - } |
|
| 1840 | + foreach ($post_address as $add_key => $add_value) {
|
|
| 1841 | + if ($add_key < 2 && !empty($add_value->long_name)) {
|
|
| 1842 | + $addresses_default[] = $add_value->long_name; |
|
| 1843 | + } |
|
| 1844 | + if ($add_value->types[0] == 'postal_code') {
|
|
| 1845 | + $postal_code = $add_value->long_name; |
|
| 1846 | + } |
|
| 1847 | + if ($add_value->types[0] == 'street_number') {
|
|
| 1848 | + $addresses[] = $add_value->long_name; |
|
| 1849 | + } |
|
| 1850 | + if ($add_value->types[0] == 'route') {
|
|
| 1851 | + $addresses[] = $add_value->long_name; |
|
| 1852 | + } |
|
| 1853 | + if ($add_value->types[0] == 'neighborhood') {
|
|
| 1854 | + $addresses[] = $add_value->long_name; |
|
| 1855 | + } |
|
| 1856 | + if ($add_value->types[0] == 'sublocality') {
|
|
| 1857 | + $addresses[] = $add_value->long_name; |
|
| 1858 | + } |
|
| 1859 | + } |
|
| 1860 | + $address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : '');
|
|
| 1861 | + } |
|
| 1862 | + |
|
| 1863 | + $post_info['post_address'] = !empty($address) ? $address : $default_location->city; |
|
| 1864 | + $post_info['post_city'] = $default_location->city; |
|
| 1865 | + $post_info['post_region'] = $default_location->region; |
|
| 1866 | + $post_info['post_country'] = $default_location->country; |
|
| 1867 | + $post_info['post_zip'] = $postal_code; |
|
| 1868 | + $post_info['post_latitude'] = $dummy_post_latitude; |
|
| 1869 | + $post_info['post_longitude'] = $dummy_post_longitude; |
|
| 1870 | + } |
|
| 1871 | 1871 | |
| 1872 | - geodir_save_listing($post_info, true); |
|
| 1872 | + geodir_save_listing($post_info, true); |
|
| 1873 | 1873 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $post_meta = array(); |
| 13 | 13 | |
| 14 | 14 | if (geodir_dummy_folder_exists()) |
| 15 | - $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
| 15 | + $dummy_image_url = geodir_plugin_url()."/geodirectory-admin/dummy"; |
|
| 16 | 16 | else |
| 17 | 17 | $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
| 18 | 18 | |
@@ -11,10 +11,11 @@ discard block |
||
| 11 | 11 | $image_array = array(); |
| 12 | 12 | $post_meta = array(); |
| 13 | 13 | |
| 14 | -if (geodir_dummy_folder_exists()) |
|
| 15 | - $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
| 16 | -else |
|
| 17 | - $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
| 14 | +if (geodir_dummy_folder_exists()) { |
|
| 15 | + $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
| 16 | +} else { |
|
| 17 | + $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
| 18 | +} |
|
| 18 | 19 | |
| 19 | 20 | $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url);
|
| 20 | 21 | |
@@ -1809,16 +1810,18 @@ discard block |
||
| 1809 | 1810 | |
| 1810 | 1811 | foreach ($post_info as $post_info) {
|
| 1811 | 1812 | $default_location = geodir_get_default_location(); |
| 1812 | - if ($city_bound_lat1 > $city_bound_lat2) |
|
| 1813 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
| 1814 | - else |
|
| 1815 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
| 1816 | - |
|
| 1817 | - |
|
| 1818 | - if ($city_bound_lng1 > $city_bound_lng2) |
|
| 1819 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
| 1820 | - else |
|
| 1821 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
| 1813 | + if ($city_bound_lat1 > $city_bound_lat2) { |
|
| 1814 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
| 1815 | + } else { |
|
| 1816 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
| 1817 | + } |
|
| 1818 | + |
|
| 1819 | + |
|
| 1820 | + if ($city_bound_lng1 > $city_bound_lng2) { |
|
| 1821 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
| 1822 | + } else { |
|
| 1823 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
| 1824 | + } |
|
| 1822 | 1825 | |
| 1823 | 1826 | $load_map = get_option('geodir_load_map');
|
| 1824 | 1827 | |