Passed
Pull Request — master (#220)
by Viruthagiri
11:11
created
geodirectory-admin/admin_db_install.php 1 patch
Indentation   +295 added lines, -295 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@  discard block
 block discarded – undo
6 6
  * @package GeoDirectory
7 7
  */
8 8
 if (!function_exists('geodir_create_tables')) {
9
-    /**
10
-     * Creates custom db tables for storing GeoDirectory plugin data.
11
-     *
12
-     * @since 1.0.0
13
-     * @package GeoDirectory
14
-     * @global object $wpdb WordPress Database object.
15
-     * @global string $plugin_prefix GeoDirectory plugin table prefix.
16
-     */
17
-    function geodir_create_tables()
18
-    {
19
-
20
-        global $wpdb, $plugin_prefix;
21
-
22
-        $wpdb->hide_errors();
23
-
24
-        $collate = '';
25
-        if ($wpdb->has_cap('collation')) {
26
-            if (!empty($wpdb->charset)) $collate = "DEFAULT CHARACTER SET $wpdb->charset";
27
-            if (!empty($wpdb->collate)) $collate .= " COLLATE $wpdb->collate";
28
-        }
9
+	/**
10
+	 * Creates custom db tables for storing GeoDirectory plugin data.
11
+	 *
12
+	 * @since 1.0.0
13
+	 * @package GeoDirectory
14
+	 * @global object $wpdb WordPress Database object.
15
+	 * @global string $plugin_prefix GeoDirectory plugin table prefix.
16
+	 */
17
+	function geodir_create_tables()
18
+	{
19
+
20
+		global $wpdb, $plugin_prefix;
21
+
22
+		$wpdb->hide_errors();
23
+
24
+		$collate = '';
25
+		if ($wpdb->has_cap('collation')) {
26
+			if (!empty($wpdb->charset)) $collate = "DEFAULT CHARACTER SET $wpdb->charset";
27
+			if (!empty($wpdb->collate)) $collate .= " COLLATE $wpdb->collate";
28
+		}
29 29
 
30 30
 		/**
31 31
 		 * Include any functions needed for upgrades.
@@ -36,31 +36,31 @@  discard block
 block discarded – undo
36 36
 
37 37
 
38 38
 // rename tables if we need to
39
-        if ($wpdb->query("SHOW TABLES LIKE 'geodir_countries'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_countries'") == 0) {
40
-            $wpdb->query("RENAME TABLE geodir_countries TO " . $wpdb->prefix . "geodir_countries");
41
-        }
42
-        if ($wpdb->query("SHOW TABLES LIKE 'geodir_custom_fields'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_custom_fields'") == 0) {
43
-            $wpdb->query("RENAME TABLE geodir_custom_fields TO " . $wpdb->prefix . "geodir_custom_fields");
44
-        }
45
-        if ($wpdb->query("SHOW TABLES LIKE 'geodir_post_icon'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_post_icon'") == 0) {
46
-            $wpdb->query("RENAME TABLE geodir_post_icon TO " . $wpdb->prefix . "geodir_post_icon");
47
-        }
48
-        if ($wpdb->query("SHOW TABLES LIKE 'geodir_attachments'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_attachments'") == 0) {
49
-            $wpdb->query("RENAME TABLE geodir_attachments TO " . $wpdb->prefix . "geodir_attachments");
50
-        }
51
-        if ($wpdb->query("SHOW TABLES LIKE 'geodir_post_review'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_post_review'") == 0) {
52
-            $wpdb->query("RENAME TABLE geodir_post_review TO " . $wpdb->prefix . "geodir_post_review");
53
-        }
54
-        if ($wpdb->query("SHOW TABLES LIKE 'geodir_custom_sort_fields'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_custom_sort_fields'") == 0) {
55
-            $wpdb->query("RENAME TABLE geodir_custom_sort_fields TO " . $wpdb->prefix . "geodir_custom_sort_fields");
56
-        }
57
-        if ($wpdb->query("SHOW TABLES LIKE 'geodir_gd_place_detail'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_gd_place_detail'") == 0) {
58
-            $wpdb->query("RENAME TABLE geodir_gd_place_detail TO " . $wpdb->prefix . "geodir_gd_place_detail");
59
-        }
60
-
61
-
62
-        // Table for storing Countries
63
-        $GEODIR_COUNTRIES_TABLE = "CREATE TABLE " . GEODIR_COUNTRIES_TABLE . " (
39
+		if ($wpdb->query("SHOW TABLES LIKE 'geodir_countries'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_countries'") == 0) {
40
+			$wpdb->query("RENAME TABLE geodir_countries TO " . $wpdb->prefix . "geodir_countries");
41
+		}
42
+		if ($wpdb->query("SHOW TABLES LIKE 'geodir_custom_fields'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_custom_fields'") == 0) {
43
+			$wpdb->query("RENAME TABLE geodir_custom_fields TO " . $wpdb->prefix . "geodir_custom_fields");
44
+		}
45
+		if ($wpdb->query("SHOW TABLES LIKE 'geodir_post_icon'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_post_icon'") == 0) {
46
+			$wpdb->query("RENAME TABLE geodir_post_icon TO " . $wpdb->prefix . "geodir_post_icon");
47
+		}
48
+		if ($wpdb->query("SHOW TABLES LIKE 'geodir_attachments'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_attachments'") == 0) {
49
+			$wpdb->query("RENAME TABLE geodir_attachments TO " . $wpdb->prefix . "geodir_attachments");
50
+		}
51
+		if ($wpdb->query("SHOW TABLES LIKE 'geodir_post_review'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_post_review'") == 0) {
52
+			$wpdb->query("RENAME TABLE geodir_post_review TO " . $wpdb->prefix . "geodir_post_review");
53
+		}
54
+		if ($wpdb->query("SHOW TABLES LIKE 'geodir_custom_sort_fields'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_custom_sort_fields'") == 0) {
55
+			$wpdb->query("RENAME TABLE geodir_custom_sort_fields TO " . $wpdb->prefix . "geodir_custom_sort_fields");
56
+		}
57
+		if ($wpdb->query("SHOW TABLES LIKE 'geodir_gd_place_detail'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_gd_place_detail'") == 0) {
58
+			$wpdb->query("RENAME TABLE geodir_gd_place_detail TO " . $wpdb->prefix . "geodir_gd_place_detail");
59
+		}
60
+
61
+
62
+		// Table for storing Countries
63
+		$GEODIR_COUNTRIES_TABLE = "CREATE TABLE " . GEODIR_COUNTRIES_TABLE . " (
64 64
 						CountryId smallint AUTO_INCREMENT NOT NULL ,
65 65
 						Country varchar (50) NOT NULL ,
66 66
 						FIPS104 varchar (2) NOT NULL ,
@@ -79,21 +79,21 @@  discard block
 block discarded – undo
79 79
 						Comment varchar (255) NULL ,
80 80
 						PRIMARY KEY  (CountryId)) $collate ";
81 81
 
82
-        /**
83
-         * Filter the SQL query that creates/updates the country DB table structure.
84
-         *
85
-         * @since 1.0.0
86
-         * @param string $sql The SQL insert query string.
87
-         */
88
-        $GEODIR_COUNTRIES_TABLE = apply_filters('geodir_before_country_table_create', $GEODIR_COUNTRIES_TABLE);
89
-        dbDelta($GEODIR_COUNTRIES_TABLE);
82
+		/**
83
+		 * Filter the SQL query that creates/updates the country DB table structure.
84
+		 *
85
+		 * @since 1.0.0
86
+		 * @param string $sql The SQL insert query string.
87
+		 */
88
+		$GEODIR_COUNTRIES_TABLE = apply_filters('geodir_before_country_table_create', $GEODIR_COUNTRIES_TABLE);
89
+		dbDelta($GEODIR_COUNTRIES_TABLE);
90 90
 
91 91
 
92
-        $country_table_empty = $wpdb->get_var("SELECT COUNT(CountryId) FROM " . GEODIR_COUNTRIES_TABLE . "");
92
+		$country_table_empty = $wpdb->get_var("SELECT COUNT(CountryId) FROM " . GEODIR_COUNTRIES_TABLE . "");
93 93
 
94
-        if ($country_table_empty == 0) {
94
+		if ($country_table_empty == 0) {
95 95
 
96
-            $countries_insert = "INSERT INTO " . GEODIR_COUNTRIES_TABLE . " (`CountryId`, `Country`, `FIPS104`, `ISO2`, `ISO3`, `ISON`, `Internet`, `Capital`, `MapReference`, `NationalitySingular`, `NationalityPlural`, `Currency`, `CurrencyCode`, `Population`, `Title`, `COMMENT`) VALUES
96
+			$countries_insert = "INSERT INTO " . GEODIR_COUNTRIES_TABLE . " (`CountryId`, `Country`, `FIPS104`, `ISO2`, `ISO3`, `ISON`, `Internet`, `Capital`, `MapReference`, `NationalitySingular`, `NationalityPlural`, `Currency`, `CurrencyCode`, `Population`, `Title`, `COMMENT`) VALUES
97 97
 	(1, 'Afghanistan', 'AF', 'AF', 'AFG', '4', 'AF', 'Kabul ', 'Asia ', 'Afghan', 'Afghans', 'Afghani ', 'AFA', 26813057, 'Afghanistan', ''),
98 98
 	(2, 'Albania', 'AL', 'AL', 'ALB', '8', 'AL', 'Tirana ', 'Europe ', 'Albanian', 'Albanians', 'Lek ', 'ALL', 3510484, 'Albania', ''),
99 99
 	(3, 'Algeria', 'AG', 'DZ', 'DZA', '12', 'DZ', 'Algiers ', 'Africa ', 'Algerian', 'Algerians', 'Algerian Dinar ', 'DZD', 31736053, 'Algeria', ''),
@@ -367,21 +367,21 @@  discard block
 block discarded – undo
367 367
 	(276, 'Curaçao', 'UC', 'CW', 'CUW', '531', 'CW', 'Willemstad ', 'Central America and the Caribbean', 'Curaçaoan', 'Curaçaoans', 'Netherlands Antillean guilder', 'ANG', 152760, 'Curaçao', ''),
368 368
 	(277, 'Caribbean Netherlands', '--', 'BQ', 'BES', '535', 'BQ', '--', 'Central America and the Caribbean', '--', '--', 'United States dollar', 'USD', 21133, 'Caribbean Netherlands', '')";
369 369
 
370
-            /**
371
-             * Filter the SQL query that inserts the country DB table data.
372
-             *
373
-             * @since 1.0.0
374
-             * @param string $sql The SQL insert query string.
375
-             */
376
-            $countries_insert = apply_filters('geodir_before_country_data_insert', $countries_insert);
377
-            $wpdb->query($countries_insert);
370
+			/**
371
+			 * Filter the SQL query that inserts the country DB table data.
372
+			 *
373
+			 * @since 1.0.0
374
+			 * @param string $sql The SQL insert query string.
375
+			 */
376
+			$countries_insert = apply_filters('geodir_before_country_data_insert', $countries_insert);
377
+			$wpdb->query($countries_insert);
378 378
 
379
-        }
379
+		}
380 380
 
381 381
 
382
-        // Table for storing location attribute - these are user defined
382
+		// Table for storing location attribute - these are user defined
383 383
 
384
-        $icon_table = "CREATE TABLE " . GEODIR_ICON_TABLE . " (
384
+		$icon_table = "CREATE TABLE " . GEODIR_ICON_TABLE . " (
385 385
 						id int NOT NULL AUTO_INCREMENT,
386 386
 						post_id int( 10 ) NOT NULL,
387 387
 						post_title varchar(254) NOT NULL,
@@ -390,19 +390,19 @@  discard block
 block discarded – undo
390 390
 						PRIMARY KEY  (id)
391 391
 						) $collate ";
392 392
 
393
-        /**
394
-         * Filter the SQL query that creates/updates the post_icon DB table structure.
395
-         *
396
-         * @since 1.0.0
397
-         * @param string $sql The SQL insert query string.
398
-         */
399
-        $icon_table = apply_filters('geodir_before_icon_table_create', $icon_table);
393
+		/**
394
+		 * Filter the SQL query that creates/updates the post_icon DB table structure.
395
+		 *
396
+		 * @since 1.0.0
397
+		 * @param string $sql The SQL insert query string.
398
+		 */
399
+		$icon_table = apply_filters('geodir_before_icon_table_create', $icon_table);
400 400
 
401
-        dbDelta($icon_table);
401
+		dbDelta($icon_table);
402 402
 
403
-        // Table for storing post custom fields - these are user defined
403
+		// Table for storing post custom fields - these are user defined
404 404
 
405
-        $post_custom_fields = "CREATE TABLE " . GEODIR_CUSTOM_FIELDS_TABLE . " (
405
+		$post_custom_fields = "CREATE TABLE " . GEODIR_CUSTOM_FIELDS_TABLE . " (
406 406
 							  id int(11) NOT NULL AUTO_INCREMENT,
407 407
 							  post_type varchar(100) NULL,
408 408
 							  data_type varchar(100) NULL DEFAULT NULL,
@@ -436,18 +436,18 @@  discard block
 block discarded – undo
436 436
 							  PRIMARY KEY  (id)
437 437
 							  ) $collate";
438 438
 
439
-        /**
440
-         * Filter the SQL query that creates/updates the custom_fields DB table structure.
441
-         *
442
-         * @since 1.0.0
443
-         * @param string $sql The SQL insert query string.
444
-         */
445
-        $post_custom_fields = apply_filters('geodir_before_custom_field_table_create', $post_custom_fields);
439
+		/**
440
+		 * Filter the SQL query that creates/updates the custom_fields DB table structure.
441
+		 *
442
+		 * @since 1.0.0
443
+		 * @param string $sql The SQL insert query string.
444
+		 */
445
+		$post_custom_fields = apply_filters('geodir_before_custom_field_table_create', $post_custom_fields);
446 446
 
447
-        dbDelta($post_custom_fields);
447
+		dbDelta($post_custom_fields);
448 448
 
449
-        // Table for storing place attribute - these are user defined
450
-        $post_detail = "CREATE TABLE " . $plugin_prefix . "gd_place_detail (
449
+		// Table for storing place attribute - these are user defined
450
+		$post_detail = "CREATE TABLE " . $plugin_prefix . "gd_place_detail (
451 451
 						post_id int(11) NOT NULL,
452 452
 						post_title text NULL DEFAULT NULL,
453 453
 						post_status varchar(20) NULL DEFAULT NULL,
@@ -473,22 +473,22 @@  discard block
 block discarded – undo
473 473
 						PRIMARY KEY  (post_id)
474 474
 						) $collate ";
475 475
 
476
-        /**
477
-         * Filter the SQL query that creates/updates the post_detail DB table structure.
478
-         *
479
-         * @since 1.0.0
480
-         * @param string $sql The SQL insert query string.
481
-         */
482
-        $post_detail = apply_filters('geodir_before_post_detail_table_create', $post_detail);
476
+		/**
477
+		 * Filter the SQL query that creates/updates the post_detail DB table structure.
478
+		 *
479
+		 * @since 1.0.0
480
+		 * @param string $sql The SQL insert query string.
481
+		 */
482
+		$post_detail = apply_filters('geodir_before_post_detail_table_create', $post_detail);
483 483
 
484
-        dbDelta($post_detail);
484
+		dbDelta($post_detail);
485 485
 
486
-        // alter post_title
487
-        //$wpdb->query("ALTER TABLE ".$wpdb->prefix."geodir_gd_place_detail MODIFY `post_title` text NULL");
486
+		// alter post_title
487
+		//$wpdb->query("ALTER TABLE ".$wpdb->prefix."geodir_gd_place_detail MODIFY `post_title` text NULL");
488 488
 
489
-        // Table for storing place images - these are user defined
489
+		// Table for storing place images - these are user defined
490 490
 
491
-        $attechment_table = "CREATE TABLE " . GEODIR_ATTACHMENT_TABLE . " (
491
+		$attechment_table = "CREATE TABLE " . GEODIR_ATTACHMENT_TABLE . " (
492 492
 						ID int(11) NOT NULL AUTO_INCREMENT,
493 493
 						post_id int(11) NOT NULL,
494 494
 						user_id int(11) DEFAULT NULL,
@@ -504,18 +504,18 @@  discard block
 block discarded – undo
504 504
 						PRIMARY KEY  (ID)
505 505
 						) $collate ";
506 506
 
507
-        /**
508
-         * Filter the SQL query that creates/updates the attachments DB table structure.
509
-         *
510
-         * @since 1.0.0
511
-         * @param string $sql The SQL insert query string.
512
-         */
513
-        $attechment_table = apply_filters('geodir_before_attachment_table_create', $attechment_table);
507
+		/**
508
+		 * Filter the SQL query that creates/updates the attachments DB table structure.
509
+		 *
510
+		 * @since 1.0.0
511
+		 * @param string $sql The SQL insert query string.
512
+		 */
513
+		$attechment_table = apply_filters('geodir_before_attachment_table_create', $attechment_table);
514 514
 
515
-        dbDelta($attechment_table);
515
+		dbDelta($attechment_table);
516 516
 
517 517
 
518
-        $custom_sort_fields_table = "CREATE TABLE " . GEODIR_CUSTOM_SORT_FIELDS_TABLE . " (
518
+		$custom_sort_fields_table = "CREATE TABLE " . GEODIR_CUSTOM_SORT_FIELDS_TABLE . " (
519 519
 			id int(11) NOT NULL AUTO_INCREMENT,
520 520
 			post_type varchar(255) NOT NULL,
521 521
 			data_type varchar(255) NOT NULL,
@@ -533,18 +533,18 @@  discard block
 block discarded – undo
533 533
 			PRIMARY KEY  (id)
534 534
 			) $collate ";
535 535
 
536
-        /**
537
-         * Filter the SQL query that creates/updates the custom_sort_fields DB table structure.
538
-         *
539
-         * @since 1.0.0
540
-         * @param string $sql The SQL insert query string.
541
-         */
542
-        $custom_sort_fields_table = apply_filters('geodir_before_sort_fields_table_create', $custom_sort_fields_table);
536
+		/**
537
+		 * Filter the SQL query that creates/updates the custom_sort_fields DB table structure.
538
+		 *
539
+		 * @since 1.0.0
540
+		 * @param string $sql The SQL insert query string.
541
+		 */
542
+		$custom_sort_fields_table = apply_filters('geodir_before_sort_fields_table_create', $custom_sort_fields_table);
543 543
 
544
-        dbDelta($custom_sort_fields_table);
544
+		dbDelta($custom_sort_fields_table);
545 545
 
546 546
 
547
-            $review_table = "CREATE TABLE " . GEODIR_REVIEW_TABLE . " (
547
+			$review_table = "CREATE TABLE " . GEODIR_REVIEW_TABLE . " (
548 548
 			id int(11) NOT NULL AUTO_INCREMENT,
549 549
 			post_id int(11) DEFAULT NULL,
550 550
 			post_title varchar( 255 ) NULL DEFAULT NULL,
@@ -568,191 +568,191 @@  discard block
 block discarded – undo
568 568
 			PRIMARY KEY  (id)
569 569
 			) $collate  ";
570 570
 
571
-            /**
572
-             * Filter the SQL query that creates the review DB table structure.
573
-             *
574
-             * @since 1.0.0
575
-             * @param string $sql The SQL insert query string.
576
-             */
577
-            $review_table = apply_filters('geodir_before_review_table_create', $review_table);
578
-            dbDelta($review_table);
571
+			/**
572
+			 * Filter the SQL query that creates the review DB table structure.
573
+			 *
574
+			 * @since 1.0.0
575
+			 * @param string $sql The SQL insert query string.
576
+			 */
577
+			$review_table = apply_filters('geodir_before_review_table_create', $review_table);
578
+			dbDelta($review_table);
579 579
 
580 580
 
581 581
 
582
-        // Alter terms table
583
-        $term_icon_column = $wpdb->get_var("SHOW COLUMNS FROM $wpdb->terms where field='term_icon'");
584
-        if (!$term_icon_column) {
585
-            $wpdb->query("ALTER TABLE $wpdb->terms ADD `term_icon` TEXT NULL DEFAULT NULL");
586
-        }
582
+		// Alter terms table
583
+		$term_icon_column = $wpdb->get_var("SHOW COLUMNS FROM $wpdb->terms where field='term_icon'");
584
+		if (!$term_icon_column) {
585
+			$wpdb->query("ALTER TABLE $wpdb->terms ADD `term_icon` TEXT NULL DEFAULT NULL");
586
+		}
587 587
 
588
-        //require_once(geodir_plugin_path() . '/upgrade.php');
588
+		//require_once(geodir_plugin_path() . '/upgrade.php');
589 589
 
590 590
 
591
-    }
591
+	}
592 592
 } // END MAIN FUNCTION geodir_tables_install
593 593
 
594 594
 if (!function_exists('geodir_create_default_fields')) {
595
-    /**
596
-     * Inserts default custom fields table data into database.
597
-     *
598
-     * @since 1.0.0
599
-     * @package GeoDirectory
600
-     */
601
-    function geodir_create_default_fields()
602
-    {
603
-
604
-        $fields = array();
605
-
606
-        $fields[] = array('listing_type' => 'gd_place',
607
-            'data_type' => 'VARCHAR',
608
-            'field_type' => 'taxonomy',
609
-            'admin_title' => __('Category', 'geodirectory'),
610
-            'admin_desc' => __('SELECT listing category FROM here. SELECT at least one CATEGORY', 'geodirectory'),
611
-            'site_title' => __('Category', 'geodirectory'),
612
-            'htmlvar_name' => 'gd_placecategory',
613
-            'default_value' => '',
614
-            'is_default' => '1',
615
-            'is_admin' => '1',
616
-            'is_required' => '1',
617
-            'clabels' => __('Category', 'geodirectory'));
618
-
619
-        $fields[] = array('listing_type' => 'gd_place',
620
-            'data_type' => 'VARCHAR',
621
-            'field_type' => 'address',
622
-            'admin_title' => __('Address', 'geodirectory'),
623
-            'admin_desc' => ADDRESS_MSG,
624
-            'site_title' => __('Address', 'geodirectory'),
625
-            'htmlvar_name' => 'post',
626
-            'default_value' => '',
627
-            'option_values' => '',
628
-            'is_default' => '1',
629
-            'is_admin' => '1',
630
-            'is_required' => '1',
631
-            'required_msg' => __('Address fields are required', 'geodirectory'),
632
-            'clabels' => __('Address', 'geodirectory'),
633
-            'extra' => array('show_city' => 1, 'city_lable' => __('City', 'geodirectory'),
634
-                'show_region' => 1, 'region_lable' => __('Region', 'geodirectory'),
635
-                'show_country' => 1, 'country_lable' => __('Country', 'geodirectory'),
636
-                'show_zip' => 1, 'zip_lable' => __('Zip/Post Code', 'geodirectory'),
637
-                'show_map' => 1, 'map_lable' => __('Set Address On Map', 'geodirectory'),
638
-                'show_mapview' => 1, 'mapview_lable' => __('Select Map View', 'geodirectory'),
639
-                'show_mapzoom' => 1, 'mapzoom_lable' => 'hidden',
640
-                'show_latlng' => 1));
641
-
642
-        $fields[] = array('listing_type' => 'gd_place',
643
-            'data_type' => 'VARCHAR',
644
-            'field_type' => 'text',
645
-            'admin_title' => __('Time', 'geodirectory'),
646
-            'admin_desc' => __('Enter Business or Listing Timing Information.<br/>eg. : 10.00 am to 6 pm every day', 'geodirectory'),
647
-            'site_title' => __('Time', 'geodirectory'),
648
-            'htmlvar_name' => 'timing',
649
-            'default_value' => '',
650
-            'option_values' => '',
651
-            'is_default' => '1',
652
-            'is_admin' => '1',
653
-            'clabels' => __('Time', 'geodirectory'));
654
-
655
-        $fields[] = array('listing_type' => 'gd_place',
656
-            'data_type' => 'VARCHAR',
657
-            'field_type' => 'phone',
658
-            'admin_title' => __('Phone', 'geodirectory'),
659
-            'admin_desc' => __('You can enter phone number,cell phone number etc.', 'geodirectory'),
660
-            'site_title' => __('Phone', 'geodirectory'),
661
-            'htmlvar_name' => 'contact',
662
-            'default_value' => '',
663
-            'option_values' => '',
664
-            'is_default' => '1',
665
-            'is_admin' => '1',
666
-            'clabels' => __('Phone', 'geodirectory'));
667
-
668
-        $fields[] = array('listing_type' => 'gd_place',
669
-            'data_type' => 'VARCHAR',
670
-            'field_type' => 'email',
671
-            'admin_title' => __('Email', 'geodirectory'),
672
-            'admin_desc' => __('You can enter your business or listing email.', 'geodirectory'),
673
-            'site_title' => __('Email', 'geodirectory'),
674
-            'htmlvar_name' => 'email',
675
-            'default_value' => '',
676
-            'option_values' => '',
677
-            'is_default' => '1',
678
-            'is_admin' => '1',
679
-            'clabels' => __('Email', 'geodirectory'));
680
-
681
-        $fields[] = array('listing_type' => 'gd_place',
682
-            'data_type' => 'VARCHAR',
683
-            'field_type' => 'url',
684
-            'admin_title' => __('Website', 'geodirectory'),
685
-            'admin_desc' => __('You can enter your business or listing website.', 'geodirectory'),
686
-            'site_title' => __('Website', 'geodirectory'),
687
-            'htmlvar_name' => 'website',
688
-            'default_value' => '',
689
-            'option_values' => '',
690
-            'is_default' => '1',
691
-            'is_admin' => '1',
692
-            'clabels' => __('Website', 'geodirectory'));
693
-
694
-        $fields[] = array('listing_type' => 'gd_place',
695
-            'data_type' => 'VARCHAR',
696
-            'field_type' => 'url',
697
-            'admin_title' => __('Twitter', 'geodirectory'),
698
-            'admin_desc' => __('You can enter your business or listing twitter url.', 'geodirectory'),
699
-            'site_title' => __('Twitter', 'geodirectory'),
700
-            'htmlvar_name' => 'twitter',
701
-            'default_value' => '',
702
-            'option_values' => '',
703
-            'is_default' => '1',
704
-            'is_admin' => '1',
705
-            'clabels' => __('Twitter', 'geodirectory'));
706
-
707
-        $fields[] = array('listing_type' => 'gd_place',
708
-            'data_type' => 'VARCHAR',
709
-            'field_type' => 'url',
710
-            'admin_title' => __('Facebook', 'geodirectory'),
711
-            'admin_desc' => __('You can enter your business or listing facebook url.', 'geodirectory'),
712
-            'site_title' => __('Facebook', 'geodirectory'),
713
-            'htmlvar_name' => 'facebook',
714
-            'default_value' => '',
715
-            'option_values' => '',
716
-            'is_default' => '1',
717
-            'is_admin' => '1',
718
-            'clabels' => __('Facebook', 'geodirectory'));
719
-
720
-        $fields[] = array('listing_type' => 'gd_place',
721
-            'data_type' => 'TEXT',
722
-            'field_type' => 'textarea',
723
-            'admin_title' => __('Video', 'geodirectory'),
724
-            'admin_desc' => __('Add video code here, YouTube etc.', 'geodirectory'),
725
-            'site_title' => __('Video', 'geodirectory'),
726
-            'htmlvar_name' => 'video',
727
-            'default_value' => '',
728
-            'option_values' => '',
729
-            'is_default' => '0',
730
-            'is_admin' => '1',
731
-            'clabels' => __('Video', 'geodirectory'));
732
-
733
-        $fields[] = array('listing_type' => 'gd_place',
734
-            'data_type' => 'TEXT',
735
-            'field_type' => 'textarea',
736
-            'admin_title' => __('Special Offers', 'geodirectory'),
737
-            'admin_desc' => __('Note: List out any special offers (optional)', 'geodirectory'),
738
-            'site_title' => __('Special Offers', 'geodirectory'),
739
-            'htmlvar_name' => 'special_offers',
740
-            'default_value' => '',
741
-            'option_values' => '',
742
-            'is_default' => '0',
743
-            'is_admin' => '1',
744
-            'clabels' => __('Special Offers', 'geodirectory'));
745
-
746
-        /**
747
-         * Filter the array of default custom fields DB table data.
748
-         *
749
-         * @since 1.0.0
750
-         * @param string $fields The default custom fields as an array.
751
-         */
752
-        $fields = apply_filters('geodir_before_default_custom_fields_saved', $fields);
753
-        foreach ($fields as $field_index => $field) {
754
-            geodir_custom_field_save($field);
755
-
756
-        }
757
-    }
595
+	/**
596
+	 * Inserts default custom fields table data into database.
597
+	 *
598
+	 * @since 1.0.0
599
+	 * @package GeoDirectory
600
+	 */
601
+	function geodir_create_default_fields()
602
+	{
603
+
604
+		$fields = array();
605
+
606
+		$fields[] = array('listing_type' => 'gd_place',
607
+			'data_type' => 'VARCHAR',
608
+			'field_type' => 'taxonomy',
609
+			'admin_title' => __('Category', 'geodirectory'),
610
+			'admin_desc' => __('SELECT listing category FROM here. SELECT at least one CATEGORY', 'geodirectory'),
611
+			'site_title' => __('Category', 'geodirectory'),
612
+			'htmlvar_name' => 'gd_placecategory',
613
+			'default_value' => '',
614
+			'is_default' => '1',
615
+			'is_admin' => '1',
616
+			'is_required' => '1',
617
+			'clabels' => __('Category', 'geodirectory'));
618
+
619
+		$fields[] = array('listing_type' => 'gd_place',
620
+			'data_type' => 'VARCHAR',
621
+			'field_type' => 'address',
622
+			'admin_title' => __('Address', 'geodirectory'),
623
+			'admin_desc' => ADDRESS_MSG,
624
+			'site_title' => __('Address', 'geodirectory'),
625
+			'htmlvar_name' => 'post',
626
+			'default_value' => '',
627
+			'option_values' => '',
628
+			'is_default' => '1',
629
+			'is_admin' => '1',
630
+			'is_required' => '1',
631
+			'required_msg' => __('Address fields are required', 'geodirectory'),
632
+			'clabels' => __('Address', 'geodirectory'),
633
+			'extra' => array('show_city' => 1, 'city_lable' => __('City', 'geodirectory'),
634
+				'show_region' => 1, 'region_lable' => __('Region', 'geodirectory'),
635
+				'show_country' => 1, 'country_lable' => __('Country', 'geodirectory'),
636
+				'show_zip' => 1, 'zip_lable' => __('Zip/Post Code', 'geodirectory'),
637
+				'show_map' => 1, 'map_lable' => __('Set Address On Map', 'geodirectory'),
638
+				'show_mapview' => 1, 'mapview_lable' => __('Select Map View', 'geodirectory'),
639
+				'show_mapzoom' => 1, 'mapzoom_lable' => 'hidden',
640
+				'show_latlng' => 1));
641
+
642
+		$fields[] = array('listing_type' => 'gd_place',
643
+			'data_type' => 'VARCHAR',
644
+			'field_type' => 'text',
645
+			'admin_title' => __('Time', 'geodirectory'),
646
+			'admin_desc' => __('Enter Business or Listing Timing Information.<br/>eg. : 10.00 am to 6 pm every day', 'geodirectory'),
647
+			'site_title' => __('Time', 'geodirectory'),
648
+			'htmlvar_name' => 'timing',
649
+			'default_value' => '',
650
+			'option_values' => '',
651
+			'is_default' => '1',
652
+			'is_admin' => '1',
653
+			'clabels' => __('Time', 'geodirectory'));
654
+
655
+		$fields[] = array('listing_type' => 'gd_place',
656
+			'data_type' => 'VARCHAR',
657
+			'field_type' => 'phone',
658
+			'admin_title' => __('Phone', 'geodirectory'),
659
+			'admin_desc' => __('You can enter phone number,cell phone number etc.', 'geodirectory'),
660
+			'site_title' => __('Phone', 'geodirectory'),
661
+			'htmlvar_name' => 'contact',
662
+			'default_value' => '',
663
+			'option_values' => '',
664
+			'is_default' => '1',
665
+			'is_admin' => '1',
666
+			'clabels' => __('Phone', 'geodirectory'));
667
+
668
+		$fields[] = array('listing_type' => 'gd_place',
669
+			'data_type' => 'VARCHAR',
670
+			'field_type' => 'email',
671
+			'admin_title' => __('Email', 'geodirectory'),
672
+			'admin_desc' => __('You can enter your business or listing email.', 'geodirectory'),
673
+			'site_title' => __('Email', 'geodirectory'),
674
+			'htmlvar_name' => 'email',
675
+			'default_value' => '',
676
+			'option_values' => '',
677
+			'is_default' => '1',
678
+			'is_admin' => '1',
679
+			'clabels' => __('Email', 'geodirectory'));
680
+
681
+		$fields[] = array('listing_type' => 'gd_place',
682
+			'data_type' => 'VARCHAR',
683
+			'field_type' => 'url',
684
+			'admin_title' => __('Website', 'geodirectory'),
685
+			'admin_desc' => __('You can enter your business or listing website.', 'geodirectory'),
686
+			'site_title' => __('Website', 'geodirectory'),
687
+			'htmlvar_name' => 'website',
688
+			'default_value' => '',
689
+			'option_values' => '',
690
+			'is_default' => '1',
691
+			'is_admin' => '1',
692
+			'clabels' => __('Website', 'geodirectory'));
693
+
694
+		$fields[] = array('listing_type' => 'gd_place',
695
+			'data_type' => 'VARCHAR',
696
+			'field_type' => 'url',
697
+			'admin_title' => __('Twitter', 'geodirectory'),
698
+			'admin_desc' => __('You can enter your business or listing twitter url.', 'geodirectory'),
699
+			'site_title' => __('Twitter', 'geodirectory'),
700
+			'htmlvar_name' => 'twitter',
701
+			'default_value' => '',
702
+			'option_values' => '',
703
+			'is_default' => '1',
704
+			'is_admin' => '1',
705
+			'clabels' => __('Twitter', 'geodirectory'));
706
+
707
+		$fields[] = array('listing_type' => 'gd_place',
708
+			'data_type' => 'VARCHAR',
709
+			'field_type' => 'url',
710
+			'admin_title' => __('Facebook', 'geodirectory'),
711
+			'admin_desc' => __('You can enter your business or listing facebook url.', 'geodirectory'),
712
+			'site_title' => __('Facebook', 'geodirectory'),
713
+			'htmlvar_name' => 'facebook',
714
+			'default_value' => '',
715
+			'option_values' => '',
716
+			'is_default' => '1',
717
+			'is_admin' => '1',
718
+			'clabels' => __('Facebook', 'geodirectory'));
719
+
720
+		$fields[] = array('listing_type' => 'gd_place',
721
+			'data_type' => 'TEXT',
722
+			'field_type' => 'textarea',
723
+			'admin_title' => __('Video', 'geodirectory'),
724
+			'admin_desc' => __('Add video code here, YouTube etc.', 'geodirectory'),
725
+			'site_title' => __('Video', 'geodirectory'),
726
+			'htmlvar_name' => 'video',
727
+			'default_value' => '',
728
+			'option_values' => '',
729
+			'is_default' => '0',
730
+			'is_admin' => '1',
731
+			'clabels' => __('Video', 'geodirectory'));
732
+
733
+		$fields[] = array('listing_type' => 'gd_place',
734
+			'data_type' => 'TEXT',
735
+			'field_type' => 'textarea',
736
+			'admin_title' => __('Special Offers', 'geodirectory'),
737
+			'admin_desc' => __('Note: List out any special offers (optional)', 'geodirectory'),
738
+			'site_title' => __('Special Offers', 'geodirectory'),
739
+			'htmlvar_name' => 'special_offers',
740
+			'default_value' => '',
741
+			'option_values' => '',
742
+			'is_default' => '0',
743
+			'is_admin' => '1',
744
+			'clabels' => __('Special Offers', 'geodirectory'));
745
+
746
+		/**
747
+		 * Filter the array of default custom fields DB table data.
748
+		 *
749
+		 * @since 1.0.0
750
+		 * @param string $fields The default custom fields as an array.
751
+		 */
752
+		$fields = apply_filters('geodir_before_default_custom_fields_saved', $fields);
753
+		foreach ($fields as $field_index => $field) {
754
+			geodir_custom_field_save($field);
755
+
756
+		}
757
+	}
758 758
 }
759 759
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-admin/option-pages/notifications_settings_array.php 1 patch
Indentation   +257 added lines, -257 removed lines patch added patch discarded remove patch
@@ -17,262 +17,262 @@
 block discarded – undo
17 17
 $geodir_settings['notifications_settings'] = apply_filters('geodir_notifications_settings', array(
18 18
 
19 19
 
20
-    array('name' => __('Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'notification_options'),
21
-
22
-
23
-    array('name' => __('Notification Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'notification_options'),
24
-
25
-    array(
26
-        'name' => __('List of usable shortcodes', 'geodirectory'),
27
-        'desc' => __('[#client_name#],[#listing_link#],[#posted_date#],[#number_of_days#],[#number_of_grace_days#],[#login_url#],[#username#],[#user_email#],[#site_name_url#],[#renew_link#],[#post_id#],[#site_name#],[#from_email#](in most cases this will be the admin email, except for popup forms)', 'geodirectory'),
28
-        'id' => 'geodir_list_of_usable_shordcodes',
29
-        'type' => 'html_content',
30
-        'css' => 'min-width:300px;',
31
-        'std' => 'All Places' // Default value for the page title - changed in settings
32
-    ),
33
-
34
-    array(
35
-        'name' => __('Use advanced editor? (slow loading)', 'geodirectory'),
36
-        'desc' => __('Yes', 'geodirectory'),
37
-        'id' => 'geodir_tiny_editor',
38
-        'std' => 'yes',
39
-        'type' => 'radio',
40
-        'value' => '1',
41
-        'radiogroup' => 'start'
42
-    ),
43
-    array(
44
-        'name' => __('Use advanced editor?(slow loading)', 'geodirectory'),
45
-        'desc' => __('No', 'geodirectory'),
46
-        'id' => 'geodir_tiny_editor',
47
-        'std' => 'yes',
48
-        'type' => 'radio',
49
-        'value' => '0',
50
-        'radiogroup' => 'end'
51
-    ),
52
-
53
-
54
-    array('type' => 'sectionend', 'id' => 'notification_options'),
55
-
56
-
57
-    array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'site_bcc_options'),
58
-
59
-    array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'site_bcc_options'),
60
-
61
-    array(
62
-        'name' => __('New user registration', 'geodirectory'),
63
-        'desc' => __('Yes', 'geodirectory'),
64
-        'id' => 'geodir_bcc_new_user',
65
-        'std' => 'yes',
66
-        'type' => 'radio',
67
-        'value' => '1',
68
-        'radiogroup' => 'start'
69
-    ),
70
-    array(
71
-        'name' => __('New user registration', 'geodirectory'),
72
-        'desc' => __('No', 'geodirectory'),
73
-        'id' => 'geodir_bcc_new_user',
74
-        'std' => 'yes',
75
-        'type' => 'radio',
76
-        'value' => '0',
77
-        'radiogroup' => 'end'
78
-    ),
79
-
80
-    array(
81
-        'name' => __('Send to friend', 'geodirectory'),
82
-        'desc' => __('Yes', 'geodirectory'),
83
-        'id' => 'geodir_bcc_friend',
84
-        'std' => 'yes',
85
-        'type' => 'radio',
86
-        'value' => '1',
87
-        'radiogroup' => 'start'
88
-    ),
89
-    array(
90
-        'name' => __('Send to friend', 'geodirectory'),
91
-        'desc' => __('No', 'geodirectory'),
92
-        'id' => 'geodir_bcc_friend',
93
-        'std' => 'yes',
94
-        'type' => 'radio',
95
-        'value' => '0',
96
-        'radiogroup' => 'end'
97
-    ),
98
-
99
-    array(
100
-        'name' => __('Send enquiry', 'geodirectory'),
101
-        'desc' => __('Yes', 'geodirectory'),
102
-        'id' => 'geodir_bcc_enquiry',
103
-        'std' => 'yes',
104
-        'type' => 'radio',
105
-        'value' => '1',
106
-        'radiogroup' => 'start'
107
-    ),
108
-    array(
109
-        'name' => __('Send enquiry', 'geodirectory'),
110
-        'desc' => __('No', 'geodirectory'),
111
-        'id' => 'geodir_bcc_enquiry',
112
-        'std' => 'yes',
113
-        'type' => 'radio',
114
-        'value' => '0',
115
-        'radiogroup' => 'end'
116
-    ),
117
-
118
-
119
-    array('type' => 'sectionend', 'id' => 'site_bcc_options'),
120
-
121
-
122
-    array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'admin_emails'),
123
-
124
-    array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'admin_emails'),
125
-
126
-    array(
127
-        'name' => __('Post submit success to admin email', 'geodirectory'),
128
-        'desc' => '',
129
-        'id' => 'geodir_post_submited_success_email_subject_admin',
130
-        'type' => 'text',
131
-        'css' => 'min-width:300px;',
132
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
133
-    ),
134
-    array(
135
-        'name' => '',
136
-        'desc' => '',
137
-        'id' => 'geodir_post_submited_success_email_content_admin',
138
-        'css' => 'width:500px; height: 150px;',
139
-        'type' => 'textarea',
140
-        'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
141
-    ),
142
-
143
-
144
-    array('type' => 'sectionend', 'id' => 'admin_emails'),
145
-
146
-
147
-    array('name' => __('Client Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'client_emails'),
148
-
149
-    array('name' => __('Client Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'client_emails'),
150
-
151
-    array(
152
-        'name' => __('Post submit success to client email', 'geodirectory'),
153
-        'desc' => '',
154
-        'id' => 'geodir_post_submited_success_email_subject',
155
-        'type' => 'text',
156
-        'css' => 'min-width:300px;',
157
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
158
-    ),
159
-    array(
160
-        'name' => '',
161
-        'desc' => '',
162
-        'id' => 'geodir_post_submited_success_email_content',
163
-        'css' => 'width:500px; height: 150px;',
164
-        'type' => 'textarea',
165
-        'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
166
-    ),
167
-
168
-
169
-    array(
170
-        'name' => __('User forgot password email', 'geodirectory'),
171
-        'desc' => '',
172
-        'id' => 'geodir_forgot_password_subject',
173
-        'type' => 'text',
174
-        'css' => 'min-width:300px;',
175
-        'std' => __('[#site_name#] - Your new password', 'geodirectory') // Default value for the page title - changed in settings
176
-    ),
177
-    array(
178
-        'name' => '',
179
-        'desc' => '',
180
-        'id' => 'geodir_forgot_password_content',
181
-        'css' => 'width:500px; height: 150px;',
182
-        'type' => 'textarea',
183
-        'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
184
-    ),
185
-
186
-    array(
187
-        'name' => __('Registration success email', 'geodirectory'),
188
-        'desc' => '',
189
-        'id' => 'geodir_registration_success_email_subject',
190
-        'type' => 'text',
191
-        'css' => 'min-width:300px;',
192
-        'std' => __('Your Log In Details', 'geodirectory') // Default value for the page title - changed in settings
193
-    ),
194
-    array(
195
-        'name' => '',
196
-        'desc' => '',
197
-        'id' => 'geodir_registration_success_email_content',
198
-        'css' => 'width:500px; height: 150px;',
199
-        'type' => 'textarea',
200
-        'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
201
-    ),
202
-    array(
203
-        'name' => __('Listing published email', 'geodirectory'),
204
-        'desc' => '',
205
-        'id' => 'geodir_post_published_email_subject',
206
-        'type' => 'text',
207
-        'css' => 'min-width:300px;',
208
-        'std' => __('Listing Published Successfully', 'geodirectory') // Default value for the page title - changed in settings
209
-    ),
210
-    array(
211
-        'name' => '',
212
-        'desc' => '',
213
-        'id' => 'geodir_post_published_email_content',
214
-        'css' => 'width:500px; height: 150px;',
215
-        'type' => 'textarea',
216
-        'std' => __("<p>Dear [#client_name#],</p><p>Your listing [#listing_link#] has been published. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>", 'geodirectory')
217
-    ),
218
-
219
-    array('type' => 'sectionend', 'id' => 'client_emails'),
220
-
221
-    array('name' => __('Other Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'other_emails'),
222
-
223
-    array('name' => __('Other Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'other_emails'),
224
-
225
-    array(
226
-        'name' => __('Send to friend', 'geodirectory'),
227
-        'desc' => '',
228
-        'id' => 'geodir_email_friend_subject',
229
-        'type' => 'text',
230
-        'css' => 'min-width:300px;',
231
-        'std' => __('[#from_name#] thought you might be interested in..', 'geodirectory')
232
-    ),
233
-    array(
234
-        'name' => '',
235
-        'desc' => '',
236
-        'id' => 'geodir_email_friend_content',
237
-        'css' => 'width:500px; height: 150px;',
238
-        'type' => 'textarea',
239
-        'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
240
-    ),
241
-
242
-    array(
243
-        'name' => __('Email enquiry', 'geodirectory'),
244
-        'desc' => '',
245
-        'id' => 'geodir_email_enquiry_subject',
246
-        'type' => 'text',
247
-        'css' => 'min-width:300px;',
248
-        'std' => __('Website Enquiry', 'geodirectory')
249
-    ),
250
-    array(
251
-        'name' => '',
252
-        'desc' => '',
253
-        'id' => 'geodir_email_enquiry_content',
254
-        'css' => 'width:500px; height: 150px;',
255
-        'type' => 'textarea',
256
-        'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
257
-    ),
258
-
259
-    array('type' => 'sectionend', 'id' => 'other_emails'),
260
-
261
-
262
-    array('name' => __('Messages', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'messages'),
263
-
264
-    array('name' => __('Messages', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'messages'),
265
-
266
-    array(
267
-        'name' => __('Post submitted success', 'geodirectory'),
268
-        'desc' => '',
269
-        'id' => 'geodir_post_added_success_msg_content',
270
-        'css' => 'width:500px; height: 150px;',
271
-        'type' => 'textarea',
272
-        'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
273
-    ),
274
-
275
-
276
-    array('type' => 'sectionend', 'id' => 'messages'),
20
+	array('name' => __('Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'notification_options'),
21
+
22
+
23
+	array('name' => __('Notification Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'notification_options'),
24
+
25
+	array(
26
+		'name' => __('List of usable shortcodes', 'geodirectory'),
27
+		'desc' => __('[#client_name#],[#listing_link#],[#posted_date#],[#number_of_days#],[#number_of_grace_days#],[#login_url#],[#username#],[#user_email#],[#site_name_url#],[#renew_link#],[#post_id#],[#site_name#],[#from_email#](in most cases this will be the admin email, except for popup forms)', 'geodirectory'),
28
+		'id' => 'geodir_list_of_usable_shordcodes',
29
+		'type' => 'html_content',
30
+		'css' => 'min-width:300px;',
31
+		'std' => 'All Places' // Default value for the page title - changed in settings
32
+	),
33
+
34
+	array(
35
+		'name' => __('Use advanced editor? (slow loading)', 'geodirectory'),
36
+		'desc' => __('Yes', 'geodirectory'),
37
+		'id' => 'geodir_tiny_editor',
38
+		'std' => 'yes',
39
+		'type' => 'radio',
40
+		'value' => '1',
41
+		'radiogroup' => 'start'
42
+	),
43
+	array(
44
+		'name' => __('Use advanced editor?(slow loading)', 'geodirectory'),
45
+		'desc' => __('No', 'geodirectory'),
46
+		'id' => 'geodir_tiny_editor',
47
+		'std' => 'yes',
48
+		'type' => 'radio',
49
+		'value' => '0',
50
+		'radiogroup' => 'end'
51
+	),
52
+
53
+
54
+	array('type' => 'sectionend', 'id' => 'notification_options'),
55
+
56
+
57
+	array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'site_bcc_options'),
58
+
59
+	array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'site_bcc_options'),
60
+
61
+	array(
62
+		'name' => __('New user registration', 'geodirectory'),
63
+		'desc' => __('Yes', 'geodirectory'),
64
+		'id' => 'geodir_bcc_new_user',
65
+		'std' => 'yes',
66
+		'type' => 'radio',
67
+		'value' => '1',
68
+		'radiogroup' => 'start'
69
+	),
70
+	array(
71
+		'name' => __('New user registration', 'geodirectory'),
72
+		'desc' => __('No', 'geodirectory'),
73
+		'id' => 'geodir_bcc_new_user',
74
+		'std' => 'yes',
75
+		'type' => 'radio',
76
+		'value' => '0',
77
+		'radiogroup' => 'end'
78
+	),
79
+
80
+	array(
81
+		'name' => __('Send to friend', 'geodirectory'),
82
+		'desc' => __('Yes', 'geodirectory'),
83
+		'id' => 'geodir_bcc_friend',
84
+		'std' => 'yes',
85
+		'type' => 'radio',
86
+		'value' => '1',
87
+		'radiogroup' => 'start'
88
+	),
89
+	array(
90
+		'name' => __('Send to friend', 'geodirectory'),
91
+		'desc' => __('No', 'geodirectory'),
92
+		'id' => 'geodir_bcc_friend',
93
+		'std' => 'yes',
94
+		'type' => 'radio',
95
+		'value' => '0',
96
+		'radiogroup' => 'end'
97
+	),
98
+
99
+	array(
100
+		'name' => __('Send enquiry', 'geodirectory'),
101
+		'desc' => __('Yes', 'geodirectory'),
102
+		'id' => 'geodir_bcc_enquiry',
103
+		'std' => 'yes',
104
+		'type' => 'radio',
105
+		'value' => '1',
106
+		'radiogroup' => 'start'
107
+	),
108
+	array(
109
+		'name' => __('Send enquiry', 'geodirectory'),
110
+		'desc' => __('No', 'geodirectory'),
111
+		'id' => 'geodir_bcc_enquiry',
112
+		'std' => 'yes',
113
+		'type' => 'radio',
114
+		'value' => '0',
115
+		'radiogroup' => 'end'
116
+	),
117
+
118
+
119
+	array('type' => 'sectionend', 'id' => 'site_bcc_options'),
120
+
121
+
122
+	array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'admin_emails'),
123
+
124
+	array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'admin_emails'),
125
+
126
+	array(
127
+		'name' => __('Post submit success to admin email', 'geodirectory'),
128
+		'desc' => '',
129
+		'id' => 'geodir_post_submited_success_email_subject_admin',
130
+		'type' => 'text',
131
+		'css' => 'min-width:300px;',
132
+		'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
133
+	),
134
+	array(
135
+		'name' => '',
136
+		'desc' => '',
137
+		'id' => 'geodir_post_submited_success_email_content_admin',
138
+		'css' => 'width:500px; height: 150px;',
139
+		'type' => 'textarea',
140
+		'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
141
+	),
142
+
143
+
144
+	array('type' => 'sectionend', 'id' => 'admin_emails'),
145
+
146
+
147
+	array('name' => __('Client Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'client_emails'),
148
+
149
+	array('name' => __('Client Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'client_emails'),
150
+
151
+	array(
152
+		'name' => __('Post submit success to client email', 'geodirectory'),
153
+		'desc' => '',
154
+		'id' => 'geodir_post_submited_success_email_subject',
155
+		'type' => 'text',
156
+		'css' => 'min-width:300px;',
157
+		'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
158
+	),
159
+	array(
160
+		'name' => '',
161
+		'desc' => '',
162
+		'id' => 'geodir_post_submited_success_email_content',
163
+		'css' => 'width:500px; height: 150px;',
164
+		'type' => 'textarea',
165
+		'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
166
+	),
167
+
168
+
169
+	array(
170
+		'name' => __('User forgot password email', 'geodirectory'),
171
+		'desc' => '',
172
+		'id' => 'geodir_forgot_password_subject',
173
+		'type' => 'text',
174
+		'css' => 'min-width:300px;',
175
+		'std' => __('[#site_name#] - Your new password', 'geodirectory') // Default value for the page title - changed in settings
176
+	),
177
+	array(
178
+		'name' => '',
179
+		'desc' => '',
180
+		'id' => 'geodir_forgot_password_content',
181
+		'css' => 'width:500px; height: 150px;',
182
+		'type' => 'textarea',
183
+		'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
184
+	),
185
+
186
+	array(
187
+		'name' => __('Registration success email', 'geodirectory'),
188
+		'desc' => '',
189
+		'id' => 'geodir_registration_success_email_subject',
190
+		'type' => 'text',
191
+		'css' => 'min-width:300px;',
192
+		'std' => __('Your Log In Details', 'geodirectory') // Default value for the page title - changed in settings
193
+	),
194
+	array(
195
+		'name' => '',
196
+		'desc' => '',
197
+		'id' => 'geodir_registration_success_email_content',
198
+		'css' => 'width:500px; height: 150px;',
199
+		'type' => 'textarea',
200
+		'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
201
+	),
202
+	array(
203
+		'name' => __('Listing published email', 'geodirectory'),
204
+		'desc' => '',
205
+		'id' => 'geodir_post_published_email_subject',
206
+		'type' => 'text',
207
+		'css' => 'min-width:300px;',
208
+		'std' => __('Listing Published Successfully', 'geodirectory') // Default value for the page title - changed in settings
209
+	),
210
+	array(
211
+		'name' => '',
212
+		'desc' => '',
213
+		'id' => 'geodir_post_published_email_content',
214
+		'css' => 'width:500px; height: 150px;',
215
+		'type' => 'textarea',
216
+		'std' => __("<p>Dear [#client_name#],</p><p>Your listing [#listing_link#] has been published. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>", 'geodirectory')
217
+	),
218
+
219
+	array('type' => 'sectionend', 'id' => 'client_emails'),
220
+
221
+	array('name' => __('Other Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'other_emails'),
222
+
223
+	array('name' => __('Other Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'other_emails'),
224
+
225
+	array(
226
+		'name' => __('Send to friend', 'geodirectory'),
227
+		'desc' => '',
228
+		'id' => 'geodir_email_friend_subject',
229
+		'type' => 'text',
230
+		'css' => 'min-width:300px;',
231
+		'std' => __('[#from_name#] thought you might be interested in..', 'geodirectory')
232
+	),
233
+	array(
234
+		'name' => '',
235
+		'desc' => '',
236
+		'id' => 'geodir_email_friend_content',
237
+		'css' => 'width:500px; height: 150px;',
238
+		'type' => 'textarea',
239
+		'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
240
+	),
241
+
242
+	array(
243
+		'name' => __('Email enquiry', 'geodirectory'),
244
+		'desc' => '',
245
+		'id' => 'geodir_email_enquiry_subject',
246
+		'type' => 'text',
247
+		'css' => 'min-width:300px;',
248
+		'std' => __('Website Enquiry', 'geodirectory')
249
+	),
250
+	array(
251
+		'name' => '',
252
+		'desc' => '',
253
+		'id' => 'geodir_email_enquiry_content',
254
+		'css' => 'width:500px; height: 150px;',
255
+		'type' => 'textarea',
256
+		'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
257
+	),
258
+
259
+	array('type' => 'sectionend', 'id' => 'other_emails'),
260
+
261
+
262
+	array('name' => __('Messages', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'messages'),
263
+
264
+	array('name' => __('Messages', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'messages'),
265
+
266
+	array(
267
+		'name' => __('Post submitted success', 'geodirectory'),
268
+		'desc' => '',
269
+		'id' => 'geodir_post_added_success_msg_content',
270
+		'css' => 'width:500px; height: 150px;',
271
+		'type' => 'textarea',
272
+		'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
273
+	),
274
+
275
+
276
+	array('type' => 'sectionend', 'id' => 'messages'),
277 277
 
278 278
 )); // End Manage NOtifications settings
Please login to merge, or discard this patch.
geodirectory-admin/option-pages/permalink_settings_array.php 1 patch
Indentation   +178 added lines, -178 removed lines patch added patch discarded remove patch
@@ -16,184 +16,184 @@
 block discarded – undo
16 16
  */
17 17
 $geodir_settings['permalink_settings'] = apply_filters('geodir_permalink_settings', array(
18 18
 
19
-    /* Listing Permalink Settings start */
20
-    array('name' => __('Permalink', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set permalink', 'id' => 'geodir_permalink_settings '),
21
-
22
-
23
-    array('name' => __('Listing Detail Permalink Settings', 'geodirectory'),
24
-        'type' => 'sectionstart',
25
-        'desc' => '',
26
-        'id' => 'geodir_permalink'),
27
-
28
-    array(
29
-        'name' => __('Add location in urls', 'geodirectory'),
30
-        'desc' => __('Add location slug in listing urls', 'geodirectory'),
31
-        'id' => 'geodir_add_location_url',
32
-        'type' => 'checkbox',
33
-        'std' => '1',
34
-        'checkboxgroup' => 'start'
35
-    ),
36
-
37
-    array(
38
-        'name' => __('Add full location in listing urls', 'geodirectory'),
39
-        'desc' => __('Add full location info with country, region and city slug in listing urls', 'geodirectory'),
40
-        'id' => 'geodir_show_location_url',
41
-        'type' => 'radio',
42
-        'value' => 'all',
43
-        'std' => 'all',
44
-        'radiogroup' => ''
45
-    ),
46
-
47
-	array(
48
-        'name' => __('Add country and city slug in listing urls', 'geodirectory'),
49
-        'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'),
50
-        'id' => 'geodir_show_location_url',
51
-        'type' => 'radio',
52
-        'std' => 'all',
53
-        'value' => 'country_city',
54
-        'radiogroup' => ''
55
-    ),
56
-	array(
57
-        'name' => __('Add region and city slug in listing urls', 'geodirectory'),
58
-        'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'),
59
-        'id' => 'geodir_show_location_url',
60
-        'type' => 'radio',
61
-        'std' => 'all',
62
-        'value' => 'region_city',
63
-        'radiogroup' => ''
64
-    ),
65
-    array(
66
-        'name' => __('Add only city in listing urls', 'geodirectory'),
67
-        'desc' => __('Add city slug in listing urls', 'geodirectory'),
68
-        'id' => 'geodir_show_location_url',
69
-        'type' => 'radio',
70
-        'std' => 'all',
71
-        'value' => 'city',
72
-        'radiogroup' => 'end'
73
-    ),
74
-
75
-
76
-
77
-    array(
78
-        'name' => __('Add category in listing urls', 'geodirectory'),
79
-        'desc' => __('Add requested category slugs in listing urls', 'geodirectory'),
80
-        'id' => 'geodir_add_categories_url',
81
-        'type' => 'checkbox',
82
-        'std' => '1',
83
-    ),
84
-
85
-    array(
86
-        'name' => __('Listing url prefix', 'geodirectory'),
87
-        'desc' => __('Listing prefix to show in url', 'geodirectory'),
88
-        'id' => 'geodir_listing_prefix',
89
-        'type' => 'text',
90
-        'css' => 'min-width:300px;',
91
-        'std' => 'places'
92
-    ),
93
-
94
-    array(
95
-        'name' => __('Location url prefix', 'geodirectory'),
96
-        'desc' => __('Depreciated, now uses the location page slug', 'geodirectory'),
97
-        'id' => 'geodir_location_prefix',
98
-        'type' => 'text',
99
-        'css' => 'min-width:300px;',
100
-        'std' => 'location' // Default value to show home top section
101
-    ),
102
-
103
-    array(
104
-        'name' => __('Location and category url separator', 'geodirectory'),
105
-        'desc' => __('Separator to show between location and category url slugs in listing urls', 'geodirectory'),
106
-        'id' => 'geodir_listingurl_separator',
107
-        'type' => 'text',
108
-        'css' => 'min-width:300px;',
109
-        'std' => 'C' // Default value to show home top section
110
-    ),
111
-
112
-    array(
113
-        'name' => __('Listing detail url separator', 'geodirectory'),
114
-        'desc' => __('Separator to show before listing slug in listing detail urls', 'geodirectory'),
115
-        'id' => 'geodir_detailurl_separator',
116
-        'type' => 'text',
117
-        'css' => 'min-width:300px;',
118
-        'std' => 'info' // Default value to show home top section
119
-    ),
120
-
121
-
122
-    array('type' => 'sectionend', 'id' => 'geodir_permalink'),
123
-
124
-    array('name' => __('GeoDirectory Pages', 'geodirectory'),
125
-        'type' => 'sectionstart',
126
-        'desc' => '',
127
-        'id' => 'geodir_pages'),
128
-
129
-    array(
130
-        'name' => __('GD Home page', 'geodirectory'),
131
-        'desc' => __('Select the page to use for the GD homepage (you must also set this page in Settings>Reading>Front page for it to work)', 'geodirectory'),
132
-        'id' => 'geodir_home_page',
133
-        'type' => 'single_select_page',
134
-        'class' => 'chosen_select'
135
-    ),
136
-
137
-    array(
138
-        'name' => __('Add listing page', 'geodirectory'),
139
-        'desc' => __('Select the page to use for adding listings', 'geodirectory'),
140
-        'id' => 'geodir_add_listing_page',
141
-        'type' => 'single_select_page',
142
-        'class' => 'chosen_select'
143
-    ),
144
-
145
-    array(
146
-        'name' => __('Listing preview page', 'geodirectory'),
147
-        'desc' => __('Select the page to use for listing preview', 'geodirectory'),
148
-        'id' => 'geodir_preview_page',
149
-        'type' => 'single_select_page',
150
-        'class' => 'chosen_select'
151
-    ),
152
-
153
-    array(
154
-        'name' => __('Listing success page', 'geodirectory'),
155
-        'desc' => __('Select the page to use for listing success', 'geodirectory'),
156
-        'id' => 'geodir_success_page',
157
-        'type' => 'single_select_page',
158
-        'class' => 'chosen_select'
159
-    ),
160
-
161
-    array(
162
-        'name' => __('Location page', 'geodirectory'),
163
-        'desc' => __('Select the page to use for locations', 'geodirectory'),
164
-        'id' => 'geodir_location_page',
165
-        'type' => 'single_select_page',
166
-        'class' => 'chosen_select'
167
-    ),
168
-
169
-    array(
170
-        'name' => __('Terms and Conditions page', 'geodirectory'),
171
-        'desc' => __('Select the page to use for Terms and Conditions (if enabled)', 'geodirectory'),
172
-        'id' => 'geodir_term_condition_page',
173
-        'type' => 'single_select_page',
174
-        'class' => 'chosen_select'
175
-    ),
176
-
177
-    array(
178
-        'name' => __('Info page', 'geodirectory'),
179
-        'desc' => __('Select the page to use for Gd general Info', 'geodirectory'),
180
-        'id' => 'geodir_info_page',
181
-        'type' => 'single_select_page',
182
-        'class' => 'chosen_select'
183
-    ),
184
-
185
-    array(
186
-        'name' => __('Login page', 'geodirectory'),
187
-        'desc' => __('Select the page to use for Login / Register', 'geodirectory'),
188
-        'id' => 'geodir_login_page',
189
-        'type' => 'single_select_page',
190
-        'class' => 'chosen_select'
191
-    ),
192
-
193
-
194
-    array('type' => 'sectionend', 'id' => 'geodir_pages'),
195
-
196
-    /* Listing Detail Permalink Settings End */
19
+	/* Listing Permalink Settings start */
20
+	array('name' => __('Permalink', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set permalink', 'id' => 'geodir_permalink_settings '),
21
+
22
+
23
+	array('name' => __('Listing Detail Permalink Settings', 'geodirectory'),
24
+		'type' => 'sectionstart',
25
+		'desc' => '',
26
+		'id' => 'geodir_permalink'),
27
+
28
+	array(
29
+		'name' => __('Add location in urls', 'geodirectory'),
30
+		'desc' => __('Add location slug in listing urls', 'geodirectory'),
31
+		'id' => 'geodir_add_location_url',
32
+		'type' => 'checkbox',
33
+		'std' => '1',
34
+		'checkboxgroup' => 'start'
35
+	),
36
+
37
+	array(
38
+		'name' => __('Add full location in listing urls', 'geodirectory'),
39
+		'desc' => __('Add full location info with country, region and city slug in listing urls', 'geodirectory'),
40
+		'id' => 'geodir_show_location_url',
41
+		'type' => 'radio',
42
+		'value' => 'all',
43
+		'std' => 'all',
44
+		'radiogroup' => ''
45
+	),
46
+
47
+	array(
48
+		'name' => __('Add country and city slug in listing urls', 'geodirectory'),
49
+		'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'),
50
+		'id' => 'geodir_show_location_url',
51
+		'type' => 'radio',
52
+		'std' => 'all',
53
+		'value' => 'country_city',
54
+		'radiogroup' => ''
55
+	),
56
+	array(
57
+		'name' => __('Add region and city slug in listing urls', 'geodirectory'),
58
+		'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'),
59
+		'id' => 'geodir_show_location_url',
60
+		'type' => 'radio',
61
+		'std' => 'all',
62
+		'value' => 'region_city',
63
+		'radiogroup' => ''
64
+	),
65
+	array(
66
+		'name' => __('Add only city in listing urls', 'geodirectory'),
67
+		'desc' => __('Add city slug in listing urls', 'geodirectory'),
68
+		'id' => 'geodir_show_location_url',
69
+		'type' => 'radio',
70
+		'std' => 'all',
71
+		'value' => 'city',
72
+		'radiogroup' => 'end'
73
+	),
74
+
75
+
76
+
77
+	array(
78
+		'name' => __('Add category in listing urls', 'geodirectory'),
79
+		'desc' => __('Add requested category slugs in listing urls', 'geodirectory'),
80
+		'id' => 'geodir_add_categories_url',
81
+		'type' => 'checkbox',
82
+		'std' => '1',
83
+	),
84
+
85
+	array(
86
+		'name' => __('Listing url prefix', 'geodirectory'),
87
+		'desc' => __('Listing prefix to show in url', 'geodirectory'),
88
+		'id' => 'geodir_listing_prefix',
89
+		'type' => 'text',
90
+		'css' => 'min-width:300px;',
91
+		'std' => 'places'
92
+	),
93
+
94
+	array(
95
+		'name' => __('Location url prefix', 'geodirectory'),
96
+		'desc' => __('Depreciated, now uses the location page slug', 'geodirectory'),
97
+		'id' => 'geodir_location_prefix',
98
+		'type' => 'text',
99
+		'css' => 'min-width:300px;',
100
+		'std' => 'location' // Default value to show home top section
101
+	),
102
+
103
+	array(
104
+		'name' => __('Location and category url separator', 'geodirectory'),
105
+		'desc' => __('Separator to show between location and category url slugs in listing urls', 'geodirectory'),
106
+		'id' => 'geodir_listingurl_separator',
107
+		'type' => 'text',
108
+		'css' => 'min-width:300px;',
109
+		'std' => 'C' // Default value to show home top section
110
+	),
111
+
112
+	array(
113
+		'name' => __('Listing detail url separator', 'geodirectory'),
114
+		'desc' => __('Separator to show before listing slug in listing detail urls', 'geodirectory'),
115
+		'id' => 'geodir_detailurl_separator',
116
+		'type' => 'text',
117
+		'css' => 'min-width:300px;',
118
+		'std' => 'info' // Default value to show home top section
119
+	),
120
+
121
+
122
+	array('type' => 'sectionend', 'id' => 'geodir_permalink'),
123
+
124
+	array('name' => __('GeoDirectory Pages', 'geodirectory'),
125
+		'type' => 'sectionstart',
126
+		'desc' => '',
127
+		'id' => 'geodir_pages'),
128
+
129
+	array(
130
+		'name' => __('GD Home page', 'geodirectory'),
131
+		'desc' => __('Select the page to use for the GD homepage (you must also set this page in Settings>Reading>Front page for it to work)', 'geodirectory'),
132
+		'id' => 'geodir_home_page',
133
+		'type' => 'single_select_page',
134
+		'class' => 'chosen_select'
135
+	),
136
+
137
+	array(
138
+		'name' => __('Add listing page', 'geodirectory'),
139
+		'desc' => __('Select the page to use for adding listings', 'geodirectory'),
140
+		'id' => 'geodir_add_listing_page',
141
+		'type' => 'single_select_page',
142
+		'class' => 'chosen_select'
143
+	),
144
+
145
+	array(
146
+		'name' => __('Listing preview page', 'geodirectory'),
147
+		'desc' => __('Select the page to use for listing preview', 'geodirectory'),
148
+		'id' => 'geodir_preview_page',
149
+		'type' => 'single_select_page',
150
+		'class' => 'chosen_select'
151
+	),
152
+
153
+	array(
154
+		'name' => __('Listing success page', 'geodirectory'),
155
+		'desc' => __('Select the page to use for listing success', 'geodirectory'),
156
+		'id' => 'geodir_success_page',
157
+		'type' => 'single_select_page',
158
+		'class' => 'chosen_select'
159
+	),
160
+
161
+	array(
162
+		'name' => __('Location page', 'geodirectory'),
163
+		'desc' => __('Select the page to use for locations', 'geodirectory'),
164
+		'id' => 'geodir_location_page',
165
+		'type' => 'single_select_page',
166
+		'class' => 'chosen_select'
167
+	),
168
+
169
+	array(
170
+		'name' => __('Terms and Conditions page', 'geodirectory'),
171
+		'desc' => __('Select the page to use for Terms and Conditions (if enabled)', 'geodirectory'),
172
+		'id' => 'geodir_term_condition_page',
173
+		'type' => 'single_select_page',
174
+		'class' => 'chosen_select'
175
+	),
176
+
177
+	array(
178
+		'name' => __('Info page', 'geodirectory'),
179
+		'desc' => __('Select the page to use for Gd general Info', 'geodirectory'),
180
+		'id' => 'geodir_info_page',
181
+		'type' => 'single_select_page',
182
+		'class' => 'chosen_select'
183
+	),
184
+
185
+	array(
186
+		'name' => __('Login page', 'geodirectory'),
187
+		'desc' => __('Select the page to use for Login / Register', 'geodirectory'),
188
+		'id' => 'geodir_login_page',
189
+		'type' => 'single_select_page',
190
+		'class' => 'chosen_select'
191
+	),
192
+
193
+
194
+	array('type' => 'sectionend', 'id' => 'geodir_pages'),
195
+
196
+	/* Listing Detail Permalink Settings End */
197 197
 
198 198
 
199 199
 )); // End Design settings
Please login to merge, or discard this patch.
geodirectory-admin/option-pages/title_meta_settings_array.php 1 patch
Indentation   +358 added lines, -358 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 $gd_wpseo_use = '';
12 12
 if (class_exists('WPSEO_Frontend') || class_exists('All_in_One_SEO_Pack')) {
13
-    $gd_wpseo_use = "<b style='color:red;'>".__('Please use the WPSEO settings instead.','geodirectory')."</b><br />";
13
+	$gd_wpseo_use = "<b style='color:red;'>".__('Please use the WPSEO settings instead.','geodirectory')."</b><br />";
14 14
 }
15 15
 
16 16
 /**
@@ -21,363 +21,363 @@  discard block
 block discarded – undo
21 21
  */
22 22
 $geodir_settings['title_meta_settings'] = apply_filters('geodir_title_meta_settings', array(
23 23
 
24
-    /* Listing Permalink Settings start */
25
-    array('name' => __('Title / Meta', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set page title and meta', 'id' => 'geodir_title_meta_settings '),
26
-
27
-
28
-
29
-
30
-    array('name' => $gd_wpseo_use.__('Available Variables', 'geodirectory'),
31
-        'desc' => __('%%title%%, %%sitename%%, %%sitedesc%%, %%excerpt%%, %%pt_single%%, %%pt_plural%%, %%category%%, %%id%%, %%sep%%, %%location%%, %%in_location%%, %%in_location_single%%, %%location_single%%, %%search_term%%, %%search_near%%, %%name%%', 'geodirectory'),
32
-        'type' => 'sectionstart',
33
-        'id' => 'geodir_meta_vars'),
34
-
35
-    array('type' => 'sectionend', 'id' => 'geodir_meta_vars'),
36
-
37
-    array('name' => __('Homepage Meta Settings', 'geodirectory'),
38
-        'type' => 'sectionstart',
39
-        'desc' => '',
40
-        'id' => 'geodir_home_meta'),
41
-
42
-    array(
43
-        'name' => __('Homepage meta title', 'geodirectory'),
44
-        'desc' => __('This will use the title of the page set as frontpage if left blank.', 'geodirectory'),
45
-        'id' => 'geodir_meta_title_homepage',
46
-        'type' => 'text',
47
-        'css' => 'width:100%;',
48
-        'std' => '',
49
-        'placeholder' => ''
50
-    ),
51
-
52
-    array(
53
-        'name' => __('Homepage meta description', 'geodirectory'),
54
-        'desc' => __('Enter the meta description for the homepage.', 'geodirectory'),
55
-        'id' => 'geodir_meta_desc_homepage',
56
-        'type' => 'textarea',
57
-        'css' => 'width:100%;',
58
-        'std' => ''
59
-    ),
60
-
61
-    array('type' => 'sectionend', 'id' => 'geodir_home_meta'),
62
-
63
-    // details page meta
64
-    array('name' => __('Details Page Meta Settings', 'geodirectory'),
65
-        'type' => 'sectionstart',
66
-        'desc' => '',
67
-        'id' => 'geodir_details_meta'),
68
-
69
-    array(
70
-        'name' => __('Details page meta title', 'geodirectory'),
71
-        'desc' => __('Enter the meta title for the details page.', 'geodirectory'),
72
-        'id' => 'geodir_meta_title_detail',
73
-        'type' => 'text',
74
-        'css' => 'width:100%;',
75
-        'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'),
76
-        'placeholder' => '%%title%% %%sep%% %%sitename%%'
77
-    ),
78
-
79
-    array(
80
-        'name' => __('Details page meta description', 'geodirectory'),
81
-        'desc' => __('Enter the meta description for the details page.', 'geodirectory'),
82
-        'id' => 'geodir_meta_desc_detail',
83
-        'type' => 'textarea',
84
-        'css' => 'width:100%;',
85
-        'std' => __('%%excerpt%%', 'geodirectory'),
86
-        'placeholder' => '%%excerpt%%'
87
-    ),
88
-
89
-    array('type' => 'sectionend', 'id' => 'geodir_details_meta'),
90
-
91
-    // CPT page meta
92
-    array('name' => __('Post Type Page Meta Settings', 'geodirectory'),
93
-        'type' => 'sectionstart',
94
-        'desc' => '',
95
-        'id' => 'geodir_pt_meta'),
96
-
97
-    array(
98
-        'name' => __('Post type page meta title', 'geodirectory'),
99
-        'desc' => __('Enter the meta title for the post type pages.', 'geodirectory'),
100
-        'id' => 'geodir_meta_title_pt',
101
-        'type' => 'text',
102
-        'css' => 'width:100%;',
103
-        'std' => __('%%pt_plural%% %%in_location%% %%sep%% %%sitename%%', 'geodirectory'),
104
-        'placeholder' => '%%pt_plural%% %%in_location%% %%sep%% %%sitename%%'
105
-    ),
106
-
107
-    array(
108
-        'name' => __('Post type page meta description', 'geodirectory'),
109
-        'desc' => __('Enter the meta description for the post type pages.', 'geodirectory'),
110
-        'id' => 'geodir_meta_desc_pt',
111
-        'type' => 'textarea',
112
-        'css' => 'width:100%;',
113
-        'std' => __('%%pt_plural%% %%in_location%%', 'geodirectory'),
114
-        'placeholder' => '%%pt_plural%% %%in_location%%'
115
-    ),
116
-
117
-    array(
118
-        'name' => __('Post type page title', 'geodirectory'),
119
-        'desc' => __('Enter the title for the post type pages.', 'geodirectory'),
120
-        'id' => 'geodir_page_title_pt',
121
-        'type' => 'text',
122
-        'css' => 'width:100%;',
123
-        'std' => __('All %%pt_plural%% %%in_location_single%%', 'geodirectory'),
124
-        'placeholder' => 'All %%pt_plural%% %%in_location_single%%'
125
-    ),
126
-
127
-    array('type' => 'sectionend', 'id' => 'geodir_pt_meta'),
128
-
129
-    // Cat listing page meta
130
-    array('name' => __('Listing Page Meta Settings', 'geodirectory'),
131
-        'type' => 'sectionstart',
132
-        'desc' => '',
133
-        'id' => 'geodir_pt_meta'),
134
-
135
-    array(
136
-        'name' => __('Listing page meta title', 'geodirectory'),
137
-        'desc' => __('Enter the meta title for the category listing pages.', 'geodirectory'),
138
-        'id' => 'geodir_meta_title_listing',
139
-        'type' => 'text',
140
-        'css' => 'width:100%;',
141
-        'std' => __('%%category%% %%in_location%% %%sep%% %%sitename%%', 'geodirectory'),
142
-        'placeholder' => '%%category%% %%in_location%% %%sep%% %%sitename%%'
143
-    ),
144
-
145
-    array(
146
-        'name' => __('Listing page meta description', 'geodirectory'),
147
-        'desc' => __('Enter the meta description for the category listing pages.', 'geodirectory'),
148
-        'id' => 'geodir_meta_desc_listing',
149
-        'type' => 'textarea',
150
-        'css' => 'width:100%;',
151
-        'std' => __('Posts related to Category: %%category%% %%in_location%%', 'geodirectory'),
152
-        'placeholder' => 'Posts related to Category: %%category%% %%in_location%%'
153
-    ),
154
-
155
-    array(
156
-        'name' => __('Category listing page title', 'geodirectory'),
157
-        'desc' => __('Enter the title for the category listing pages.', 'geodirectory'),
158
-        'id' => 'geodir_page_title_cat-listing',
159
-        'type' => 'text',
160
-        'css' => 'width:100%;',
161
-        'std' => __('All %%category%% %%in_location_single%%', 'geodirectory'),
162
-        'placeholder' => 'All %%category%% %%in_location_single%%'
163
-    ),
164
-
165
-    array(
166
-        'name' => __('Tag listing page title', 'geodirectory'),
167
-        'desc' => __('Enter the title for the tag listing pages.', 'geodirectory'),
168
-        'id' => 'geodir_page_title_tag-listing',
169
-        'type' => 'text',
170
-        'css' => 'width:100%;',
171
-        'std' => __('Tag: %%tag%% %%in_location_single%%', 'geodirectory'),
172
-        'placeholder' => 'Tag: %%tag%% %%in_location_single%%'
173
-    ),
174
-
175
-    array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
176
-
177
-    // location page meta
178
-    array('name' => __('Location Page Meta Settings', 'geodirectory'),
179
-        'type' => 'sectionstart',
180
-        'desc' => '',
181
-        'id' => 'geodir_pt_meta'),
182
-
183
-    array(
184
-        'name' => __('Location page meta title', 'geodirectory'),
185
-        'desc' => __('Enter the meta title for the location pages.', 'geodirectory'),
186
-        'id' => 'geodir_meta_title_location',
187
-        'type' => 'text',
188
-        'css' => 'width:100%;',
189
-        'std' => __('%%title%% %%location%% %%sep%% %%sitename%%', 'geodirectory'),
190
-        'placeholder' => '%%title%% %%location%% %%sep%% %%sitename%%'
191
-    ),
192
-
193
-    array(
194
-        'name' => __('Location page meta description', 'geodirectory'),
195
-        'desc' => __('Enter the meta description for the location pages.', 'geodirectory'),
196
-        'id' => 'geodir_meta_desc_location',
197
-        'type' => 'textarea',
198
-        'css' => 'width:100%;',
199
-        'std' => __('%%location%%', 'geodirectory'),
200
-        'placeholder' => '%%location%%'
201
-    ),
202
-
203
-    array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
204
-
205
-    // Search page meta
206
-    array('name' => __('Search Page Meta Settings', 'geodirectory'),
207
-        'type' => 'sectionstart',
208
-        'desc' => '',
209
-        'id' => 'geodir_pt_meta'),
210
-
211
-    array(
212
-        'name' => __('Search page meta title', 'geodirectory'),
213
-        'desc' => __('Enter the meta title for the search page.', 'geodirectory'),
214
-        'id' => 'geodir_meta_title_search',
215
-        'type' => 'text',
216
-        'css' => 'width:100%;',
217
-        'std' => __('%%pt_plural%% search results for %%search_term%%, Near %%search_near%% %%sep%% %%sitename%%', 'geodirectory'),
218
-        'placeholder' => '%%pt_plural%% search results for %%search_term%%, Near %%search_near%% %%sep%% %%sitename%%'
219
-    ),
220
-
221
-    array(
222
-        'name' => __('Search page meta description', 'geodirectory'),
223
-        'desc' => __('Enter the meta description for the search page.', 'geodirectory'),
224
-        'id' => 'geodir_meta_desc_search',
225
-        'type' => 'textarea',
226
-        'css' => 'width:100%;',
227
-        'std' => __('%%pt_plural%% search results for %%search_term%%, Near %%search_near%%', 'geodirectory'),
228
-        'placeholder' => '%%pt_plural%% search results for %%search_term%%, Near %%search_near%%'
229
-    ),
230
-
231
-    array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
232
-
233
-    //Add listing page meta
234
-    array('name' => __('Add Listing Page Meta Settings', 'geodirectory'),
235
-        'type' => 'sectionstart',
236
-        'desc' => '',
237
-        'id' => 'geodir_pt_meta'),
238
-
239
-    array(
240
-        'name' => __('Add listing page meta title', 'geodirectory'),
241
-        'desc' => __('Enter the meta title for the add listing page.', 'geodirectory'),
242
-        'id' => 'geodir_meta_title_add-listing',
243
-        'type' => 'text',
244
-        'css' => 'width:100%;',
245
-        'std' => __('Add %%pt_single%% %%sep%% %%sitename%%', 'geodirectory'),
246
-        'placeholder' => 'Add %%pt_single%% %%sep%% %%sitename%%'
247
-    ),
248
-
249
-    array(
250
-        'name' => __('Add listing page meta description', 'geodirectory'),
251
-        'desc' => __('Enter the meta description for the add listing page.', 'geodirectory'),
252
-        'id' => 'geodir_meta_desc_add-listing',
253
-        'type' => 'textarea',
254
-        'css' => 'width:100%;',
255
-        'std' => __('Add %%pt_single%%', 'geodirectory'),
256
-        'placeholder' => 'Add %%pt_single%%'
257
-    ),
258
-
259
-    array(
260
-        'name' => __('Add listing page title', 'geodirectory'),
261
-        'desc' => __('Enter the title for the add listing page.', 'geodirectory'),
262
-        'id' => 'geodir_page_title_add-listing',
263
-        'type' => 'text',
264
-        'css' => 'width:100%;',
265
-        'std' => __('Add %%pt_single%%', 'geodirectory'),
266
-        'placeholder' => 'Add %%pt_single%%'
267
-    ),
268
-
269
-    array(
270
-        'name' => __('Edit listing page title', 'geodirectory'),
271
-        'desc' => __('Enter the title for the edit listing page.', 'geodirectory'),
272
-        'id' => 'geodir_page_title_edit-listing',
273
-        'type' => 'text',
274
-        'css' => 'width:100%;',
275
-        'std' => __('Edit %%pt_single%%', 'geodirectory'),
276
-        'placeholder' => 'Edit %%pt_single%%'
277
-    ),
278
-
279
-    array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
280
-
281
-    //Author page meta
282
-    array('name' => __('Author Page Meta Settings', 'geodirectory'),
283
-        'type' => 'sectionstart',
284
-        'desc' => '',
285
-        'id' => 'geodir_pt_meta'),
286
-
287
-    array(
288
-        'name' => __('Author page meta title', 'geodirectory'),
289
-        'desc' => __('Enter the meta title for the author page.', 'geodirectory'),
290
-        'id' => 'geodir_meta_title_author',
291
-        'type' => 'text',
292
-        'css' => 'width:100%;',
293
-        'std' => __('Author: %%name%% %%sep%% %%sitename%%', 'geodirectory'),
294
-        'placeholder' => 'Author: %%name%% %%sep%% %%sitename%%'
295
-    ),
296
-
297
-    array(
298
-        'name' => __('Author page meta description', 'geodirectory'),
299
-        'desc' => __('Enter the meta description for the author page.', 'geodirectory'),
300
-        'id' => 'geodir_meta_desc_author',
301
-        'type' => 'textarea',
302
-        'css' => 'width:100%;',
303
-        'std' => ''
304
-    ),
305
-
306
-    array(
307
-        'name' => __('Author page title', 'geodirectory'),
308
-        'desc' => __('Enter the title for the author page.', 'geodirectory'),
309
-        'id' => 'geodir_page_title_author',
310
-        'type' => 'text',
311
-        'css' => 'width:100%;',
312
-        'std' => __('%%pt_plural%% by: %%name%%', 'geodirectory'),
313
-        'placeholder' => '%%pt_plural%% by: %%name%%'
314
-    ),
315
-
316
-    array(
317
-        'name' => __('Author favorite page title', 'geodirectory'),
318
-        'desc' => __('Enter the title for the author favorite page.', 'geodirectory'),
319
-        'id' => 'geodir_page_title_favorite',
320
-        'type' => 'text',
321
-        'css' => 'width:100%;',
322
-        'std' => __('%%name%%: Favorite %%pt_plural%%', 'geodirectory'),
323
-        'placeholder' => '%%name%%: Favorite %%pt_plural%%'
324
-    ),
325
-
326
-    array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
327
-
328
-    //Login page meta
329
-    array('name' => __('Login Page Meta Settings', 'geodirectory'),
330
-        'type' => 'sectionstart',
331
-        'desc' => '',
332
-        'id' => 'geodir_login_meta'),
333
-
334
-    array(
335
-        'name' => __('Login page meta title', 'geodirectory'),
336
-        'desc' => __('Enter the meta title for the login page.', 'geodirectory'),
337
-        'id' => 'geodir_meta_title_login',
338
-        'type' => 'text',
339
-        'css' => 'width:100%;',
340
-        'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'),
341
-        'placeholder' => '%%title%% %%sep%% %%sitename%%'
342
-    ),
343
-
344
-    array(
345
-        'name' => __('Login page meta description', 'geodirectory'),
346
-        'desc' => __('Enter the meta description for the login page.', 'geodirectory'),
347
-        'id' => 'geodir_meta_desc_login',
348
-        'type' => 'textarea',
349
-        'css' => 'width:100%;',
350
-        'std' => ''
351
-    ),
352
-
353
-    array('type' => 'sectionend', 'id' => 'geodir_login_meta'),
354
-
355
-    //Listing success page meta
356
-    array('name' => __('Listing Success Page Meta Settings', 'geodirectory'),
357
-        'type' => 'sectionstart',
358
-        'desc' => '',
359
-        'id' => 'geodir_login_meta'),
360
-
361
-    array(
362
-        'name' => __('Listing success page meta title', 'geodirectory'),
363
-        'desc' => __('Enter the meta title for the listing success page.', 'geodirectory'),
364
-        'id' => 'geodir_meta_title_listing-success',
365
-        'type' => 'text',
366
-        'css' => 'width:100%;',
367
-        'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'),
368
-        'placeholder' => '%%title%% %%sep%% %%sitename%%'
369
-    ),
370
-
371
-    array(
372
-        'name' => __('Listing success page meta description', 'geodirectory'),
373
-        'desc' => __('Enter the meta description for the listing success page.', 'geodirectory'),
374
-        'id' => 'geodir_meta_desc_listing-success',
375
-        'type' => 'textarea',
376
-        'css' => 'width:100%;',
377
-        'std' => ''
378
-    ),
379
-
380
-    array('type' => 'sectionend', 'id' => 'geodir_login_meta'),
24
+	/* Listing Permalink Settings start */
25
+	array('name' => __('Title / Meta', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set page title and meta', 'id' => 'geodir_title_meta_settings '),
26
+
27
+
28
+
29
+
30
+	array('name' => $gd_wpseo_use.__('Available Variables', 'geodirectory'),
31
+		'desc' => __('%%title%%, %%sitename%%, %%sitedesc%%, %%excerpt%%, %%pt_single%%, %%pt_plural%%, %%category%%, %%id%%, %%sep%%, %%location%%, %%in_location%%, %%in_location_single%%, %%location_single%%, %%search_term%%, %%search_near%%, %%name%%', 'geodirectory'),
32
+		'type' => 'sectionstart',
33
+		'id' => 'geodir_meta_vars'),
34
+
35
+	array('type' => 'sectionend', 'id' => 'geodir_meta_vars'),
36
+
37
+	array('name' => __('Homepage Meta Settings', 'geodirectory'),
38
+		'type' => 'sectionstart',
39
+		'desc' => '',
40
+		'id' => 'geodir_home_meta'),
41
+
42
+	array(
43
+		'name' => __('Homepage meta title', 'geodirectory'),
44
+		'desc' => __('This will use the title of the page set as frontpage if left blank.', 'geodirectory'),
45
+		'id' => 'geodir_meta_title_homepage',
46
+		'type' => 'text',
47
+		'css' => 'width:100%;',
48
+		'std' => '',
49
+		'placeholder' => ''
50
+	),
51
+
52
+	array(
53
+		'name' => __('Homepage meta description', 'geodirectory'),
54
+		'desc' => __('Enter the meta description for the homepage.', 'geodirectory'),
55
+		'id' => 'geodir_meta_desc_homepage',
56
+		'type' => 'textarea',
57
+		'css' => 'width:100%;',
58
+		'std' => ''
59
+	),
60
+
61
+	array('type' => 'sectionend', 'id' => 'geodir_home_meta'),
62
+
63
+	// details page meta
64
+	array('name' => __('Details Page Meta Settings', 'geodirectory'),
65
+		'type' => 'sectionstart',
66
+		'desc' => '',
67
+		'id' => 'geodir_details_meta'),
68
+
69
+	array(
70
+		'name' => __('Details page meta title', 'geodirectory'),
71
+		'desc' => __('Enter the meta title for the details page.', 'geodirectory'),
72
+		'id' => 'geodir_meta_title_detail',
73
+		'type' => 'text',
74
+		'css' => 'width:100%;',
75
+		'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'),
76
+		'placeholder' => '%%title%% %%sep%% %%sitename%%'
77
+	),
78
+
79
+	array(
80
+		'name' => __('Details page meta description', 'geodirectory'),
81
+		'desc' => __('Enter the meta description for the details page.', 'geodirectory'),
82
+		'id' => 'geodir_meta_desc_detail',
83
+		'type' => 'textarea',
84
+		'css' => 'width:100%;',
85
+		'std' => __('%%excerpt%%', 'geodirectory'),
86
+		'placeholder' => '%%excerpt%%'
87
+	),
88
+
89
+	array('type' => 'sectionend', 'id' => 'geodir_details_meta'),
90
+
91
+	// CPT page meta
92
+	array('name' => __('Post Type Page Meta Settings', 'geodirectory'),
93
+		'type' => 'sectionstart',
94
+		'desc' => '',
95
+		'id' => 'geodir_pt_meta'),
96
+
97
+	array(
98
+		'name' => __('Post type page meta title', 'geodirectory'),
99
+		'desc' => __('Enter the meta title for the post type pages.', 'geodirectory'),
100
+		'id' => 'geodir_meta_title_pt',
101
+		'type' => 'text',
102
+		'css' => 'width:100%;',
103
+		'std' => __('%%pt_plural%% %%in_location%% %%sep%% %%sitename%%', 'geodirectory'),
104
+		'placeholder' => '%%pt_plural%% %%in_location%% %%sep%% %%sitename%%'
105
+	),
106
+
107
+	array(
108
+		'name' => __('Post type page meta description', 'geodirectory'),
109
+		'desc' => __('Enter the meta description for the post type pages.', 'geodirectory'),
110
+		'id' => 'geodir_meta_desc_pt',
111
+		'type' => 'textarea',
112
+		'css' => 'width:100%;',
113
+		'std' => __('%%pt_plural%% %%in_location%%', 'geodirectory'),
114
+		'placeholder' => '%%pt_plural%% %%in_location%%'
115
+	),
116
+
117
+	array(
118
+		'name' => __('Post type page title', 'geodirectory'),
119
+		'desc' => __('Enter the title for the post type pages.', 'geodirectory'),
120
+		'id' => 'geodir_page_title_pt',
121
+		'type' => 'text',
122
+		'css' => 'width:100%;',
123
+		'std' => __('All %%pt_plural%% %%in_location_single%%', 'geodirectory'),
124
+		'placeholder' => 'All %%pt_plural%% %%in_location_single%%'
125
+	),
126
+
127
+	array('type' => 'sectionend', 'id' => 'geodir_pt_meta'),
128
+
129
+	// Cat listing page meta
130
+	array('name' => __('Listing Page Meta Settings', 'geodirectory'),
131
+		'type' => 'sectionstart',
132
+		'desc' => '',
133
+		'id' => 'geodir_pt_meta'),
134
+
135
+	array(
136
+		'name' => __('Listing page meta title', 'geodirectory'),
137
+		'desc' => __('Enter the meta title for the category listing pages.', 'geodirectory'),
138
+		'id' => 'geodir_meta_title_listing',
139
+		'type' => 'text',
140
+		'css' => 'width:100%;',
141
+		'std' => __('%%category%% %%in_location%% %%sep%% %%sitename%%', 'geodirectory'),
142
+		'placeholder' => '%%category%% %%in_location%% %%sep%% %%sitename%%'
143
+	),
144
+
145
+	array(
146
+		'name' => __('Listing page meta description', 'geodirectory'),
147
+		'desc' => __('Enter the meta description for the category listing pages.', 'geodirectory'),
148
+		'id' => 'geodir_meta_desc_listing',
149
+		'type' => 'textarea',
150
+		'css' => 'width:100%;',
151
+		'std' => __('Posts related to Category: %%category%% %%in_location%%', 'geodirectory'),
152
+		'placeholder' => 'Posts related to Category: %%category%% %%in_location%%'
153
+	),
154
+
155
+	array(
156
+		'name' => __('Category listing page title', 'geodirectory'),
157
+		'desc' => __('Enter the title for the category listing pages.', 'geodirectory'),
158
+		'id' => 'geodir_page_title_cat-listing',
159
+		'type' => 'text',
160
+		'css' => 'width:100%;',
161
+		'std' => __('All %%category%% %%in_location_single%%', 'geodirectory'),
162
+		'placeholder' => 'All %%category%% %%in_location_single%%'
163
+	),
164
+
165
+	array(
166
+		'name' => __('Tag listing page title', 'geodirectory'),
167
+		'desc' => __('Enter the title for the tag listing pages.', 'geodirectory'),
168
+		'id' => 'geodir_page_title_tag-listing',
169
+		'type' => 'text',
170
+		'css' => 'width:100%;',
171
+		'std' => __('Tag: %%tag%% %%in_location_single%%', 'geodirectory'),
172
+		'placeholder' => 'Tag: %%tag%% %%in_location_single%%'
173
+	),
174
+
175
+	array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
176
+
177
+	// location page meta
178
+	array('name' => __('Location Page Meta Settings', 'geodirectory'),
179
+		'type' => 'sectionstart',
180
+		'desc' => '',
181
+		'id' => 'geodir_pt_meta'),
182
+
183
+	array(
184
+		'name' => __('Location page meta title', 'geodirectory'),
185
+		'desc' => __('Enter the meta title for the location pages.', 'geodirectory'),
186
+		'id' => 'geodir_meta_title_location',
187
+		'type' => 'text',
188
+		'css' => 'width:100%;',
189
+		'std' => __('%%title%% %%location%% %%sep%% %%sitename%%', 'geodirectory'),
190
+		'placeholder' => '%%title%% %%location%% %%sep%% %%sitename%%'
191
+	),
192
+
193
+	array(
194
+		'name' => __('Location page meta description', 'geodirectory'),
195
+		'desc' => __('Enter the meta description for the location pages.', 'geodirectory'),
196
+		'id' => 'geodir_meta_desc_location',
197
+		'type' => 'textarea',
198
+		'css' => 'width:100%;',
199
+		'std' => __('%%location%%', 'geodirectory'),
200
+		'placeholder' => '%%location%%'
201
+	),
202
+
203
+	array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
204
+
205
+	// Search page meta
206
+	array('name' => __('Search Page Meta Settings', 'geodirectory'),
207
+		'type' => 'sectionstart',
208
+		'desc' => '',
209
+		'id' => 'geodir_pt_meta'),
210
+
211
+	array(
212
+		'name' => __('Search page meta title', 'geodirectory'),
213
+		'desc' => __('Enter the meta title for the search page.', 'geodirectory'),
214
+		'id' => 'geodir_meta_title_search',
215
+		'type' => 'text',
216
+		'css' => 'width:100%;',
217
+		'std' => __('%%pt_plural%% search results for %%search_term%%, Near %%search_near%% %%sep%% %%sitename%%', 'geodirectory'),
218
+		'placeholder' => '%%pt_plural%% search results for %%search_term%%, Near %%search_near%% %%sep%% %%sitename%%'
219
+	),
220
+
221
+	array(
222
+		'name' => __('Search page meta description', 'geodirectory'),
223
+		'desc' => __('Enter the meta description for the search page.', 'geodirectory'),
224
+		'id' => 'geodir_meta_desc_search',
225
+		'type' => 'textarea',
226
+		'css' => 'width:100%;',
227
+		'std' => __('%%pt_plural%% search results for %%search_term%%, Near %%search_near%%', 'geodirectory'),
228
+		'placeholder' => '%%pt_plural%% search results for %%search_term%%, Near %%search_near%%'
229
+	),
230
+
231
+	array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
232
+
233
+	//Add listing page meta
234
+	array('name' => __('Add Listing Page Meta Settings', 'geodirectory'),
235
+		'type' => 'sectionstart',
236
+		'desc' => '',
237
+		'id' => 'geodir_pt_meta'),
238
+
239
+	array(
240
+		'name' => __('Add listing page meta title', 'geodirectory'),
241
+		'desc' => __('Enter the meta title for the add listing page.', 'geodirectory'),
242
+		'id' => 'geodir_meta_title_add-listing',
243
+		'type' => 'text',
244
+		'css' => 'width:100%;',
245
+		'std' => __('Add %%pt_single%% %%sep%% %%sitename%%', 'geodirectory'),
246
+		'placeholder' => 'Add %%pt_single%% %%sep%% %%sitename%%'
247
+	),
248
+
249
+	array(
250
+		'name' => __('Add listing page meta description', 'geodirectory'),
251
+		'desc' => __('Enter the meta description for the add listing page.', 'geodirectory'),
252
+		'id' => 'geodir_meta_desc_add-listing',
253
+		'type' => 'textarea',
254
+		'css' => 'width:100%;',
255
+		'std' => __('Add %%pt_single%%', 'geodirectory'),
256
+		'placeholder' => 'Add %%pt_single%%'
257
+	),
258
+
259
+	array(
260
+		'name' => __('Add listing page title', 'geodirectory'),
261
+		'desc' => __('Enter the title for the add listing page.', 'geodirectory'),
262
+		'id' => 'geodir_page_title_add-listing',
263
+		'type' => 'text',
264
+		'css' => 'width:100%;',
265
+		'std' => __('Add %%pt_single%%', 'geodirectory'),
266
+		'placeholder' => 'Add %%pt_single%%'
267
+	),
268
+
269
+	array(
270
+		'name' => __('Edit listing page title', 'geodirectory'),
271
+		'desc' => __('Enter the title for the edit listing page.', 'geodirectory'),
272
+		'id' => 'geodir_page_title_edit-listing',
273
+		'type' => 'text',
274
+		'css' => 'width:100%;',
275
+		'std' => __('Edit %%pt_single%%', 'geodirectory'),
276
+		'placeholder' => 'Edit %%pt_single%%'
277
+	),
278
+
279
+	array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
280
+
281
+	//Author page meta
282
+	array('name' => __('Author Page Meta Settings', 'geodirectory'),
283
+		'type' => 'sectionstart',
284
+		'desc' => '',
285
+		'id' => 'geodir_pt_meta'),
286
+
287
+	array(
288
+		'name' => __('Author page meta title', 'geodirectory'),
289
+		'desc' => __('Enter the meta title for the author page.', 'geodirectory'),
290
+		'id' => 'geodir_meta_title_author',
291
+		'type' => 'text',
292
+		'css' => 'width:100%;',
293
+		'std' => __('Author: %%name%% %%sep%% %%sitename%%', 'geodirectory'),
294
+		'placeholder' => 'Author: %%name%% %%sep%% %%sitename%%'
295
+	),
296
+
297
+	array(
298
+		'name' => __('Author page meta description', 'geodirectory'),
299
+		'desc' => __('Enter the meta description for the author page.', 'geodirectory'),
300
+		'id' => 'geodir_meta_desc_author',
301
+		'type' => 'textarea',
302
+		'css' => 'width:100%;',
303
+		'std' => ''
304
+	),
305
+
306
+	array(
307
+		'name' => __('Author page title', 'geodirectory'),
308
+		'desc' => __('Enter the title for the author page.', 'geodirectory'),
309
+		'id' => 'geodir_page_title_author',
310
+		'type' => 'text',
311
+		'css' => 'width:100%;',
312
+		'std' => __('%%pt_plural%% by: %%name%%', 'geodirectory'),
313
+		'placeholder' => '%%pt_plural%% by: %%name%%'
314
+	),
315
+
316
+	array(
317
+		'name' => __('Author favorite page title', 'geodirectory'),
318
+		'desc' => __('Enter the title for the author favorite page.', 'geodirectory'),
319
+		'id' => 'geodir_page_title_favorite',
320
+		'type' => 'text',
321
+		'css' => 'width:100%;',
322
+		'std' => __('%%name%%: Favorite %%pt_plural%%', 'geodirectory'),
323
+		'placeholder' => '%%name%%: Favorite %%pt_plural%%'
324
+	),
325
+
326
+	array('type' => 'sectionend', 'id' => 'geodir_location_meta'),
327
+
328
+	//Login page meta
329
+	array('name' => __('Login Page Meta Settings', 'geodirectory'),
330
+		'type' => 'sectionstart',
331
+		'desc' => '',
332
+		'id' => 'geodir_login_meta'),
333
+
334
+	array(
335
+		'name' => __('Login page meta title', 'geodirectory'),
336
+		'desc' => __('Enter the meta title for the login page.', 'geodirectory'),
337
+		'id' => 'geodir_meta_title_login',
338
+		'type' => 'text',
339
+		'css' => 'width:100%;',
340
+		'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'),
341
+		'placeholder' => '%%title%% %%sep%% %%sitename%%'
342
+	),
343
+
344
+	array(
345
+		'name' => __('Login page meta description', 'geodirectory'),
346
+		'desc' => __('Enter the meta description for the login page.', 'geodirectory'),
347
+		'id' => 'geodir_meta_desc_login',
348
+		'type' => 'textarea',
349
+		'css' => 'width:100%;',
350
+		'std' => ''
351
+	),
352
+
353
+	array('type' => 'sectionend', 'id' => 'geodir_login_meta'),
354
+
355
+	//Listing success page meta
356
+	array('name' => __('Listing Success Page Meta Settings', 'geodirectory'),
357
+		'type' => 'sectionstart',
358
+		'desc' => '',
359
+		'id' => 'geodir_login_meta'),
360
+
361
+	array(
362
+		'name' => __('Listing success page meta title', 'geodirectory'),
363
+		'desc' => __('Enter the meta title for the listing success page.', 'geodirectory'),
364
+		'id' => 'geodir_meta_title_listing-success',
365
+		'type' => 'text',
366
+		'css' => 'width:100%;',
367
+		'std' => __('%%title%% %%sep%% %%sitename%%', 'geodirectory'),
368
+		'placeholder' => '%%title%% %%sep%% %%sitename%%'
369
+	),
370
+
371
+	array(
372
+		'name' => __('Listing success page meta description', 'geodirectory'),
373
+		'desc' => __('Enter the meta description for the listing success page.', 'geodirectory'),
374
+		'id' => 'geodir_meta_desc_listing-success',
375
+		'type' => 'textarea',
376
+		'css' => 'width:100%;',
377
+		'std' => ''
378
+	),
379
+
380
+	array('type' => 'sectionend', 'id' => 'geodir_login_meta'),
381 381
 
382 382
 
383 383
 
Please login to merge, or discard this patch.
geodirectory-admin/place_dummy_post.php 1 patch
Indentation   +1225 added lines, -1225 removed lines patch added patch discarded remove patch
@@ -12,30 +12,30 @@  discard block
 block discarded – undo
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
 switch ($dummy_post_index) {
20 20
 
21
-    case(1):
22
-        $image_array[] = "$dummy_image_url/a1.jpg";
23
-        $image_array[] = "$dummy_image_url/a2.jpg";
24
-        $image_array[] = "$dummy_image_url/a3.jpg";
25
-        $image_array[] = "$dummy_image_url/a4.jpg";
26
-        $image_array[] = "$dummy_image_url/a5.jpg";
27
-        $image_array[] = "$dummy_image_url/a6.jpg";
28
-        $image_array[] = "$dummy_image_url/a7.jpg";
29
-        $image_array[] = "$dummy_image_url/a8.jpg";
30
-        $image_array[] = "$dummy_image_url/a9.jpg";
31
-        $image_array[] = "$dummy_image_url/a10.jpg";
32
-        $image_array[] = "$dummy_image_url/a11.jpg";
33
-
34
-
35
-        $post_info[] = array(
36
-            "listing_type" => 'gd_place',
37
-            "post_title" => 'Franklin Square',
38
-            "post_desc" => ' <h3> Location </h3>
21
+	case(1):
22
+		$image_array[] = "$dummy_image_url/a1.jpg";
23
+		$image_array[] = "$dummy_image_url/a2.jpg";
24
+		$image_array[] = "$dummy_image_url/a3.jpg";
25
+		$image_array[] = "$dummy_image_url/a4.jpg";
26
+		$image_array[] = "$dummy_image_url/a5.jpg";
27
+		$image_array[] = "$dummy_image_url/a6.jpg";
28
+		$image_array[] = "$dummy_image_url/a7.jpg";
29
+		$image_array[] = "$dummy_image_url/a8.jpg";
30
+		$image_array[] = "$dummy_image_url/a9.jpg";
31
+		$image_array[] = "$dummy_image_url/a10.jpg";
32
+		$image_array[] = "$dummy_image_url/a11.jpg";
33
+
34
+
35
+		$post_info[] = array(
36
+			"listing_type" => 'gd_place',
37
+			"post_title" => 'Franklin Square',
38
+			"post_desc" => ' <h3> Location </h3>
39 39
 		
40 40
 		6th and Race Streets in Historic Philadelphia
41 41
 		<h3>The Experience</h3>
@@ -70,42 +70,42 @@  discard block
 block discarded – undo
70 70
 		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.
71 71
 		
72 72
 		SquareBurger is open until October - perfect for a couple bites between rounds of miniature golf!',
73
-            "post_images" => $image_array,
74
-            "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
75
-            "post_tags" => array('Tags', 'Sample Tags'),
76
-            "geodir_video" => '',
77
-            "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
78
-            "geodir_contact" => '(111) 677-4444',
79
-            "geodir_email" => '[email protected]',
80
-            "geodir_website" => 'http://franklinsquare.com',
81
-            "geodir_twitter" => 'http://twitter.com/franklinsquare',
82
-            "geodir_facebook" => 'http://facebook.com/franklinsquare',
83
-            "post_dummy" => '1'
84
-        );
85
-
86
-
87
-        break;
88
-    case 2:
89
-        $image_array = array();
90
-        $post_meta = array();
91
-
92
-        /// Attractions ////post start 2///
93
-        $image_array[] = "$dummy_image_url/a6.jpg";
94
-        $image_array[] = "$dummy_image_url/a1.jpg";
95
-        $image_array[] = "$dummy_image_url/a3.jpg";
96
-        $image_array[] = "$dummy_image_url/a4.jpg";
97
-        $image_array[] = "$dummy_image_url/a5.jpg";
98
-        $image_array[] = "$dummy_image_url/a2.jpg";
99
-        $image_array[] = "$dummy_image_url/a7.jpg";
100
-        $image_array[] = "$dummy_image_url/a8.jpg";
101
-        $image_array[] = "$dummy_image_url/a9.jpg";
102
-        $image_array[] = "$dummy_image_url/a10.jpg";
103
-        $image_array[] = "$dummy_image_url/a11.jpg";
104
-
105
-        $post_info[] = array(
106
-            "listing_type" => 'gd_place',
107
-            "post_title" => 'Please Touch Museum',
108
-            "post_desc" => '<h3>New Location! </h3>
73
+			"post_images" => $image_array,
74
+			"post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
75
+			"post_tags" => array('Tags', 'Sample Tags'),
76
+			"geodir_video" => '',
77
+			"geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
78
+			"geodir_contact" => '(111) 677-4444',
79
+			"geodir_email" => '[email protected]',
80
+			"geodir_website" => 'http://franklinsquare.com',
81
+			"geodir_twitter" => 'http://twitter.com/franklinsquare',
82
+			"geodir_facebook" => 'http://facebook.com/franklinsquare',
83
+			"post_dummy" => '1'
84
+		);
85
+
86
+
87
+		break;
88
+	case 2:
89
+		$image_array = array();
90
+		$post_meta = array();
91
+
92
+		/// Attractions ////post start 2///
93
+		$image_array[] = "$dummy_image_url/a6.jpg";
94
+		$image_array[] = "$dummy_image_url/a1.jpg";
95
+		$image_array[] = "$dummy_image_url/a3.jpg";
96
+		$image_array[] = "$dummy_image_url/a4.jpg";
97
+		$image_array[] = "$dummy_image_url/a5.jpg";
98
+		$image_array[] = "$dummy_image_url/a2.jpg";
99
+		$image_array[] = "$dummy_image_url/a7.jpg";
100
+		$image_array[] = "$dummy_image_url/a8.jpg";
101
+		$image_array[] = "$dummy_image_url/a9.jpg";
102
+		$image_array[] = "$dummy_image_url/a10.jpg";
103
+		$image_array[] = "$dummy_image_url/a11.jpg";
104
+
105
+		$post_info[] = array(
106
+			"listing_type" => 'gd_place',
107
+			"post_title" => 'Please Touch Museum',
108
+			"post_desc" => '<h3>New Location! </h3>
109 109
 		
110 110
 		Who doesn&acute;t love the Please Touch Museum? And now, taking kids to the Museum is better than ever. The nation&acute;s premier children&acute;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.
111 111
 		
@@ -137,42 +137,42 @@  discard block
 block discarded – undo
137 137
 		
138 138
 		You can buy admission tickets to the Please Touch Museum online through our partners at the Independence Visitor Center. Just click the button below.',
139 139
 
140
-            "post_images" => $image_array,
141
-            "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
142
-            "post_tags" => array('Tags', 'Sample Tags'),
143
-            "geodir_video" => '',
144
-            "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
145
-            "geodir_contact" => '(222) 777-1111',
146
-            "geodir_email" => '[email protected]',
147
-            "geodir_website" => 'http://pleasetouchmuseum.com',
148
-            "geodir_twitter" => 'http://twitter.com/pleasetouchmuseum',
149
-            "geodir_facebook" => 'http://facebook.com/pleasetouchmuseum',
150
-            "post_dummy" => '1'
151
-        );
152
-
153
-        break;
154
-    case 3:
155
-        $image_array = array();
156
-        $post_meta = array();
157
-
158
-        ////post end///
159
-        /// Attractions ////post start 3///
160
-        $image_array[] = "$dummy_image_url/a9.jpg";
161
-        $image_array[] = "$dummy_image_url/a10.jpg";
162
-        $image_array[] = "$dummy_image_url/a3.jpg";
163
-        $image_array[] = "$dummy_image_url/a4.jpg";
164
-        $image_array[] = "$dummy_image_url/a5.jpg";
165
-        $image_array[] = "$dummy_image_url/a2.jpg";
166
-        $image_array[] = "$dummy_image_url/a7.jpg";
167
-        $image_array[] = "$dummy_image_url/a8.jpg";
168
-        $image_array[] = "$dummy_image_url/a6.jpg";
169
-        $image_array[] = "$dummy_image_url/a1.jpg";
170
-        $image_array[] = "$dummy_image_url/a11.jpg";
171
-
172
-        $post_info[] = array(
173
-            "listing_type" => 'gd_place',
174
-            "post_title" => 'Longwood Gardens',
175
-            "post_desc" => '<h3>The Experience </h3>
140
+			"post_images" => $image_array,
141
+			"post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
142
+			"post_tags" => array('Tags', 'Sample Tags'),
143
+			"geodir_video" => '',
144
+			"geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
145
+			"geodir_contact" => '(222) 777-1111',
146
+			"geodir_email" => '[email protected]',
147
+			"geodir_website" => 'http://pleasetouchmuseum.com',
148
+			"geodir_twitter" => 'http://twitter.com/pleasetouchmuseum',
149
+			"geodir_facebook" => 'http://facebook.com/pleasetouchmuseum',
150
+			"post_dummy" => '1'
151
+		);
152
+
153
+		break;
154
+	case 3:
155
+		$image_array = array();
156
+		$post_meta = array();
157
+
158
+		////post end///
159
+		/// Attractions ////post start 3///
160
+		$image_array[] = "$dummy_image_url/a9.jpg";
161
+		$image_array[] = "$dummy_image_url/a10.jpg";
162
+		$image_array[] = "$dummy_image_url/a3.jpg";
163
+		$image_array[] = "$dummy_image_url/a4.jpg";
164
+		$image_array[] = "$dummy_image_url/a5.jpg";
165
+		$image_array[] = "$dummy_image_url/a2.jpg";
166
+		$image_array[] = "$dummy_image_url/a7.jpg";
167
+		$image_array[] = "$dummy_image_url/a8.jpg";
168
+		$image_array[] = "$dummy_image_url/a6.jpg";
169
+		$image_array[] = "$dummy_image_url/a1.jpg";
170
+		$image_array[] = "$dummy_image_url/a11.jpg";
171
+
172
+		$post_info[] = array(
173
+			"listing_type" => 'gd_place',
174
+			"post_title" => 'Longwood Gardens',
175
+			"post_desc" => '<h3>The Experience </h3>
176 176
 		
177 177
 		When you&acute;re at Longwood Gardens, it&acute;s easy to imagine that you&acute;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.
178 178
 		
@@ -197,42 +197,42 @@  discard block
 block discarded – undo
197 197
 		<h3>Buy Tickets Online In Advance </h3>
198 198
 		
199 199
 		You can buy admission tickets to Longwood Gardens online through our partners at the Independence Visitor Center. Just click the button below.',
200
-            "post_images" => $image_array,
201
-            "post_category" => array('gd_placecategory' => array('Attractions')),
202
-            "post_tags" => array('wood', 'garden'),
203
-            "geodir_video" => '',
204
-            "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
205
-            "geodir_contact" => '(111) 888-1111',
206
-            "geodir_email" => '[email protected]',
207
-            "geodir_website" => 'http://longwoodgardens.com',
208
-            "geodir_twitter" => 'http://twitter.com/longwoodgardens',
209
-            "geodir_facebook" => 'http://facebook.com/longwoodgardens',
210
-            "post_dummy" => '1'
211
-        );
212
-        break;
213
-    ////post end///
214
-    /// Attractions ////post start 4///
215
-
216
-    case 4:
217
-
218
-        $image_array = array();
219
-        $post_meta = array();
220
-        $image_array[] = "$dummy_image_url/a11.jpg";
221
-        $image_array[] = "$dummy_image_url/a10.jpg";
222
-        $image_array[] = "$dummy_image_url/a3.jpg";
223
-        $image_array[] = "$dummy_image_url/a4.jpg";
224
-        $image_array[] = "$dummy_image_url/a5.jpg";
225
-        $image_array[] = "$dummy_image_url/a2.jpg";
226
-        $image_array[] = "$dummy_image_url/a7.jpg";
227
-        $image_array[] = "$dummy_image_url/a8.jpg";
228
-        $image_array[] = "$dummy_image_url/a6.jpg";
229
-        $image_array[] = "$dummy_image_url/a1.jpg";
230
-        $image_array[] = "$dummy_image_url/a9.jpg";
231
-
232
-        $post_info[] = array(
233
-            "listing_type" => 'gd_place',
234
-            "post_title" => 'The Philadelphia Zoo',
235
-            "post_desc" => '<h3>The Zoo 150th Birthday</h3>
200
+			"post_images" => $image_array,
201
+			"post_category" => array('gd_placecategory' => array('Attractions')),
202
+			"post_tags" => array('wood', 'garden'),
203
+			"geodir_video" => '',
204
+			"geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm',
205
+			"geodir_contact" => '(111) 888-1111',
206
+			"geodir_email" => '[email protected]',
207
+			"geodir_website" => 'http://longwoodgardens.com',
208
+			"geodir_twitter" => 'http://twitter.com/longwoodgardens',
209
+			"geodir_facebook" => 'http://facebook.com/longwoodgardens',
210
+			"post_dummy" => '1'
211
+		);
212
+		break;
213
+	////post end///
214
+	/// Attractions ////post start 4///
215
+
216
+	case 4:
217
+
218
+		$image_array = array();
219
+		$post_meta = array();
220
+		$image_array[] = "$dummy_image_url/a11.jpg";
221
+		$image_array[] = "$dummy_image_url/a10.jpg";
222
+		$image_array[] = "$dummy_image_url/a3.jpg";
223
+		$image_array[] = "$dummy_image_url/a4.jpg";
224
+		$image_array[] = "$dummy_image_url/a5.jpg";
225
+		$image_array[] = "$dummy_image_url/a2.jpg";
226
+		$image_array[] = "$dummy_image_url/a7.jpg";
227
+		$image_array[] = "$dummy_image_url/a8.jpg";
228
+		$image_array[] = "$dummy_image_url/a6.jpg";
229
+		$image_array[] = "$dummy_image_url/a1.jpg";
230
+		$image_array[] = "$dummy_image_url/a9.jpg";
231
+
232
+		$post_info[] = array(
233
+			"listing_type" => 'gd_place',
234
+			"post_title" => 'The Philadelphia Zoo',
235
+			"post_desc" => '<h3>The Zoo 150th Birthday</h3>
236 236
 		
237 237
 		The Philadelphia Zoo celebrated its 150th anniversary in 2009. So stop by and celebrate this major achievement at America&acute;s first zoo!
238 238
 		
@@ -267,45 +267,45 @@  discard block
 block discarded – undo
267 267
 		The nation&acute;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&acute;s grandson; its botanical collections of over 500 plant species; its groundbreaking research and its fine veterinary facilities.
268 268
 		
269 269
 		The Primate Reserve, Carnivore Kingdom, and Rare Animal Conservation Center, with its tree kangaroos and blue-eyed lemurs, are brand new, but there&acute;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&acute;s perspective; outdoors, the Zoo Balloon lifts passengers 400 feet into the air for a bird&acute;s-eye view of the zoo.',
270
-            "post_images" => $image_array,
271
-            "post_category" => array('gd_placecategory' => array('Attractions')),
272
-            "post_tags" => array('wood', 'garden'),
273
-            "geodir_video" => '',
274
-            "geodir_timing" => 'Open today until 11.30 a.m., Sunday 11 am to 7 pm',
275
-            "geodir_contact" => '(211) 143-1900',
276
-            "geodir_email" => '[email protected]',
277
-            "geodir_website" => 'http://philadelphiazoo.com',
278
-            "geodir_twitter" => 'http://twitter.com/philadelphiazoo',
279
-            "geodir_facebook" => 'http://facebook.com/philadelphiazoo',
280
-            "post_dummy" => '1'
281
-        );
282
-
283
-        ////post end///
284
-        /// Attractions ////post start 4///
285
-        break;
286
-    case 5:
287
-
288
-
289
-        $image_array = array();
290
-        $post_meta = array();
291
-
292
-        /// Attractions ////post start 5///
293
-        $image_array[] = "$dummy_image_url/a12.jpg";
294
-        $image_array[] = "$dummy_image_url/a13.jpg";
295
-        $image_array[] = "$dummy_image_url/a3.jpg";
296
-        $image_array[] = "$dummy_image_url/a4.jpg";
297
-        $image_array[] = "$dummy_image_url/a5.jpg";
298
-        $image_array[] = "$dummy_image_url/a2.jpg";
299
-        $image_array[] = "$dummy_image_url/a7.jpg";
300
-        $image_array[] = "$dummy_image_url/a8.jpg";
301
-        $image_array[] = "$dummy_image_url/a6.jpg";
302
-        $image_array[] = "$dummy_image_url/a1.jpg";
303
-        $image_array[] = "$dummy_image_url/a9.jpg";
304
-
305
-        $post_info[] = array(
306
-            "listing_type" => 'gd_place',
307
-            "post_title" => 'National Constitution Center',
308
-            "post_desc" => '<h3>The Experience</h3>
270
+			"post_images" => $image_array,
271
+			"post_category" => array('gd_placecategory' => array('Attractions')),
272
+			"post_tags" => array('wood', 'garden'),
273
+			"geodir_video" => '',
274
+			"geodir_timing" => 'Open today until 11.30 a.m., Sunday 11 am to 7 pm',
275
+			"geodir_contact" => '(211) 143-1900',
276
+			"geodir_email" => '[email protected]',
277
+			"geodir_website" => 'http://philadelphiazoo.com',
278
+			"geodir_twitter" => 'http://twitter.com/philadelphiazoo',
279
+			"geodir_facebook" => 'http://facebook.com/philadelphiazoo',
280
+			"post_dummy" => '1'
281
+		);
282
+
283
+		////post end///
284
+		/// Attractions ////post start 4///
285
+		break;
286
+	case 5:
287
+
288
+
289
+		$image_array = array();
290
+		$post_meta = array();
291
+
292
+		/// Attractions ////post start 5///
293
+		$image_array[] = "$dummy_image_url/a12.jpg";
294
+		$image_array[] = "$dummy_image_url/a13.jpg";
295
+		$image_array[] = "$dummy_image_url/a3.jpg";
296
+		$image_array[] = "$dummy_image_url/a4.jpg";
297
+		$image_array[] = "$dummy_image_url/a5.jpg";
298
+		$image_array[] = "$dummy_image_url/a2.jpg";
299
+		$image_array[] = "$dummy_image_url/a7.jpg";
300
+		$image_array[] = "$dummy_image_url/a8.jpg";
301
+		$image_array[] = "$dummy_image_url/a6.jpg";
302
+		$image_array[] = "$dummy_image_url/a1.jpg";
303
+		$image_array[] = "$dummy_image_url/a9.jpg";
304
+
305
+		$post_info[] = array(
306
+			"listing_type" => 'gd_place',
307
+			"post_title" => 'National Constitution Center',
308
+			"post_desc" => '<h3>The Experience</h3>
309 309
 	
310 310
 	It only four pages long, but the U.S. Constitution is among the most influential and important documents in the history of the world.
311 311
 	
@@ -327,45 +327,45 @@  discard block
 block discarded – undo
327 327
 	<h3>Kids Stuff </h3>
328 328
 	
329 329
 	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.',
330
-            "post_images" => $image_array,
331
-            "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
332
-            "post_tags" => array('Tag', 'Center'),
333
-            "geodir_video" => '',
334
-            "geodir_timing" => 'Open today until 9.30 a.m., Sunday 11 am to 7 pm',
335
-            "geodir_contact" => '(111) 111-1111',
336
-            "geodir_email" => '[email protected]',
337
-            "geodir_website" => 'http://ncc.com',
338
-            "geodir_twitter" => 'http://twitter.com/ncc',
339
-            "geodir_facebook" => 'http://facebook.com/ncc',
340
-            "post_dummy" => '1'
341
-        );
342
-
343
-        ////post end///
344
-        /// Attractions ////post start 5///
345
-        break;
346
-    case 6:
347
-
348
-
349
-        $image_array = array();
350
-        $post_meta = array();
351
-
352
-        /// Attractions ////post start 6///
353
-        $image_array[] = "$dummy_image_url/a14.jpg";
354
-        $image_array[] = "$dummy_image_url/a13.jpg";
355
-        $image_array[] = "$dummy_image_url/a3.jpg";
356
-        $image_array[] = "$dummy_image_url/a4.jpg";
357
-        $image_array[] = "$dummy_image_url/a5.jpg";
358
-        $image_array[] = "$dummy_image_url/a2.jpg";
359
-        $image_array[] = "$dummy_image_url/a7.jpg";
360
-        $image_array[] = "$dummy_image_url/a8.jpg";
361
-        $image_array[] = "$dummy_image_url/a6.jpg";
362
-        $image_array[] = "$dummy_image_url/a1.jpg";
363
-        $image_array[] = "$dummy_image_url/a9.jpg";
364
-
365
-        $post_info[] = array(
366
-            "listing_type" => 'gd_place',
367
-            "post_title" => 'Sadsbury Woods Preserve',
368
-            "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.
330
+			"post_images" => $image_array,
331
+			"post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
332
+			"post_tags" => array('Tag', 'Center'),
333
+			"geodir_video" => '',
334
+			"geodir_timing" => 'Open today until 9.30 a.m., Sunday 11 am to 7 pm',
335
+			"geodir_contact" => '(111) 111-1111',
336
+			"geodir_email" => '[email protected]',
337
+			"geodir_website" => 'http://ncc.com',
338
+			"geodir_twitter" => 'http://twitter.com/ncc',
339
+			"geodir_facebook" => 'http://facebook.com/ncc',
340
+			"post_dummy" => '1'
341
+		);
342
+
343
+		////post end///
344
+		/// Attractions ////post start 5///
345
+		break;
346
+	case 6:
347
+
348
+
349
+		$image_array = array();
350
+		$post_meta = array();
351
+
352
+		/// Attractions ////post start 6///
353
+		$image_array[] = "$dummy_image_url/a14.jpg";
354
+		$image_array[] = "$dummy_image_url/a13.jpg";
355
+		$image_array[] = "$dummy_image_url/a3.jpg";
356
+		$image_array[] = "$dummy_image_url/a4.jpg";
357
+		$image_array[] = "$dummy_image_url/a5.jpg";
358
+		$image_array[] = "$dummy_image_url/a2.jpg";
359
+		$image_array[] = "$dummy_image_url/a7.jpg";
360
+		$image_array[] = "$dummy_image_url/a8.jpg";
361
+		$image_array[] = "$dummy_image_url/a6.jpg";
362
+		$image_array[] = "$dummy_image_url/a1.jpg";
363
+		$image_array[] = "$dummy_image_url/a9.jpg";
364
+
365
+		$post_info[] = array(
366
+			"listing_type" => 'gd_place',
367
+			"post_title" => 'Sadsbury Woods Preserve',
368
+			"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.
369 369
 	
370 370
 	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.
371 371
 	
@@ -381,45 +381,45 @@  discard block
 block discarded – undo
381 381
 	Outsider Tip
382 382
 	
383 383
 	The deep forest is a great place for spotting neo-tropical songbirds in the spring and summer months',
384
-            "post_images" => $image_array,
385
-            "post_category" => array('gd_placecategory' => array('Attractions')),
386
-            "post_tags" => array('sample', 'tags'),
387
-            "geodir_video" => '',
388
-            "geodir_timing" => 'Open today until 12.30 p.m., Sunday 12 pm to 7 pm',
389
-            "geodir_contact" => '(222) 999-9999',
390
-            "geodir_email" => '[email protected]',
391
-            "geodir_website" => 'http://swp.com',
392
-            "geodir_twitter" => 'http://twitter.com/swp',
393
-            "geodir_facebook" => 'http://facebook.com/swp',
394
-            "post_dummy" => '1'
395
-        );
396
-
397
-        ////post end///
398
-        /// Attractions ////post start 6///
399
-
400
-        break;
401
-    case 7:
402
-
403
-        $image_array = array();
404
-        $post_meta = array();
405
-
406
-        /// Attractions ////post start 7///
407
-        $image_array[] = "$dummy_image_url/a15.jpg";
408
-        $image_array[] = "$dummy_image_url/a16.jpg";
409
-        $image_array[] = "$dummy_image_url/a17.jpg";
410
-        $image_array[] = "$dummy_image_url/a4.jpg";
411
-        $image_array[] = "$dummy_image_url/a5.jpg";
412
-        $image_array[] = "$dummy_image_url/a2.jpg";
413
-        $image_array[] = "$dummy_image_url/a7.jpg";
414
-        $image_array[] = "$dummy_image_url/a8.jpg";
415
-        $image_array[] = "$dummy_image_url/a6.jpg";
416
-        $image_array[] = "$dummy_image_url/a1.jpg";
417
-        $image_array[] = "$dummy_image_url/a9.jpg";
418
-
419
-        $post_info[] = array(
420
-            "listing_type" => 'gd_place',
421
-            "post_title" => 'Museum Without Walls',
422
-            "post_desc" => '<h3>The Experience </h3>
384
+			"post_images" => $image_array,
385
+			"post_category" => array('gd_placecategory' => array('Attractions')),
386
+			"post_tags" => array('sample', 'tags'),
387
+			"geodir_video" => '',
388
+			"geodir_timing" => 'Open today until 12.30 p.m., Sunday 12 pm to 7 pm',
389
+			"geodir_contact" => '(222) 999-9999',
390
+			"geodir_email" => '[email protected]',
391
+			"geodir_website" => 'http://swp.com',
392
+			"geodir_twitter" => 'http://twitter.com/swp',
393
+			"geodir_facebook" => 'http://facebook.com/swp',
394
+			"post_dummy" => '1'
395
+		);
396
+
397
+		////post end///
398
+		/// Attractions ////post start 6///
399
+
400
+		break;
401
+	case 7:
402
+
403
+		$image_array = array();
404
+		$post_meta = array();
405
+
406
+		/// Attractions ////post start 7///
407
+		$image_array[] = "$dummy_image_url/a15.jpg";
408
+		$image_array[] = "$dummy_image_url/a16.jpg";
409
+		$image_array[] = "$dummy_image_url/a17.jpg";
410
+		$image_array[] = "$dummy_image_url/a4.jpg";
411
+		$image_array[] = "$dummy_image_url/a5.jpg";
412
+		$image_array[] = "$dummy_image_url/a2.jpg";
413
+		$image_array[] = "$dummy_image_url/a7.jpg";
414
+		$image_array[] = "$dummy_image_url/a8.jpg";
415
+		$image_array[] = "$dummy_image_url/a6.jpg";
416
+		$image_array[] = "$dummy_image_url/a1.jpg";
417
+		$image_array[] = "$dummy_image_url/a9.jpg";
418
+
419
+		$post_info[] = array(
420
+			"listing_type" => 'gd_place',
421
+			"post_title" => 'Museum Without Walls',
422
+			"post_desc" => '<h3>The Experience </h3>
423 423
 	
424 424
 	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.
425 425
 	
@@ -429,45 +429,45 @@  discard block
 block discarded – undo
429 429
 	<h3>History </h3>
430 430
 	
431 431
 	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. ',
432
-            "post_images" => $image_array,
433
-            "post_category" => array('gd_placecategory' => array('Attractions')),
434
-            "post_tags" => array('Museum'),
435
-            "geodir_video" => '',
436
-            "geodir_timing" => 'Open today until 10.30 a.m., Sunday 10 am to 7 pm',
437
-            "geodir_contact" => '(222) 999-9999',
438
-            "geodir_email" => '[email protected]',
439
-            "geodir_website" => 'http://museumwithoutwallsaudio.org/',
440
-            "geodir_twitter" => 'http://twitter.com/mwwalls',
441
-            "geodir_facebook" => 'http://facebook.com/mwwalls',
442
-            "post_dummy" => '1'
443
-        );
444
-
445
-        ////post end///
446
-        /// Attractions ////post start 7///
447
-
448
-        break;
449
-    case 8:
450
-
451
-        $image_array = array();
452
-        $post_meta = array();
453
-
454
-        /// Attractions ////post start 8///
455
-        $image_array[] = "$dummy_image_url/a18.jpg";
456
-        $image_array[] = "$dummy_image_url/a10.jpg";
457
-        $image_array[] = "$dummy_image_url/a3.jpg";
458
-        $image_array[] = "$dummy_image_url/a4.jpg";
459
-        $image_array[] = "$dummy_image_url/a5.jpg";
460
-        $image_array[] = "$dummy_image_url/a2.jpg";
461
-        $image_array[] = "$dummy_image_url/a7.jpg";
462
-        $image_array[] = "$dummy_image_url/a8.jpg";
463
-        $image_array[] = "$dummy_image_url/a6.jpg";
464
-        $image_array[] = "$dummy_image_url/a1.jpg";
465
-        $image_array[] = "$dummy_image_url/a9.jpg";
466
-
467
-        $post_info[] = array(
468
-            "listing_type" => 'gd_place',
469
-            "post_title" => 'Audacious Freedom',
470
-            "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.
432
+			"post_images" => $image_array,
433
+			"post_category" => array('gd_placecategory' => array('Attractions')),
434
+			"post_tags" => array('Museum'),
435
+			"geodir_video" => '',
436
+			"geodir_timing" => 'Open today until 10.30 a.m., Sunday 10 am to 7 pm',
437
+			"geodir_contact" => '(222) 999-9999',
438
+			"geodir_email" => '[email protected]',
439
+			"geodir_website" => 'http://museumwithoutwallsaudio.org/',
440
+			"geodir_twitter" => 'http://twitter.com/mwwalls',
441
+			"geodir_facebook" => 'http://facebook.com/mwwalls',
442
+			"post_dummy" => '1'
443
+		);
444
+
445
+		////post end///
446
+		/// Attractions ////post start 7///
447
+
448
+		break;
449
+	case 8:
450
+
451
+		$image_array = array();
452
+		$post_meta = array();
453
+
454
+		/// Attractions ////post start 8///
455
+		$image_array[] = "$dummy_image_url/a18.jpg";
456
+		$image_array[] = "$dummy_image_url/a10.jpg";
457
+		$image_array[] = "$dummy_image_url/a3.jpg";
458
+		$image_array[] = "$dummy_image_url/a4.jpg";
459
+		$image_array[] = "$dummy_image_url/a5.jpg";
460
+		$image_array[] = "$dummy_image_url/a2.jpg";
461
+		$image_array[] = "$dummy_image_url/a7.jpg";
462
+		$image_array[] = "$dummy_image_url/a8.jpg";
463
+		$image_array[] = "$dummy_image_url/a6.jpg";
464
+		$image_array[] = "$dummy_image_url/a1.jpg";
465
+		$image_array[] = "$dummy_image_url/a9.jpg";
466
+
467
+		$post_info[] = array(
468
+			"listing_type" => 'gd_place',
469
+			"post_title" => 'Audacious Freedom',
470
+			"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.
471 471
 	
472 472
 	Discover how African Americans in Philadelphia lived and worked while helping to shape the young nation in its formative stages.
473 473
 	
@@ -475,45 +475,45 @@  discard block
 block discarded – undo
475 475
 	
476 476
 	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&acute;s Corner, which highlights the daily lives of children during that period.
477 477
 	',
478
-            "post_images" => $image_array,
479
-            "post_category" => array('gd_placecategory' => array('Attractions')),
480
-            "post_tags" => array('Tag1'),
481
-            "geodir_video" => '',
482
-            "geodir_timing" => 'Open today until 11.30 a.m., Sunday 1 pm to 7 pm',
483
-            "geodir_contact" => '(777) 777-7777',
484
-            "geodir_email" => '[email protected]',
485
-            "geodir_website" => 'http://www.aampmuseum.org/',
486
-            "geodir_twitter" => 'http://twitter.com/aampmuseum',
487
-            "geodir_facebook" => 'http://facebook.com/aampmuseum',
488
-            "post_dummy" => '1'
489
-        );
490
-
491
-        ////post end///
492
-        /// Attractions ////post start 8///
493
-
494
-
495
-        break;
496
-    case 9:
497
-        $image_array = array();
498
-        $post_meta = array();
499
-
500
-        /// Attractions ////post start 9///
501
-        $image_array[] = "$dummy_image_url/a19.jpg";
502
-        $image_array[] = "$dummy_image_url/a20.jpg";
503
-        $image_array[] = "$dummy_image_url/a3.jpg";
504
-        $image_array[] = "$dummy_image_url/a4.jpg";
505
-        $image_array[] = "$dummy_image_url/a5.jpg";
506
-        $image_array[] = "$dummy_image_url/a2.jpg";
507
-        $image_array[] = "$dummy_image_url/a7.jpg";
508
-        $image_array[] = "$dummy_image_url/a8.jpg";
509
-        $image_array[] = "$dummy_image_url/a6.jpg";
510
-        $image_array[] = "$dummy_image_url/a1.jpg";
511
-        $image_array[] = "$dummy_image_url/a9.jpg";
512
-
513
-        $post_info[] = array(
514
-            "listing_type" => 'gd_place',
515
-            "post_title" => 'The Liberty Bell Center',
516
-            "post_desc" => '<h3>The Experience </h3>
478
+			"post_images" => $image_array,
479
+			"post_category" => array('gd_placecategory' => array('Attractions')),
480
+			"post_tags" => array('Tag1'),
481
+			"geodir_video" => '',
482
+			"geodir_timing" => 'Open today until 11.30 a.m., Sunday 1 pm to 7 pm',
483
+			"geodir_contact" => '(777) 777-7777',
484
+			"geodir_email" => '[email protected]',
485
+			"geodir_website" => 'http://www.aampmuseum.org/',
486
+			"geodir_twitter" => 'http://twitter.com/aampmuseum',
487
+			"geodir_facebook" => 'http://facebook.com/aampmuseum',
488
+			"post_dummy" => '1'
489
+		);
490
+
491
+		////post end///
492
+		/// Attractions ////post start 8///
493
+
494
+
495
+		break;
496
+	case 9:
497
+		$image_array = array();
498
+		$post_meta = array();
499
+
500
+		/// Attractions ////post start 9///
501
+		$image_array[] = "$dummy_image_url/a19.jpg";
502
+		$image_array[] = "$dummy_image_url/a20.jpg";
503
+		$image_array[] = "$dummy_image_url/a3.jpg";
504
+		$image_array[] = "$dummy_image_url/a4.jpg";
505
+		$image_array[] = "$dummy_image_url/a5.jpg";
506
+		$image_array[] = "$dummy_image_url/a2.jpg";
507
+		$image_array[] = "$dummy_image_url/a7.jpg";
508
+		$image_array[] = "$dummy_image_url/a8.jpg";
509
+		$image_array[] = "$dummy_image_url/a6.jpg";
510
+		$image_array[] = "$dummy_image_url/a1.jpg";
511
+		$image_array[] = "$dummy_image_url/a9.jpg";
512
+
513
+		$post_info[] = array(
514
+			"listing_type" => 'gd_place',
515
+			"post_title" => 'The Liberty Bell Center',
516
+			"post_desc" => '<h3>The Experience </h3>
517 517
 	
518 518
 	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.
519 519
 	
@@ -534,45 +534,45 @@  discard block
 block discarded – undo
534 534
 	The Bell is suspended from what is believed to be its original yoke, made of American elm.
535 535
 	
536 536
 	The Liberty Bell weighs 2,080 pounds. The yoke weighs about 100 pounds.',
537
-            "post_images" => $image_array,
538
-            "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
539
-            "post_tags" => array(''),
540
-            "geodir_video" => '',
541
-            "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.',
542
-            "geodir_contact" => '(777) 666-6666',
543
-            "geodir_email" => '[email protected]',
544
-            "geodir_website" => 'http://www.nps.gov/inde',
545
-            "geodir_twitter" => 'http://twitter.com/nps',
546
-            "geodir_facebook" => 'http://facebook.com/nps',
547
-            "post_dummy" => '1'
548
-        );
549
-
550
-        ////post end///
551
-        /// Attractions ////post start 9///
552
-        break;
553
-    case 10:
554
-
555
-
556
-        $image_array = array();
557
-        $post_meta = array();
558
-
559
-        /// Attractions ////post start 10///
560
-        $image_array[] = "$dummy_image_url/a19.jpg";
561
-        $image_array[] = "$dummy_image_url/a20.jpg";
562
-        $image_array[] = "$dummy_image_url/a3.jpg";
563
-        $image_array[] = "$dummy_image_url/a4.jpg";
564
-        $image_array[] = "$dummy_image_url/a5.jpg";
565
-        $image_array[] = "$dummy_image_url/a2.jpg";
566
-        $image_array[] = "$dummy_image_url/a7.jpg";
567
-        $image_array[] = "$dummy_image_url/a8.jpg";
568
-        $image_array[] = "$dummy_image_url/a6.jpg";
569
-        $image_array[] = "$dummy_image_url/a1.jpg";
570
-        $image_array[] = "$dummy_image_url/a9.jpg";
571
-
572
-        $post_info[] = array(
573
-            "listing_type" => 'gd_place',
574
-            "post_title" => 'Rittenhouse Square',
575
-            "post_desc" => '
537
+			"post_images" => $image_array,
538
+			"post_category" => array('gd_placecategory' => array('Attractions', 'Feature')),
539
+			"post_tags" => array(''),
540
+			"geodir_video" => '',
541
+			"geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.',
542
+			"geodir_contact" => '(777) 666-6666',
543
+			"geodir_email" => '[email protected]',
544
+			"geodir_website" => 'http://www.nps.gov/inde',
545
+			"geodir_twitter" => 'http://twitter.com/nps',
546
+			"geodir_facebook" => 'http://facebook.com/nps',
547
+			"post_dummy" => '1'
548
+		);
549
+
550
+		////post end///
551
+		/// Attractions ////post start 9///
552
+		break;
553
+	case 10:
554
+
555
+
556
+		$image_array = array();
557
+		$post_meta = array();
558
+
559
+		/// Attractions ////post start 10///
560
+		$image_array[] = "$dummy_image_url/a19.jpg";
561
+		$image_array[] = "$dummy_image_url/a20.jpg";
562
+		$image_array[] = "$dummy_image_url/a3.jpg";
563
+		$image_array[] = "$dummy_image_url/a4.jpg";
564
+		$image_array[] = "$dummy_image_url/a5.jpg";
565
+		$image_array[] = "$dummy_image_url/a2.jpg";
566
+		$image_array[] = "$dummy_image_url/a7.jpg";
567
+		$image_array[] = "$dummy_image_url/a8.jpg";
568
+		$image_array[] = "$dummy_image_url/a6.jpg";
569
+		$image_array[] = "$dummy_image_url/a1.jpg";
570
+		$image_array[] = "$dummy_image_url/a9.jpg";
571
+
572
+		$post_info[] = array(
573
+			"listing_type" => 'gd_place',
574
+			"post_title" => 'Rittenhouse Square',
575
+			"post_desc" => '
576 576
 	
577 577
 	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”.
578 578
 	<h3> History </h3>
@@ -605,45 +605,45 @@  discard block
 block discarded – undo
605 605
 	
606 606
 	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.
607 607
 	',
608
-            "post_images" => $image_array,
609
-            "post_category" => array('gd_placecategory' => array('Attractions')),
610
-            "post_tags" => array('Museum'),
611
-            "geodir_video" => '',
612
-            "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.',
613
-            "geodir_contact" => '(777) 666-6666',
614
-            "geodir_email" => '[email protected]',
615
-            "geodir_website" => 'http://www.fairmountpark.org/rittenhousesquare.asp',
616
-            "geodir_twitter" => 'http://twitter.com/fairmountpark',
617
-            "geodir_facebook" => 'http://facebook.com/fairmountpark',
618
-            "post_dummy" => '1'
619
-        );
620
-
621
-        ////post end///
622
-        /// Attractions ////post start 10///
623
-        break;
624
-    case 11:
625
-
626
-
627
-        $image_array = array();
628
-        $post_meta = array();
629
-
630
-        /// Hotels ////post start 1///
631
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
632
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
633
-        $image_array[] = "$dummy_image_url/hotels3.jpg";
634
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
635
-        $image_array[] = "$dummy_image_url/hotels5.jpg";
636
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
637
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
638
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
639
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
640
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
641
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
642
-
643
-        $post_info[] = array(
644
-            "listing_type" => 'gd_place',
645
-            "post_title" => 'Loews Philadelphia Hotel',
646
-            "post_desc" => '
608
+			"post_images" => $image_array,
609
+			"post_category" => array('gd_placecategory' => array('Attractions')),
610
+			"post_tags" => array('Museum'),
611
+			"geodir_video" => '',
612
+			"geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.',
613
+			"geodir_contact" => '(777) 666-6666',
614
+			"geodir_email" => '[email protected]',
615
+			"geodir_website" => 'http://www.fairmountpark.org/rittenhousesquare.asp',
616
+			"geodir_twitter" => 'http://twitter.com/fairmountpark',
617
+			"geodir_facebook" => 'http://facebook.com/fairmountpark',
618
+			"post_dummy" => '1'
619
+		);
620
+
621
+		////post end///
622
+		/// Attractions ////post start 10///
623
+		break;
624
+	case 11:
625
+
626
+
627
+		$image_array = array();
628
+		$post_meta = array();
629
+
630
+		/// Hotels ////post start 1///
631
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
632
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
633
+		$image_array[] = "$dummy_image_url/hotels3.jpg";
634
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
635
+		$image_array[] = "$dummy_image_url/hotels5.jpg";
636
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
637
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
638
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
639
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
640
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
641
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
642
+
643
+		$post_info[] = array(
644
+			"listing_type" => 'gd_place',
645
+			"post_title" => 'Loews Philadelphia Hotel',
646
+			"post_desc" => '
647 647
 	
648 648
 	<h3>OVERVIEW </h3>
649 649
 	
@@ -710,45 +710,45 @@  discard block
 block discarded – undo
710 710
 	
711 711
 	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.
712 712
 	',
713
-            "post_images" => $image_array,
714
-            "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
715
-            "post_tags" => array(''),
716
-            "geodir_video" => '',
717
-            "geodir_timing" => 'Daily, 6:30 am – 12:00 pm',
718
-            "geodir_contact" => '(111) 111-0000',
719
-            "geodir_email" => '[email protected]',
720
-            "geodir_website" => 'http://www.loewshotels.com/en/hotels/philadelphia-hotel/overview.aspx',
721
-            "geodir_twitter" => 'http://twitter.com/loewshotels',
722
-            "geodir_facebook" => 'http://facebook.com/loewshotels',
723
-            "post_dummy" => '1'
724
-        );
725
-
726
-        ////post end///
727
-        /// Hotels ////post start 1///
728
-        break;
729
-    case 12:
730
-
731
-
732
-        $image_array = array();
733
-        $post_meta = array();
734
-
735
-        /// Hotels ////post start 2///
736
-        $image_array[] = "$dummy_image_url/hotels5.jpg";
737
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
738
-        $image_array[] = "$dummy_image_url/hotels3.jpg";
739
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
740
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
741
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
742
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
743
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
744
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
745
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
746
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
747
-
748
-        $post_info[] = array(
749
-            "listing_type" => 'gd_place',
750
-            "post_title" => 'Embassy Suites Philadelphia',
751
-            "post_desc" => '
713
+			"post_images" => $image_array,
714
+			"post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
715
+			"post_tags" => array(''),
716
+			"geodir_video" => '',
717
+			"geodir_timing" => 'Daily, 6:30 am – 12:00 pm',
718
+			"geodir_contact" => '(111) 111-0000',
719
+			"geodir_email" => '[email protected]',
720
+			"geodir_website" => 'http://www.loewshotels.com/en/hotels/philadelphia-hotel/overview.aspx',
721
+			"geodir_twitter" => 'http://twitter.com/loewshotels',
722
+			"geodir_facebook" => 'http://facebook.com/loewshotels',
723
+			"post_dummy" => '1'
724
+		);
725
+
726
+		////post end///
727
+		/// Hotels ////post start 1///
728
+		break;
729
+	case 12:
730
+
731
+
732
+		$image_array = array();
733
+		$post_meta = array();
734
+
735
+		/// Hotels ////post start 2///
736
+		$image_array[] = "$dummy_image_url/hotels5.jpg";
737
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
738
+		$image_array[] = "$dummy_image_url/hotels3.jpg";
739
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
740
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
741
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
742
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
743
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
744
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
745
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
746
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
747
+
748
+		$post_info[] = array(
749
+			"listing_type" => 'gd_place',
750
+			"post_title" => 'Embassy Suites Philadelphia',
751
+			"post_desc" => '
752 752
 	The newly renovated Embassy Suites Philadelphia – Center City hotel is conveniently situated in the heart of downtown Philadelphia, Pennsylvania and Philadelphia&acute;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:
753 753
 	
754 754
 	Philadelphia Museum of Art
@@ -764,45 +764,45 @@  discard block
 block discarded – undo
764 764
 	
765 765
 	A delicious, complimentary cooked-to-order breakfast is offered each morning, and a hotel Manager&acute;s Reception every night – featuring complimentary refreshments and great company.
766 766
 	',
767
-            "post_images" => $image_array,
768
-            "post_category" => array('gd_placecategory' => array('Hotels')),
769
-            "post_tags" => array(''),
770
-            "geodir_video" => '',
771
-            "geodir_timing" => 'Daily, 10:30 am – 10 pm',
772
-            "geodir_contact" => '(111) 111-0000',
773
-            "geodir_email" => '[email protected]',
774
-            "geodir_website" => 'http://embassysuites1.hilton.com/en_US/es/hotel/PHLDTES-Embassy-Suites-Philadelphia-Center-City-Pennsylvania/index.do',
775
-            "geodir_twitter" => 'http://twitter.com/embassysuites1',
776
-            "geodir_facebook" => 'http://facebook.com/embassysuites1',
777
-            "post_dummy" => '1'
778
-        );
779
-
780
-        ////post end///
781
-        /// Hotels ////post start 2///
782
-
783
-        break;
784
-    case 13:
785
-
786
-        $image_array = array();
787
-        $post_meta = array();
788
-
789
-        /// Hotels ////post start 3///
790
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
791
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
792
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
793
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
794
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
795
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
796
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
797
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
798
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
799
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
800
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
801
-
802
-        $post_info[] = array(
803
-            "listing_type" => 'gd_place',
804
-            "post_title" => 'Doubletree Hotel Philadelphia',
805
-            "post_desc" => '
767
+			"post_images" => $image_array,
768
+			"post_category" => array('gd_placecategory' => array('Hotels')),
769
+			"post_tags" => array(''),
770
+			"geodir_video" => '',
771
+			"geodir_timing" => 'Daily, 10:30 am – 10 pm',
772
+			"geodir_contact" => '(111) 111-0000',
773
+			"geodir_email" => '[email protected]',
774
+			"geodir_website" => 'http://embassysuites1.hilton.com/en_US/es/hotel/PHLDTES-Embassy-Suites-Philadelphia-Center-City-Pennsylvania/index.do',
775
+			"geodir_twitter" => 'http://twitter.com/embassysuites1',
776
+			"geodir_facebook" => 'http://facebook.com/embassysuites1',
777
+			"post_dummy" => '1'
778
+		);
779
+
780
+		////post end///
781
+		/// Hotels ////post start 2///
782
+
783
+		break;
784
+	case 13:
785
+
786
+		$image_array = array();
787
+		$post_meta = array();
788
+
789
+		/// Hotels ////post start 3///
790
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
791
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
792
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
793
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
794
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
795
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
796
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
797
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
798
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
799
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
800
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
801
+
802
+		$post_info[] = array(
803
+			"listing_type" => 'gd_place',
804
+			"post_title" => 'Doubletree Hotel Philadelphia',
805
+			"post_desc" => '
806 806
 	With 434 rooms, the Doubletree Hotel is a great option for your upcoming stay in Philadelphia.
807 807
 	
808 808
 	<h3>Location </h3>
@@ -832,47 +832,47 @@  discard block
 block discarded – undo
832 832
 	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&acute;re close to everything you could ever want in a night on the town.
833 833
 	',
834 834
 
835
-            "post_images" => $image_array,
836
-
837
-            "post_category" => array('gd_placecategory' => array('Hotels')),
838
-            "post_tags" => array(''),
839
-            "geodir_video" => '',
840
-            "geodir_timing" => 'Daily, 10:30 am – 10 pm',
841
-            "geodir_contact" => '(111) 111-0000',
842
-            "geodir_email" => '[email protected]',
843
-            "geodir_website" => 'http://doubletree1.hilton.com/en_US/dt/hotel/PHLBLDT-Doubletree-Hotel-Philadelphia-Pennsylvania/index.do',
844
-            "geodir_twitter" => 'http://twitter.com/doubletree1',
845
-            "geodir_facebook" => 'http://facebook.com/doubletree1',
846
-            "post_dummy" => '1'
847
-        );
848
-
849
-        ////post end///
850
-        /// Hotels ////post start 3///
851
-
852
-        break;
853
-    case 14:
854
-
855
-
856
-        $image_array = array();
857
-        $post_meta = array();
858
-
859
-        /// Hotels ////post start 4///
860
-        $image_array[] = "$dummy_image_url/hotels15.jpg";
861
-        $image_array[] = "$dummy_image_url/hotels16.jpg";
862
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
863
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
864
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
865
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
866
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
867
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
868
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
869
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
870
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
871
-
872
-        $post_info[] = array(
873
-            "listing_type" => 'gd_place',
874
-            "post_title" => 'Philadelphia Marriott Downtown',
875
-            "post_desc" => '
835
+			"post_images" => $image_array,
836
+
837
+			"post_category" => array('gd_placecategory' => array('Hotels')),
838
+			"post_tags" => array(''),
839
+			"geodir_video" => '',
840
+			"geodir_timing" => 'Daily, 10:30 am – 10 pm',
841
+			"geodir_contact" => '(111) 111-0000',
842
+			"geodir_email" => '[email protected]',
843
+			"geodir_website" => 'http://doubletree1.hilton.com/en_US/dt/hotel/PHLBLDT-Doubletree-Hotel-Philadelphia-Pennsylvania/index.do',
844
+			"geodir_twitter" => 'http://twitter.com/doubletree1',
845
+			"geodir_facebook" => 'http://facebook.com/doubletree1',
846
+			"post_dummy" => '1'
847
+		);
848
+
849
+		////post end///
850
+		/// Hotels ////post start 3///
851
+
852
+		break;
853
+	case 14:
854
+
855
+
856
+		$image_array = array();
857
+		$post_meta = array();
858
+
859
+		/// Hotels ////post start 4///
860
+		$image_array[] = "$dummy_image_url/hotels15.jpg";
861
+		$image_array[] = "$dummy_image_url/hotels16.jpg";
862
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
863
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
864
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
865
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
866
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
867
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
868
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
869
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
870
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
871
+
872
+		$post_info[] = array(
873
+			"listing_type" => 'gd_place',
874
+			"post_title" => 'Philadelphia Marriott Downtown',
875
+			"post_desc" => '
876 876
 	Get ready to stay and play at the new aloft Philadelphia Airport!
877 877
 	
878 878
 	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.
@@ -899,45 +899,45 @@  discard block
 block discarded – undo
899 899
 	
900 900
 	Aahh…breathe deep at Aloft. This hotel is smoke-free.
901 901
 	',
902
-            "post_images" => $image_array,
903
-            "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
904
-            "post_tags" => array(''),
905
-            "geodir_video" => '',
906
-            "geodir_timing" => '24 Hours',
907
-            "geodir_contact" => '(123) 111-2222',
908
-            "geodir_email" => '[email protected]',
909
-            "geodir_website" => 'http://www.marriott.com/hotels/travel/phldt-philadelphia-marriott-downtown/',
910
-            "geodir_twitter" => 'http://twitter.com/marriott',
911
-            "geodir_facebook" => 'http://facebook.com/marriott',
912
-            "post_dummy" => '1'
913
-        );
914
-
915
-        ////post end///
916
-        /// Hotels ////post start 4///
917
-        break;
918
-    case 15:
919
-
920
-
921
-        $image_array = array();
922
-        $post_meta = array();
923
-
924
-        /// Hotels ////post start 5///
925
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
926
-        $image_array[] = "$dummy_image_url/hotels16.jpg";
927
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
928
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
929
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
930
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
931
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
932
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
933
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
934
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
935
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
936
-
937
-        $post_info[] = array(
938
-            "listing_type" => 'gd_place',
939
-            "post_title" => 'Hilton Inn at Penn',
940
-            "post_desc" => '
902
+			"post_images" => $image_array,
903
+			"post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
904
+			"post_tags" => array(''),
905
+			"geodir_video" => '',
906
+			"geodir_timing" => '24 Hours',
907
+			"geodir_contact" => '(123) 111-2222',
908
+			"geodir_email" => '[email protected]',
909
+			"geodir_website" => 'http://www.marriott.com/hotels/travel/phldt-philadelphia-marriott-downtown/',
910
+			"geodir_twitter" => 'http://twitter.com/marriott',
911
+			"geodir_facebook" => 'http://facebook.com/marriott',
912
+			"post_dummy" => '1'
913
+		);
914
+
915
+		////post end///
916
+		/// Hotels ////post start 4///
917
+		break;
918
+	case 15:
919
+
920
+
921
+		$image_array = array();
922
+		$post_meta = array();
923
+
924
+		/// Hotels ////post start 5///
925
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
926
+		$image_array[] = "$dummy_image_url/hotels16.jpg";
927
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
928
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
929
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
930
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
931
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
932
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
933
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
934
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
935
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
936
+
937
+		$post_info[] = array(
938
+			"listing_type" => 'gd_place',
939
+			"post_title" => 'Hilton Inn at Penn',
940
+			"post_desc" => '
941 941
 	Located in the heart of Penn&acute;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.
942 942
 	
943 943
 	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.
@@ -953,45 +953,45 @@  discard block
 block discarded – undo
953 953
 	
954 954
 	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.  
955 955
 	',
956
-            "post_images" => $image_array,
957
-            "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
958
-            "post_tags" => array(''),
959
-            "geodir_video" => '',
960
-            "geodir_timing" => 'Daily : 11 am to 11 pm',
961
-            "geodir_contact" => '(888) 888-8888',
962
-            "geodir_email" => '[email protected]',
963
-            "geodir_website" => 'http://www.theinnatpenn.com/',
964
-            "geodir_twitter" => 'http://twitter.com/theinnatpenn',
965
-            "geodir_facebook" => 'http://facebook.com/theinnatpenn',
966
-            "post_dummy" => '1'
967
-        );
968
-
969
-        ////post end///
970
-        /// Hotels ////post start 5///
971
-        break;
972
-    case 16:
973
-
974
-
975
-        $image_array = array();
976
-        $post_meta = array();
977
-
978
-        /// Hotels ////post start 6///
979
-        $image_array[] = "$dummy_image_url/hotels17.jpg";
980
-        $image_array[] = "$dummy_image_url/hotels18.jpg";
981
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
982
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
983
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
984
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
985
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
986
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
987
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
988
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
989
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
990
-
991
-        $post_info[] = array(
992
-            "listing_type" => 'gd_place',
993
-            "post_title" => 'Courtyard Philadelphia Downtown',
994
-            "post_desc" => '
956
+			"post_images" => $image_array,
957
+			"post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
958
+			"post_tags" => array(''),
959
+			"geodir_video" => '',
960
+			"geodir_timing" => 'Daily : 11 am to 11 pm',
961
+			"geodir_contact" => '(888) 888-8888',
962
+			"geodir_email" => '[email protected]',
963
+			"geodir_website" => 'http://www.theinnatpenn.com/',
964
+			"geodir_twitter" => 'http://twitter.com/theinnatpenn',
965
+			"geodir_facebook" => 'http://facebook.com/theinnatpenn',
966
+			"post_dummy" => '1'
967
+		);
968
+
969
+		////post end///
970
+		/// Hotels ////post start 5///
971
+		break;
972
+	case 16:
973
+
974
+
975
+		$image_array = array();
976
+		$post_meta = array();
977
+
978
+		/// Hotels ////post start 6///
979
+		$image_array[] = "$dummy_image_url/hotels17.jpg";
980
+		$image_array[] = "$dummy_image_url/hotels18.jpg";
981
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
982
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
983
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
984
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
985
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
986
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
987
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
988
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
989
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
990
+
991
+		$post_info[] = array(
992
+			"listing_type" => 'gd_place',
993
+			"post_title" => 'Courtyard Philadelphia Downtown',
994
+			"post_desc" => '
995 995
 	<h3>Overview </h3>
996 996
 	
997 997
 	The Philadelphia Downtown Courtyard opened it&acute;s doors after a grand $75 million restoration, recapturing the grandeur of its 1926 origins while incorporating state of the art systems throughout.
@@ -1021,45 +1021,45 @@  discard block
 block discarded – undo
1021 1021
 	
1022 1022
 	Recently featured on WE TV&acute;s “My Fair Wedding”, the Courtyard Marriott Philadelphia is one of the city&acute;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. 
1023 1023
 	',
1024
-            "post_images" => $image_array,
1025
-            "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
1026
-            "post_tags" => array(''),
1027
-            "geodir_video" => '',
1028
-            "geodir_timing" => 'Daily : 11 am to 11 pm',
1029
-            "geodir_contact" => '(888) 888-8888',
1030
-            "geodir_email" => '[email protected]',
1031
-            "geodir_website" => 'http://www.theinnatpenn.com/',
1032
-            "geodir_twitter" => 'http://twitter.com/theinnatpenn',
1033
-            "geodir_facebook" => 'http://facebook.com/theinnatpenn',
1034
-            "post_dummy" => '1'
1035
-        );
1036
-
1037
-        ////post end///
1038
-        /// Hotels ////post start 6///
1039
-
1040
-        break;
1041
-    case 17:
1042
-
1043
-        $image_array = array();
1044
-        $post_meta = array();
1045
-
1046
-        /// Hotels ////post start 7///
1047
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
1048
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
1049
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1050
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
1051
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1052
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
1053
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
1054
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
1055
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
1056
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1057
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
1058
-
1059
-        $post_info[] = array(
1060
-            "listing_type" => 'gd_place',
1061
-            "post_title" => 'Four Seasons Philadelphia',
1062
-            "post_desc" => '
1024
+			"post_images" => $image_array,
1025
+			"post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
1026
+			"post_tags" => array(''),
1027
+			"geodir_video" => '',
1028
+			"geodir_timing" => 'Daily : 11 am to 11 pm',
1029
+			"geodir_contact" => '(888) 888-8888',
1030
+			"geodir_email" => '[email protected]',
1031
+			"geodir_website" => 'http://www.theinnatpenn.com/',
1032
+			"geodir_twitter" => 'http://twitter.com/theinnatpenn',
1033
+			"geodir_facebook" => 'http://facebook.com/theinnatpenn',
1034
+			"post_dummy" => '1'
1035
+		);
1036
+
1037
+		////post end///
1038
+		/// Hotels ////post start 6///
1039
+
1040
+		break;
1041
+	case 17:
1042
+
1043
+		$image_array = array();
1044
+		$post_meta = array();
1045
+
1046
+		/// Hotels ////post start 7///
1047
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
1048
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
1049
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1050
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
1051
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1052
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
1053
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
1054
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
1055
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
1056
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1057
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
1058
+
1059
+		$post_info[] = array(
1060
+			"listing_type" => 'gd_place',
1061
+			"post_title" => 'Four Seasons Philadelphia',
1062
+			"post_desc" => '
1063 1063
 	<h3>Overview </h3>
1064 1064
 	
1065 1065
 	The Philadelphia Downtown Courtyard opened it&acute;s doors after a grand $75 million restoration, recapturing the grandeur of its 1926 origins while incorporating state of the art systems throughout.
@@ -1089,45 +1089,45 @@  discard block
 block discarded – undo
1089 1089
 	
1090 1090
 	Recently featured on WE TV&acute;s “My Fair Wedding”, the Courtyard Marriott Philadelphia is one of the city&acute;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. 
1091 1091
 	',
1092
-            "post_images" => $image_array,
1093
-            "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
1094
-            "post_tags" => array(''),
1095
-            "geodir_video" => '',
1096
-            "geodir_timing" => 'Daily : 11 am to 11 pm',
1097
-            "geodir_contact" => '(143) 888-8888',
1098
-            "geodir_email" => '[email protected]',
1099
-            "geodir_website" => 'http://www.fourseasons.com/philadelphia/',
1100
-            "geodir_twitter" => 'http://twitter.com/fourseasons',
1101
-            "geodir_facebook" => 'http://facebook.com/fourseasons',
1102
-            "post_dummy" => '1'
1103
-        );
1104
-
1105
-        ////post end///
1106
-        /// Hotels ////post start 7///
1107
-        break;
1108
-    case 18:
1109
-
1110
-
1111
-        $image_array = array();
1112
-        $post_meta = array();
1113
-
1114
-        /// Hotels ////post start 8///
1115
-        $image_array[] = "$dummy_image_url/hotels11.jpg";
1116
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
1117
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1118
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
1119
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1120
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
1121
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
1122
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
1123
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
1124
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1125
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
1126
-
1127
-        $post_info[] = array(
1128
-            "listing_type" => 'gd_place',
1129
-            "post_title" => 'Alexander Inn',
1130
-            "post_desc" => '
1092
+			"post_images" => $image_array,
1093
+			"post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
1094
+			"post_tags" => array(''),
1095
+			"geodir_video" => '',
1096
+			"geodir_timing" => 'Daily : 11 am to 11 pm',
1097
+			"geodir_contact" => '(143) 888-8888',
1098
+			"geodir_email" => '[email protected]',
1099
+			"geodir_website" => 'http://www.fourseasons.com/philadelphia/',
1100
+			"geodir_twitter" => 'http://twitter.com/fourseasons',
1101
+			"geodir_facebook" => 'http://facebook.com/fourseasons',
1102
+			"post_dummy" => '1'
1103
+		);
1104
+
1105
+		////post end///
1106
+		/// Hotels ////post start 7///
1107
+		break;
1108
+	case 18:
1109
+
1110
+
1111
+		$image_array = array();
1112
+		$post_meta = array();
1113
+
1114
+		/// Hotels ////post start 8///
1115
+		$image_array[] = "$dummy_image_url/hotels11.jpg";
1116
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
1117
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1118
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
1119
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1120
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
1121
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
1122
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
1123
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
1124
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1125
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
1126
+
1127
+		$post_info[] = array(
1128
+			"listing_type" => 'gd_place',
1129
+			"post_title" => 'Alexander Inn',
1130
+			"post_desc" => '
1131 1131
 	The Alexander Inn is one of Philadelphia&acute;s most popular and reasonably priced small hotels.
1132 1132
 	
1133 1133
 	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.
@@ -1136,45 +1136,45 @@  discard block
 block discarded – undo
1136 1136
 	
1137 1137
 	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&acute;s free 24-hour fitness and e-mail centers.  
1138 1138
 	',
1139
-            "post_images" => $image_array,
1140
-            "post_category" => array('gd_placecategory' => array('Hotels')),
1141
-            "post_tags" => array(''),
1142
-            "geodir_video" => '',
1143
-            "geodir_timing" => 'Daily : 11 am to 11 pm',
1144
-            "geodir_contact" => '(143) 888-8888',
1145
-            "geodir_email" => '[email protected]',
1146
-            "geodir_website" => 'http://www.alexanderinn.com/',
1147
-            "geodir_twitter" => 'http://twitter.com/alexanderinn',
1148
-            "geodir_facebook" => 'http://facebook.com/alexanderinn',
1149
-            "post_dummy" => '1'
1150
-        );
1151
-
1152
-        ////post end///
1153
-        /// Hotels ////post start 8///
1154
-        break;
1155
-    case 19:
1156
-
1157
-
1158
-        $image_array = array();
1159
-        $post_meta = array();
1160
-
1161
-        /// Hotels ////post start 9///
1162
-        $image_array[] = "$dummy_image_url/hotels5.jpg";
1163
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
1164
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1165
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
1166
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1167
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
1168
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
1169
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
1170
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
1171
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1172
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
1173
-
1174
-        $post_info[] = array(
1175
-            "listing_type" => 'gd_place',
1176
-            "post_title" => 'Best Western Center City Hotel',
1177
-            "post_desc" => '
1139
+			"post_images" => $image_array,
1140
+			"post_category" => array('gd_placecategory' => array('Hotels')),
1141
+			"post_tags" => array(''),
1142
+			"geodir_video" => '',
1143
+			"geodir_timing" => 'Daily : 11 am to 11 pm',
1144
+			"geodir_contact" => '(143) 888-8888',
1145
+			"geodir_email" => '[email protected]',
1146
+			"geodir_website" => 'http://www.alexanderinn.com/',
1147
+			"geodir_twitter" => 'http://twitter.com/alexanderinn',
1148
+			"geodir_facebook" => 'http://facebook.com/alexanderinn',
1149
+			"post_dummy" => '1'
1150
+		);
1151
+
1152
+		////post end///
1153
+		/// Hotels ////post start 8///
1154
+		break;
1155
+	case 19:
1156
+
1157
+
1158
+		$image_array = array();
1159
+		$post_meta = array();
1160
+
1161
+		/// Hotels ////post start 9///
1162
+		$image_array[] = "$dummy_image_url/hotels5.jpg";
1163
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
1164
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1165
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
1166
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1167
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
1168
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
1169
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
1170
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
1171
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1172
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
1173
+
1174
+		$post_info[] = array(
1175
+			"listing_type" => 'gd_place',
1176
+			"post_title" => 'Best Western Center City Hotel',
1177
+			"post_desc" => '
1178 1178
 	The Alexander Inn is one of Philadelphia&acute;s most popular and reasonably priced small hotels.
1179 1179
 	
1180 1180
 	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.
@@ -1183,91 +1183,91 @@  discard block
 block discarded – undo
1183 1183
 	
1184 1184
 	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&acute;s free 24-hour fitness and e-mail centers.  
1185 1185
 	',
1186
-            "post_images" => $image_array,
1187
-            "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
1188
-            "post_tags" => array(''),
1189
-            "geodir_video" => '',
1190
-            "geodir_timing" => 'Daily : 10 am to 11 pm',
1191
-            "geodir_contact" => '(243) 222-12344',
1192
-            "geodir_email" => '[email protected]',
1193
-            "geodir_website" => 'http://book.bestwestern.com/bestwestern/productInfo.do?propertyCode=39087',
1194
-            "geodir_twitter" => 'http://twitter.com/bestwestern',
1195
-            "geodir_facebook" => 'http://facebook.com/bestwestern',
1196
-            "post_dummy" => '1'
1197
-        );
1198
-
1199
-        ////post end///
1200
-        /// Hotels ////post start 9///
1201
-        break;
1202
-    case 20:
1203
-
1204
-
1205
-        $image_array = array();
1206
-        $post_meta = array();
1207
-
1208
-        /// Hotels ////post start 10///
1209
-        $image_array[] = "$dummy_image_url/hotels7.jpg";
1210
-        $image_array[] = "$dummy_image_url/hotels10.jpg";
1211
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1212
-        $image_array[] = "$dummy_image_url/hotels4.jpg";
1213
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1214
-        $image_array[] = "$dummy_image_url/hotels6.jpg";
1215
-        $image_array[] = "$dummy_image_url/hotels12.jpg";
1216
-        $image_array[] = "$dummy_image_url/hotels8.jpg";
1217
-        $image_array[] = "$dummy_image_url/hotels9.jpg";
1218
-        $image_array[] = "$dummy_image_url/hotels1.jpg";
1219
-        $image_array[] = "$dummy_image_url/hotels2.jpg";
1220
-
1221
-        $post_info[] = array(
1222
-            "listing_type" => 'gd_place',
1223
-            "post_title" => 'Chestnut Hill Hotel',
1224
-            "post_desc" => '
1186
+			"post_images" => $image_array,
1187
+			"post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')),
1188
+			"post_tags" => array(''),
1189
+			"geodir_video" => '',
1190
+			"geodir_timing" => 'Daily : 10 am to 11 pm',
1191
+			"geodir_contact" => '(243) 222-12344',
1192
+			"geodir_email" => '[email protected]',
1193
+			"geodir_website" => 'http://book.bestwestern.com/bestwestern/productInfo.do?propertyCode=39087',
1194
+			"geodir_twitter" => 'http://twitter.com/bestwestern',
1195
+			"geodir_facebook" => 'http://facebook.com/bestwestern',
1196
+			"post_dummy" => '1'
1197
+		);
1198
+
1199
+		////post end///
1200
+		/// Hotels ////post start 9///
1201
+		break;
1202
+	case 20:
1203
+
1204
+
1205
+		$image_array = array();
1206
+		$post_meta = array();
1207
+
1208
+		/// Hotels ////post start 10///
1209
+		$image_array[] = "$dummy_image_url/hotels7.jpg";
1210
+		$image_array[] = "$dummy_image_url/hotels10.jpg";
1211
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1212
+		$image_array[] = "$dummy_image_url/hotels4.jpg";
1213
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1214
+		$image_array[] = "$dummy_image_url/hotels6.jpg";
1215
+		$image_array[] = "$dummy_image_url/hotels12.jpg";
1216
+		$image_array[] = "$dummy_image_url/hotels8.jpg";
1217
+		$image_array[] = "$dummy_image_url/hotels9.jpg";
1218
+		$image_array[] = "$dummy_image_url/hotels1.jpg";
1219
+		$image_array[] = "$dummy_image_url/hotels2.jpg";
1220
+
1221
+		$post_info[] = array(
1222
+			"listing_type" => 'gd_place',
1223
+			"post_title" => 'Chestnut Hill Hotel',
1224
+			"post_desc" => '
1225 1225
 	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&acute;s standards, it was originally a distant “suburb” on the outskirts of the Philadelphia countryside.
1226 1226
 	
1227 1227
 	Today, it is one of the region&acute;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.
1228 1228
 	
1229 1229
 	The Chestnut Hill Hotel fits perfectly in this setting - the hotel&acute;s 36 rooms and suites, decorated in an 18th-century style, hold the hotel to its boutique roots. It&acute;s a perfect place at which to enjoy a romantic getaway in Philadelphia. 
1230 1230
 	',
1231
-            "post_images" => $image_array,
1232
-            "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
1233
-            "post_tags" => array(''),
1234
-            "geodir_video" => '',
1235
-            "geodir_timing" => 'Daily : 10 am to 11 pm',
1236
-            "geodir_contact" => '(243) 222-12344',
1237
-            "geodir_email" => '[email protected]',
1238
-            "geodir_website" => 'http://www.chestnuthillhotel.com/',
1239
-            "geodir_twitter" => 'http://twitter.com/chestnuthillhotel',
1240
-            "geodir_facebook" => 'http://facebook.com/chestnuthillhotel',
1241
-            "post_dummy" => '1'
1242
-        );
1243
-
1244
-        ////post end///
1245
-        /// Hotels ////post start 10///
1246
-
1247
-        break;
1248
-    case 21:
1249
-
1250
-
1251
-        $image_array = array();
1252
-        $post_meta = array();
1253
-
1254
-        /// Restaurants ////post start 1//
1255
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1256
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1257
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1258
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1259
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1260
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1261
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1262
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1263
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1264
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1265
-        $image_array[] = "$dummy_image_url/restaurants11.jpg";
1266
-
1267
-        $post_info[] = array(
1268
-            "listing_type" => 'gd_place',
1269
-            "post_title" => 'Village Whiskey',
1270
-            "post_desc" => '
1231
+			"post_images" => $image_array,
1232
+			"post_category" => array('gd_placecategory' => array('Hotels', 'Feature')),
1233
+			"post_tags" => array(''),
1234
+			"geodir_video" => '',
1235
+			"geodir_timing" => 'Daily : 10 am to 11 pm',
1236
+			"geodir_contact" => '(243) 222-12344',
1237
+			"geodir_email" => '[email protected]',
1238
+			"geodir_website" => 'http://www.chestnuthillhotel.com/',
1239
+			"geodir_twitter" => 'http://twitter.com/chestnuthillhotel',
1240
+			"geodir_facebook" => 'http://facebook.com/chestnuthillhotel',
1241
+			"post_dummy" => '1'
1242
+		);
1243
+
1244
+		////post end///
1245
+		/// Hotels ////post start 10///
1246
+
1247
+		break;
1248
+	case 21:
1249
+
1250
+
1251
+		$image_array = array();
1252
+		$post_meta = array();
1253
+
1254
+		/// Restaurants ////post start 1//
1255
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1256
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1257
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1258
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1259
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1260
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1261
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1262
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1263
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1264
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1265
+		$image_array[] = "$dummy_image_url/restaurants11.jpg";
1266
+
1267
+		$post_info[] = array(
1268
+			"listing_type" => 'gd_place',
1269
+			"post_title" => 'Village Whiskey',
1270
+			"post_desc" => '
1271 1271
 	
1272 1272
 	
1273 1273
 	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.
@@ -1293,45 +1293,45 @@  discard block
 block discarded – undo
1293 1293
 	
1294 1294
 	During the warmer months, diners can sit at large, wooden tables placed along Sansom Street for whiskey alfresco.
1295 1295
 	',
1296
-            "post_images" => $image_array,
1297
-            "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')),
1298
-            "post_tags" => array('Sample Tag1'),
1299
-            "geodir_video" => '',
1300
-            "geodir_timing" => 'Daily : 10 am to 11 pm',
1301
-            "geodir_contact" => '(243) 222-12344',
1302
-            "geodir_email" => '[email protected]',
1303
-            "geodir_website" => 'http://www.villagewhiskey.com/',
1304
-            "geodir_twitter" => 'http://twitter.com/villagewhiskey',
1305
-            "geodir_facebook" => 'http://facebook.com/villagewhiskey',
1306
-            "post_dummy" => '1'
1307
-        );
1308
-
1309
-        ////post end///
1310
-        /// Restaurants ////post start 1///
1311
-        break;
1312
-    case 22:
1313
-
1314
-
1315
-        $image_array = array();
1316
-        $post_meta = array();
1317
-
1318
-        /// Restaurants ////post start 2//
1319
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1320
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1321
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1322
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1323
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1324
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1325
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1326
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1327
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1328
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1329
-        $image_array[] = "$dummy_image_url/restaurants11.jpg";
1330
-
1331
-        $post_info[] = array(
1332
-            "listing_type" => 'gd_place',
1333
-            "post_title" => 'Zavino Pizzeria and Wine Bar',
1334
-            "post_desc" => '
1296
+			"post_images" => $image_array,
1297
+			"post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')),
1298
+			"post_tags" => array('Sample Tag1'),
1299
+			"geodir_video" => '',
1300
+			"geodir_timing" => 'Daily : 10 am to 11 pm',
1301
+			"geodir_contact" => '(243) 222-12344',
1302
+			"geodir_email" => '[email protected]',
1303
+			"geodir_website" => 'http://www.villagewhiskey.com/',
1304
+			"geodir_twitter" => 'http://twitter.com/villagewhiskey',
1305
+			"geodir_facebook" => 'http://facebook.com/villagewhiskey',
1306
+			"post_dummy" => '1'
1307
+		);
1308
+
1309
+		////post end///
1310
+		/// Restaurants ////post start 1///
1311
+		break;
1312
+	case 22:
1313
+
1314
+
1315
+		$image_array = array();
1316
+		$post_meta = array();
1317
+
1318
+		/// Restaurants ////post start 2//
1319
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1320
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1321
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1322
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1323
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1324
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1325
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1326
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1327
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1328
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1329
+		$image_array[] = "$dummy_image_url/restaurants11.jpg";
1330
+
1331
+		$post_info[] = array(
1332
+			"listing_type" => 'gd_place',
1333
+			"post_title" => 'Zavino Pizzeria and Wine Bar',
1334
+			"post_desc" => '
1335 1335
 	Zavino is a new pizzeria and wine bar located at the epicenter of the city&acute;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.
1336 1336
 	
1337 1337
 	The restaurant&acute;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.
@@ -1350,46 +1350,46 @@  discard block
 block discarded – undo
1350 1350
 	
1351 1351
 	Pizzas vary in price from $8 to $12.
1352 1352
 	',
1353
-            "post_images" => $image_array,
1354
-            "post_category" => array('gd_placecategory' => array('Restaurants')),
1355
-            "post_tags" => array('Sample Tag1'),
1356
-            "geodir_video" => '',
1357
-            "geodir_timing" => 'Daily : 10 am to 11 pm',
1358
-            "geodir_contact" => '(243) 222-12344',
1359
-            "geodir_email" => '[email protected]',
1360
-            "geodir_website" => 'http://www.villagewhiskey.com/',
1361
-            "geodir_twitter" => 'http://twitter.com/villagewhiskey',
1362
-            "geodir_facebook" => 'http://facebook.com/villagewhiskey',
1363
-            "post_dummy" => '1'
1364
-        );
1365
-
1366
-        ////post end///
1367
-        /// Restaurants ////post start 2///
1368
-
1369
-        break;
1370
-    case 23:
1371
-
1372
-
1373
-        $image_array = array();
1374
-        $post_meta = array();
1375
-
1376
-        /// Restaurants ////post start 3//
1377
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1378
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1379
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1380
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1381
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1382
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1383
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1384
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1385
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1386
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1387
-        $image_array[] = "$dummy_image_url/restaurants11.jpg";
1388
-
1389
-        $post_info[] = array(
1390
-            "listing_type" => 'gd_place',
1391
-            "post_title" => 'Parc',
1392
-            "post_desc" => '
1353
+			"post_images" => $image_array,
1354
+			"post_category" => array('gd_placecategory' => array('Restaurants')),
1355
+			"post_tags" => array('Sample Tag1'),
1356
+			"geodir_video" => '',
1357
+			"geodir_timing" => 'Daily : 10 am to 11 pm',
1358
+			"geodir_contact" => '(243) 222-12344',
1359
+			"geodir_email" => '[email protected]',
1360
+			"geodir_website" => 'http://www.villagewhiskey.com/',
1361
+			"geodir_twitter" => 'http://twitter.com/villagewhiskey',
1362
+			"geodir_facebook" => 'http://facebook.com/villagewhiskey',
1363
+			"post_dummy" => '1'
1364
+		);
1365
+
1366
+		////post end///
1367
+		/// Restaurants ////post start 2///
1368
+
1369
+		break;
1370
+	case 23:
1371
+
1372
+
1373
+		$image_array = array();
1374
+		$post_meta = array();
1375
+
1376
+		/// Restaurants ////post start 3//
1377
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1378
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1379
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1380
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1381
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1382
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1383
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1384
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1385
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1386
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1387
+		$image_array[] = "$dummy_image_url/restaurants11.jpg";
1388
+
1389
+		$post_info[] = array(
1390
+			"listing_type" => 'gd_place',
1391
+			"post_title" => 'Parc',
1392
+			"post_desc" => '
1393 1393
 	If you love Paris in the springtime, Parc is a veritable grand cru.
1394 1394
 	
1395 1395
 	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.
@@ -1417,45 +1417,45 @@  discard block
 block discarded – undo
1417 1417
 	
1418 1418
 	To put it simply, Parc is nothing short of an authentic Parisian dining experience - right here in the heart of Rittenhouse Square.
1419 1419
 	',
1420
-            "post_images" => $image_array,
1421
-            "post_category" => array('gd_placecategory' => array('Restaurants')),
1422
-            "post_tags" => array('Sample Tag1'),
1423
-            "geodir_video" => '',
1424
-            "geodir_timing" => 'Daily : 10 am to 12 pm',
1425
-            "geodir_contact" => '(143) 222-12344',
1426
-            "geodir_email" => '[email protected]',
1427
-            "geodir_website" => 'http://www.parc-restaurant.com/',
1428
-            "geodir_twitter" => 'http://twitter.com/parc-restaurant',
1429
-            "geodir_facebook" => 'http://facebook.com/parc-restaurant',
1430
-            "post_dummy" => '1'
1431
-        );
1432
-
1433
-        ////post end///
1434
-        /// Restaurants ////post start 3///
1435
-        break;
1436
-    case 24:
1437
-
1438
-
1439
-        $image_array = array();
1440
-        $post_meta = array();
1441
-
1442
-        /// Restaurants ////post start 4//
1443
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1444
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1445
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1446
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1447
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1448
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1449
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1450
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1451
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1452
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1453
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1454
-
1455
-        $post_info[] = array(
1456
-            "listing_type" => 'gd_place',
1457
-            "post_title" => 'Percy Street Barbecue',
1458
-            "post_desc" => '
1420
+			"post_images" => $image_array,
1421
+			"post_category" => array('gd_placecategory' => array('Restaurants')),
1422
+			"post_tags" => array('Sample Tag1'),
1423
+			"geodir_video" => '',
1424
+			"geodir_timing" => 'Daily : 10 am to 12 pm',
1425
+			"geodir_contact" => '(143) 222-12344',
1426
+			"geodir_email" => '[email protected]',
1427
+			"geodir_website" => 'http://www.parc-restaurant.com/',
1428
+			"geodir_twitter" => 'http://twitter.com/parc-restaurant',
1429
+			"geodir_facebook" => 'http://facebook.com/parc-restaurant',
1430
+			"post_dummy" => '1'
1431
+		);
1432
+
1433
+		////post end///
1434
+		/// Restaurants ////post start 3///
1435
+		break;
1436
+	case 24:
1437
+
1438
+
1439
+		$image_array = array();
1440
+		$post_meta = array();
1441
+
1442
+		/// Restaurants ////post start 4//
1443
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1444
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1445
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1446
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1447
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1448
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1449
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1450
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1451
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1452
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1453
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1454
+
1455
+		$post_info[] = array(
1456
+			"listing_type" => 'gd_place',
1457
+			"post_title" => 'Percy Street Barbecue',
1458
+			"post_desc" => '
1459 1459
 	Percy Street Barbecue sees the South Street debut of restaurateurs Steven Cook and Michael Solomonov (Zahav, Xochitl).
1460 1460
 	
1461 1461
 	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.
@@ -1481,46 +1481,46 @@  discard block
 block discarded – undo
1481 1481
 	
1482 1482
 	Seating in the form of repurposed church pews, and bare light bulbs overhead in the dining room lend to the restaurant Texas-esque aesthetic.
1483 1483
 	',
1484
-            "post_images" => $image_array,
1485
-            "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')),
1486
-            "post_tags" => array('Sample Tag1'),
1487
-            "geodir_video" => '',
1488
-            "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.',
1489
-            "geodir_contact" => '(143) 222-12344',
1490
-            "geodir_email" => '[email protected]',
1491
-            "geodir_website" => 'http://www.percystreet.com/',
1492
-            "geodir_twitter" => 'http://twitter.com/percystreet',
1493
-            "geodir_facebook" => 'http://facebook.com/percystreet',
1494
-            "post_dummy" => '1'
1495
-        );
1496
-
1497
-        ////post end///
1498
-        /// Restaurants ////post start 4///
1499
-
1500
-        break;
1501
-    case 25:
1502
-
1503
-
1504
-        $image_array = array();
1505
-        $post_meta = array();
1506
-
1507
-        /// Restaurants ////post start 5//
1508
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1509
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1510
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1511
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1512
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1513
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1514
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1515
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1516
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1517
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1518
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1519
-
1520
-        $post_info[] = array(
1521
-            "listing_type" => 'gd_place',
1522
-            "post_title" => 'The Fountain Restaurant',
1523
-            "post_desc" => '
1484
+			"post_images" => $image_array,
1485
+			"post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')),
1486
+			"post_tags" => array('Sample Tag1'),
1487
+			"geodir_video" => '',
1488
+			"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.',
1489
+			"geodir_contact" => '(143) 222-12344',
1490
+			"geodir_email" => '[email protected]',
1491
+			"geodir_website" => 'http://www.percystreet.com/',
1492
+			"geodir_twitter" => 'http://twitter.com/percystreet',
1493
+			"geodir_facebook" => 'http://facebook.com/percystreet',
1494
+			"post_dummy" => '1'
1495
+		);
1496
+
1497
+		////post end///
1498
+		/// Restaurants ////post start 4///
1499
+
1500
+		break;
1501
+	case 25:
1502
+
1503
+
1504
+		$image_array = array();
1505
+		$post_meta = array();
1506
+
1507
+		/// Restaurants ////post start 5//
1508
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1509
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1510
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1511
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1512
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1513
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1514
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1515
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1516
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1517
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1518
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1519
+
1520
+		$post_info[] = array(
1521
+			"listing_type" => 'gd_place',
1522
+			"post_title" => 'The Fountain Restaurant',
1523
+			"post_desc" => '
1524 1524
 	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&acute;s 2010 Five Star award to a perfect Five Diamond rating from AAA. It&acute;s been a Philadelphia favorite for special occasion meals for decades.
1525 1525
 	
1526 1526
 	Additionally rated as the best restaurant in Philadelphia by Zagat&acute;s, the Fountain Restaurant overlooks the majestic Swann Memorial Fountain sculpture by Alexander Stirling Calder in the center of Logan Square. You&acute;ll also enjoy sweeping views of the grand Benjamin Franklin Parkway and its gorgeous Beaux Arts architecture.
@@ -1530,45 +1530,45 @@  discard block
 block discarded – undo
1530 1530
 	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.
1531 1531
 	
1532 1532
 	',
1533
-            "post_images" => $image_array,
1534
-            "post_category" => array('gd_placecategory' => array('Restaurants')),
1535
-            "post_tags" => array('food'),
1536
-            "geodir_video" => '',
1537
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.',
1538
-            "geodir_contact" => '(103) 100-12344',
1539
-            "geodir_email" => '[email protected]',
1540
-            "geodir_website" => 'http://www.fourseasons.com/philadelphia/dining',
1541
-            "geodir_twitter" => 'http://twitter.com/fourseasons',
1542
-            "geodir_facebook" => 'http://facebook.com/fourseasons',
1543
-            "post_dummy" => '1'
1544
-        );
1545
-
1546
-        ////post end///
1547
-        /// Restaurants ////post start 5///
1548
-        break;
1549
-    case 26:
1550
-
1551
-
1552
-        $image_array = array();
1553
-        $post_meta = array();
1554
-
1555
-        /// Restaurants ////post start 6//
1556
-        $image_array[] = "$dummy_image_url/restaurants11.jpg";
1557
-        $image_array[] = "$dummy_image_url/restaurants10.jpg";
1558
-        $image_array[] = "$dummy_image_url/restaurants3.jpg";
1559
-        $image_array[] = "$dummy_image_url/restaurants1.jpg";
1560
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1561
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1562
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1563
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1564
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1565
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1566
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1567
-
1568
-        $post_info[] = array(
1569
-            "listing_type" => 'gd_place',
1570
-            "post_title" => 'Lacroix at The Rittenhouse',
1571
-            "post_desc" => '
1533
+			"post_images" => $image_array,
1534
+			"post_category" => array('gd_placecategory' => array('Restaurants')),
1535
+			"post_tags" => array('food'),
1536
+			"geodir_video" => '',
1537
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.',
1538
+			"geodir_contact" => '(103) 100-12344',
1539
+			"geodir_email" => '[email protected]',
1540
+			"geodir_website" => 'http://www.fourseasons.com/philadelphia/dining',
1541
+			"geodir_twitter" => 'http://twitter.com/fourseasons',
1542
+			"geodir_facebook" => 'http://facebook.com/fourseasons',
1543
+			"post_dummy" => '1'
1544
+		);
1545
+
1546
+		////post end///
1547
+		/// Restaurants ////post start 5///
1548
+		break;
1549
+	case 26:
1550
+
1551
+
1552
+		$image_array = array();
1553
+		$post_meta = array();
1554
+
1555
+		/// Restaurants ////post start 6//
1556
+		$image_array[] = "$dummy_image_url/restaurants11.jpg";
1557
+		$image_array[] = "$dummy_image_url/restaurants10.jpg";
1558
+		$image_array[] = "$dummy_image_url/restaurants3.jpg";
1559
+		$image_array[] = "$dummy_image_url/restaurants1.jpg";
1560
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1561
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1562
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1563
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1564
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1565
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1566
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1567
+
1568
+		$post_info[] = array(
1569
+			"listing_type" => 'gd_place',
1570
+			"post_title" => 'Lacroix at The Rittenhouse',
1571
+			"post_desc" => '
1572 1572
 	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.
1573 1573
 	
1574 1574
 	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.
@@ -1579,46 +1579,46 @@  discard block
 block discarded – undo
1579 1579
 	
1580 1580
 	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.
1581 1581
 	',
1582
-            "post_images" => $image_array,
1583
-            "post_category" => array('gd_placecategory' => array('Restaurants')),
1584
-            "post_tags" => array('food'),
1585
-            "geodir_video" => '',
1586
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1587
-            "geodir_contact" => '(113) 121-12344',
1588
-            "geodir_email" => '[email protected]',
1589
-            "geodir_website" => 'http://www.rittenhousehotel.com/lacroix.cfm',
1590
-            "geodir_twitter" => 'http://twitter.com/rittenhousehotel',
1591
-            "geodir_facebook" => 'http://facebook.com/rittenhousehotel',
1592
-            "post_dummy" => '1'
1593
-        );
1594
-
1595
-        ////post end///
1596
-        /// Restaurants ////post start 6///
1597
-
1598
-        break;
1599
-    case 27:
1600
-
1601
-
1602
-        $image_array = array();
1603
-        $post_meta = array();
1604
-
1605
-        /// Restaurants ////post start 7//
1606
-        $image_array[] = "$dummy_image_url/restaurants12.jpg";
1607
-        $image_array[] = "$dummy_image_url/restaurants13.jpg";
1608
-        $image_array[] = "$dummy_image_url/restaurants14.jpg";
1609
-        $image_array[] = "$dummy_image_url/restaurants15.jpg";
1610
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1611
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1612
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1613
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1614
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1615
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1616
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1617
-
1618
-        $post_info[] = array(
1619
-            "listing_type" => 'gd_place',
1620
-            "post_title" => 'Lacroix at The Rittenhouse',
1621
-            "post_desc" => '
1582
+			"post_images" => $image_array,
1583
+			"post_category" => array('gd_placecategory' => array('Restaurants')),
1584
+			"post_tags" => array('food'),
1585
+			"geodir_video" => '',
1586
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1587
+			"geodir_contact" => '(113) 121-12344',
1588
+			"geodir_email" => '[email protected]',
1589
+			"geodir_website" => 'http://www.rittenhousehotel.com/lacroix.cfm',
1590
+			"geodir_twitter" => 'http://twitter.com/rittenhousehotel',
1591
+			"geodir_facebook" => 'http://facebook.com/rittenhousehotel',
1592
+			"post_dummy" => '1'
1593
+		);
1594
+
1595
+		////post end///
1596
+		/// Restaurants ////post start 6///
1597
+
1598
+		break;
1599
+	case 27:
1600
+
1601
+
1602
+		$image_array = array();
1603
+		$post_meta = array();
1604
+
1605
+		/// Restaurants ////post start 7//
1606
+		$image_array[] = "$dummy_image_url/restaurants12.jpg";
1607
+		$image_array[] = "$dummy_image_url/restaurants13.jpg";
1608
+		$image_array[] = "$dummy_image_url/restaurants14.jpg";
1609
+		$image_array[] = "$dummy_image_url/restaurants15.jpg";
1610
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1611
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1612
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1613
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1614
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1615
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1616
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1617
+
1618
+		$post_info[] = array(
1619
+			"listing_type" => 'gd_place',
1620
+			"post_title" => 'Lacroix at The Rittenhouse',
1621
+			"post_desc" => '
1622 1622
 	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.
1623 1623
 	
1624 1624
 	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.
@@ -1629,45 +1629,45 @@  discard block
 block discarded – undo
1629 1629
 	
1630 1630
 	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.
1631 1631
 	',
1632
-            "post_images" => $image_array,
1633
-            "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
1634
-            "post_tags" => array('food'),
1635
-            "geodir_video" => '',
1636
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1637
-            "geodir_contact" => '(113) 121-12344',
1638
-            "geodir_email" => '[email protected]',
1639
-            "geodir_website" => 'http://www.zamarestaurant.com/',
1640
-            "geodir_twitter" => 'http://twitter.com/zamarestaurant',
1641
-            "geodir_facebook" => 'http://facebook.com/zamarestaurant',
1642
-            "post_dummy" => '1'
1643
-        );
1644
-
1645
-        ////post end///
1646
-        /// Restaurants ////post start 7///
1647
-
1648
-        break;
1649
-    case 28:
1650
-
1651
-        $image_array = array();
1652
-        $post_meta = array();
1653
-
1654
-        /// Restaurants ////post start 8//
1655
-        $image_array[] = "$dummy_image_url/restaurants16.jpg";
1656
-        $image_array[] = "$dummy_image_url/restaurants17.jpg";
1657
-        $image_array[] = "$dummy_image_url/restaurants18.jpg";
1658
-        $image_array[] = "$dummy_image_url/restaurants19.jpg";
1659
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1660
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1661
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1662
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1663
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1664
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1665
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1666
-
1667
-        $post_info[] = array(
1668
-            "listing_type" => 'gd_place',
1669
-            "post_title" => 'Sampan',
1670
-            "post_desc" => '
1632
+			"post_images" => $image_array,
1633
+			"post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
1634
+			"post_tags" => array('food'),
1635
+			"geodir_video" => '',
1636
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1637
+			"geodir_contact" => '(113) 121-12344',
1638
+			"geodir_email" => '[email protected]',
1639
+			"geodir_website" => 'http://www.zamarestaurant.com/',
1640
+			"geodir_twitter" => 'http://twitter.com/zamarestaurant',
1641
+			"geodir_facebook" => 'http://facebook.com/zamarestaurant',
1642
+			"post_dummy" => '1'
1643
+		);
1644
+
1645
+		////post end///
1646
+		/// Restaurants ////post start 7///
1647
+
1648
+		break;
1649
+	case 28:
1650
+
1651
+		$image_array = array();
1652
+		$post_meta = array();
1653
+
1654
+		/// Restaurants ////post start 8//
1655
+		$image_array[] = "$dummy_image_url/restaurants16.jpg";
1656
+		$image_array[] = "$dummy_image_url/restaurants17.jpg";
1657
+		$image_array[] = "$dummy_image_url/restaurants18.jpg";
1658
+		$image_array[] = "$dummy_image_url/restaurants19.jpg";
1659
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1660
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1661
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1662
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1663
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1664
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1665
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1666
+
1667
+		$post_info[] = array(
1668
+			"listing_type" => 'gd_place',
1669
+			"post_title" => 'Sampan',
1670
+			"post_desc" => '
1671 1671
 	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&acute;s highly sought-after culinary talents.
1672 1672
 	
1673 1673
 	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&acute;s popular series Pantry Raid and TLC Ultimate Cake Off.
@@ -1686,45 +1686,45 @@  discard block
 block discarded – undo
1686 1686
 	
1687 1687
 	Prices range from $5 to $19.
1688 1688
 	',
1689
-            "post_images" => $image_array,
1690
-            "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
1691
-            "post_tags" => array('restaurant'),
1692
-            "geodir_video" => '',
1693
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1694
-            "geodir_contact" => '(000) 111-2222',
1695
-            "geodir_email" => '[email protected]',
1696
-            "geodir_website" => 'http://www.sampanphilly.com/',
1697
-            "geodir_twitter" => 'http://twitter.com/sampanphilly',
1698
-            "geodir_facebook" => 'http://facebook.com/sampanphilly',
1699
-            "post_dummy" => '1'
1700
-        );
1701
-
1702
-        ////post end///
1703
-        /// Restaurants ////post start 8///
1704
-
1705
-        break;
1706
-    case 29:
1707
-
1708
-        $image_array = array();
1709
-        $post_meta = array();
1710
-
1711
-        /// Restaurants ////post start 9//
1712
-        $image_array[] = "$dummy_image_url/restaurants17.jpg";
1713
-        $image_array[] = "$dummy_image_url/restaurants16.jpg";
1714
-        $image_array[] = "$dummy_image_url/restaurants18.jpg";
1715
-        $image_array[] = "$dummy_image_url/restaurants19.jpg";
1716
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1717
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1718
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1719
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1720
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1721
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1722
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1723
-
1724
-        $post_info[] = array(
1725
-            "listing_type" => 'gd_place',
1726
-            "post_title" => 'Morimoto',
1727
-            "post_desc" => '
1689
+			"post_images" => $image_array,
1690
+			"post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
1691
+			"post_tags" => array('restaurant'),
1692
+			"geodir_video" => '',
1693
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1694
+			"geodir_contact" => '(000) 111-2222',
1695
+			"geodir_email" => '[email protected]',
1696
+			"geodir_website" => 'http://www.sampanphilly.com/',
1697
+			"geodir_twitter" => 'http://twitter.com/sampanphilly',
1698
+			"geodir_facebook" => 'http://facebook.com/sampanphilly',
1699
+			"post_dummy" => '1'
1700
+		);
1701
+
1702
+		////post end///
1703
+		/// Restaurants ////post start 8///
1704
+
1705
+		break;
1706
+	case 29:
1707
+
1708
+		$image_array = array();
1709
+		$post_meta = array();
1710
+
1711
+		/// Restaurants ////post start 9//
1712
+		$image_array[] = "$dummy_image_url/restaurants17.jpg";
1713
+		$image_array[] = "$dummy_image_url/restaurants16.jpg";
1714
+		$image_array[] = "$dummy_image_url/restaurants18.jpg";
1715
+		$image_array[] = "$dummy_image_url/restaurants19.jpg";
1716
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1717
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1718
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1719
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1720
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1721
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1722
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1723
+
1724
+		$post_info[] = array(
1725
+			"listing_type" => 'gd_place',
1726
+			"post_title" => 'Morimoto',
1727
+			"post_desc" => '
1728 1728
 	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.
1729 1729
 	
1730 1730
 	The restaurant&acute;s namesake and head chef, Morimoto (of Food Network&acute;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.
@@ -1737,45 +1737,45 @@  discard block
 block discarded – undo
1737 1737
 	
1738 1738
 	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.
1739 1739
 	',
1740
-            "post_images" => $image_array,
1741
-            "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife', 'Feature')),
1742
-            "post_tags" => array('America'),
1743
-            "geodir_video" => '',
1744
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1745
-            "geodir_contact" => '(000) 111-2222',
1746
-            "geodir_email" => '[email protected]',
1747
-            "geodir_website" => 'http://www.morimotorestaurant.com/',
1748
-            "geodir_twitter" => 'http://twitter.com/morimotorestaurant',
1749
-            "geodir_facebook" => 'http://facebook.com/morimotorestaurant',
1750
-            "post_dummy" => '1'
1751
-        );
1752
-
1753
-        ////post end///
1754
-        /// Restaurants ////post start 9///
1755
-        break;
1756
-    case 30:
1757
-
1758
-
1759
-        $image_array = array();
1760
-        $post_meta = array();
1761
-
1762
-        /// Restaurants ////post start 10//
1763
-        $image_array[] = "$dummy_image_url/restaurants19.jpg";
1764
-        $image_array[] = "$dummy_image_url/restaurants17.jpg";
1765
-        $image_array[] = "$dummy_image_url/restaurants18.jpg";
1766
-        $image_array[] = "$dummy_image_url/restaurants16.jpg";
1767
-        $image_array[] = "$dummy_image_url/restaurants5.jpg";
1768
-        $image_array[] = "$dummy_image_url/restaurants6.jpg";
1769
-        $image_array[] = "$dummy_image_url/restaurants7.jpg";
1770
-        $image_array[] = "$dummy_image_url/restaurants8.jpg";
1771
-        $image_array[] = "$dummy_image_url/restaurants9.jpg";
1772
-        $image_array[] = "$dummy_image_url/restaurants2.jpg";
1773
-        $image_array[] = "$dummy_image_url/restaurants4.jpg";
1774
-
1775
-        $post_info[] = array(
1776
-            "listing_type" => 'gd_place',
1777
-            "post_title" => 'Buddakan',
1778
-            "post_desc" => '
1740
+			"post_images" => $image_array,
1741
+			"post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife', 'Feature')),
1742
+			"post_tags" => array('America'),
1743
+			"geodir_video" => '',
1744
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1745
+			"geodir_contact" => '(000) 111-2222',
1746
+			"geodir_email" => '[email protected]',
1747
+			"geodir_website" => 'http://www.morimotorestaurant.com/',
1748
+			"geodir_twitter" => 'http://twitter.com/morimotorestaurant',
1749
+			"geodir_facebook" => 'http://facebook.com/morimotorestaurant',
1750
+			"post_dummy" => '1'
1751
+		);
1752
+
1753
+		////post end///
1754
+		/// Restaurants ////post start 9///
1755
+		break;
1756
+	case 30:
1757
+
1758
+
1759
+		$image_array = array();
1760
+		$post_meta = array();
1761
+
1762
+		/// Restaurants ////post start 10//
1763
+		$image_array[] = "$dummy_image_url/restaurants19.jpg";
1764
+		$image_array[] = "$dummy_image_url/restaurants17.jpg";
1765
+		$image_array[] = "$dummy_image_url/restaurants18.jpg";
1766
+		$image_array[] = "$dummy_image_url/restaurants16.jpg";
1767
+		$image_array[] = "$dummy_image_url/restaurants5.jpg";
1768
+		$image_array[] = "$dummy_image_url/restaurants6.jpg";
1769
+		$image_array[] = "$dummy_image_url/restaurants7.jpg";
1770
+		$image_array[] = "$dummy_image_url/restaurants8.jpg";
1771
+		$image_array[] = "$dummy_image_url/restaurants9.jpg";
1772
+		$image_array[] = "$dummy_image_url/restaurants2.jpg";
1773
+		$image_array[] = "$dummy_image_url/restaurants4.jpg";
1774
+
1775
+		$post_info[] = array(
1776
+			"listing_type" => 'gd_place',
1777
+			"post_title" => 'Buddakan',
1778
+			"post_desc" => '
1779 1779
 	<h3>The Experience </h3>
1780 1780
 	
1781 1781
 	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.
@@ -1786,87 +1786,87 @@  discard block
 block discarded – undo
1786 1786
 	
1787 1787
 	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 .
1788 1788
 	',
1789
-            "post_images" => $image_array,
1790
-            "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
1791
-            "post_tags" => array('America'),
1792
-            "geodir_video" => '',
1793
-            "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1794
-            "geodir_contact" => '(000) 111-2222',
1795
-            "geodir_email" => '[email protected]',
1796
-            "geodir_website" => 'http://www.buddakan.com/',
1797
-            "geodir_twitter" => 'http://twitter.com/buddakan',
1798
-            "geodir_facebook" => 'http://facebook.com/buddakan',
1799
-            "post_dummy" => '1'
1800
-        );
1801
-        break;
1802
-
1803
-    ////post end///
1804
-    /// Restaurants ////post start 10///
1789
+			"post_images" => $image_array,
1790
+			"post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')),
1791
+			"post_tags" => array('America'),
1792
+			"geodir_video" => '',
1793
+			"geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.',
1794
+			"geodir_contact" => '(000) 111-2222',
1795
+			"geodir_email" => '[email protected]',
1796
+			"geodir_website" => 'http://www.buddakan.com/',
1797
+			"geodir_twitter" => 'http://twitter.com/buddakan',
1798
+			"geodir_facebook" => 'http://facebook.com/buddakan',
1799
+			"post_dummy" => '1'
1800
+		);
1801
+		break;
1802
+
1803
+	////post end///
1804
+	/// Restaurants ////post start 10///
1805 1805
 } // end of switch
1806 1806
 
1807 1807
 
1808 1808
 foreach ($post_info as $post_info) {
1809
-    $default_location = geodir_get_default_location();
1810
-    if ($city_bound_lat1 > $city_bound_lat2)
1811
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1812
-    else
1813
-        $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1814
-
1815
-
1816
-    if ($city_bound_lng1 > $city_bound_lng2)
1817
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1818
-    else
1819
-        $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1820
-    $post_address = array();
1821
-    $postal_code = '';
1822
-    $address = '';
1823
-
1824
-    $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
1825
-
1826
-
1827
-    if (!empty($post_address)) {
1828
-        foreach ($post_address as $add_key => $add_value) {
1829
-            if ($add_value->types[0] == 'postal_code') {
1830
-                $postal_code = $add_value->long_name;
1831
-            }
1832
-
1833
-            if ($add_value->types[0] == 'street_number') {
1834
-                if ($address != '')
1835
-                    $address .= ',' . $add_value->long_name;
1836
-                else
1837
-                    $address .= $add_value->long_name;
1838
-            }
1839
-            if ($add_value->types[0] == 'route') {
1840
-                if ($address != '')
1841
-                    $address .= ',' . $add_value->long_name;
1842
-                else
1843
-                    $address .= $add_value->long_name;
1844
-            }
1845
-            if ($add_value->types[0] == 'neighborhood') {
1846
-                if ($address != '')
1847
-                    $address .= ',' . $add_value->long_name;
1848
-                else
1849
-                    $address .= $add_value->long_name;
1850
-            }
1851
-            if ($add_value->types[0] == 'sublocality') {
1852
-                if ($address != '')
1853
-                    $address .= ',' . $add_value->long_name;
1854
-                else
1855
-                    $address .= $add_value->long_name;
1856
-            }
1857
-
1858
-        }
1859
-
1860
-        $post_info['post_address'] = $address;
1861
-        $post_info['post_city'] = $default_location->city;
1862
-        $post_info['post_region'] = $default_location->region;
1863
-        $post_info['post_country'] = $default_location->country;
1864
-        $post_info['post_zip'] = $postal_code;
1865
-        $post_info['post_latitude'] = $dummy_post_latitude;
1866
-        $post_info['post_longitude'] = $dummy_post_longitude;
1867
-
1868
-    }
1869
-    geodir_save_listing($post_info, true);
1809
+	$default_location = geodir_get_default_location();
1810
+	if ($city_bound_lat1 > $city_bound_lat2)
1811
+		$dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1));
1812
+	else
1813
+		$dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2));
1814
+
1815
+
1816
+	if ($city_bound_lng1 > $city_bound_lng2)
1817
+		$dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1));
1818
+	else
1819
+		$dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2));
1820
+	$post_address = array();
1821
+	$postal_code = '';
1822
+	$address = '';
1823
+
1824
+	$post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude);
1825
+
1826
+
1827
+	if (!empty($post_address)) {
1828
+		foreach ($post_address as $add_key => $add_value) {
1829
+			if ($add_value->types[0] == 'postal_code') {
1830
+				$postal_code = $add_value->long_name;
1831
+			}
1832
+
1833
+			if ($add_value->types[0] == 'street_number') {
1834
+				if ($address != '')
1835
+					$address .= ',' . $add_value->long_name;
1836
+				else
1837
+					$address .= $add_value->long_name;
1838
+			}
1839
+			if ($add_value->types[0] == 'route') {
1840
+				if ($address != '')
1841
+					$address .= ',' . $add_value->long_name;
1842
+				else
1843
+					$address .= $add_value->long_name;
1844
+			}
1845
+			if ($add_value->types[0] == 'neighborhood') {
1846
+				if ($address != '')
1847
+					$address .= ',' . $add_value->long_name;
1848
+				else
1849
+					$address .= $add_value->long_name;
1850
+			}
1851
+			if ($add_value->types[0] == 'sublocality') {
1852
+				if ($address != '')
1853
+					$address .= ',' . $add_value->long_name;
1854
+				else
1855
+					$address .= $add_value->long_name;
1856
+			}
1857
+
1858
+		}
1859
+
1860
+		$post_info['post_address'] = $address;
1861
+		$post_info['post_city'] = $default_location->city;
1862
+		$post_info['post_region'] = $default_location->region;
1863
+		$post_info['post_country'] = $default_location->country;
1864
+		$post_info['post_zip'] = $postal_code;
1865
+		$post_info['post_latitude'] = $dummy_post_latitude;
1866
+		$post_info['post_longitude'] = $dummy_post_longitude;
1867
+
1868
+	}
1869
+	geodir_save_listing($post_info, true);
1870 1870
 
1871 1871
 }
1872 1872
 
Please login to merge, or discard this patch.
geodirectory-functions/cat-meta-functions/Tax-meta-class.php 1 patch
Indentation   +2028 added lines, -2028 removed lines patch added patch discarded remove patch
@@ -28,260 +28,260 @@  discard block
 block discarded – undo
28 28
 
29 29
 if (!class_exists('Tax_Meta_Class')) :
30 30
 
31
-    /**
32
-     * All Types Meta Box class.
33
-     *
34
-     * @package All Types Meta Box
35
-     * @since 1.0
36
-     *
37
-     * @todo Nothing.
38
-     */
39
-
40
-
41
-    class Tax_Meta_Class
42
-    {
43
-
44
-        /**
45
-         * Holds meta box object
46
-         *
47
-         * @var object
48
-         * @access protected
49
-         */
50
-        protected $_meta_box;
51
-
52
-        /**
53
-         * Holds meta box fields.
54
-         *
55
-         * @var array
56
-         * @access protected
57
-         */
58
-        protected $_prefix;
59
-
60
-        /**
61
-         * Holds Prefix for meta box fields.
62
-         *
63
-         * @var array
64
-         * @access protected
65
-         */
66
-        protected $_fields;
67
-
68
-        /**
69
-         * Use local images.
70
-         *
71
-         * @var bool
72
-         * @access protected
73
-         */
74
-        protected $_Local_images;
75
-
76
-        /**
77
-         * What form is this? edit or new term.
78
-         *
79
-         * @var string
80
-         * @access protected
81
-         * $since 1.0
82
-         */
83
-        protected $_form_type;
84
-        /**
85
-         * SelfPath to allow themes as well as plugins.
86
-         *
87
-         * @var string
88
-         * @access protected
89
-         * $since 1.0
90
-         */
91
-        protected $SelfPath;
92
-
93
-        /**
94
-         * Constructor
95
-         *
96
-         * @since 1.0
97
-         * @access public
98
-         *
99
-         * @param array $meta_box
100
-         */
101
-        public function __construct($meta_box)
102
-        {
103
-
104
-            // If we are not in admin area exit.
105
-            if (!is_admin())
106
-                return;
107
-
108
-            // Assign meta box values to local variables and add it's missed values.
109
-            $this->_meta_box = $meta_box;
110
-            $this->_prefix = (isset($meta_box['prefix'])) ? $meta_box['prefix'] : '';
111
-            $this->_fields = &$this->_meta_box['fields'];
112
-            $this->_Local_images = (isset($meta_box['local_images'])) ? true : false;
113
-            $this->add_missed_values();
114
-            if (isset($meta_box['use_with_theme']))
115
-                if ($meta_box['use_with_theme'] === true) {
116
-                    $this->SelfPath = get_stylesheet_directory_uri() . '/library/cat-meta';
117
-                } elseif ($meta_box['use_with_theme'] === false) {
118
-                    $this->SelfPath = plugins_url('cat-meta-functions', plugin_basename(dirname(__FILE__)));
119
-                } else {
120
-                    $this->SelfPath = $meta_box['use_with_theme'];
121
-                }
122
-            else {
123
-                $this->SelfPath = plugins_url('cat-meta-functions', plugin_basename(dirname(__FILE__)));
124
-            }
125
-
126
-
127
-            // Add Actions
128
-            add_action('admin_init', array(&$this, 'add'));
129
-
130
-            // Check for special fields and add needed actions for them.
131
-            $this->check_field_upload();
132
-            $this->check_field_color();
133
-            $this->check_field_date();
134
-            $this->check_field_time();
135
-
136
-            // Load common js, css files
137
-            // Must enqueue for all pages as we need js for the media upload, too.
138
-            add_action('admin_print_styles', array(&$this, 'load_scripts_styles'));
139
-
140
-        }
141
-
142
-        /**
143
-         * Load all Javascript and CSS
144
-         *
145
-         * @since 1.0
146
-         * @access public
147
-         */
148
-        public function load_scripts_styles()
149
-        {
150
-
151
-            // Get Plugin Path
152
-            $plugin_path = $this->SelfPath;
153
-            //only load styles and js when needed
154
-            /* 
31
+	/**
32
+	 * All Types Meta Box class.
33
+	 *
34
+	 * @package All Types Meta Box
35
+	 * @since 1.0
36
+	 *
37
+	 * @todo Nothing.
38
+	 */
39
+
40
+
41
+	class Tax_Meta_Class
42
+	{
43
+
44
+		/**
45
+		 * Holds meta box object
46
+		 *
47
+		 * @var object
48
+		 * @access protected
49
+		 */
50
+		protected $_meta_box;
51
+
52
+		/**
53
+		 * Holds meta box fields.
54
+		 *
55
+		 * @var array
56
+		 * @access protected
57
+		 */
58
+		protected $_prefix;
59
+
60
+		/**
61
+		 * Holds Prefix for meta box fields.
62
+		 *
63
+		 * @var array
64
+		 * @access protected
65
+		 */
66
+		protected $_fields;
67
+
68
+		/**
69
+		 * Use local images.
70
+		 *
71
+		 * @var bool
72
+		 * @access protected
73
+		 */
74
+		protected $_Local_images;
75
+
76
+		/**
77
+		 * What form is this? edit or new term.
78
+		 *
79
+		 * @var string
80
+		 * @access protected
81
+		 * $since 1.0
82
+		 */
83
+		protected $_form_type;
84
+		/**
85
+		 * SelfPath to allow themes as well as plugins.
86
+		 *
87
+		 * @var string
88
+		 * @access protected
89
+		 * $since 1.0
90
+		 */
91
+		protected $SelfPath;
92
+
93
+		/**
94
+		 * Constructor
95
+		 *
96
+		 * @since 1.0
97
+		 * @access public
98
+		 *
99
+		 * @param array $meta_box
100
+		 */
101
+		public function __construct($meta_box)
102
+		{
103
+
104
+			// If we are not in admin area exit.
105
+			if (!is_admin())
106
+				return;
107
+
108
+			// Assign meta box values to local variables and add it's missed values.
109
+			$this->_meta_box = $meta_box;
110
+			$this->_prefix = (isset($meta_box['prefix'])) ? $meta_box['prefix'] : '';
111
+			$this->_fields = &$this->_meta_box['fields'];
112
+			$this->_Local_images = (isset($meta_box['local_images'])) ? true : false;
113
+			$this->add_missed_values();
114
+			if (isset($meta_box['use_with_theme']))
115
+				if ($meta_box['use_with_theme'] === true) {
116
+					$this->SelfPath = get_stylesheet_directory_uri() . '/library/cat-meta';
117
+				} elseif ($meta_box['use_with_theme'] === false) {
118
+					$this->SelfPath = plugins_url('cat-meta-functions', plugin_basename(dirname(__FILE__)));
119
+				} else {
120
+					$this->SelfPath = $meta_box['use_with_theme'];
121
+				}
122
+			else {
123
+				$this->SelfPath = plugins_url('cat-meta-functions', plugin_basename(dirname(__FILE__)));
124
+			}
125
+
126
+
127
+			// Add Actions
128
+			add_action('admin_init', array(&$this, 'add'));
129
+
130
+			// Check for special fields and add needed actions for them.
131
+			$this->check_field_upload();
132
+			$this->check_field_color();
133
+			$this->check_field_date();
134
+			$this->check_field_time();
135
+
136
+			// Load common js, css files
137
+			// Must enqueue for all pages as we need js for the media upload, too.
138
+			add_action('admin_print_styles', array(&$this, 'load_scripts_styles'));
139
+
140
+		}
141
+
142
+		/**
143
+		 * Load all Javascript and CSS
144
+		 *
145
+		 * @since 1.0
146
+		 * @access public
147
+		 */
148
+		public function load_scripts_styles()
149
+		{
150
+
151
+			// Get Plugin Path
152
+			$plugin_path = $this->SelfPath;
153
+			//only load styles and js when needed
154
+			/* 
155 155
 		 * since 1.0
156 156
 		 */
157
-            $taxnow = isset($_REQUEST['taxonomy']) ? $_REQUEST['taxonomy'] : '';
158
-
159
-            if (!empty($this->_meta_box['pages'])) {
160
-                if (in_array($taxnow, $this->_meta_box['pages'])) {
161
-                    // Enqueue Meta Box Style
162
-                    //wp_enqueue_style( 'tax-meta-clss', $plugin_path . '/css/Tax-meta-class.css' );
163
-                    // Enqueue Meta Box Scripts
164
-                    //wp_enqueue_script( 'tax-meta-clss', $plugin_path . '/js/tax-meta-clss.js', array( 'jquery' ), null, true );
165
-
166
-                }
167
-            }
168
-
169
-        }
170
-
171
-        /**
172
-         * Check the Field Upload, Add needed Actions
173
-         *
174
-         * @since 1.0
175
-         * @access public
176
-         */
177
-        public function enqueue_tax_meta_scripts()
178
-        {
179
-            // Make upload feature work event when custom post type doesn't support 'editor'
180
-            wp_enqueue_script('media-upload');
181
-            wp_enqueue_script('thickbox');
182
-            add_thickbox();
183
-            wp_enqueue_script('jquery-ui-core');
184
-            wp_enqueue_script('jquery-ui-sortable');
185
-
186
-
187
-        }
188
-
189
-        public function check_field_upload()
190
-        {
191
-
192
-            // Check if the field is an image or file. If not, return.
193
-            if (!$this->has_field('image') && !$this->has_field('file'))
194
-                return;
195
-
196
-
197
-            add_action('wp_enqueue_scripts', array(&$this, 'enqueue_tax_meta_scripts'), 100);
198
-
199
-            // Add data encoding type for file uploading.	
200
-            add_action('post_edit_form_tag', array(&$this, 'add_enctype'));
201
-
202
-
203
-            // Add filters for media upload.
204
-            add_filter('media_upload_gallery', array(&$this, 'insert_images'));
205
-            add_filter('media_upload_library', array(&$this, 'insert_images'));
206
-            add_filter('media_upload_image', array(&$this, 'insert_images'));
207
-
208
-            // Delete all attachments when delete custom post type.
209
-            add_action('wp_ajax_at_delete_file', array(&$this, 'delete_file'));
210
-            add_action('wp_ajax_at_reorder_images', array(&$this, 'reorder_images'));
211
-            // Delete file via Ajax
212
-            add_action('wp_ajax_at_delete_mupload', array($this, 'wp_ajax_delete_image'));
213
-        }
214
-
215
-        /**
216
-         * Add data encoding type for file uploading
217
-         *
218
-         * @since 1.0
219
-         * @access public
220
-         */
221
-        public function add_enctype()
222
-        {
223
-            echo ' enctype="multipart/form-data"';
224
-        }
225
-
226
-        /**
227
-         * Process images added to meta field.
228
-         *
229
-         * Modified from Faster Image Insert plugin.
230
-         *
231
-         * @return void
232
-         * @author Cory Crowley
233
-         */
234
-        public function insert_images()
235
-        {
236
-
237
-            // If post variables are empty, return.
238
-            if (!isset($_POST['at-insert']) || empty($_POST['attachments']))
239
-                return;
240
-
241
-            // Security Check
242
-            check_admin_referer('media-form');
243
-
244
-            // Create Security Nonce
245
-            $nonce = wp_create_nonce('at_ajax_delete');
246
-
247
-            // Get Post Id and Field Id
248
-            $term_id = $_POST['post_id'];
249
-            $id = $_POST['field_id'];
250
-
251
-            // Modify the insertion string
252
-            $html = '';
253
-            foreach ($_POST['attachments'] as $attachment_id => $attachment) {
254
-
255
-                // Strip Slashes
256
-                $attachment = stripslashes_deep($attachment);
257
-
258
-                // If not selected or url is empty, continue in loop.
259
-                if (empty($attachment['selected']) || empty($attachment['url']))
260
-                    continue;
261
-
262
-                $li = "<li id='item_{$attachment_id}'>";
263
-                $li .= "<img src='{$attachment['url']}' alt='image_{$attachment_id}' />";
264
-                //$li 	.= "<a title='" . __( 'Delete this image' ) . "' class='at-delete-file' href='#' rel='{$nonce}|{$term_id}|{$id}|{$attachment_id}'>" . __( 'Delete' ) . "</a>";
265
-                $li .= "<a title='" . __('Remove this image', 'geodirectory') . "' class='at-delete-file' href='#' rel='{$nonce}|{$term_id}|{$id}|{$attachment_id}'><img src='" . $this->SelfPath . "/images/delete-16.png' alt='" . __('Remove', 'geodirectory') . "' /></a>";
266
-                $li .= "<input type='hidden' name='{$id}[]' value='{$attachment_id}' />";
267
-                $li .= "</li>";
268
-                $html .= $li;
269
-
270
-            } // End For Each
271
-
272
-            return media_send_to_editor($html);
273
-
274
-        }
275
-
276
-        /**
277
-         * Delete attachments associated with the post.
278
-         *
279
-         * @since 1.0
280
-         * @access public
281
-         *
282
-         * @param int|string $term_id The term ID.
283
-         */
284
-        /*public function delete_attachments( $term_id ) {
157
+			$taxnow = isset($_REQUEST['taxonomy']) ? $_REQUEST['taxonomy'] : '';
158
+
159
+			if (!empty($this->_meta_box['pages'])) {
160
+				if (in_array($taxnow, $this->_meta_box['pages'])) {
161
+					// Enqueue Meta Box Style
162
+					//wp_enqueue_style( 'tax-meta-clss', $plugin_path . '/css/Tax-meta-class.css' );
163
+					// Enqueue Meta Box Scripts
164
+					//wp_enqueue_script( 'tax-meta-clss', $plugin_path . '/js/tax-meta-clss.js', array( 'jquery' ), null, true );
165
+
166
+				}
167
+			}
168
+
169
+		}
170
+
171
+		/**
172
+		 * Check the Field Upload, Add needed Actions
173
+		 *
174
+		 * @since 1.0
175
+		 * @access public
176
+		 */
177
+		public function enqueue_tax_meta_scripts()
178
+		{
179
+			// Make upload feature work event when custom post type doesn't support 'editor'
180
+			wp_enqueue_script('media-upload');
181
+			wp_enqueue_script('thickbox');
182
+			add_thickbox();
183
+			wp_enqueue_script('jquery-ui-core');
184
+			wp_enqueue_script('jquery-ui-sortable');
185
+
186
+
187
+		}
188
+
189
+		public function check_field_upload()
190
+		{
191
+
192
+			// Check if the field is an image or file. If not, return.
193
+			if (!$this->has_field('image') && !$this->has_field('file'))
194
+				return;
195
+
196
+
197
+			add_action('wp_enqueue_scripts', array(&$this, 'enqueue_tax_meta_scripts'), 100);
198
+
199
+			// Add data encoding type for file uploading.	
200
+			add_action('post_edit_form_tag', array(&$this, 'add_enctype'));
201
+
202
+
203
+			// Add filters for media upload.
204
+			add_filter('media_upload_gallery', array(&$this, 'insert_images'));
205
+			add_filter('media_upload_library', array(&$this, 'insert_images'));
206
+			add_filter('media_upload_image', array(&$this, 'insert_images'));
207
+
208
+			// Delete all attachments when delete custom post type.
209
+			add_action('wp_ajax_at_delete_file', array(&$this, 'delete_file'));
210
+			add_action('wp_ajax_at_reorder_images', array(&$this, 'reorder_images'));
211
+			// Delete file via Ajax
212
+			add_action('wp_ajax_at_delete_mupload', array($this, 'wp_ajax_delete_image'));
213
+		}
214
+
215
+		/**
216
+		 * Add data encoding type for file uploading
217
+		 *
218
+		 * @since 1.0
219
+		 * @access public
220
+		 */
221
+		public function add_enctype()
222
+		{
223
+			echo ' enctype="multipart/form-data"';
224
+		}
225
+
226
+		/**
227
+		 * Process images added to meta field.
228
+		 *
229
+		 * Modified from Faster Image Insert plugin.
230
+		 *
231
+		 * @return void
232
+		 * @author Cory Crowley
233
+		 */
234
+		public function insert_images()
235
+		{
236
+
237
+			// If post variables are empty, return.
238
+			if (!isset($_POST['at-insert']) || empty($_POST['attachments']))
239
+				return;
240
+
241
+			// Security Check
242
+			check_admin_referer('media-form');
243
+
244
+			// Create Security Nonce
245
+			$nonce = wp_create_nonce('at_ajax_delete');
246
+
247
+			// Get Post Id and Field Id
248
+			$term_id = $_POST['post_id'];
249
+			$id = $_POST['field_id'];
250
+
251
+			// Modify the insertion string
252
+			$html = '';
253
+			foreach ($_POST['attachments'] as $attachment_id => $attachment) {
254
+
255
+				// Strip Slashes
256
+				$attachment = stripslashes_deep($attachment);
257
+
258
+				// If not selected or url is empty, continue in loop.
259
+				if (empty($attachment['selected']) || empty($attachment['url']))
260
+					continue;
261
+
262
+				$li = "<li id='item_{$attachment_id}'>";
263
+				$li .= "<img src='{$attachment['url']}' alt='image_{$attachment_id}' />";
264
+				//$li 	.= "<a title='" . __( 'Delete this image' ) . "' class='at-delete-file' href='#' rel='{$nonce}|{$term_id}|{$id}|{$attachment_id}'>" . __( 'Delete' ) . "</a>";
265
+				$li .= "<a title='" . __('Remove this image', 'geodirectory') . "' class='at-delete-file' href='#' rel='{$nonce}|{$term_id}|{$id}|{$attachment_id}'><img src='" . $this->SelfPath . "/images/delete-16.png' alt='" . __('Remove', 'geodirectory') . "' /></a>";
266
+				$li .= "<input type='hidden' name='{$id}[]' value='{$attachment_id}' />";
267
+				$li .= "</li>";
268
+				$html .= $li;
269
+
270
+			} // End For Each
271
+
272
+			return media_send_to_editor($html);
273
+
274
+		}
275
+
276
+		/**
277
+		 * Delete attachments associated with the post.
278
+		 *
279
+		 * @since 1.0
280
+		 * @access public
281
+		 *
282
+		 * @param int|string $term_id The term ID.
283
+		 */
284
+		/*public function delete_attachments( $term_id ) {
285 285
 		
286 286
 		// Get Attachments
287 287
 		$attachments = get_posts( array( 'numberposts' => -1, 'post_type' => 'attachment', 'post_parent' => $term_id ) );
@@ -295,349 +295,349 @@  discard block
 block discarded – undo
295 295
 		
296 296
 	}*/
297 297
 
298
-        /**
299
-         * Ajax callback for deleting files.
300
-         *
301
-         * Modified from a function used by "Verve Meta Boxes" plugin ( http://goo.gl/aw64H )
302
-         *
303
-         * @since 1.0
304
-         * @access public
305
-         */
306
-        public function delete_file()
307
-        {
308
-
309
-
310
-            // If data is not set, die.
311
-            if (!isset($_POST['data']))
312
-                die();
313
-
314
-            list($nonce, $term_id, $key, $attach_id) = explode('|', $_POST['data']);
315
-
316
-            if (!wp_verify_nonce($nonce, 'at_ajax_delete'))
317
-                die('1');
318
-
319
-            $this->delete_tax_meta($term_id, $key, $attach_id);
320
-
321
-            die('0');
322
-
323
-        }
324
-
325
-        /**
326
-         * Ajax callback for deleting files.
327
-         * Modified from a function used by "Verve Meta Boxes" plugin (http://goo.gl/LzYSq)
328
-         * @since 1.0
329
-         * @access public
330
-         */
331
-        public function wp_ajax_delete_image()
332
-        {
333
-            $term_id = isset($_GET['post_id']) ? intval($_GET['post_id']) : 0;
334
-            $field_id = isset($_GET['field_id']) ? $_GET['field_id'] : 0;
335
-            $attachment_id = isset($_GET['attachment_id']) ? intval($_GET['attachment_id']) : 0;
336
-            $ok = false;
337
-            if (strpos($field_id, '[') === false) {
338
-                check_admin_referer("at-delete-mupload_" . urldecode($field_id));
339
-                if ($term_id > 0)
340
-                    $this->delete_tax_meta($term_id, $field_id);
341
-                //$ok = wp_delete_attachment( $attachment_id );
342
-                $ok = 1;
343
-            } else {
344
-                $f = explode('[', urldecode($field_id));
345
-                $f_fiexed = array();
346
-                foreach ($f as $k => $v) {
347
-                    $f[$k] = str_replace(']', '', $v);
348
-                }
349
-                $saved = $this->get_tax_meta($term_id, $f[0], true);
350
-                if (isset($saved[$f[1]][$f[2]])) {
351
-                    unset($saved[$f[1]][$f[2]]);
352
-                    if ($term_id > 0)
353
-                        update_post_meta($term_id, $f[0], $saved);
354
-                    //$ok = wp_delete_attachment( $attachment_id );
355
-                    $ok = 1;
356
-                }
357
-            }
358
-
359
-
360
-            if ($ok) {
361
-                echo json_encode(array('status' => 'success'));
362
-                die();
363
-            } else {
364
-                echo json_encode(array('message' => __('Cannot delete file. Something\'s wrong.', 'geodirectory')));
365
-                die();
366
-            }
367
-        }
368
-
369
-        /**
370
-         * Ajax callback for reordering Images.
371
-         *
372
-         * @since 1.0
373
-         * @access public
374
-         */
375
-        public function reorder_images()
376
-        {
377
-
378
-            if (!isset($_POST['data']))
379
-                die();
380
-
381
-            list($order, $term_id, $key, $nonce) = explode('|', $_POST['data']);
382
-
383
-            if (!wp_verify_nonce($nonce, 'at_ajax_reorder'))
384
-                die('1');
385
-
386
-            parse_str($order, $items);
387
-            $items = $items['item'];
388
-            $order = 1;
389
-            foreach ($items as $item) {
390
-                wp_update_post(array('ID' => $item, 'post_parent' => $term_id, 'menu_order' => $order));
391
-                $order++;
392
-            }
393
-
394
-            die('0');
395
-
396
-        }
397
-
398
-        /**
399
-         * Check Field Color
400
-         *
401
-         * @since 1.0
402
-         * @access public
403
-         */
404
-        public function check_field_color()
405
-        {
406
-
407
-            if ($this->has_field('color') && $this->is_edit_page()) {
408
-                // Enqueu built-in script and style for color picker.
409
-                wp_enqueue_style('farbtastic');
410
-                wp_enqueue_script('farbtastic');
411
-            }
412
-
413
-        }
414
-
415
-        /**
416
-         * Check Field Date
417
-         *
418
-         * @since 1.0
419
-         * @access public
420
-         */
421
-        public function check_field_date()
422
-        {
423
-
424
-            if ($this->has_field('date') && $this->is_edit_page()) {
425
-                // Enqueu JQuery UI, use proper version.
426
-                wp_enqueue_style('tmc-jquery-ui-css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/' . $this->get_jqueryui_ver() . '/themes/base/jquery-ui.css');
427
-                wp_enqueue_script('tmc-jquery-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/' . $this->get_jqueryui_ver() . '/jquery-ui.min.js', array('jquery'));
428
-            }
429
-
430
-        }
431
-
432
-        /**
433
-         * Check Field Time
434
-         *
435
-         * @since 1.0
436
-         * @access public
437
-         */
438
-        public function check_field_time()
439
-        {
440
-
441
-            if ($this->has_field('time') && $this->is_edit_page()) {
442
-
443
-                // Enqueu JQuery UI, use proper version.
444
-                wp_enqueue_style('tmc-jquery-ui-css', 'https://ajax.googleapis.com/ajax/libs/jqueryui/' . $this->get_jqueryui_ver() . '/themes/base/jquery-ui.css', array(), false, true);
445
-                wp_enqueue_script('tmc-jquery-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/' . $this->get_jqueryui_ver() . '/jquery-ui.min.js', array('jquery'), false, true);
446
-                wp_enqueue_script('at-timepicker', 'https://github.com/trentrichardson/jQuery-Timepicker-Addon/raw/master/jquery-ui-timepicker-addon.js', array('tmc-jquery-ui'), false, true);
447
-
448
-            }
449
-
450
-        }
451
-
452
-        /**
453
-         * Add Meta Box for multiple post types.
454
-         *
455
-         * @since 1.0
456
-         * @access public
457
-         */
458
-        public function add()
459
-        {
460
-
461
-            // Loop through array
462
-            if (!empty($this->_meta_box['pages'])) {
463
-                foreach ($this->_meta_box['pages'] as $page) {
464
-                    //add fields to edit form
465
-                    add_action($page . '_edit_form_fields', array(&$this, 'show_edit_form'));
466
-                    //add fields to add new form
467
-                    add_action($page . '_add_form_fields', array(&$this, 'show_new_form'));
468
-                    // this saves the edit fields
469
-                    add_action('edited_' . $page, array(&$this, 'save'), 10, 2);
470
-                    // this saves the add fields
471
-                    add_action('created_' . $page, array(&$this, 'save'), 10, 2);
472
-                }
473
-            }
474
-
475
-        }
476
-
477
-        /**
478
-         * Callback function to show fields on add new taxonomy term form.
479
-         *
480
-         * @since 1.0
481
-         * @access public
482
-         */
483
-        public function show_new_form($term_id)
484
-        {
485
-            $this->_form_type = 'new';
486
-            $this->show($term_id);
487
-        }
488
-
489
-        /**
490
-         * Callback function to show fields on term edit form.
491
-         *
492
-         * @since 1.0
493
-         * @access public
494
-         */
495
-        public function show_edit_form($term_id)
496
-        {
497
-            $this->_form_type = 'edit';
498
-            $this->show($term_id);
499
-        }
500
-
501
-
502
-        /**
503
-         * Callback function to show fields in meta box.
504
-         *
505
-         * @since 1.0
506
-         * @access public
507
-         */
508
-        public function show($term_id)
509
-        {
510
-
511
-            wp_nonce_field(basename(__FILE__), 'tax_meta_class_nonce');
512
-
513
-            foreach ($this->_fields as $field) {
514
-                $meta = $this->get_tax_meta($term_id, $field['id'], !$field['multiple']);
515
-                $meta = ($meta !== '') ? $meta : $field['std'];
516
-                if ('image' != $field['type'] && $field['type'] != 'repeater')
517
-                    $meta = is_array($meta) ? array_map('esc_attr', $meta) : esc_attr($meta);
518
-
519
-                if ($field['validate_func']) {
520
-                    echo '<tr class="form-field form-required ' . $field['style'] . '">';
521
-                } else {
522
-                    echo '<tr class="form-field ' . $field['style'] . '">';
523
-                }
524
-
525
-                // Call Separated methods for displaying each type of field.
526
-                call_user_func(array(&$this, 'show_field_' . $field['type']), $field, $meta);
527
-                echo '</tr>';
528
-            }
529
-            echo '</table>';
530
-        }
531
-
532
-        /**
533
-         * Show Repeater Fields.
534
-         *
535
-         * @param string $field
536
-         * @param string $meta
537
-         * @since 1.0
538
-         * @access public
539
-         */
540
-        public function show_field_repeater($field, $meta)
541
-        {
542
-            // Get Plugin Path
543
-            $plugin_path = $this->SelfPath;
544
-            $this->show_field_begin($field, $meta);
545
-            echo "<div class='at-repeat' id='{$field['id']}'>";
546
-
547
-            $c = 0;
548
-
549
-            if (count($meta) > 0 && is_array($meta)) {
550
-                foreach ($meta as $me) {
551
-                    //for labling toggles
552
-                    $mmm = $me[$field['fields'][0]['id']];
553
-                    echo '<div class="at-repater-block">' . $mmm . '<br/><table class="repeater-table" style="display: none;">';
554
-                    if ($field['inline']) {
555
-                        echo '<tr class="at-inline" VALIGN="top">';
556
-                    }
557
-                    foreach ($field['fields'] as $f) {
558
-                        //reset var $id for repeater
559
-                        $id = '';
560
-                        $id = $field['id'] . '[' . $c . '][' . $f['id'] . ']';
561
-                        $m = $me[$f['id']];
562
-                        $m = ($m !== '') ? $m : $f['std'];
563
-                        if ('image' != $f['type'] && $f['type'] != 'repeater')
564
-                            $m = is_array($m) ? array_map('esc_attr', $m) : esc_attr($m);
565
-                        //set new id for field in array format
566
-                        $f['id'] = $id;
567
-                        if (!$field['inline']) {
568
-                            echo '<tr>';
569
-                        }
570
-                        call_user_func(array(&$this, 'show_field_' . $f['type']), $f, $m);
571
-                        if (!$field['inline']) {
572
-                            echo '</tr>';
573
-                        }
574
-                    }
575
-                    if ($field['inline']) {
576
-                        echo '</tr>';
577
-                    }
578
-                    echo '</table>
298
+		/**
299
+		 * Ajax callback for deleting files.
300
+		 *
301
+		 * Modified from a function used by "Verve Meta Boxes" plugin ( http://goo.gl/aw64H )
302
+		 *
303
+		 * @since 1.0
304
+		 * @access public
305
+		 */
306
+		public function delete_file()
307
+		{
308
+
309
+
310
+			// If data is not set, die.
311
+			if (!isset($_POST['data']))
312
+				die();
313
+
314
+			list($nonce, $term_id, $key, $attach_id) = explode('|', $_POST['data']);
315
+
316
+			if (!wp_verify_nonce($nonce, 'at_ajax_delete'))
317
+				die('1');
318
+
319
+			$this->delete_tax_meta($term_id, $key, $attach_id);
320
+
321
+			die('0');
322
+
323
+		}
324
+
325
+		/**
326
+		 * Ajax callback for deleting files.
327
+		 * Modified from a function used by "Verve Meta Boxes" plugin (http://goo.gl/LzYSq)
328
+		 * @since 1.0
329
+		 * @access public
330
+		 */
331
+		public function wp_ajax_delete_image()
332
+		{
333
+			$term_id = isset($_GET['post_id']) ? intval($_GET['post_id']) : 0;
334
+			$field_id = isset($_GET['field_id']) ? $_GET['field_id'] : 0;
335
+			$attachment_id = isset($_GET['attachment_id']) ? intval($_GET['attachment_id']) : 0;
336
+			$ok = false;
337
+			if (strpos($field_id, '[') === false) {
338
+				check_admin_referer("at-delete-mupload_" . urldecode($field_id));
339
+				if ($term_id > 0)
340
+					$this->delete_tax_meta($term_id, $field_id);
341
+				//$ok = wp_delete_attachment( $attachment_id );
342
+				$ok = 1;
343
+			} else {
344
+				$f = explode('[', urldecode($field_id));
345
+				$f_fiexed = array();
346
+				foreach ($f as $k => $v) {
347
+					$f[$k] = str_replace(']', '', $v);
348
+				}
349
+				$saved = $this->get_tax_meta($term_id, $f[0], true);
350
+				if (isset($saved[$f[1]][$f[2]])) {
351
+					unset($saved[$f[1]][$f[2]]);
352
+					if ($term_id > 0)
353
+						update_post_meta($term_id, $f[0], $saved);
354
+					//$ok = wp_delete_attachment( $attachment_id );
355
+					$ok = 1;
356
+				}
357
+			}
358
+
359
+
360
+			if ($ok) {
361
+				echo json_encode(array('status' => 'success'));
362
+				die();
363
+			} else {
364
+				echo json_encode(array('message' => __('Cannot delete file. Something\'s wrong.', 'geodirectory')));
365
+				die();
366
+			}
367
+		}
368
+
369
+		/**
370
+		 * Ajax callback for reordering Images.
371
+		 *
372
+		 * @since 1.0
373
+		 * @access public
374
+		 */
375
+		public function reorder_images()
376
+		{
377
+
378
+			if (!isset($_POST['data']))
379
+				die();
380
+
381
+			list($order, $term_id, $key, $nonce) = explode('|', $_POST['data']);
382
+
383
+			if (!wp_verify_nonce($nonce, 'at_ajax_reorder'))
384
+				die('1');
385
+
386
+			parse_str($order, $items);
387
+			$items = $items['item'];
388
+			$order = 1;
389
+			foreach ($items as $item) {
390
+				wp_update_post(array('ID' => $item, 'post_parent' => $term_id, 'menu_order' => $order));
391
+				$order++;
392
+			}
393
+
394
+			die('0');
395
+
396
+		}
397
+
398
+		/**
399
+		 * Check Field Color
400
+		 *
401
+		 * @since 1.0
402
+		 * @access public
403
+		 */
404
+		public function check_field_color()
405
+		{
406
+
407
+			if ($this->has_field('color') && $this->is_edit_page()) {
408
+				// Enqueu built-in script and style for color picker.
409
+				wp_enqueue_style('farbtastic');
410
+				wp_enqueue_script('farbtastic');
411
+			}
412
+
413
+		}
414
+
415
+		/**
416
+		 * Check Field Date
417
+		 *
418
+		 * @since 1.0
419
+		 * @access public
420
+		 */
421
+		public function check_field_date()
422
+		{
423
+
424
+			if ($this->has_field('date') && $this->is_edit_page()) {
425
+				// Enqueu JQuery UI, use proper version.
426
+				wp_enqueue_style('tmc-jquery-ui-css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/' . $this->get_jqueryui_ver() . '/themes/base/jquery-ui.css');
427
+				wp_enqueue_script('tmc-jquery-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/' . $this->get_jqueryui_ver() . '/jquery-ui.min.js', array('jquery'));
428
+			}
429
+
430
+		}
431
+
432
+		/**
433
+		 * Check Field Time
434
+		 *
435
+		 * @since 1.0
436
+		 * @access public
437
+		 */
438
+		public function check_field_time()
439
+		{
440
+
441
+			if ($this->has_field('time') && $this->is_edit_page()) {
442
+
443
+				// Enqueu JQuery UI, use proper version.
444
+				wp_enqueue_style('tmc-jquery-ui-css', 'https://ajax.googleapis.com/ajax/libs/jqueryui/' . $this->get_jqueryui_ver() . '/themes/base/jquery-ui.css', array(), false, true);
445
+				wp_enqueue_script('tmc-jquery-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/' . $this->get_jqueryui_ver() . '/jquery-ui.min.js', array('jquery'), false, true);
446
+				wp_enqueue_script('at-timepicker', 'https://github.com/trentrichardson/jQuery-Timepicker-Addon/raw/master/jquery-ui-timepicker-addon.js', array('tmc-jquery-ui'), false, true);
447
+
448
+			}
449
+
450
+		}
451
+
452
+		/**
453
+		 * Add Meta Box for multiple post types.
454
+		 *
455
+		 * @since 1.0
456
+		 * @access public
457
+		 */
458
+		public function add()
459
+		{
460
+
461
+			// Loop through array
462
+			if (!empty($this->_meta_box['pages'])) {
463
+				foreach ($this->_meta_box['pages'] as $page) {
464
+					//add fields to edit form
465
+					add_action($page . '_edit_form_fields', array(&$this, 'show_edit_form'));
466
+					//add fields to add new form
467
+					add_action($page . '_add_form_fields', array(&$this, 'show_new_form'));
468
+					// this saves the edit fields
469
+					add_action('edited_' . $page, array(&$this, 'save'), 10, 2);
470
+					// this saves the add fields
471
+					add_action('created_' . $page, array(&$this, 'save'), 10, 2);
472
+				}
473
+			}
474
+
475
+		}
476
+
477
+		/**
478
+		 * Callback function to show fields on add new taxonomy term form.
479
+		 *
480
+		 * @since 1.0
481
+		 * @access public
482
+		 */
483
+		public function show_new_form($term_id)
484
+		{
485
+			$this->_form_type = 'new';
486
+			$this->show($term_id);
487
+		}
488
+
489
+		/**
490
+		 * Callback function to show fields on term edit form.
491
+		 *
492
+		 * @since 1.0
493
+		 * @access public
494
+		 */
495
+		public function show_edit_form($term_id)
496
+		{
497
+			$this->_form_type = 'edit';
498
+			$this->show($term_id);
499
+		}
500
+
501
+
502
+		/**
503
+		 * Callback function to show fields in meta box.
504
+		 *
505
+		 * @since 1.0
506
+		 * @access public
507
+		 */
508
+		public function show($term_id)
509
+		{
510
+
511
+			wp_nonce_field(basename(__FILE__), 'tax_meta_class_nonce');
512
+
513
+			foreach ($this->_fields as $field) {
514
+				$meta = $this->get_tax_meta($term_id, $field['id'], !$field['multiple']);
515
+				$meta = ($meta !== '') ? $meta : $field['std'];
516
+				if ('image' != $field['type'] && $field['type'] != 'repeater')
517
+					$meta = is_array($meta) ? array_map('esc_attr', $meta) : esc_attr($meta);
518
+
519
+				if ($field['validate_func']) {
520
+					echo '<tr class="form-field form-required ' . $field['style'] . '">';
521
+				} else {
522
+					echo '<tr class="form-field ' . $field['style'] . '">';
523
+				}
524
+
525
+				// Call Separated methods for displaying each type of field.
526
+				call_user_func(array(&$this, 'show_field_' . $field['type']), $field, $meta);
527
+				echo '</tr>';
528
+			}
529
+			echo '</table>';
530
+		}
531
+
532
+		/**
533
+		 * Show Repeater Fields.
534
+		 *
535
+		 * @param string $field
536
+		 * @param string $meta
537
+		 * @since 1.0
538
+		 * @access public
539
+		 */
540
+		public function show_field_repeater($field, $meta)
541
+		{
542
+			// Get Plugin Path
543
+			$plugin_path = $this->SelfPath;
544
+			$this->show_field_begin($field, $meta);
545
+			echo "<div class='at-repeat' id='{$field['id']}'>";
546
+
547
+			$c = 0;
548
+
549
+			if (count($meta) > 0 && is_array($meta)) {
550
+				foreach ($meta as $me) {
551
+					//for labling toggles
552
+					$mmm = $me[$field['fields'][0]['id']];
553
+					echo '<div class="at-repater-block">' . $mmm . '<br/><table class="repeater-table" style="display: none;">';
554
+					if ($field['inline']) {
555
+						echo '<tr class="at-inline" VALIGN="top">';
556
+					}
557
+					foreach ($field['fields'] as $f) {
558
+						//reset var $id for repeater
559
+						$id = '';
560
+						$id = $field['id'] . '[' . $c . '][' . $f['id'] . ']';
561
+						$m = $me[$f['id']];
562
+						$m = ($m !== '') ? $m : $f['std'];
563
+						if ('image' != $f['type'] && $f['type'] != 'repeater')
564
+							$m = is_array($m) ? array_map('esc_attr', $m) : esc_attr($m);
565
+						//set new id for field in array format
566
+						$f['id'] = $id;
567
+						if (!$field['inline']) {
568
+							echo '<tr>';
569
+						}
570
+						call_user_func(array(&$this, 'show_field_' . $f['type']), $f, $m);
571
+						if (!$field['inline']) {
572
+							echo '</tr>';
573
+						}
574
+					}
575
+					if ($field['inline']) {
576
+						echo '</tr>';
577
+					}
578
+					echo '</table>
579 579
 				<span class="at-re-toggle"><img src="';
580
-                    if ($this->_Local_images) {
581
-                        echo $plugin_path . '/images/edit.png';
582
-                    } else {
583
-                        echo 'http://i.imgur.com/ka0E2.png';
584
-                    }
585
-                    echo '" alt="Edit" title="Edit"/></span> 
580
+					if ($this->_Local_images) {
581
+						echo $plugin_path . '/images/edit.png';
582
+					} else {
583
+						echo 'http://i.imgur.com/ka0E2.png';
584
+					}
585
+					echo '" alt="Edit" title="Edit"/></span> 
586 586
 				<img src="';
587
-                    if ($this->_Local_images) {
588
-                        echo $plugin_path . '/images/remove.png';
589
-                    } else {
590
-                        echo 'http://i.imgur.com/g8Duj.png';
591
-                    }
592
-                    echo '" alt="' . __('Remove', 'geodirectory') . '" title="' . __('Remove', 'geodirectory') . '" id="remove-' . $field['id'] . '"></div>';
593
-                    $c = $c + 1;
594
-
595
-                }
596
-                $this->show_field_end($field, $meta);
597
-            }
598
-
599
-            echo '<img src="';
600
-            if ($this->_Local_images) {
601
-                echo $plugin_path . '/images/add.png';
602
-            } else {
603
-                echo 'http://i.imgur.com/w5Tuc.png';
604
-            }
605
-            echo '" alt="' . __('Add', 'geodirectory') . '" title="' . __('Add', 'geodirectory') . '" id="add-' . $field['id'] . '"><br/></div>';
606
-
607
-            //create all fields once more for js function and catch with object buffer
608
-            ob_start();
609
-            echo '<div class="at-repater-block"><table class="repeater-table">';
610
-            if ($field['inline']) {
611
-                echo '<tr class="at-inline" VALIGN="top">';
612
-            }
613
-            foreach ($field['fields'] as $f) {
614
-                //reset var $id for repeater
615
-                $id = '';
616
-                $id = $field['id'] . '[CurrentCounter][' . $f['id'] . ']';
617
-                $f['id'] = $id;
618
-                if (!$field['inline']) {
619
-                    echo '<tr>';
620
-                }
621
-                call_user_func(array(&$this, 'show_field_' . $f['type']), $f, '');
622
-                if (!$field['inline']) {
623
-                    echo '</tr>';
624
-                }
625
-            }
626
-            if ($field['inline']) {
627
-                echo '</tr>';
628
-            }
629
-            echo '</table><img src="';
630
-            if ($this->_Local_images) {
631
-                echo $plugin_path . '/images/remove.png';
632
-            } else {
633
-                echo 'http://i.imgur.com/g8Duj.png';
634
-            }
635
-            echo '" alt="' . __('Remove', 'geodirectory') . '" title="' . __('Remove', 'geodirectory') . '" id="remove-' . $field['id'] . '"></div>';
636
-            $counter = 'countadd_' . $field['id'];
637
-            $js_code = ob_get_clean();
638
-            $js_code = str_replace("'", "\"", $js_code);
639
-            $js_code = str_replace("CurrentCounter", "' + " . $counter . " + '", $js_code);
640
-            echo '<script>
587
+					if ($this->_Local_images) {
588
+						echo $plugin_path . '/images/remove.png';
589
+					} else {
590
+						echo 'http://i.imgur.com/g8Duj.png';
591
+					}
592
+					echo '" alt="' . __('Remove', 'geodirectory') . '" title="' . __('Remove', 'geodirectory') . '" id="remove-' . $field['id'] . '"></div>';
593
+					$c = $c + 1;
594
+
595
+				}
596
+				$this->show_field_end($field, $meta);
597
+			}
598
+
599
+			echo '<img src="';
600
+			if ($this->_Local_images) {
601
+				echo $plugin_path . '/images/add.png';
602
+			} else {
603
+				echo 'http://i.imgur.com/w5Tuc.png';
604
+			}
605
+			echo '" alt="' . __('Add', 'geodirectory') . '" title="' . __('Add', 'geodirectory') . '" id="add-' . $field['id'] . '"><br/></div>';
606
+
607
+			//create all fields once more for js function and catch with object buffer
608
+			ob_start();
609
+			echo '<div class="at-repater-block"><table class="repeater-table">';
610
+			if ($field['inline']) {
611
+				echo '<tr class="at-inline" VALIGN="top">';
612
+			}
613
+			foreach ($field['fields'] as $f) {
614
+				//reset var $id for repeater
615
+				$id = '';
616
+				$id = $field['id'] . '[CurrentCounter][' . $f['id'] . ']';
617
+				$f['id'] = $id;
618
+				if (!$field['inline']) {
619
+					echo '<tr>';
620
+				}
621
+				call_user_func(array(&$this, 'show_field_' . $f['type']), $f, '');
622
+				if (!$field['inline']) {
623
+					echo '</tr>';
624
+				}
625
+			}
626
+			if ($field['inline']) {
627
+				echo '</tr>';
628
+			}
629
+			echo '</table><img src="';
630
+			if ($this->_Local_images) {
631
+				echo $plugin_path . '/images/remove.png';
632
+			} else {
633
+				echo 'http://i.imgur.com/g8Duj.png';
634
+			}
635
+			echo '" alt="' . __('Remove', 'geodirectory') . '" title="' . __('Remove', 'geodirectory') . '" id="remove-' . $field['id'] . '"></div>';
636
+			$counter = 'countadd_' . $field['id'];
637
+			$js_code = ob_get_clean();
638
+			$js_code = str_replace("'", "\"", $js_code);
639
+			$js_code = str_replace("CurrentCounter", "' + " . $counter . " + '", $js_code);
640
+			echo '<script>
641 641
 				jQuery(document).ready(function() {
642 642
 					var ' . $counter . ' = ' . $c . ';
643 643
 					jQuery("#add-' . $field['id'] . '").live(\'click\', function() {
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
         			});
651 651
     			});
652 652
     		</script>';
653
-            echo '<br/><style>
653
+			echo '<br/><style>
654 654
 .at-inline{line-height: 1 !important;}
655 655
 .at-inline .at-field{border: 0px !important;}
656 656
 .at-inline .at-label{margin: 0 0 1px !important;}
@@ -658,532 +658,532 @@  discard block
 block discarded – undo
658 658
 .at-inline .at-textarea{width: 100px; height: 75px;}
659 659
 .at-repater-block{background-color: #FFFFFF;border: 1px solid;margin: 2px;}
660 660
 </style>';
661
-            $this->show_field_end($field, $meta);
662
-        }
663
-
664
-        /**
665
-         * Begin Field.
666
-         *
667
-         * @param string $field
668
-         * @param string $meta
669
-         * @since 1.0
670
-         * @access public
671
-         */
672
-        public function show_field_begin($field, $meta)
673
-        {
674
-            if (isset($field['group'])) {
675
-                if ($field['group'] == "start") {
676
-                    echo "<td class='at-field'>";
677
-                }
678
-            } else {
679
-                if ($this->_form_type == 'edit') {
680
-                    echo '<th valign="top" scope="row">';
681
-                } else {
682
-                    if ($field['validate_func']) {
683
-                        echo '<td><div class="form-field form-required">';
684
-                    } else {
685
-                        echo '<td><div class="form-field">';
686
-                    }
687
-                }
688
-            }
689
-            if ($field['name'] != '' || $field['name'] != FALSE) {
690
-                //echo "<div class='at-label'>";
691
-                echo "<label for='{$field['id']}'>{$field['name']}</label>";
692
-                //echo "</div>";
693
-            }
694
-            if ($this->_form_type == 'edit') {
695
-                echo '</th><td>';
696
-            }
697
-        }
698
-
699
-        /**
700
-         * End Field.
701
-         *
702
-         * @param string $field
703
-         * @param string $meta
704
-         * @since 1.0
705
-         * @access public
706
-         */
707
-        public function show_field_end($field, $meta = NULL, $group = false)
708
-        {
709
-            if (isset($field['group'])) {
710
-                if ($group == 'end') {
711
-                    if ($field['desc'] != '') {
712
-                        echo "<p class='desc-field'>{$field['desc']}</p></td>";
713
-                    } else {
714
-                        echo "</td>";
715
-                    }
716
-                } else {
717
-                    if ($field['desc'] != '') {
718
-                        echo "<p class='desc-field'>{$field['desc']}</p><br/>";
719
-                    } else {
720
-                        echo '<br/>';
721
-                    }
722
-                }
723
-            } else {
724
-                if ($field['desc'] != '') {
725
-                    echo "<p class='desc-field'>{$field['desc']}</p>";
726
-                }
727
-                if ($this->_form_type == 'edit') {
728
-                    echo '<td>';
729
-                } else {
730
-                    echo '<td></div>';
731
-                }
732
-            }
733
-        }
734
-
735
-        /**
736
-         * Show Field Text.
737
-         *
738
-         * @param string $field
739
-         * @param string $meta
740
-         * @since 1.0
741
-         * @access public
742
-         */
743
-        public function show_field_text($field, $meta)
744
-        {
745
-            $this->show_field_begin($field, $meta);
746
-            echo "<input type='text' class='at-text' name='{$field['id']}' id='{$field['id']}' value='{$meta}' size='30' />";
747
-            $this->show_field_end($field, $meta);
748
-        }
749
-
750
-        /**
751
-         * Show Field hidden.
752
-         *
753
-         * @param string $field
754
-         * @param string|mixed $meta
755
-         * @since 0.1.3
756
-         * @access public
757
-         */
758
-        public function show_field_hidden($field, $meta)
759
-        {
760
-            //$this->show_field_begin( $field, $meta );
761
-            echo "<input type='hidden' class='at-text' name='{$field['id']}' id='{$field['id']}' value='{$meta}'/>";
762
-            //$this->show_field_end( $field, $meta );
763
-        }
764
-
765
-        /**
766
-         * Show Field Paragraph.
767
-         *
768
-         * @param string $field
769
-         * @since 0.1.3
770
-         * @access public
771
-         */
772
-        public function show_field_paragraph($field)
773
-        {
774
-            //$this->show_field_begin( $field, $meta );
775
-            echo '<p>' . $field['value'] . '</p>';
776
-            //$this->show_field_end( $field, $meta );
777
-        }
778
-
779
-        /**
780
-         * Show Field Textarea.
781
-         *
782
-         * @param string $field
783
-         * @param string $meta
784
-         * @since 1.0
785
-         * @access public
786
-         */
787
-        public function show_field_textarea($field, $meta)
788
-        {
789
-            $this->show_field_begin($field, $meta);
790
-            echo "<textarea class='at-textarea large-text' name='{$field['id']}' id='{$field['id']}' cols='60' rows='10'>{$meta}</textarea>";
791
-            $this->show_field_end($field, $meta);
792
-        }
793
-
794
-        /**
795
-         * Show Field Select.
796
-         *
797
-         * @param string $field
798
-         * @param string $meta
799
-         * @since 1.0
800
-         * @access public
801
-         */
802
-        public function show_field_select($field, $meta)
803
-        {
804
-
805
-            if (!is_array($meta))
806
-                $meta = (array)$meta;
807
-
808
-            $this->show_field_begin($field, $meta);
809
-            echo "<select class='at-select' name='{$field['id']}" . ($field['multiple'] ? "[]' id='{$field['id']}' multiple='multiple'" : "'") . ">";
810
-            foreach ($field['options'] as $key => $value) {
811
-                echo "<option value='{$key}'" . selected(in_array($key, $meta), true, false) . ">{$value}</option>";
812
-            }
813
-            echo "</select>";
814
-            $this->show_field_end($field, $meta);
815
-
816
-        }
817
-
818
-        /**
819
-         * Show Radio Field.
820
-         *
821
-         * @param string $field
822
-         * @param string $meta
823
-         * @since 1.0
824
-         * @access public
825
-         */
826
-        public function show_field_radio($field, $meta)
827
-        {
828
-
829
-            if (!is_array($meta))
830
-                $meta = (array)$meta;
831
-
832
-            $this->show_field_begin($field, $meta);
833
-            foreach ($field['options'] as $key => $value) {
834
-                echo "<input type='radio' class='at-radio' name='{$field['id']}' value='{$key}'" . checked(in_array($key, $meta), true, false) . " /> <span class='at-radio-label'>{$value}</span>";
835
-            }
836
-            $this->show_field_end($field, $meta);
837
-        }
838
-
839
-        /**
840
-         * Show Checkbox Field.
841
-         *
842
-         * @param string $field
843
-         * @param string $meta
844
-         * @since 1.0
845
-         * @access public
846
-         */
847
-        public function show_field_checkbox($field, $meta)
848
-        {
849
-
850
-            $this->show_field_begin($field, $meta);
851
-            echo "<input type='checkbox' class='rw-checkbox' name='{$field['id']}' id='{$field['id']}'" . checked(!empty($meta), true, false) . " /> {$field['desc']}";
852
-            $this->show_field_end($field, $meta);
853
-        }
854
-
855
-        /**
856
-         * Show Wysiwig Field.
857
-         *
858
-         * @param string $field
859
-         * @param string $meta
860
-         * @since 1.0
861
-         * @access public
862
-         */
863
-        public function show_field_wysiwyg($field, $meta)
864
-        {
865
-            $this->show_field_begin($field, $meta);
866
-            // Add TinyMCE script for WP version < 3.3
867
-            global $wp_version;
868
-
869
-            if (version_compare($wp_version, '3.2.1') < 1) {
870
-                echo "<textarea class='at-wysiwyg theEditor large-text' name='{$field['id']}' id='{$field['id']}' cols='60' rows='10'>{$meta}</textarea>";
871
-            } else {
872
-                // Use new wp_editor() since WP 3.3
873
-                wp_editor(stripslashes(html_entity_decode($meta)), $field['id'], array('editor_class' => 'at-wysiwyg'));
874
-            }
875
-            $this->show_field_end($field, $meta);
876
-        }
877
-
878
-        /**
879
-         * Show File Field.
880
-         *
881
-         * @global object $post The current post object.
882
-         * @param string $field
883
-         * @param string $meta
884
-         * @since 1.0
885
-         * @access public
886
-         */
887
-        public function show_field_file($field, $meta)
888
-        {
889
-
890
-            global $post;
891
-
892
-            if (!is_array($meta))
893
-                $meta = (array)$meta;
894
-
895
-            $this->show_field_begin($field, $meta);
896
-            echo "{$field['desc']}<br />";
897
-
898
-            if (!empty($meta)) {
899
-                $nonce = wp_create_nonce('at_ajax_delete');
900
-                echo '<div style="margin-bottom: 10px"><strong>' . __('Uploaded files', 'geodirectory') . '</strong></div>';
901
-                echo '<ol class="at-upload">';
902
-                foreach ($meta as $att) {
903
-                    // if (wp_attachment_is_image($att)) continue; // what's image uploader for?
904
-                    echo "<li>" . wp_get_attachment_link($att, '', false, false, ' ') . " (<a class='at-delete-file' href='#' rel='{$nonce}|{$post->ID}|{$field['id']}|{$att}'>" . __('Remove', 'geodirectory') . "</a>)</li>";
905
-                }
906
-                echo '</ol>';
907
-            }
908
-
909
-            // show form upload
910
-
911
-            echo "<div class='at-file-upload-label'>";
912
-            echo "<strong>" . __('Upload new files', 'geodirectory') . "</strong>";
913
-            echo "</div>";
914
-            echo "<div class='new-files'>";
915
-            echo "<div class='file-input'>";
916
-            echo "<input type='file' name='{$field['id']}[]' />";
917
-            echo "</div><!-- End .file-input -->";
918
-            echo "<a class='at-add-file button' href='#'>" . __('Add more files', 'geodirectory') . "</a>";
919
-            echo "</div><!-- End .new-files -->";
920
-            echo "</td>";
921
-            $this->show_field_end($field, $meta);
922
-        }
923
-
924
-        /**
925
-         * Show Image Field.
926
-         *
927
-         * @param array $field
928
-         * @param array $meta
929
-         * @since 1.0
930
-         * @access public
931
-         */
932
-        public function show_field_image($field, $meta)
933
-        {
934
-            $this->show_field_begin($field, $meta);
935
-            $html = wp_nonce_field("at-delete-mupload_{$field['id']}", "nonce-delete-mupload_" . $field['id'], false, false);
936
-            if (is_array($meta)) {
937
-                if (isset($meta[0]) && is_array($meta[0]))
938
-                    $meta = $meta[0];
939
-            }
940
-
941
-            $uploads = wp_upload_dir();
942
-            if (is_array($meta) && isset($meta['src']) && $meta['src'] != '') {
943
-
944
-                $file_info = pathinfo($meta['src']);
945
-
946
-                //print_r($meta);
947
-                //print_r($uploads);
948
-                //print_r($file_info);
949
-
950
-                if ($file_info['dirname'] != '.' && $file_info['dirname'] != '..')
951
-                    $sub_dir = $file_info['dirname'];
952
-
953
-                $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs	
954
-                $uploads_baseurl = $uploads['baseurl'];
955
-                $uploads_path = $uploads['path'];
956
-
957
-                $file_name = $file_info['basename'];
958
-
959
-                $sub_dir = str_replace($uploads_baseurl, '', $sub_dir);
960
-
961
-                $uploads_url = $uploads_baseurl . $sub_dir;
962
-
963
-                $meta['src'] = $uploads_url . '/' . $file_name;
964
-
965
-
966
-                $html .= "<span class='mupload_img_holder'><img src='" . $meta['src'] . "' style='max-height: 150px;max-width: 150px;' /></span>";
967
-                $html .= "<input type='hidden' name='" . $field['id'] . "[id]' id='" . $field['id'] . "[id]' value='" . $meta['id'] . "' />";
968
-                $html .= "<input type='hidden' class='" . $field['id'] . "[src]' name='" . $field['id'] . "[src]' id='" . $field['id'] . "[src]' value='" . $meta['src'] . "' />";
969
-                $html .= "<input class='at-delete_image_button' type='button' rel='" . $field['id'] . "' value='" . __('Remove Image', 'geodirectory') . "' />";
970
-            } else {
971
-                $html .= "<span class='mupload_img_holder'></span>";
972
-                $html .= "<input type='hidden' name='" . $field['id'] . "[id]' id='" . $field['id'] . "[id]' value='' />";
973
-                $html .= "<input class='" . $field['id'] . "[src]' style='position:absolute;left:-500px;width:50px;' type='text' name='" . $field['id'] . "[src]' id='" . $field['id'] . "[src]' value='' />";
974
-                $html .= "<input class='at-upload_image_button' type='button' rel='" . $field['id'] . "' value='" . __('Upload Image', 'geodirectory') . "' />";
975
-            }
976
-            echo $html;
977
-            $this->show_field_end($field, $meta);
978
-        }
979
-
980
-        /**
981
-         * Show Color Field.
982
-         *
983
-         * @param string $field
984
-         * @param string $meta
985
-         * @since 1.0
986
-         * @access public
987
-         */
988
-        public function show_field_color($field, $meta)
989
-        {
990
-
991
-            if (empty($meta))
992
-                $meta = '#';
993
-
994
-            $this->show_field_begin($field, $meta);
995
-
996
-            echo "<input class='at-color' type='text' name='{$field['id']}' id='{$field['id']}' value='{$meta}' size='8' />";
997
-            //	echo "<a href='#' class='at-color-select button' rel='{$field['id']}'>" . __( 'Select a color' ) . "</a>";
998
-            echo "<input type='button' class='at-color-select button' rel='{$field['id']}' value='" . __('Select a color', 'geodirectory') . "'/>";
999
-            echo "<div style='display:none' class='at-color-picker' rel='{$field['id']}'></div>";
1000
-            $this->show_field_end($field, $meta);
1001
-
1002
-        }
1003
-
1004
-        /**
1005
-         * Show Checkbox List Field
1006
-         *
1007
-         * @param string $field
1008
-         * @param string $meta
1009
-         * @since 1.0
1010
-         * @access public
1011
-         */
1012
-        public function show_field_checkbox_list($field, $meta)
1013
-        {
1014
-
1015
-            if (!is_array($meta))
1016
-                $meta = (array)$meta;
1017
-
1018
-            $this->show_field_begin($field, $meta);
1019
-
1020
-            $html = array();
1021
-
1022
-            foreach ($field['options'] as $key => $value) {
1023
-                $html[] = "<input type='checkbox' class='at-checkbox_list' name='{$field['id']}[]' value='{$key}'" . checked(in_array($key, $meta), true, false) . " /> {$value}";
1024
-            }
1025
-
1026
-            echo implode('<br />', $html);
1027
-
1028
-            $this->show_field_end($field, $meta);
1029
-
1030
-        }
1031
-
1032
-        /**
1033
-         * Show Date Field.
1034
-         *
1035
-         * @param string $field
1036
-         * @param string $meta
1037
-         * @since 1.0
1038
-         * @access public
1039
-         */
1040
-        public function show_field_date($field, $meta)
1041
-        {
1042
-            $this->show_field_begin($field, $meta);
1043
-            echo "<input type='text' class='at-date' name='{$field['id']}' id='{$field['id']}' rel='{$field['format']}' value='{$meta}' size='30' />";
1044
-            $this->show_field_end($field, $meta);
1045
-        }
1046
-
1047
-        /**
1048
-         * Show time field.
1049
-         *
1050
-         * @param string $field
1051
-         * @param string $meta
1052
-         * @since 1.0
1053
-         * @access public
1054
-         */
1055
-        public function show_field_time($field, $meta)
1056
-        {
1057
-            $this->show_field_begin($field, $meta);
1058
-            echo "<input type='text' class='at-time' name='{$field['id']}' id='{$field['id']}' rel='{$field['format']}' value='{$meta}' size='30' />";
1059
-            $this->show_field_end($field, $meta);
1060
-        }
1061
-
1062
-        /**
1063
-         * Show Posts field.
1064
-         * used creating a posts/pages/custom types checkboxlist or a select dropdown
1065
-         *
1066
-         * @global object $post The current post object.
1067
-         * @param string $field
1068
-         * @param string $meta
1069
-         * @since 1.0
1070
-         * @access public
1071
-         */
1072
-        public function show_field_posts($field, $meta)
1073
-        {
1074
-            global $post;
1075
-
1076
-            if (!is_array($meta)) $meta = (array)$meta;
1077
-            $this->show_field_begin($field, $meta);
1078
-            $options = $field['options'];
1079
-            $posts = get_posts($options['args']);
1080
-
1081
-            // checkbox_list
1082
-            if ('checkbox_list' == $options['type']) {
1083
-                foreach ($posts as $p) {
1084
-                    echo "<input type='checkbox' name='{$field['id']}[]' value='$p->ID'" . checked(in_array($p->ID, $meta), true, false) . " /> $p->post_title<br/>";
1085
-                }
1086
-            } // select
1087
-            else {
1088
-                echo "<select name='{$field['id']}" . ($field['multiple'] ? "[]' multiple='multiple' style='height:auto'" : "'") . ">";
1089
-                foreach ($posts as $p) {
1090
-                    echo "<option value='$p->ID'" . selected(in_array($p->ID, $meta), true, false) . ">$p->post_title</option>";
1091
-                }
1092
-                echo "</select>";
1093
-            }
1094
-
1095
-            $this->show_field_end($field, $meta);
1096
-        }
1097
-
1098
-        /**
1099
-         * Show Taxonomy field.
1100
-         * used creating a category/tags/custom taxonomy checkboxlist or a select dropdown
1101
-         *
1102
-         * @global object $post The current post object.
1103
-         * @param string $field
1104
-         * @param string $meta
1105
-         * @since 1.0
1106
-         * @access public
1107
-         *
1108
-         * @uses get_terms()
1109
-         */
1110
-        public function show_field_taxonomy($field, $meta)
1111
-        {
1112
-            global $post;
1113
-
1114
-            if (!is_array($meta)) $meta = (array)$meta;
1115
-            $this->show_field_begin($field, $meta);
1116
-            $options = $field['options'];
1117
-            $terms = get_terms($options['taxonomy'], $options['args']);
1118
-
1119
-            // checkbox_list
1120
-            if ('checkbox_list' == $options['type']) {
1121
-                foreach ($terms as $term) {
1122
-                    echo "<input type='checkbox' name='{$field['id']}[]' value='$term->slug'" . checked(in_array($term->slug, $meta), true, false) . " /> $term->name<br/>";
1123
-                }
1124
-            } // select
1125
-            else {
1126
-                echo "<select name='{$field['id']}" . ($field['multiple'] ? "[]' multiple='multiple' style='height:auto'" : "'") . ">";
1127
-                foreach ($terms as $term) {
1128
-                    echo "<option value='$term->slug'" . selected(in_array($term->slug, $meta), true, false) . ">$term->name</option>";
1129
-                }
1130
-                echo "</select>";
1131
-            }
1132
-
1133
-            $this->show_field_end($field, $meta);
1134
-        }
1135
-
1136
-        /**
1137
-         * Save Data from Metabox
1138
-         *
1139
-         * @param string $term_id The term ID.
1140
-         * @since 1.0
1141
-         * @access public
1142
-         * @return string
1143
-         */
1144
-        public function save($term_id)
1145
-        {
1146
-
1147
-            $taxnow = '';
1148
-            if (isset($_POST['taxonomy']))
1149
-                $taxnow = $_POST['taxonomy'];
1150
-
1151
-            if (!isset($term_id)                                                        // Check Revision
1152
-                || (!in_array($taxnow, $this->_meta_box['pages']))                            // Check if current taxonomy type is supported.
1153
-                || (!check_admin_referer(basename(__FILE__), 'tax_meta_class_nonce'))        // Check nonce - Security
1154
-                || (!current_user_can('manage_categories'))
1155
-            )                                // Check permission
1156
-            {
1157
-                return $term_id;
1158
-            }
1159
-
1160
-
1161
-            foreach ($this->_fields as $field) {
1162
-
1163
-                $name = $field['id'];
1164
-                $type = $field['type'];
1165
-                $old = $this->get_tax_meta($term_id, $name, !$field['multiple']);
1166
-                $new = (isset($_POST[$name])) ? $_POST[$name] : (($field['multiple']) ? array() : '');
1167
-
1168
-                // Validate meta value
1169
-                if (class_exists('Tax_Meta_Validate') && method_exists('Tax_Meta_Validate', $field['validate_func'])) {
1170
-                    $new = call_user_func(array('Tax_Meta_Validate', $field['validate_func']), $new);
1171
-                }
1172
-
1173
-
1174
-                if ($name == 'ct_cat_icon') {
1175
-
1176
-                    $upload_dir = wp_upload_dir();
1177
-
1178
-                    $image_name_arr = explode('/', $new['src']);
1179
-                    //$old_filename = end($image_name_arr);
1180
-                    //$img_name_arr = explode('.',$old_filename);
1181
-
1182
-                    //$old_filename = $upload_dir['path'].'/'.$old_filename;
1183
-
1184
-                    $new_filename = $upload_dir['path'] . '/' . 'cat_icon_' . $term_id . '.png';
1185
-
1186
-                    /*rename($old_filename, $new_filename);
661
+			$this->show_field_end($field, $meta);
662
+		}
663
+
664
+		/**
665
+		 * Begin Field.
666
+		 *
667
+		 * @param string $field
668
+		 * @param string $meta
669
+		 * @since 1.0
670
+		 * @access public
671
+		 */
672
+		public function show_field_begin($field, $meta)
673
+		{
674
+			if (isset($field['group'])) {
675
+				if ($field['group'] == "start") {
676
+					echo "<td class='at-field'>";
677
+				}
678
+			} else {
679
+				if ($this->_form_type == 'edit') {
680
+					echo '<th valign="top" scope="row">';
681
+				} else {
682
+					if ($field['validate_func']) {
683
+						echo '<td><div class="form-field form-required">';
684
+					} else {
685
+						echo '<td><div class="form-field">';
686
+					}
687
+				}
688
+			}
689
+			if ($field['name'] != '' || $field['name'] != FALSE) {
690
+				//echo "<div class='at-label'>";
691
+				echo "<label for='{$field['id']}'>{$field['name']}</label>";
692
+				//echo "</div>";
693
+			}
694
+			if ($this->_form_type == 'edit') {
695
+				echo '</th><td>';
696
+			}
697
+		}
698
+
699
+		/**
700
+		 * End Field.
701
+		 *
702
+		 * @param string $field
703
+		 * @param string $meta
704
+		 * @since 1.0
705
+		 * @access public
706
+		 */
707
+		public function show_field_end($field, $meta = NULL, $group = false)
708
+		{
709
+			if (isset($field['group'])) {
710
+				if ($group == 'end') {
711
+					if ($field['desc'] != '') {
712
+						echo "<p class='desc-field'>{$field['desc']}</p></td>";
713
+					} else {
714
+						echo "</td>";
715
+					}
716
+				} else {
717
+					if ($field['desc'] != '') {
718
+						echo "<p class='desc-field'>{$field['desc']}</p><br/>";
719
+					} else {
720
+						echo '<br/>';
721
+					}
722
+				}
723
+			} else {
724
+				if ($field['desc'] != '') {
725
+					echo "<p class='desc-field'>{$field['desc']}</p>";
726
+				}
727
+				if ($this->_form_type == 'edit') {
728
+					echo '<td>';
729
+				} else {
730
+					echo '<td></div>';
731
+				}
732
+			}
733
+		}
734
+
735
+		/**
736
+		 * Show Field Text.
737
+		 *
738
+		 * @param string $field
739
+		 * @param string $meta
740
+		 * @since 1.0
741
+		 * @access public
742
+		 */
743
+		public function show_field_text($field, $meta)
744
+		{
745
+			$this->show_field_begin($field, $meta);
746
+			echo "<input type='text' class='at-text' name='{$field['id']}' id='{$field['id']}' value='{$meta}' size='30' />";
747
+			$this->show_field_end($field, $meta);
748
+		}
749
+
750
+		/**
751
+		 * Show Field hidden.
752
+		 *
753
+		 * @param string $field
754
+		 * @param string|mixed $meta
755
+		 * @since 0.1.3
756
+		 * @access public
757
+		 */
758
+		public function show_field_hidden($field, $meta)
759
+		{
760
+			//$this->show_field_begin( $field, $meta );
761
+			echo "<input type='hidden' class='at-text' name='{$field['id']}' id='{$field['id']}' value='{$meta}'/>";
762
+			//$this->show_field_end( $field, $meta );
763
+		}
764
+
765
+		/**
766
+		 * Show Field Paragraph.
767
+		 *
768
+		 * @param string $field
769
+		 * @since 0.1.3
770
+		 * @access public
771
+		 */
772
+		public function show_field_paragraph($field)
773
+		{
774
+			//$this->show_field_begin( $field, $meta );
775
+			echo '<p>' . $field['value'] . '</p>';
776
+			//$this->show_field_end( $field, $meta );
777
+		}
778
+
779
+		/**
780
+		 * Show Field Textarea.
781
+		 *
782
+		 * @param string $field
783
+		 * @param string $meta
784
+		 * @since 1.0
785
+		 * @access public
786
+		 */
787
+		public function show_field_textarea($field, $meta)
788
+		{
789
+			$this->show_field_begin($field, $meta);
790
+			echo "<textarea class='at-textarea large-text' name='{$field['id']}' id='{$field['id']}' cols='60' rows='10'>{$meta}</textarea>";
791
+			$this->show_field_end($field, $meta);
792
+		}
793
+
794
+		/**
795
+		 * Show Field Select.
796
+		 *
797
+		 * @param string $field
798
+		 * @param string $meta
799
+		 * @since 1.0
800
+		 * @access public
801
+		 */
802
+		public function show_field_select($field, $meta)
803
+		{
804
+
805
+			if (!is_array($meta))
806
+				$meta = (array)$meta;
807
+
808
+			$this->show_field_begin($field, $meta);
809
+			echo "<select class='at-select' name='{$field['id']}" . ($field['multiple'] ? "[]' id='{$field['id']}' multiple='multiple'" : "'") . ">";
810
+			foreach ($field['options'] as $key => $value) {
811
+				echo "<option value='{$key}'" . selected(in_array($key, $meta), true, false) . ">{$value}</option>";
812
+			}
813
+			echo "</select>";
814
+			$this->show_field_end($field, $meta);
815
+
816
+		}
817
+
818
+		/**
819
+		 * Show Radio Field.
820
+		 *
821
+		 * @param string $field
822
+		 * @param string $meta
823
+		 * @since 1.0
824
+		 * @access public
825
+		 */
826
+		public function show_field_radio($field, $meta)
827
+		{
828
+
829
+			if (!is_array($meta))
830
+				$meta = (array)$meta;
831
+
832
+			$this->show_field_begin($field, $meta);
833
+			foreach ($field['options'] as $key => $value) {
834
+				echo "<input type='radio' class='at-radio' name='{$field['id']}' value='{$key}'" . checked(in_array($key, $meta), true, false) . " /> <span class='at-radio-label'>{$value}</span>";
835
+			}
836
+			$this->show_field_end($field, $meta);
837
+		}
838
+
839
+		/**
840
+		 * Show Checkbox Field.
841
+		 *
842
+		 * @param string $field
843
+		 * @param string $meta
844
+		 * @since 1.0
845
+		 * @access public
846
+		 */
847
+		public function show_field_checkbox($field, $meta)
848
+		{
849
+
850
+			$this->show_field_begin($field, $meta);
851
+			echo "<input type='checkbox' class='rw-checkbox' name='{$field['id']}' id='{$field['id']}'" . checked(!empty($meta), true, false) . " /> {$field['desc']}";
852
+			$this->show_field_end($field, $meta);
853
+		}
854
+
855
+		/**
856
+		 * Show Wysiwig Field.
857
+		 *
858
+		 * @param string $field
859
+		 * @param string $meta
860
+		 * @since 1.0
861
+		 * @access public
862
+		 */
863
+		public function show_field_wysiwyg($field, $meta)
864
+		{
865
+			$this->show_field_begin($field, $meta);
866
+			// Add TinyMCE script for WP version < 3.3
867
+			global $wp_version;
868
+
869
+			if (version_compare($wp_version, '3.2.1') < 1) {
870
+				echo "<textarea class='at-wysiwyg theEditor large-text' name='{$field['id']}' id='{$field['id']}' cols='60' rows='10'>{$meta}</textarea>";
871
+			} else {
872
+				// Use new wp_editor() since WP 3.3
873
+				wp_editor(stripslashes(html_entity_decode($meta)), $field['id'], array('editor_class' => 'at-wysiwyg'));
874
+			}
875
+			$this->show_field_end($field, $meta);
876
+		}
877
+
878
+		/**
879
+		 * Show File Field.
880
+		 *
881
+		 * @global object $post The current post object.
882
+		 * @param string $field
883
+		 * @param string $meta
884
+		 * @since 1.0
885
+		 * @access public
886
+		 */
887
+		public function show_field_file($field, $meta)
888
+		{
889
+
890
+			global $post;
891
+
892
+			if (!is_array($meta))
893
+				$meta = (array)$meta;
894
+
895
+			$this->show_field_begin($field, $meta);
896
+			echo "{$field['desc']}<br />";
897
+
898
+			if (!empty($meta)) {
899
+				$nonce = wp_create_nonce('at_ajax_delete');
900
+				echo '<div style="margin-bottom: 10px"><strong>' . __('Uploaded files', 'geodirectory') . '</strong></div>';
901
+				echo '<ol class="at-upload">';
902
+				foreach ($meta as $att) {
903
+					// if (wp_attachment_is_image($att)) continue; // what's image uploader for?
904
+					echo "<li>" . wp_get_attachment_link($att, '', false, false, ' ') . " (<a class='at-delete-file' href='#' rel='{$nonce}|{$post->ID}|{$field['id']}|{$att}'>" . __('Remove', 'geodirectory') . "</a>)</li>";
905
+				}
906
+				echo '</ol>';
907
+			}
908
+
909
+			// show form upload
910
+
911
+			echo "<div class='at-file-upload-label'>";
912
+			echo "<strong>" . __('Upload new files', 'geodirectory') . "</strong>";
913
+			echo "</div>";
914
+			echo "<div class='new-files'>";
915
+			echo "<div class='file-input'>";
916
+			echo "<input type='file' name='{$field['id']}[]' />";
917
+			echo "</div><!-- End .file-input -->";
918
+			echo "<a class='at-add-file button' href='#'>" . __('Add more files', 'geodirectory') . "</a>";
919
+			echo "</div><!-- End .new-files -->";
920
+			echo "</td>";
921
+			$this->show_field_end($field, $meta);
922
+		}
923
+
924
+		/**
925
+		 * Show Image Field.
926
+		 *
927
+		 * @param array $field
928
+		 * @param array $meta
929
+		 * @since 1.0
930
+		 * @access public
931
+		 */
932
+		public function show_field_image($field, $meta)
933
+		{
934
+			$this->show_field_begin($field, $meta);
935
+			$html = wp_nonce_field("at-delete-mupload_{$field['id']}", "nonce-delete-mupload_" . $field['id'], false, false);
936
+			if (is_array($meta)) {
937
+				if (isset($meta[0]) && is_array($meta[0]))
938
+					$meta = $meta[0];
939
+			}
940
+
941
+			$uploads = wp_upload_dir();
942
+			if (is_array($meta) && isset($meta['src']) && $meta['src'] != '') {
943
+
944
+				$file_info = pathinfo($meta['src']);
945
+
946
+				//print_r($meta);
947
+				//print_r($uploads);
948
+				//print_r($file_info);
949
+
950
+				if ($file_info['dirname'] != '.' && $file_info['dirname'] != '..')
951
+					$sub_dir = $file_info['dirname'];
952
+
953
+				$uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs	
954
+				$uploads_baseurl = $uploads['baseurl'];
955
+				$uploads_path = $uploads['path'];
956
+
957
+				$file_name = $file_info['basename'];
958
+
959
+				$sub_dir = str_replace($uploads_baseurl, '', $sub_dir);
960
+
961
+				$uploads_url = $uploads_baseurl . $sub_dir;
962
+
963
+				$meta['src'] = $uploads_url . '/' . $file_name;
964
+
965
+
966
+				$html .= "<span class='mupload_img_holder'><img src='" . $meta['src'] . "' style='max-height: 150px;max-width: 150px;' /></span>";
967
+				$html .= "<input type='hidden' name='" . $field['id'] . "[id]' id='" . $field['id'] . "[id]' value='" . $meta['id'] . "' />";
968
+				$html .= "<input type='hidden' class='" . $field['id'] . "[src]' name='" . $field['id'] . "[src]' id='" . $field['id'] . "[src]' value='" . $meta['src'] . "' />";
969
+				$html .= "<input class='at-delete_image_button' type='button' rel='" . $field['id'] . "' value='" . __('Remove Image', 'geodirectory') . "' />";
970
+			} else {
971
+				$html .= "<span class='mupload_img_holder'></span>";
972
+				$html .= "<input type='hidden' name='" . $field['id'] . "[id]' id='" . $field['id'] . "[id]' value='' />";
973
+				$html .= "<input class='" . $field['id'] . "[src]' style='position:absolute;left:-500px;width:50px;' type='text' name='" . $field['id'] . "[src]' id='" . $field['id'] . "[src]' value='' />";
974
+				$html .= "<input class='at-upload_image_button' type='button' rel='" . $field['id'] . "' value='" . __('Upload Image', 'geodirectory') . "' />";
975
+			}
976
+			echo $html;
977
+			$this->show_field_end($field, $meta);
978
+		}
979
+
980
+		/**
981
+		 * Show Color Field.
982
+		 *
983
+		 * @param string $field
984
+		 * @param string $meta
985
+		 * @since 1.0
986
+		 * @access public
987
+		 */
988
+		public function show_field_color($field, $meta)
989
+		{
990
+
991
+			if (empty($meta))
992
+				$meta = '#';
993
+
994
+			$this->show_field_begin($field, $meta);
995
+
996
+			echo "<input class='at-color' type='text' name='{$field['id']}' id='{$field['id']}' value='{$meta}' size='8' />";
997
+			//	echo "<a href='#' class='at-color-select button' rel='{$field['id']}'>" . __( 'Select a color' ) . "</a>";
998
+			echo "<input type='button' class='at-color-select button' rel='{$field['id']}' value='" . __('Select a color', 'geodirectory') . "'/>";
999
+			echo "<div style='display:none' class='at-color-picker' rel='{$field['id']}'></div>";
1000
+			$this->show_field_end($field, $meta);
1001
+
1002
+		}
1003
+
1004
+		/**
1005
+		 * Show Checkbox List Field
1006
+		 *
1007
+		 * @param string $field
1008
+		 * @param string $meta
1009
+		 * @since 1.0
1010
+		 * @access public
1011
+		 */
1012
+		public function show_field_checkbox_list($field, $meta)
1013
+		{
1014
+
1015
+			if (!is_array($meta))
1016
+				$meta = (array)$meta;
1017
+
1018
+			$this->show_field_begin($field, $meta);
1019
+
1020
+			$html = array();
1021
+
1022
+			foreach ($field['options'] as $key => $value) {
1023
+				$html[] = "<input type='checkbox' class='at-checkbox_list' name='{$field['id']}[]' value='{$key}'" . checked(in_array($key, $meta), true, false) . " /> {$value}";
1024
+			}
1025
+
1026
+			echo implode('<br />', $html);
1027
+
1028
+			$this->show_field_end($field, $meta);
1029
+
1030
+		}
1031
+
1032
+		/**
1033
+		 * Show Date Field.
1034
+		 *
1035
+		 * @param string $field
1036
+		 * @param string $meta
1037
+		 * @since 1.0
1038
+		 * @access public
1039
+		 */
1040
+		public function show_field_date($field, $meta)
1041
+		{
1042
+			$this->show_field_begin($field, $meta);
1043
+			echo "<input type='text' class='at-date' name='{$field['id']}' id='{$field['id']}' rel='{$field['format']}' value='{$meta}' size='30' />";
1044
+			$this->show_field_end($field, $meta);
1045
+		}
1046
+
1047
+		/**
1048
+		 * Show time field.
1049
+		 *
1050
+		 * @param string $field
1051
+		 * @param string $meta
1052
+		 * @since 1.0
1053
+		 * @access public
1054
+		 */
1055
+		public function show_field_time($field, $meta)
1056
+		{
1057
+			$this->show_field_begin($field, $meta);
1058
+			echo "<input type='text' class='at-time' name='{$field['id']}' id='{$field['id']}' rel='{$field['format']}' value='{$meta}' size='30' />";
1059
+			$this->show_field_end($field, $meta);
1060
+		}
1061
+
1062
+		/**
1063
+		 * Show Posts field.
1064
+		 * used creating a posts/pages/custom types checkboxlist or a select dropdown
1065
+		 *
1066
+		 * @global object $post The current post object.
1067
+		 * @param string $field
1068
+		 * @param string $meta
1069
+		 * @since 1.0
1070
+		 * @access public
1071
+		 */
1072
+		public function show_field_posts($field, $meta)
1073
+		{
1074
+			global $post;
1075
+
1076
+			if (!is_array($meta)) $meta = (array)$meta;
1077
+			$this->show_field_begin($field, $meta);
1078
+			$options = $field['options'];
1079
+			$posts = get_posts($options['args']);
1080
+
1081
+			// checkbox_list
1082
+			if ('checkbox_list' == $options['type']) {
1083
+				foreach ($posts as $p) {
1084
+					echo "<input type='checkbox' name='{$field['id']}[]' value='$p->ID'" . checked(in_array($p->ID, $meta), true, false) . " /> $p->post_title<br/>";
1085
+				}
1086
+			} // select
1087
+			else {
1088
+				echo "<select name='{$field['id']}" . ($field['multiple'] ? "[]' multiple='multiple' style='height:auto'" : "'") . ">";
1089
+				foreach ($posts as $p) {
1090
+					echo "<option value='$p->ID'" . selected(in_array($p->ID, $meta), true, false) . ">$p->post_title</option>";
1091
+				}
1092
+				echo "</select>";
1093
+			}
1094
+
1095
+			$this->show_field_end($field, $meta);
1096
+		}
1097
+
1098
+		/**
1099
+		 * Show Taxonomy field.
1100
+		 * used creating a category/tags/custom taxonomy checkboxlist or a select dropdown
1101
+		 *
1102
+		 * @global object $post The current post object.
1103
+		 * @param string $field
1104
+		 * @param string $meta
1105
+		 * @since 1.0
1106
+		 * @access public
1107
+		 *
1108
+		 * @uses get_terms()
1109
+		 */
1110
+		public function show_field_taxonomy($field, $meta)
1111
+		{
1112
+			global $post;
1113
+
1114
+			if (!is_array($meta)) $meta = (array)$meta;
1115
+			$this->show_field_begin($field, $meta);
1116
+			$options = $field['options'];
1117
+			$terms = get_terms($options['taxonomy'], $options['args']);
1118
+
1119
+			// checkbox_list
1120
+			if ('checkbox_list' == $options['type']) {
1121
+				foreach ($terms as $term) {
1122
+					echo "<input type='checkbox' name='{$field['id']}[]' value='$term->slug'" . checked(in_array($term->slug, $meta), true, false) . " /> $term->name<br/>";
1123
+				}
1124
+			} // select
1125
+			else {
1126
+				echo "<select name='{$field['id']}" . ($field['multiple'] ? "[]' multiple='multiple' style='height:auto'" : "'") . ">";
1127
+				foreach ($terms as $term) {
1128
+					echo "<option value='$term->slug'" . selected(in_array($term->slug, $meta), true, false) . ">$term->name</option>";
1129
+				}
1130
+				echo "</select>";
1131
+			}
1132
+
1133
+			$this->show_field_end($field, $meta);
1134
+		}
1135
+
1136
+		/**
1137
+		 * Save Data from Metabox
1138
+		 *
1139
+		 * @param string $term_id The term ID.
1140
+		 * @since 1.0
1141
+		 * @access public
1142
+		 * @return string
1143
+		 */
1144
+		public function save($term_id)
1145
+		{
1146
+
1147
+			$taxnow = '';
1148
+			if (isset($_POST['taxonomy']))
1149
+				$taxnow = $_POST['taxonomy'];
1150
+
1151
+			if (!isset($term_id)                                                        // Check Revision
1152
+				|| (!in_array($taxnow, $this->_meta_box['pages']))                            // Check if current taxonomy type is supported.
1153
+				|| (!check_admin_referer(basename(__FILE__), 'tax_meta_class_nonce'))        // Check nonce - Security
1154
+				|| (!current_user_can('manage_categories'))
1155
+			)                                // Check permission
1156
+			{
1157
+				return $term_id;
1158
+			}
1159
+
1160
+
1161
+			foreach ($this->_fields as $field) {
1162
+
1163
+				$name = $field['id'];
1164
+				$type = $field['type'];
1165
+				$old = $this->get_tax_meta($term_id, $name, !$field['multiple']);
1166
+				$new = (isset($_POST[$name])) ? $_POST[$name] : (($field['multiple']) ? array() : '');
1167
+
1168
+				// Validate meta value
1169
+				if (class_exists('Tax_Meta_Validate') && method_exists('Tax_Meta_Validate', $field['validate_func'])) {
1170
+					$new = call_user_func(array('Tax_Meta_Validate', $field['validate_func']), $new);
1171
+				}
1172
+
1173
+
1174
+				if ($name == 'ct_cat_icon') {
1175
+
1176
+					$upload_dir = wp_upload_dir();
1177
+
1178
+					$image_name_arr = explode('/', $new['src']);
1179
+					//$old_filename = end($image_name_arr);
1180
+					//$img_name_arr = explode('.',$old_filename);
1181
+
1182
+					//$old_filename = $upload_dir['path'].'/'.$old_filename;
1183
+
1184
+					$new_filename = $upload_dir['path'] . '/' . 'cat_icon_' . $term_id . '.png';
1185
+
1186
+					/*rename($old_filename, $new_filename);
1187 1187
 				
1188 1188
 				//subdir
1189 1189
 				$new['src'] = $upload_dir['url'].'/'.'cat_icon_'.$term_id.'.png';
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
 				update_attached_file( $new['id'], $new['src'] );*/
1192 1192
 
1193 1193
 
1194
-                    /*	
1194
+					/*	
1195 1195
 		
1196 1196
 		$new['src'] = $upload_dir['url'].'/'.'cat_icon_'.$term_id.'.png';
1197 1197
 		
@@ -1216,67 +1216,67 @@  discard block
 block discarded – undo
1216 1216
 		$attach_id = wp_insert_attachment( $attachment, $filename);*/
1217 1217
 
1218 1218
 
1219
-                }
1220
-
1221
-
1222
-                //skip on Paragraph field
1223
-                if ($type != "paragraph") {
1224
-
1225
-                    // Call defined method to save meta value, if there's no methods, call common one.
1226
-                    $save_func = 'save_field_' . $type;
1227
-                    if (method_exists($this, $save_func)) {
1228
-                        call_user_func(array(&$this, 'save_field_' . $type), $term_id, $field, $old, $new);
1229
-                    } else {
1230
-                        $this->save_field($term_id, $field, $old, $new);
1231
-                    }
1232
-                }
1233
-
1234
-            } // End foreach
1235
-
1236
-        }
1237
-
1238
-        /**
1239
-         * Common function for saving fields.
1240
-         *
1241
-         * @param string $term_id The term ID.
1242
-         * @param string $field
1243
-         * @param string $old
1244
-         * @param string|mixed $new
1245
-         * @since 1.0
1246
-         * @access public
1247
-         */
1248
-        public function save_field($term_id, $field, $old, $new)
1249
-        {
1250
-            $name = $field['id'];
1251
-            $this->delete_tax_meta($term_id, $name);
1252
-            if ($new === '' || $new === array())
1253
-                return;
1254
-
1255
-            $this->update_tax_meta($term_id, $name, $new);
1256
-        }
1257
-
1258
-        /**
1259
-         * function for saving image field.
1260
-         *
1261
-         * @param string $term_id The term ID.
1262
-         * @param string $field
1263
-         * @param string $old
1264
-         * @param string|mixed $new
1265
-         * @since 1.0
1266
-         * @access public
1267
-         */
1268
-        public function save_field_image($term_id, $field, $old, $new)
1269
-        {
1270
-            $name = $field['id'];
1271
-
1272
-            $this->delete_tax_meta($term_id, $name);
1273
-            if ($new === '' || $new === array() || $new['id'] == '' || $new['src'] == '')
1274
-                return;
1275
-
1276
-            $this->update_tax_meta($term_id, $name, $new);
1277
-        }
1278
-
1279
-        /*
1219
+				}
1220
+
1221
+
1222
+				//skip on Paragraph field
1223
+				if ($type != "paragraph") {
1224
+
1225
+					// Call defined method to save meta value, if there's no methods, call common one.
1226
+					$save_func = 'save_field_' . $type;
1227
+					if (method_exists($this, $save_func)) {
1228
+						call_user_func(array(&$this, 'save_field_' . $type), $term_id, $field, $old, $new);
1229
+					} else {
1230
+						$this->save_field($term_id, $field, $old, $new);
1231
+					}
1232
+				}
1233
+
1234
+			} // End foreach
1235
+
1236
+		}
1237
+
1238
+		/**
1239
+		 * Common function for saving fields.
1240
+		 *
1241
+		 * @param string $term_id The term ID.
1242
+		 * @param string $field
1243
+		 * @param string $old
1244
+		 * @param string|mixed $new
1245
+		 * @since 1.0
1246
+		 * @access public
1247
+		 */
1248
+		public function save_field($term_id, $field, $old, $new)
1249
+		{
1250
+			$name = $field['id'];
1251
+			$this->delete_tax_meta($term_id, $name);
1252
+			if ($new === '' || $new === array())
1253
+				return;
1254
+
1255
+			$this->update_tax_meta($term_id, $name, $new);
1256
+		}
1257
+
1258
+		/**
1259
+		 * function for saving image field.
1260
+		 *
1261
+		 * @param string $term_id The term ID.
1262
+		 * @param string $field
1263
+		 * @param string $old
1264
+		 * @param string|mixed $new
1265
+		 * @since 1.0
1266
+		 * @access public
1267
+		 */
1268
+		public function save_field_image($term_id, $field, $old, $new)
1269
+		{
1270
+			$name = $field['id'];
1271
+
1272
+			$this->delete_tax_meta($term_id, $name);
1273
+			if ($new === '' || $new === array() || $new['id'] == '' || $new['src'] == '')
1274
+				return;
1275
+
1276
+			$this->update_tax_meta($term_id, $name, $new);
1277
+		}
1278
+
1279
+		/*
1280 1280
 	 * Save Wysiwyg Field.
1281 1281
 	 *
1282 1282
 	 * @param string $term_id The term ID. 
@@ -1286,806 +1286,806 @@  discard block
 block discarded – undo
1286 1286
 	 * @since 1.0
1287 1287
 	 * @access public 
1288 1288
 	 */
1289
-        public function save_field_wysiwyg($term_id, $field, $old, $new)
1290
-        {
1291
-            $this->save_field($term_id, $field, $old, $new);
1292
-        }
1293
-
1294
-        /**
1295
-         * Save repeater Fields.
1296
-         *
1297
-         * @param string $term_id The term ID.
1298
-         * @param string $field
1299
-         * @param string|mixed $old
1300
-         * @param string|mixed $new
1301
-         * @since 1.0
1302
-         * @access public
1303
-         */
1304
-        public function save_field_repeater($term_id, $field, $old, $new)
1305
-        {
1306
-            if (is_array($new) && count($new) > 0) {
1307
-                foreach ($new as $n) {
1308
-                    foreach ($field['fields'] as $f) {
1309
-                        $type = $f['type'];
1310
-                        switch ($type) {
1311
-                            case 'wysiwyg':
1312
-                                $n[$f['id']] = wpautop($n[$f['id']]);
1313
-                                break;
1314
-                            case 'file':
1315
-                                $n[$f['id']] = $this->save_field_file_repeater($term_id, $f, '', $n[$f['id']]);
1316
-                                break;
1317
-                            default:
1318
-                                break;
1319
-                        }
1320
-                    }
1321
-                    if (!$this->is_array_empty($n))
1322
-                        $temp[] = $n;
1323
-                }
1324
-                if (isset($temp) && count($temp) > 0 && !$this->is_array_empty($temp)) {
1325
-                    $this->update_tax_meta($term_id, $field['id'], $temp);
1326
-                } else {
1327
-                    //	remove old meta if exists
1328
-                    delete_post_meta($term_id, $field['id']);
1329
-                }
1330
-            } else {
1331
-                //	remove old meta if exists
1332
-                delete_post_meta($term_id, $field['id']);
1333
-            }
1334
-        }
1335
-
1336
-        /**
1337
-         * Save File Field.
1338
-         *
1339
-         * @param string $term_id The term ID.
1340
-         * @param string $field
1341
-         * @param string $old
1342
-         * @param string $new
1343
-         * @since 1.0
1344
-         * @access public
1345
-         */
1346
-        public function save_field_file($term_id, $field, $old, $new)
1347
-        {
1348
-
1349
-            $name = $field['id'];
1350
-            if (empty($_FILES[$name]))
1351
-                return;
1352
-            $this->fix_file_array($_FILES[$name]);
1353
-            foreach ($_FILES[$name] as $position => $fileitem) {
1354
-
1355
-                $file = wp_handle_upload($fileitem, array('test_form' => false));
1356
-                if (empty($file['file']))
1357
-                    continue;
1358
-                $filename = $file['file'];
1359
-
1360
-                $attachment = array(
1361
-                    'post_mime_type' => $file['type'],
1362
-                    'guid' => $file['url'],
1363
-                    'post_parent' => $term_id,
1364
-                    'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
1365
-                    'post_content' => ''
1366
-                );
1367
-
1368
-                $id = wp_insert_attachment($attachment, $filename, $term_id);
1369
-
1370
-                if (!is_wp_error($id)) {
1371
-
1372
-                    wp_update_attachment_metadata($id, wp_generate_attachment_metadata($id, $filename));
1373
-                    add_post_meta($term_id, $name, $id, false);    // save file's url in meta fields
1374
-
1375
-                } // End if
1376
-
1377
-            } // End foreach
1378
-
1379
-        }
1380
-
1381
-        /**
1382
-         * Save repeater File Field.
1383
-         * @param string $term_id The term ID.
1384
-         * @param string $field
1385
-         * @param string $old
1386
-         * @param string $new
1387
-         * @since 1.0
1388
-         * @access public
1389
-         * @return int|void
1390
-         */
1391
-        public function save_field_file_repeater($term_id, $field, $old, $new)
1392
-        {
1393
-
1394
-            $name = $field['id'];
1395
-            if (empty($_FILES[$name]))
1396
-                return;
1397
-            $this->fix_file_array($_FILES[$name]);
1398
-            foreach ($_FILES[$name] as $position => $fileitem) {
1399
-
1400
-                $file = wp_handle_upload($fileitem, array('test_form' => false));
1401
-                if (empty($file['file']))
1402
-                    continue;
1403
-                $filename = $file['file'];
1404
-
1405
-                $attachment = array(
1406
-                    'post_mime_type' => $file['type'],
1407
-                    'guid' => $file['url'],
1408
-                    'post_parent' => $term_id,
1409
-                    'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
1410
-                    'post_content' => ''
1411
-                );
1412
-
1413
-                $id = wp_insert_attachment($attachment, $filename);
1414
-
1415
-                if (!is_wp_error($id)) {
1416
-
1417
-                    wp_update_attachment_metadata($id, wp_generate_attachment_metadata($id, $filename));
1418
-                    return $id;    // return file's url in meta fields
1419
-                } // End if
1420
-            } // End foreach
1421
-        }
1422
-
1423
-        /**
1424
-         * Add missed values for meta box.
1425
-         *
1426
-         * @since 1.0
1427
-         * @access public
1428
-         */
1429
-        public function add_missed_values()
1430
-        {
1431
-
1432
-            // Default values for meta box
1433
-            $this->_meta_box = array_merge(array('context' => 'normal', 'priority' => 'high', 'pages' => array('post')), (array)$this->_meta_box);
1434
-
1435
-            if(is_array($this->_fields)) {
1436
-                // Default values for fields
1437
-                foreach ($this->_fields as &$field) {
1438
-                    $multiple = in_array($field['type'], array('checkbox_list', 'file', 'image'));
1439
-                    $std = $multiple ? array() : '';
1440
-                    $format = 'date' == $field['type'] ? 'yy-mm-dd' : ('time' == $field['type'] ? 'hh:mm' : '');
1441
-                    $field = array_merge(array('multiple' => $multiple, 'std' => $std, 'desc' => '', 'format' => $format, 'validate_func' => ''), $field);
1442
-                } // End foreach
1443
-            }
1444
-        }
1445
-
1446
-        /**
1447
-         * Check if field with $type exists.
1448
-         *
1449
-         * @param string $type
1450
-         * @since 1.0
1451
-         * @access public
1452
-         */
1453
-        public function has_field($type)
1454
-        {
1455
-            if(is_array($this->_fields)) {
1456
-                foreach ($this->_fields as $field) {
1457
-                    if ($type == $field['type'])
1458
-                        return true;
1459
-                }
1460
-            }
1461
-            return false;
1462
-        }
1463
-
1464
-        /**
1465
-         * Check if current page is edit page.
1466
-         *
1467
-         * @since 1.0
1468
-         * @access public
1469
-         */
1470
-        public function is_edit_page()
1471
-        {
1472
-            global $pagenow;
1473
-            return ($pagenow == 'edit-tags.php');
1474
-        }
1475
-
1476
-        /**
1477
-         * Fixes the odd indexing of multiple file uploads.
1478
-         *
1479
-         * Goes from the format:
1480
-         * $_FILES['field']['key']['index']
1481
-         * to
1482
-         * The More standard and appropriate:
1483
-         * $_FILES['field']['index']['key']
1484
-         *
1485
-         * @param string $files
1486
-         * @since 1.0
1487
-         * @access public
1488
-         */
1489
-        public function fix_file_array(&$files)
1490
-        {
1491
-
1492
-            $output = array();
1493
-
1494
-            foreach ($files as $key => $list) {
1495
-                foreach ($list as $index => $value) {
1496
-                    $output[$index][$key] = $value;
1497
-                }
1498
-            }
1499
-
1500
-            return $files = $output;
1501
-
1502
-        }
1503
-
1504
-        /**
1505
-         * Get proper JQuery UI version.
1506
-         *
1507
-         * Used in order to not conflict with WP Admin Scripts.
1508
-         *
1509
-         * @since 1.0
1510
-         * @access public
1511
-         */
1512
-        public function get_jqueryui_ver()
1513
-        {
1514
-
1515
-            global $wp_version;
1516
-
1517
-            if (version_compare($wp_version, '3.1', '>=')) {
1518
-                return '1.8.10';
1519
-            }
1520
-
1521
-            return '1.7.3';
1522
-
1523
-        }
1524
-
1525
-        /**
1526
-         *  Add Field to meta box (generic function)
1527
-         * @author Ohad Raz
1528
-         * @since 1.0
1529
-         * @access public
1530
-         * @param $id string  field id, i.e. the meta key
1531
-         * @param $args mixed|array
1532
-         */
1533
-        public function addField($id, $args)
1534
-        {
1535
-            $new_field = array('id' => $id, 'std' => '', 'desc' => '', 'style' => '');
1536
-            $new_field = array_merge($new_field, $args);
1537
-            $this->_fields[] = $new_field;
1538
-        }
1539
-
1540
-
1541
-        /**
1542
-         *  Add Text Field to meta box
1543
-         * @author Ohad Raz
1544
-         * @since 1.0
1545
-         * @access public
1546
-         * @param $id string  field id, i.e. the meta key
1547
-         * @param $args mixed|array
1548
-         *    'name' => // field name/label string optional
1549
-         *    'desc' => // field description, string optional
1550
-         *    'std' => // default value, string optional
1551
-         *    'style' =>    // custom style for field, string optional
1552
-         *    'validate_func' => // validate function, string optional
1553
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1554
-         */
1555
-        public function addText($id, $args, $repeater = false)
1556
-        {
1557
-            $new_field = array('type' => 'text', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Text Field', 'geodirectory'));
1558
-            $new_field = array_merge($new_field, $args);
1559
-            if (false === $repeater) {
1560
-                $this->_fields[] = $new_field;
1561
-            } else {
1562
-                return $new_field;
1563
-            }
1564
-        }
1565
-
1566
-        /**
1567
-         *  Add Hidden Field to meta box
1568
-         * @author Ohad Raz
1569
-         * @since 0.1.3
1570
-         * @access public
1571
-         * @param $id string  field id, i.e. the meta key
1572
-         * @param $args mixed|array
1573
-         *    'name' => // field name/label string optional
1574
-         *    'desc' => // field description, string optional
1575
-         *    'std' => // default value, string optional
1576
-         *    'style' =>    // custom style for field, string optional
1577
-         *    'validate_func' => // validate function, string optional
1578
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1579
-         */
1580
-        public function addHidden($id, $args, $repeater = false)
1581
-        {
1582
-            $new_field = array('type' => 'hidden', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Text Field', 'geodirectory'));
1583
-            $new_field = array_merge($new_field, $args);
1584
-            if (false === $repeater) {
1585
-                $this->_fields[] = $new_field;
1586
-            } else {
1587
-                return $new_field;
1588
-            }
1589
-        }
1590
-
1591
-        /**
1592
-         *  Add Paragraph to meta box
1593
-         * @author Ohad Raz
1594
-         * @since 0.1.3
1595
-         * @access public
1596
-         * @param $id string  field id, i.e. the meta key
1597
-         * @param $value  paragraph html
1598
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1599
-         */
1600
-        public function addParagraph($id, $args, $repeater = false)
1601
-        {
1602
-            $new_field = array('type' => 'paragraph', 'id' => $id, 'value' => '', 'style' => '');
1603
-            $new_field = array_merge($new_field, $args);
1604
-            if (false === $repeater) {
1605
-                $this->_fields[] = $new_field;
1606
-            } else {
1607
-                return $new_field;
1608
-            }
1609
-        }
1610
-
1611
-        /**
1612
-         *  Add Checkbox Field to meta box
1613
-         * @author Ohad Raz
1614
-         * @since 1.0
1615
-         * @access public
1616
-         * @param $id string  field id, i.e. the meta key
1617
-         * @param $args mixed|array
1618
-         *    'name' => // field name/label string optional
1619
-         *    'desc' => // field description, string optional
1620
-         *    'std' => // default value, string optional
1621
-         *    'validate_func' => // validate function, string optional
1622
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1623
-         */
1624
-        public function addCheckbox($id, $args, $repeater = false)
1625
-        {
1626
-            $new_field = array('type' => 'checkbox', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Checkbox Field', 'geodirectory'));
1627
-            $new_field = array_merge($new_field, $args);
1628
-            if (false === $repeater) {
1629
-                $this->_fields[] = $new_field;
1630
-            } else {
1631
-                return $new_field;
1632
-            }
1633
-        }
1634
-
1635
-        /**
1636
-         *  Add CheckboxList Field to meta box
1637
-         * @author Ohad Raz
1638
-         * @since 1.0
1639
-         * @access public
1640
-         * @param $id string  field id, i.e. the meta key
1641
-         * @param $options (array)  array of key => value pairs for select options
1642
-         * @param $args mixed|array
1643
-         *    'name' => // field name/label string optional
1644
-         *    'desc' => // field description, string optional
1645
-         *    'std' => // default value, string optional
1646
-         *    'validate_func' => // validate function, string optional
1647
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1648
-         *
1649
-         * @return : remember to call: $checkbox_list = $this->get_tax_meta(get_the_ID(), 'meta_name', false);
1650
-         *   which means the last param as false to get the values in an array
1651
-         */
1652
-        public function addCheckboxList($id, $options, $args, $repeater = false)
1653
-        {
1654
-            $new_field = array('type' => 'checkbox_list', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Checkbox List Field', 'geodirectory'));
1655
-            $new_field = array_merge($new_field, $args);
1656
-            if (false === $repeater) {
1657
-                $this->_fields[] = $new_field;
1658
-            } else {
1659
-                return $new_field;
1660
-            }
1661
-        }
1662
-
1663
-        /**
1664
-         *  Add Textarea Field to meta box
1665
-         * @author Ohad Raz
1666
-         * @since 1.0
1667
-         * @access public
1668
-         * @param $id string  field id, i.e. the meta key
1669
-         * @param $args mixed|array
1670
-         *    'name' => // field name/label string optional
1671
-         *    'desc' => // field description, string optional
1672
-         *    'std' => // default value, string optional
1673
-         *    'style' =>    // custom style for field, string optional
1674
-         *    'validate_func' => // validate function, string optional
1675
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1676
-         */
1677
-        public function addTextarea($id, $args, $repeater = false)
1678
-        {
1679
-            $new_field = array('type' => 'textarea', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Textarea Field', 'geodirectory'));
1680
-            $new_field = array_merge($new_field, $args);
1681
-            if (false === $repeater) {
1682
-                $this->_fields[] = $new_field;
1683
-            } else {
1684
-                return $new_field;
1685
-            }
1686
-        }
1687
-
1688
-        /**
1689
-         *  Add Select Field to meta box
1690
-         * @author Ohad Raz
1691
-         * @since 1.0
1692
-         * @access public
1693
-         * @param $id string field id, i.e. the meta key
1694
-         * @param $options (array)  array of key => value pairs for select options
1695
-         * @param $args mixed|array
1696
-         *    'name' => // field name/label string optional
1697
-         *    'desc' => // field description, string optional
1698
-         *    'std' => // default value, (array) optional
1699
-         *    'multiple' => // select multiple values, optional. Default is false.
1700
-         *    'validate_func' => // validate function, string optional
1701
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1702
-         */
1703
-        public function addSelect($id, $options, $args, $repeater = false)
1704
-        {
1705
-            $new_field = array('type' => 'select', 'id' => $id, 'std' => array(), 'desc' => '', 'style' => '', 'name' => __('Select Field', 'geodirectory'), 'multiple' => false, 'options' => $options);
1706
-            $new_field = array_merge($new_field, $args);
1707
-            if (false === $repeater) {
1708
-                $this->_fields[] = $new_field;
1709
-            } else {
1710
-                return $new_field;
1711
-            }
1712
-        }
1713
-
1714
-
1715
-        /**
1716
-         *  Add Radio Field to meta box
1717
-         * @author Ohad Raz
1718
-         * @since 1.0
1719
-         * @access public
1720
-         * @param $id string field id, i.e. the meta key
1721
-         * @param $options (array)  array of key => value pairs for radio options
1722
-         * @param $args mixed|array
1723
-         *    'name' => // field name/label string optional
1724
-         *    'desc' => // field description, string optional
1725
-         *    'std' => // default value, string optional
1726
-         *    'validate_func' => // validate function, string optional
1727
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1728
-         */
1729
-        public function addRadio($id, $options, $args, $repeater = false)
1730
-        {
1731
-            $new_field = array('type' => 'radio', 'id' => $id, 'std' => array(), 'desc' => '', 'style' => '', 'name' => __('Radio Field', 'geodirectory'), 'options' => $options);
1732
-            $new_field = array_merge($new_field, $args);
1733
-            if (false === $repeater) {
1734
-                $this->_fields[] = $new_field;
1735
-            } else {
1736
-                return $new_field;
1737
-            }
1738
-        }
1739
-
1740
-        /**
1741
-         *  Add Date Field to meta box
1742
-         * @author Ohad Raz
1743
-         * @since 1.0
1744
-         * @access public
1745
-         * @param $id string  field id, i.e. the meta key
1746
-         * @param $args mixed|array
1747
-         *    'name' => // field name/label string optional
1748
-         *    'desc' => // field description, string optional
1749
-         *    'std' => // default value, string optional
1750
-         *    'validate_func' => // validate function, string optional
1751
-         *    'format' => // date format, default yy-mm-dd. Optional. Default "'d MM, yy'"  See more formats here: http://goo.gl/Wcwxn
1752
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1753
-         */
1754
-        public function addDate($id, $args, $repeater = false)
1755
-        {
1756
-            $new_field = array('type' => 'date', 'id' => $id, 'std' => '', 'desc' => '', 'format' => 'yy-mm-dd', 'name' => __('Date Field', 'geodirectory'));
1757
-            $new_field = array_merge($new_field, $args);
1758
-            if (false === $repeater) {
1759
-                $this->_fields[] = $new_field;
1760
-            } else {
1761
-                return $new_field;
1762
-            }
1763
-        }
1764
-
1765
-        /**
1766
-         *  Add Time Field to meta box
1767
-         * @author Ohad Raz
1768
-         * @since 1.0
1769
-         * @access public
1770
-         * @param $id string- field id, i.e. the meta key
1771
-         * @param $args mixed|array
1772
-         *    'name' => // field name/label string optional
1773
-         *    'desc' => // field description, string optional
1774
-         *    'std' => // default value, string optional
1775
-         *    'validate_func' => // validate function, string optional
1776
-         *    'format' => // time format, default hh:mm. Optional. See more formats here: http://goo.gl/83woX
1777
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1778
-         */
1779
-        public function addTime($id, $args, $repeater = false)
1780
-        {
1781
-            $new_field = array('type' => 'time', 'id' => $id, 'std' => '', 'desc' => '', 'format' => 'hh:mm', 'name' => __('Time Field', 'geodirectory'));
1782
-            $new_field = array_merge($new_field, $args);
1783
-            if (false === $repeater) {
1784
-                $this->_fields[] = $new_field;
1785
-            } else {
1786
-                return $new_field;
1787
-            }
1788
-        }
1789
-
1790
-        /**
1791
-         *  Add Color Field to meta box
1792
-         * @author Ohad Raz
1793
-         * @since 1.0
1794
-         * @access public
1795
-         * @param $id string  field id, i.e. the meta key
1796
-         * @param $args mixed|array
1797
-         *    'name' => // field name/label string optional
1798
-         *    'desc' => // field description, string optional
1799
-         *    'std' => // default value, string optional
1800
-         *    'validate_func' => // validate function, string optional
1801
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1802
-         */
1803
-        public function addColor($id, $args, $repeater = false)
1804
-        {
1805
-            $new_field = array('type' => 'color', 'id' => $id, 'std' => '', 'desc' => '', 'name' => __('ColorPicker Field', 'geodirectory'));
1806
-            $new_field = array_merge($new_field, $args);
1807
-            if (false === $repeater) {
1808
-                $this->_fields[] = $new_field;
1809
-            } else {
1810
-                return $new_field;
1811
-            }
1812
-        }
1813
-
1814
-        /**
1815
-         *  Add Image Field to meta box
1816
-         * @author Ohad Raz
1817
-         * @since 1.0
1818
-         * @access public
1819
-         * @param $id string  field id, i.e. the meta key
1820
-         * @param $args mixed|array
1821
-         *    'name' => // field name/label string optional
1822
-         *    'desc' => // field description, string optional
1823
-         *    'validate_func' => // validate function, string optional
1824
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1825
-         */
1826
-        public function addImage($id, $args, $repeater = false)
1827
-        {
1828
-            $new_field = array('type' => 'image', 'id' => $id, 'desc' => '', 'style' => '', 'name' => __('Image Field', 'geodirectory'));
1829
-            $new_field = array_merge($new_field, $args);
1830
-
1831
-            if (false === $repeater) {
1832
-                $this->_fields[] = $new_field;
1833
-            } else {
1834
-                return $new_field;
1835
-            }
1836
-        }
1837
-
1838
-        /**
1839
-         *  Add File Field to meta box
1840
-         * @author Ohad Raz
1841
-         * @since 1.0
1842
-         * @access public
1843
-         * @param $id string  field id, i.e. the meta key
1844
-         * @param $args mixed|array
1845
-         *    'name' => // field name/label string optional
1846
-         *    'desc' => // field description, string optional
1847
-         *    'validate_func' => // validate function, string optional
1848
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1849
-         */
1850
-        public function addFile($id, $args, $repeater = false)
1851
-        {
1852
-            $new_field = array('type' => 'file', 'id' => $id, 'desc' => '', 'style' => '', 'name' => __('File Field', 'geodirectory'));
1853
-            $new_field = array_merge($new_field, $args);
1854
-            if (false === $repeater) {
1855
-                $this->_fields[] = $new_field;
1856
-            } else {
1857
-                return $new_field;
1858
-            }
1859
-        }
1860
-
1861
-        /**
1862
-         *  Add WYSIWYG Field to meta box
1863
-         * @author Ohad Raz
1864
-         * @since 1.0
1865
-         * @access public
1866
-         * @param $id string  field id, i.e. the meta key
1867
-         * @param $args mixed|array
1868
-         *    'name' => // field name/label string optional
1869
-         *    'desc' => // field description, string optional
1870
-         *    'std' => // default value, string optional
1871
-         *    'style' =>    // custom style for field, string optional Default 'width: 300px; height: 400px'
1872
-         *    'validate_func' => // validate function, string optional
1873
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1874
-         */
1875
-        public function addWysiwyg($id, $args, $repeater = false)
1876
-        {
1877
-            $new_field = array('type' => 'wysiwyg', 'id' => $id, 'std' => '', 'desc' => '', 'style' => 'width: 300px; height: 400px', 'name' => __('WYSIWYG Editor Field', 'geodirectory'));
1878
-            $new_field = array_merge($new_field, $args);
1879
-            if (false === $repeater) {
1880
-                $this->_fields[] = $new_field;
1881
-            } else {
1882
-                return $new_field;
1883
-            }
1884
-        }
1885
-
1886
-        /**
1887
-         *  Add Taxonomy Field to meta box
1888
-         * @author Ohad Raz
1889
-         * @since 1.0
1890
-         * @access public
1891
-         * @param $id string  field id, i.e. the meta key
1892
-         * @param $options mixed|array options of taxonomy field
1893
-         *    'taxonomy' =>    // taxonomy name can be category,post_tag or any custom taxonomy default is category
1894
-         * 'type' =>  // how to show taxonomy? 'select' (default) or 'checkbox_list'
1895
-         * 'args' =>  // arguments to query taxonomy, see http://goo.gl/uAANN default ('hide_empty' => false)
1896
-         * @param $args mixed|array
1897
-         *    'name' => // field name/label string optional
1898
-         *    'desc' => // field description, string optional
1899
-         *    'std' => // default value, string optional
1900
-         *    'validate_func' => // validate function, string optional
1901
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1902
-         */
1903
-        public function addTaxonomy($id, $options, $args, $repeater = false)
1904
-        {
1905
-            $q = array('hide_empty' => 0);
1906
-            $tax = 'category';
1907
-            $type = 'select';
1908
-            $temp = array($tax, $type, $q);
1909
-            $options = array_merge($temp, $options);
1910
-            $new_field = array('type' => 'taxonomy', 'id' => $id, 'desc' => '', 'name' => __('Taxonomy Field', 'geodirectory'), 'options' => $options);
1911
-            $new_field = array_merge($new_field, $args);
1912
-            if (false === $repeater) {
1913
-                $this->_fields[] = $new_field;
1914
-            } else {
1915
-                return $new_field;
1916
-            }
1917
-        }
1918
-
1919
-        /**
1920
-         *  Add posts Field to meta box
1921
-         * @author Ohad Raz
1922
-         * @since 1.0
1923
-         * @access public
1924
-         * @param $id string  field id, i.e. the meta key
1925
-         * @param $options mixed|array options of taxonomy field
1926
-         *    'post_type' =>    // post type name, 'post' (default) 'page' or any custom post type
1927
-         * 'type' =>  // how to show posts? 'select' (default) or 'checkbox_list'
1928
-         * 'args' =>  // arguments to query posts, see http://goo.gl/is0yK default ('posts_per_page' => -1)
1929
-         * @param $args mixed|array
1930
-         *    'name' => // field name/label string optional
1931
-         *    'desc' => // field description, string optional
1932
-         *    'std' => // default value, string optional
1933
-         *    'validate_func' => // validate function, string optional
1934
-         * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1935
-         */
1936
-        public function addPosts($id, $options, $args, $repeater = false)
1937
-        {
1938
-            $q = array('posts_per_page' => -1);
1939
-            $temp = array('post_type' => 'post', 'type' => 'select', 'args' => $q);
1940
-            $options = array_merge($temp, $options);
1941
-            $new_field = array('type' => 'posts', 'id' => $id, 'desc' => '', 'name' => __('Posts Field', 'geodirectory'), 'options' => $options);
1942
-            $new_field = array_merge($new_field, $args);
1943
-            if (false === $repeater) {
1944
-                $this->_fields[] = $new_field;
1945
-            } else {
1946
-                return $new_field;
1947
-            }
1948
-        }
1949
-
1950
-        /**
1951
-         *  Add repeater Field Block to meta box
1952
-         * @author Ohad Raz
1953
-         * @since 1.0
1954
-         * @access public
1955
-         * @param $id string  field id, i.e. the meta key
1956
-         * @param $args mixed|array
1957
-         *    'name' => // field name/label string optional
1958
-         *    'desc' => // field description, string optional
1959
-         *    'std' => // default value, string optional
1960
-         *    'style' =>    // custom style for field, string optional
1961
-         *    'validate_func' => // validate function, string optional
1962
-         *    'fields' => //fields to repeater
1963
-         */
1964
-        public function addRepeaterBlock($id, $args)
1965
-        {
1966
-            $new_field = array('type' => 'repeater', 'id' => $id, 'name' => __('Reapeater Field', 'geodirectory'), 'fields' => array(), 'inline' => false);
1967
-            $new_field = array_merge($new_field, $args);
1968
-            $this->_fields[] = $new_field;
1969
-        }
1970
-
1971
-
1972
-        /**
1973
-         * Finish Declaration of Meta Box
1974
-         * @author Ohad Raz
1975
-         * @since 1.0
1976
-         * @access public
1977
-         */
1978
-        public function Finish()
1979
-        {
1980
-            $this->add_missed_values();
1981
-            $this->check_field_upload();
1982
-            $this->check_field_color();
1983
-            $this->check_field_date();
1984
-            $this->check_field_time();
1985
-        }
1986
-
1987
-        /**
1988
-         * Helper function to check for empty arrays
1989
-         * @author Ohad Raz
1990
-         * @since 1.0
1991
-         * @access public
1992
-         * @param $args mixed|array
1993
-         */
1994
-        public function is_array_empty($array)
1995
-        {
1996
-            if (!is_array($array))
1997
-                return true;
1998
-
1999
-            foreach ($array as $a) {
2000
-                if (is_array($a)) {
2001
-                    foreach ($a as $sub_a) {
2002
-                        if (!empty($sub_a) && $sub_a != '')
2003
-                            return false;
2004
-                    }
2005
-                } else {
2006
-                    if (!empty($a) && $a != '')
2007
-                        return false;
2008
-                }
2009
-            }
2010
-            return true;
2011
-        }
2012
-
2013
-
2014
-        //get term meta field
2015
-        public function get_tax_meta($term_id, $key, $multi = false, $post_type = '')
2016
-        {
2017
-
2018
-            if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2019
-                $taxObject = get_taxonomy($_REQUEST['taxonomy']);
2020
-                $post_type = $taxObject->object_type[0];
2021
-            }
2022
-
2023
-            if($post_type=='post'){$post_type='';}
2024
-            if($post_type){$post_type = $post_type.'_';}
2025
-
2026
-            $t_id = (is_object($term_id)) ? $term_id->term_id : $term_id;
2027
-
2028
-            $m = get_option('tax_meta_' . $post_type  . $t_id);
2029
-            if (isset($m[$key])) {
2030
-                return $m[$key];
2031
-            } else {
2032
-                return '';
2033
-            }
2034
-        }
2035
-
2036
-        //delete meta
2037
-        public function delete_tax_meta($term_id, $key, $post_type = '')
2038
-        {
2039
-
2040
-            if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2041
-                $taxObject = get_taxonomy($_REQUEST['taxonomy']);
2042
-                $post_type = $taxObject->object_type[0];
2043
-            }
2044
-
2045
-            if($post_type=='post'){$post_type='';}
2046
-            if($post_type){$post_type = $post_type.'_';}
2047
-
2048
-            $m = get_option('tax_meta_' . $post_type  . $term_id);
2049
-
2050
-            if (isset($m[$key])) {
2051
-                unset($m[$key]);
2052
-            }
2053
-            update_option('tax_meta_' . $post_type  . $term_id, $m);
2054
-        }
2055
-
2056
-        //update meta
2057
-        public function update_tax_meta($term_id, $key, $value, $post_type = '')
2058
-        {
2059
-
2060
-            if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2061
-                $taxObject = get_taxonomy($_REQUEST['taxonomy']);
2062
-                $post_type = $taxObject->object_type[0];
2063
-            }
2064
-
2065
-            if($post_type=='post'){$post_type='';}
2066
-            if($post_type){$post_type = $post_type.'_';}
2067
-
2068
-            $m = get_option('tax_meta_' . $post_type  . $term_id);
2069
-
2070
-            $m[$key] = $value;
2071
-            update_option('tax_meta_' . $post_type  . $term_id, $m);
2072
-
2073
-            /**
2074
-             * Called after the tax meta is updated.
2075
-             *
2076
-             * Used to update things after a GD category is saved.
2077
-             *
2078
-             * @since 1.0.0
2079
-             * @param bool $false False.
2080
-             * @param bool $true True.
2081
-             * @param int $term_id The term id being updated.
2082
-             * @param string $post_type The post type of the cat being updated.
2083
-             */
2084
-            do_action('gd_tax_meta_updated', false, true, $term_id, $post_type);
2085
-        }
2086
-
2087
-
2088
-    } // End Class
1289
+		public function save_field_wysiwyg($term_id, $field, $old, $new)
1290
+		{
1291
+			$this->save_field($term_id, $field, $old, $new);
1292
+		}
1293
+
1294
+		/**
1295
+		 * Save repeater Fields.
1296
+		 *
1297
+		 * @param string $term_id The term ID.
1298
+		 * @param string $field
1299
+		 * @param string|mixed $old
1300
+		 * @param string|mixed $new
1301
+		 * @since 1.0
1302
+		 * @access public
1303
+		 */
1304
+		public function save_field_repeater($term_id, $field, $old, $new)
1305
+		{
1306
+			if (is_array($new) && count($new) > 0) {
1307
+				foreach ($new as $n) {
1308
+					foreach ($field['fields'] as $f) {
1309
+						$type = $f['type'];
1310
+						switch ($type) {
1311
+							case 'wysiwyg':
1312
+								$n[$f['id']] = wpautop($n[$f['id']]);
1313
+								break;
1314
+							case 'file':
1315
+								$n[$f['id']] = $this->save_field_file_repeater($term_id, $f, '', $n[$f['id']]);
1316
+								break;
1317
+							default:
1318
+								break;
1319
+						}
1320
+					}
1321
+					if (!$this->is_array_empty($n))
1322
+						$temp[] = $n;
1323
+				}
1324
+				if (isset($temp) && count($temp) > 0 && !$this->is_array_empty($temp)) {
1325
+					$this->update_tax_meta($term_id, $field['id'], $temp);
1326
+				} else {
1327
+					//	remove old meta if exists
1328
+					delete_post_meta($term_id, $field['id']);
1329
+				}
1330
+			} else {
1331
+				//	remove old meta if exists
1332
+				delete_post_meta($term_id, $field['id']);
1333
+			}
1334
+		}
1335
+
1336
+		/**
1337
+		 * Save File Field.
1338
+		 *
1339
+		 * @param string $term_id The term ID.
1340
+		 * @param string $field
1341
+		 * @param string $old
1342
+		 * @param string $new
1343
+		 * @since 1.0
1344
+		 * @access public
1345
+		 */
1346
+		public function save_field_file($term_id, $field, $old, $new)
1347
+		{
1348
+
1349
+			$name = $field['id'];
1350
+			if (empty($_FILES[$name]))
1351
+				return;
1352
+			$this->fix_file_array($_FILES[$name]);
1353
+			foreach ($_FILES[$name] as $position => $fileitem) {
1354
+
1355
+				$file = wp_handle_upload($fileitem, array('test_form' => false));
1356
+				if (empty($file['file']))
1357
+					continue;
1358
+				$filename = $file['file'];
1359
+
1360
+				$attachment = array(
1361
+					'post_mime_type' => $file['type'],
1362
+					'guid' => $file['url'],
1363
+					'post_parent' => $term_id,
1364
+					'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
1365
+					'post_content' => ''
1366
+				);
1367
+
1368
+				$id = wp_insert_attachment($attachment, $filename, $term_id);
1369
+
1370
+				if (!is_wp_error($id)) {
1371
+
1372
+					wp_update_attachment_metadata($id, wp_generate_attachment_metadata($id, $filename));
1373
+					add_post_meta($term_id, $name, $id, false);    // save file's url in meta fields
1374
+
1375
+				} // End if
1376
+
1377
+			} // End foreach
1378
+
1379
+		}
1380
+
1381
+		/**
1382
+		 * Save repeater File Field.
1383
+		 * @param string $term_id The term ID.
1384
+		 * @param string $field
1385
+		 * @param string $old
1386
+		 * @param string $new
1387
+		 * @since 1.0
1388
+		 * @access public
1389
+		 * @return int|void
1390
+		 */
1391
+		public function save_field_file_repeater($term_id, $field, $old, $new)
1392
+		{
1393
+
1394
+			$name = $field['id'];
1395
+			if (empty($_FILES[$name]))
1396
+				return;
1397
+			$this->fix_file_array($_FILES[$name]);
1398
+			foreach ($_FILES[$name] as $position => $fileitem) {
1399
+
1400
+				$file = wp_handle_upload($fileitem, array('test_form' => false));
1401
+				if (empty($file['file']))
1402
+					continue;
1403
+				$filename = $file['file'];
1404
+
1405
+				$attachment = array(
1406
+					'post_mime_type' => $file['type'],
1407
+					'guid' => $file['url'],
1408
+					'post_parent' => $term_id,
1409
+					'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
1410
+					'post_content' => ''
1411
+				);
1412
+
1413
+				$id = wp_insert_attachment($attachment, $filename);
1414
+
1415
+				if (!is_wp_error($id)) {
1416
+
1417
+					wp_update_attachment_metadata($id, wp_generate_attachment_metadata($id, $filename));
1418
+					return $id;    // return file's url in meta fields
1419
+				} // End if
1420
+			} // End foreach
1421
+		}
1422
+
1423
+		/**
1424
+		 * Add missed values for meta box.
1425
+		 *
1426
+		 * @since 1.0
1427
+		 * @access public
1428
+		 */
1429
+		public function add_missed_values()
1430
+		{
1431
+
1432
+			// Default values for meta box
1433
+			$this->_meta_box = array_merge(array('context' => 'normal', 'priority' => 'high', 'pages' => array('post')), (array)$this->_meta_box);
1434
+
1435
+			if(is_array($this->_fields)) {
1436
+				// Default values for fields
1437
+				foreach ($this->_fields as &$field) {
1438
+					$multiple = in_array($field['type'], array('checkbox_list', 'file', 'image'));
1439
+					$std = $multiple ? array() : '';
1440
+					$format = 'date' == $field['type'] ? 'yy-mm-dd' : ('time' == $field['type'] ? 'hh:mm' : '');
1441
+					$field = array_merge(array('multiple' => $multiple, 'std' => $std, 'desc' => '', 'format' => $format, 'validate_func' => ''), $field);
1442
+				} // End foreach
1443
+			}
1444
+		}
1445
+
1446
+		/**
1447
+		 * Check if field with $type exists.
1448
+		 *
1449
+		 * @param string $type
1450
+		 * @since 1.0
1451
+		 * @access public
1452
+		 */
1453
+		public function has_field($type)
1454
+		{
1455
+			if(is_array($this->_fields)) {
1456
+				foreach ($this->_fields as $field) {
1457
+					if ($type == $field['type'])
1458
+						return true;
1459
+				}
1460
+			}
1461
+			return false;
1462
+		}
1463
+
1464
+		/**
1465
+		 * Check if current page is edit page.
1466
+		 *
1467
+		 * @since 1.0
1468
+		 * @access public
1469
+		 */
1470
+		public function is_edit_page()
1471
+		{
1472
+			global $pagenow;
1473
+			return ($pagenow == 'edit-tags.php');
1474
+		}
1475
+
1476
+		/**
1477
+		 * Fixes the odd indexing of multiple file uploads.
1478
+		 *
1479
+		 * Goes from the format:
1480
+		 * $_FILES['field']['key']['index']
1481
+		 * to
1482
+		 * The More standard and appropriate:
1483
+		 * $_FILES['field']['index']['key']
1484
+		 *
1485
+		 * @param string $files
1486
+		 * @since 1.0
1487
+		 * @access public
1488
+		 */
1489
+		public function fix_file_array(&$files)
1490
+		{
1491
+
1492
+			$output = array();
1493
+
1494
+			foreach ($files as $key => $list) {
1495
+				foreach ($list as $index => $value) {
1496
+					$output[$index][$key] = $value;
1497
+				}
1498
+			}
1499
+
1500
+			return $files = $output;
1501
+
1502
+		}
1503
+
1504
+		/**
1505
+		 * Get proper JQuery UI version.
1506
+		 *
1507
+		 * Used in order to not conflict with WP Admin Scripts.
1508
+		 *
1509
+		 * @since 1.0
1510
+		 * @access public
1511
+		 */
1512
+		public function get_jqueryui_ver()
1513
+		{
1514
+
1515
+			global $wp_version;
1516
+
1517
+			if (version_compare($wp_version, '3.1', '>=')) {
1518
+				return '1.8.10';
1519
+			}
1520
+
1521
+			return '1.7.3';
1522
+
1523
+		}
1524
+
1525
+		/**
1526
+		 *  Add Field to meta box (generic function)
1527
+		 * @author Ohad Raz
1528
+		 * @since 1.0
1529
+		 * @access public
1530
+		 * @param $id string  field id, i.e. the meta key
1531
+		 * @param $args mixed|array
1532
+		 */
1533
+		public function addField($id, $args)
1534
+		{
1535
+			$new_field = array('id' => $id, 'std' => '', 'desc' => '', 'style' => '');
1536
+			$new_field = array_merge($new_field, $args);
1537
+			$this->_fields[] = $new_field;
1538
+		}
1539
+
1540
+
1541
+		/**
1542
+		 *  Add Text Field to meta box
1543
+		 * @author Ohad Raz
1544
+		 * @since 1.0
1545
+		 * @access public
1546
+		 * @param $id string  field id, i.e. the meta key
1547
+		 * @param $args mixed|array
1548
+		 *    'name' => // field name/label string optional
1549
+		 *    'desc' => // field description, string optional
1550
+		 *    'std' => // default value, string optional
1551
+		 *    'style' =>    // custom style for field, string optional
1552
+		 *    'validate_func' => // validate function, string optional
1553
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1554
+		 */
1555
+		public function addText($id, $args, $repeater = false)
1556
+		{
1557
+			$new_field = array('type' => 'text', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Text Field', 'geodirectory'));
1558
+			$new_field = array_merge($new_field, $args);
1559
+			if (false === $repeater) {
1560
+				$this->_fields[] = $new_field;
1561
+			} else {
1562
+				return $new_field;
1563
+			}
1564
+		}
1565
+
1566
+		/**
1567
+		 *  Add Hidden Field to meta box
1568
+		 * @author Ohad Raz
1569
+		 * @since 0.1.3
1570
+		 * @access public
1571
+		 * @param $id string  field id, i.e. the meta key
1572
+		 * @param $args mixed|array
1573
+		 *    'name' => // field name/label string optional
1574
+		 *    'desc' => // field description, string optional
1575
+		 *    'std' => // default value, string optional
1576
+		 *    'style' =>    // custom style for field, string optional
1577
+		 *    'validate_func' => // validate function, string optional
1578
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1579
+		 */
1580
+		public function addHidden($id, $args, $repeater = false)
1581
+		{
1582
+			$new_field = array('type' => 'hidden', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Text Field', 'geodirectory'));
1583
+			$new_field = array_merge($new_field, $args);
1584
+			if (false === $repeater) {
1585
+				$this->_fields[] = $new_field;
1586
+			} else {
1587
+				return $new_field;
1588
+			}
1589
+		}
1590
+
1591
+		/**
1592
+		 *  Add Paragraph to meta box
1593
+		 * @author Ohad Raz
1594
+		 * @since 0.1.3
1595
+		 * @access public
1596
+		 * @param $id string  field id, i.e. the meta key
1597
+		 * @param $value  paragraph html
1598
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1599
+		 */
1600
+		public function addParagraph($id, $args, $repeater = false)
1601
+		{
1602
+			$new_field = array('type' => 'paragraph', 'id' => $id, 'value' => '', 'style' => '');
1603
+			$new_field = array_merge($new_field, $args);
1604
+			if (false === $repeater) {
1605
+				$this->_fields[] = $new_field;
1606
+			} else {
1607
+				return $new_field;
1608
+			}
1609
+		}
1610
+
1611
+		/**
1612
+		 *  Add Checkbox Field to meta box
1613
+		 * @author Ohad Raz
1614
+		 * @since 1.0
1615
+		 * @access public
1616
+		 * @param $id string  field id, i.e. the meta key
1617
+		 * @param $args mixed|array
1618
+		 *    'name' => // field name/label string optional
1619
+		 *    'desc' => // field description, string optional
1620
+		 *    'std' => // default value, string optional
1621
+		 *    'validate_func' => // validate function, string optional
1622
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1623
+		 */
1624
+		public function addCheckbox($id, $args, $repeater = false)
1625
+		{
1626
+			$new_field = array('type' => 'checkbox', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Checkbox Field', 'geodirectory'));
1627
+			$new_field = array_merge($new_field, $args);
1628
+			if (false === $repeater) {
1629
+				$this->_fields[] = $new_field;
1630
+			} else {
1631
+				return $new_field;
1632
+			}
1633
+		}
1634
+
1635
+		/**
1636
+		 *  Add CheckboxList Field to meta box
1637
+		 * @author Ohad Raz
1638
+		 * @since 1.0
1639
+		 * @access public
1640
+		 * @param $id string  field id, i.e. the meta key
1641
+		 * @param $options (array)  array of key => value pairs for select options
1642
+		 * @param $args mixed|array
1643
+		 *    'name' => // field name/label string optional
1644
+		 *    'desc' => // field description, string optional
1645
+		 *    'std' => // default value, string optional
1646
+		 *    'validate_func' => // validate function, string optional
1647
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1648
+		 *
1649
+		 * @return : remember to call: $checkbox_list = $this->get_tax_meta(get_the_ID(), 'meta_name', false);
1650
+		 *   which means the last param as false to get the values in an array
1651
+		 */
1652
+		public function addCheckboxList($id, $options, $args, $repeater = false)
1653
+		{
1654
+			$new_field = array('type' => 'checkbox_list', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Checkbox List Field', 'geodirectory'));
1655
+			$new_field = array_merge($new_field, $args);
1656
+			if (false === $repeater) {
1657
+				$this->_fields[] = $new_field;
1658
+			} else {
1659
+				return $new_field;
1660
+			}
1661
+		}
1662
+
1663
+		/**
1664
+		 *  Add Textarea Field to meta box
1665
+		 * @author Ohad Raz
1666
+		 * @since 1.0
1667
+		 * @access public
1668
+		 * @param $id string  field id, i.e. the meta key
1669
+		 * @param $args mixed|array
1670
+		 *    'name' => // field name/label string optional
1671
+		 *    'desc' => // field description, string optional
1672
+		 *    'std' => // default value, string optional
1673
+		 *    'style' =>    // custom style for field, string optional
1674
+		 *    'validate_func' => // validate function, string optional
1675
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1676
+		 */
1677
+		public function addTextarea($id, $args, $repeater = false)
1678
+		{
1679
+			$new_field = array('type' => 'textarea', 'id' => $id, 'std' => '', 'desc' => '', 'style' => '', 'name' => __('Textarea Field', 'geodirectory'));
1680
+			$new_field = array_merge($new_field, $args);
1681
+			if (false === $repeater) {
1682
+				$this->_fields[] = $new_field;
1683
+			} else {
1684
+				return $new_field;
1685
+			}
1686
+		}
1687
+
1688
+		/**
1689
+		 *  Add Select Field to meta box
1690
+		 * @author Ohad Raz
1691
+		 * @since 1.0
1692
+		 * @access public
1693
+		 * @param $id string field id, i.e. the meta key
1694
+		 * @param $options (array)  array of key => value pairs for select options
1695
+		 * @param $args mixed|array
1696
+		 *    'name' => // field name/label string optional
1697
+		 *    'desc' => // field description, string optional
1698
+		 *    'std' => // default value, (array) optional
1699
+		 *    'multiple' => // select multiple values, optional. Default is false.
1700
+		 *    'validate_func' => // validate function, string optional
1701
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1702
+		 */
1703
+		public function addSelect($id, $options, $args, $repeater = false)
1704
+		{
1705
+			$new_field = array('type' => 'select', 'id' => $id, 'std' => array(), 'desc' => '', 'style' => '', 'name' => __('Select Field', 'geodirectory'), 'multiple' => false, 'options' => $options);
1706
+			$new_field = array_merge($new_field, $args);
1707
+			if (false === $repeater) {
1708
+				$this->_fields[] = $new_field;
1709
+			} else {
1710
+				return $new_field;
1711
+			}
1712
+		}
1713
+
1714
+
1715
+		/**
1716
+		 *  Add Radio Field to meta box
1717
+		 * @author Ohad Raz
1718
+		 * @since 1.0
1719
+		 * @access public
1720
+		 * @param $id string field id, i.e. the meta key
1721
+		 * @param $options (array)  array of key => value pairs for radio options
1722
+		 * @param $args mixed|array
1723
+		 *    'name' => // field name/label string optional
1724
+		 *    'desc' => // field description, string optional
1725
+		 *    'std' => // default value, string optional
1726
+		 *    'validate_func' => // validate function, string optional
1727
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1728
+		 */
1729
+		public function addRadio($id, $options, $args, $repeater = false)
1730
+		{
1731
+			$new_field = array('type' => 'radio', 'id' => $id, 'std' => array(), 'desc' => '', 'style' => '', 'name' => __('Radio Field', 'geodirectory'), 'options' => $options);
1732
+			$new_field = array_merge($new_field, $args);
1733
+			if (false === $repeater) {
1734
+				$this->_fields[] = $new_field;
1735
+			} else {
1736
+				return $new_field;
1737
+			}
1738
+		}
1739
+
1740
+		/**
1741
+		 *  Add Date Field to meta box
1742
+		 * @author Ohad Raz
1743
+		 * @since 1.0
1744
+		 * @access public
1745
+		 * @param $id string  field id, i.e. the meta key
1746
+		 * @param $args mixed|array
1747
+		 *    'name' => // field name/label string optional
1748
+		 *    'desc' => // field description, string optional
1749
+		 *    'std' => // default value, string optional
1750
+		 *    'validate_func' => // validate function, string optional
1751
+		 *    'format' => // date format, default yy-mm-dd. Optional. Default "'d MM, yy'"  See more formats here: http://goo.gl/Wcwxn
1752
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1753
+		 */
1754
+		public function addDate($id, $args, $repeater = false)
1755
+		{
1756
+			$new_field = array('type' => 'date', 'id' => $id, 'std' => '', 'desc' => '', 'format' => 'yy-mm-dd', 'name' => __('Date Field', 'geodirectory'));
1757
+			$new_field = array_merge($new_field, $args);
1758
+			if (false === $repeater) {
1759
+				$this->_fields[] = $new_field;
1760
+			} else {
1761
+				return $new_field;
1762
+			}
1763
+		}
1764
+
1765
+		/**
1766
+		 *  Add Time Field to meta box
1767
+		 * @author Ohad Raz
1768
+		 * @since 1.0
1769
+		 * @access public
1770
+		 * @param $id string- field id, i.e. the meta key
1771
+		 * @param $args mixed|array
1772
+		 *    'name' => // field name/label string optional
1773
+		 *    'desc' => // field description, string optional
1774
+		 *    'std' => // default value, string optional
1775
+		 *    'validate_func' => // validate function, string optional
1776
+		 *    'format' => // time format, default hh:mm. Optional. See more formats here: http://goo.gl/83woX
1777
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1778
+		 */
1779
+		public function addTime($id, $args, $repeater = false)
1780
+		{
1781
+			$new_field = array('type' => 'time', 'id' => $id, 'std' => '', 'desc' => '', 'format' => 'hh:mm', 'name' => __('Time Field', 'geodirectory'));
1782
+			$new_field = array_merge($new_field, $args);
1783
+			if (false === $repeater) {
1784
+				$this->_fields[] = $new_field;
1785
+			} else {
1786
+				return $new_field;
1787
+			}
1788
+		}
1789
+
1790
+		/**
1791
+		 *  Add Color Field to meta box
1792
+		 * @author Ohad Raz
1793
+		 * @since 1.0
1794
+		 * @access public
1795
+		 * @param $id string  field id, i.e. the meta key
1796
+		 * @param $args mixed|array
1797
+		 *    'name' => // field name/label string optional
1798
+		 *    'desc' => // field description, string optional
1799
+		 *    'std' => // default value, string optional
1800
+		 *    'validate_func' => // validate function, string optional
1801
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1802
+		 */
1803
+		public function addColor($id, $args, $repeater = false)
1804
+		{
1805
+			$new_field = array('type' => 'color', 'id' => $id, 'std' => '', 'desc' => '', 'name' => __('ColorPicker Field', 'geodirectory'));
1806
+			$new_field = array_merge($new_field, $args);
1807
+			if (false === $repeater) {
1808
+				$this->_fields[] = $new_field;
1809
+			} else {
1810
+				return $new_field;
1811
+			}
1812
+		}
1813
+
1814
+		/**
1815
+		 *  Add Image Field to meta box
1816
+		 * @author Ohad Raz
1817
+		 * @since 1.0
1818
+		 * @access public
1819
+		 * @param $id string  field id, i.e. the meta key
1820
+		 * @param $args mixed|array
1821
+		 *    'name' => // field name/label string optional
1822
+		 *    'desc' => // field description, string optional
1823
+		 *    'validate_func' => // validate function, string optional
1824
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1825
+		 */
1826
+		public function addImage($id, $args, $repeater = false)
1827
+		{
1828
+			$new_field = array('type' => 'image', 'id' => $id, 'desc' => '', 'style' => '', 'name' => __('Image Field', 'geodirectory'));
1829
+			$new_field = array_merge($new_field, $args);
1830
+
1831
+			if (false === $repeater) {
1832
+				$this->_fields[] = $new_field;
1833
+			} else {
1834
+				return $new_field;
1835
+			}
1836
+		}
1837
+
1838
+		/**
1839
+		 *  Add File Field to meta box
1840
+		 * @author Ohad Raz
1841
+		 * @since 1.0
1842
+		 * @access public
1843
+		 * @param $id string  field id, i.e. the meta key
1844
+		 * @param $args mixed|array
1845
+		 *    'name' => // field name/label string optional
1846
+		 *    'desc' => // field description, string optional
1847
+		 *    'validate_func' => // validate function, string optional
1848
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1849
+		 */
1850
+		public function addFile($id, $args, $repeater = false)
1851
+		{
1852
+			$new_field = array('type' => 'file', 'id' => $id, 'desc' => '', 'style' => '', 'name' => __('File Field', 'geodirectory'));
1853
+			$new_field = array_merge($new_field, $args);
1854
+			if (false === $repeater) {
1855
+				$this->_fields[] = $new_field;
1856
+			} else {
1857
+				return $new_field;
1858
+			}
1859
+		}
1860
+
1861
+		/**
1862
+		 *  Add WYSIWYG Field to meta box
1863
+		 * @author Ohad Raz
1864
+		 * @since 1.0
1865
+		 * @access public
1866
+		 * @param $id string  field id, i.e. the meta key
1867
+		 * @param $args mixed|array
1868
+		 *    'name' => // field name/label string optional
1869
+		 *    'desc' => // field description, string optional
1870
+		 *    'std' => // default value, string optional
1871
+		 *    'style' =>    // custom style for field, string optional Default 'width: 300px; height: 400px'
1872
+		 *    'validate_func' => // validate function, string optional
1873
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1874
+		 */
1875
+		public function addWysiwyg($id, $args, $repeater = false)
1876
+		{
1877
+			$new_field = array('type' => 'wysiwyg', 'id' => $id, 'std' => '', 'desc' => '', 'style' => 'width: 300px; height: 400px', 'name' => __('WYSIWYG Editor Field', 'geodirectory'));
1878
+			$new_field = array_merge($new_field, $args);
1879
+			if (false === $repeater) {
1880
+				$this->_fields[] = $new_field;
1881
+			} else {
1882
+				return $new_field;
1883
+			}
1884
+		}
1885
+
1886
+		/**
1887
+		 *  Add Taxonomy Field to meta box
1888
+		 * @author Ohad Raz
1889
+		 * @since 1.0
1890
+		 * @access public
1891
+		 * @param $id string  field id, i.e. the meta key
1892
+		 * @param $options mixed|array options of taxonomy field
1893
+		 *    'taxonomy' =>    // taxonomy name can be category,post_tag or any custom taxonomy default is category
1894
+		 * 'type' =>  // how to show taxonomy? 'select' (default) or 'checkbox_list'
1895
+		 * 'args' =>  // arguments to query taxonomy, see http://goo.gl/uAANN default ('hide_empty' => false)
1896
+		 * @param $args mixed|array
1897
+		 *    'name' => // field name/label string optional
1898
+		 *    'desc' => // field description, string optional
1899
+		 *    'std' => // default value, string optional
1900
+		 *    'validate_func' => // validate function, string optional
1901
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1902
+		 */
1903
+		public function addTaxonomy($id, $options, $args, $repeater = false)
1904
+		{
1905
+			$q = array('hide_empty' => 0);
1906
+			$tax = 'category';
1907
+			$type = 'select';
1908
+			$temp = array($tax, $type, $q);
1909
+			$options = array_merge($temp, $options);
1910
+			$new_field = array('type' => 'taxonomy', 'id' => $id, 'desc' => '', 'name' => __('Taxonomy Field', 'geodirectory'), 'options' => $options);
1911
+			$new_field = array_merge($new_field, $args);
1912
+			if (false === $repeater) {
1913
+				$this->_fields[] = $new_field;
1914
+			} else {
1915
+				return $new_field;
1916
+			}
1917
+		}
1918
+
1919
+		/**
1920
+		 *  Add posts Field to meta box
1921
+		 * @author Ohad Raz
1922
+		 * @since 1.0
1923
+		 * @access public
1924
+		 * @param $id string  field id, i.e. the meta key
1925
+		 * @param $options mixed|array options of taxonomy field
1926
+		 *    'post_type' =>    // post type name, 'post' (default) 'page' or any custom post type
1927
+		 * 'type' =>  // how to show posts? 'select' (default) or 'checkbox_list'
1928
+		 * 'args' =>  // arguments to query posts, see http://goo.gl/is0yK default ('posts_per_page' => -1)
1929
+		 * @param $args mixed|array
1930
+		 *    'name' => // field name/label string optional
1931
+		 *    'desc' => // field description, string optional
1932
+		 *    'std' => // default value, string optional
1933
+		 *    'validate_func' => // validate function, string optional
1934
+		 * @param $repeater bool  is this a field inside a repeatr? true|false(default)
1935
+		 */
1936
+		public function addPosts($id, $options, $args, $repeater = false)
1937
+		{
1938
+			$q = array('posts_per_page' => -1);
1939
+			$temp = array('post_type' => 'post', 'type' => 'select', 'args' => $q);
1940
+			$options = array_merge($temp, $options);
1941
+			$new_field = array('type' => 'posts', 'id' => $id, 'desc' => '', 'name' => __('Posts Field', 'geodirectory'), 'options' => $options);
1942
+			$new_field = array_merge($new_field, $args);
1943
+			if (false === $repeater) {
1944
+				$this->_fields[] = $new_field;
1945
+			} else {
1946
+				return $new_field;
1947
+			}
1948
+		}
1949
+
1950
+		/**
1951
+		 *  Add repeater Field Block to meta box
1952
+		 * @author Ohad Raz
1953
+		 * @since 1.0
1954
+		 * @access public
1955
+		 * @param $id string  field id, i.e. the meta key
1956
+		 * @param $args mixed|array
1957
+		 *    'name' => // field name/label string optional
1958
+		 *    'desc' => // field description, string optional
1959
+		 *    'std' => // default value, string optional
1960
+		 *    'style' =>    // custom style for field, string optional
1961
+		 *    'validate_func' => // validate function, string optional
1962
+		 *    'fields' => //fields to repeater
1963
+		 */
1964
+		public function addRepeaterBlock($id, $args)
1965
+		{
1966
+			$new_field = array('type' => 'repeater', 'id' => $id, 'name' => __('Reapeater Field', 'geodirectory'), 'fields' => array(), 'inline' => false);
1967
+			$new_field = array_merge($new_field, $args);
1968
+			$this->_fields[] = $new_field;
1969
+		}
1970
+
1971
+
1972
+		/**
1973
+		 * Finish Declaration of Meta Box
1974
+		 * @author Ohad Raz
1975
+		 * @since 1.0
1976
+		 * @access public
1977
+		 */
1978
+		public function Finish()
1979
+		{
1980
+			$this->add_missed_values();
1981
+			$this->check_field_upload();
1982
+			$this->check_field_color();
1983
+			$this->check_field_date();
1984
+			$this->check_field_time();
1985
+		}
1986
+
1987
+		/**
1988
+		 * Helper function to check for empty arrays
1989
+		 * @author Ohad Raz
1990
+		 * @since 1.0
1991
+		 * @access public
1992
+		 * @param $args mixed|array
1993
+		 */
1994
+		public function is_array_empty($array)
1995
+		{
1996
+			if (!is_array($array))
1997
+				return true;
1998
+
1999
+			foreach ($array as $a) {
2000
+				if (is_array($a)) {
2001
+					foreach ($a as $sub_a) {
2002
+						if (!empty($sub_a) && $sub_a != '')
2003
+							return false;
2004
+					}
2005
+				} else {
2006
+					if (!empty($a) && $a != '')
2007
+						return false;
2008
+				}
2009
+			}
2010
+			return true;
2011
+		}
2012
+
2013
+
2014
+		//get term meta field
2015
+		public function get_tax_meta($term_id, $key, $multi = false, $post_type = '')
2016
+		{
2017
+
2018
+			if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2019
+				$taxObject = get_taxonomy($_REQUEST['taxonomy']);
2020
+				$post_type = $taxObject->object_type[0];
2021
+			}
2022
+
2023
+			if($post_type=='post'){$post_type='';}
2024
+			if($post_type){$post_type = $post_type.'_';}
2025
+
2026
+			$t_id = (is_object($term_id)) ? $term_id->term_id : $term_id;
2027
+
2028
+			$m = get_option('tax_meta_' . $post_type  . $t_id);
2029
+			if (isset($m[$key])) {
2030
+				return $m[$key];
2031
+			} else {
2032
+				return '';
2033
+			}
2034
+		}
2035
+
2036
+		//delete meta
2037
+		public function delete_tax_meta($term_id, $key, $post_type = '')
2038
+		{
2039
+
2040
+			if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2041
+				$taxObject = get_taxonomy($_REQUEST['taxonomy']);
2042
+				$post_type = $taxObject->object_type[0];
2043
+			}
2044
+
2045
+			if($post_type=='post'){$post_type='';}
2046
+			if($post_type){$post_type = $post_type.'_';}
2047
+
2048
+			$m = get_option('tax_meta_' . $post_type  . $term_id);
2049
+
2050
+			if (isset($m[$key])) {
2051
+				unset($m[$key]);
2052
+			}
2053
+			update_option('tax_meta_' . $post_type  . $term_id, $m);
2054
+		}
2055
+
2056
+		//update meta
2057
+		public function update_tax_meta($term_id, $key, $value, $post_type = '')
2058
+		{
2059
+
2060
+			if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2061
+				$taxObject = get_taxonomy($_REQUEST['taxonomy']);
2062
+				$post_type = $taxObject->object_type[0];
2063
+			}
2064
+
2065
+			if($post_type=='post'){$post_type='';}
2066
+			if($post_type){$post_type = $post_type.'_';}
2067
+
2068
+			$m = get_option('tax_meta_' . $post_type  . $term_id);
2069
+
2070
+			$m[$key] = $value;
2071
+			update_option('tax_meta_' . $post_type  . $term_id, $m);
2072
+
2073
+			/**
2074
+			 * Called after the tax meta is updated.
2075
+			 *
2076
+			 * Used to update things after a GD category is saved.
2077
+			 *
2078
+			 * @since 1.0.0
2079
+			 * @param bool $false False.
2080
+			 * @param bool $true True.
2081
+			 * @param int $term_id The term id being updated.
2082
+			 * @param string $post_type The post type of the cat being updated.
2083
+			 */
2084
+			do_action('gd_tax_meta_updated', false, true, $term_id, $post_type);
2085
+		}
2086
+
2087
+
2088
+	} // End Class
2089 2089
 
2090 2090
 endif; // End Check Class Exists
2091 2091
 
@@ -2095,67 +2095,67 @@  discard block
 block discarded – undo
2095 2095
 
2096 2096
 //get term meta field
2097 2097
 if (!function_exists('get_tax_meta')) {
2098
-    function get_tax_meta($term_id, $key, $multi = false, $post_type = '')
2099
-    {
2100
-
2101
-        if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2102
-            $taxObject = get_taxonomy($_REQUEST['taxonomy']);
2103
-            $post_type = $taxObject->object_type[0];
2104
-        }
2105
-
2106
-        if($post_type=='post'){$post_type='';}
2107
-        if($post_type){$post_type = $post_type.'_';}
2108
-
2109
-        $t_id = (is_object($term_id)) ? $term_id->term_id : $term_id;
2110
-
2111
-        $m = get_option('tax_meta_' . $post_type  . $t_id);
2112
-        if (isset($m[$key])) {
2113
-            return $m[$key];
2114
-        } else {
2115
-            return '';
2116
-        }
2117
-    }
2098
+	function get_tax_meta($term_id, $key, $multi = false, $post_type = '')
2099
+	{
2100
+
2101
+		if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2102
+			$taxObject = get_taxonomy($_REQUEST['taxonomy']);
2103
+			$post_type = $taxObject->object_type[0];
2104
+		}
2105
+
2106
+		if($post_type=='post'){$post_type='';}
2107
+		if($post_type){$post_type = $post_type.'_';}
2108
+
2109
+		$t_id = (is_object($term_id)) ? $term_id->term_id : $term_id;
2110
+
2111
+		$m = get_option('tax_meta_' . $post_type  . $t_id);
2112
+		if (isset($m[$key])) {
2113
+			return $m[$key];
2114
+		} else {
2115
+			return '';
2116
+		}
2117
+	}
2118 2118
 }
2119 2119
 
2120 2120
 //delete meta
2121 2121
 if (!function_exists('delete_tax_meta')) {
2122
-    function delete_tax_meta($term_id, $key)
2123
-    {
2122
+	function delete_tax_meta($term_id, $key)
2123
+	{
2124 2124
 
2125
-        $taxObject = get_taxonomy($_REQUEST['taxonomy']);
2126
-        $post_type = $taxObject->object_type[0];
2125
+		$taxObject = get_taxonomy($_REQUEST['taxonomy']);
2126
+		$post_type = $taxObject->object_type[0];
2127 2127
 
2128
-        if($post_type=='post'){$post_type='';}
2129
-        if($post_type){$post_type = $post_type.'_';}
2128
+		if($post_type=='post'){$post_type='';}
2129
+		if($post_type){$post_type = $post_type.'_';}
2130 2130
 
2131
-        $m = get_option('tax_meta_' . $post_type . $term_id);
2131
+		$m = get_option('tax_meta_' . $post_type . $term_id);
2132 2132
 
2133
-        if (isset($m[$key])) {
2134
-            unset($m[$key]);
2135
-        }
2136
-        update_option('tax_meta_' . $post_type  . $term_id, $m);
2137
-    }
2133
+		if (isset($m[$key])) {
2134
+			unset($m[$key]);
2135
+		}
2136
+		update_option('tax_meta_' . $post_type  . $term_id, $m);
2137
+	}
2138 2138
 }
2139 2139
 
2140 2140
 //update meta
2141 2141
 if (!function_exists('update_tax_meta')) {
2142
-    function update_tax_meta($term_id, $key, $value, $post_type = '')
2143
-    {
2142
+	function update_tax_meta($term_id, $key, $value, $post_type = '')
2143
+	{
2144 2144
 
2145
-        if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2146
-            $taxObject = get_taxonomy($_REQUEST['taxonomy']);
2147
-            $post_type = $taxObject->object_type[0];
2148
-        }
2145
+		if (empty($post_type) && isset($_REQUEST['taxonomy'])) {
2146
+			$taxObject = get_taxonomy($_REQUEST['taxonomy']);
2147
+			$post_type = $taxObject->object_type[0];
2148
+		}
2149 2149
 
2150
-        if($post_type=='post'){$post_type='';}
2151
-        if($post_type){$post_type = $post_type.'_';}
2150
+		if($post_type=='post'){$post_type='';}
2151
+		if($post_type){$post_type = $post_type.'_';}
2152 2152
 
2153
-        $m = get_option('tax_meta_' . $post_type  . $term_id);
2153
+		$m = get_option('tax_meta_' . $post_type  . $term_id);
2154 2154
 
2155
-        $m[$key] = $value;
2156
-        update_option('tax_meta_' . $post_type . $term_id, $m);
2155
+		$m[$key] = $value;
2156
+		update_option('tax_meta_' . $post_type . $term_id, $m);
2157 2157
 
2158
-        /** This action is documented in geodirectory-functions/cat-meta-functions/Tax-meta-class.php */
2159
-        do_action('gd_tax_meta_updated', false, true, $term_id, $post_type);
2160
-    }
2158
+		/** This action is documented in geodirectory-functions/cat-meta-functions/Tax-meta-class.php */
2159
+		do_action('gd_tax_meta_updated', false, true, $term_id, $post_type);
2160
+	}
2161 2161
 }
2162 2162
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-functions/cat-meta-functions/cat_meta.php 1 patch
Indentation   +165 added lines, -165 removed lines patch added patch discarded remove patch
@@ -11,139 +11,139 @@  discard block
 block discarded – undo
11 11
 //include the main class file
12 12
 require_once("Tax-meta-class.php");
13 13
 if (is_admin()) {
14
-    /*
14
+	/*
15 15
      * prefix of meta keys, optional
16 16
      * use underscore (_) at the beginning to make keys hidden, for example $prefix = '_ba_';
17 17
      *  you also can make prefix empty to disable it
18 18
      *
19 19
      */
20 20
 
21
-    $prefix = 'ct_';
22
-    /*
21
+	$prefix = 'ct_';
22
+	/*
23 23
      * configure your meta box
24 24
      */
25 25
 
26
-    $config = array(
27
-        'id' => 'demo_meta_box',                    // meta box id, unique per meta box
28
-        'title' => __('Demo Meta Box', 'geodirectory'),                    // meta box title
29
-        'pages' => geodir_get_taxonomies(),            // taxonomy name, accept categories, post_tag and custom taxonomies
30
-        'context' => 'normal',                        // where the meta box appear: normal (default), advanced, side; optional
31
-        'fields' => array(),                        // list of meta fields (can be added by field arrays)
32
-        'local_images' => false,                    // Use local or hosted images (meta box images for add/remove)
33
-        'use_with_theme' => true                    //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
34
-    );
26
+	$config = array(
27
+		'id' => 'demo_meta_box',                    // meta box id, unique per meta box
28
+		'title' => __('Demo Meta Box', 'geodirectory'),                    // meta box title
29
+		'pages' => geodir_get_taxonomies(),            // taxonomy name, accept categories, post_tag and custom taxonomies
30
+		'context' => 'normal',                        // where the meta box appear: normal (default), advanced, side; optional
31
+		'fields' => array(),                        // list of meta fields (can be added by field arrays)
32
+		'local_images' => false,                    // Use local or hosted images (meta box images for add/remove)
33
+		'use_with_theme' => true                    //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
34
+	);
35 35
 
36 36
 
37
-    /*
37
+	/*
38 38
      * Initiate your meta box
39 39
      */
40
-    $my_meta = new Tax_Meta_Class($config);
41
-    $my_meta->addWysiwyg($prefix . 'cat_top_desc', array('name' => __('Category Top Description', 'geodirectory'), 'desc' => __('This will appear at the top of the category listing.', 'geodirectory')));
42
-    $my_meta->addImage($prefix . 'cat_default_img', array('name' => __('Default Listing Image', 'geodirectory'), 'desc' => __('Choose a default "no image"', 'geodirectory')));
43
-    $my_meta->addImage($prefix . 'cat_icon', array('name' => __('Category Icon', 'geodirectory'), 'desc' => __('Choose a category icon', 'geodirectory'), 'validate_func' => '!empty'));
44
-    /*$my_meta->addCheckbox($prefix.'pointless',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory'),'style'=>'hidden'));*/// hidden setting to trick WPML
45
-
46
-    $my_meta->addSelect($prefix . 'cat_schema',
47
-    /*
40
+	$my_meta = new Tax_Meta_Class($config);
41
+	$my_meta->addWysiwyg($prefix . 'cat_top_desc', array('name' => __('Category Top Description', 'geodirectory'), 'desc' => __('This will appear at the top of the category listing.', 'geodirectory')));
42
+	$my_meta->addImage($prefix . 'cat_default_img', array('name' => __('Default Listing Image', 'geodirectory'), 'desc' => __('Choose a default "no image"', 'geodirectory')));
43
+	$my_meta->addImage($prefix . 'cat_icon', array('name' => __('Category Icon', 'geodirectory'), 'desc' => __('Choose a category icon', 'geodirectory'), 'validate_func' => '!empty'));
44
+	/*$my_meta->addCheckbox($prefix.'pointless',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory'),'style'=>'hidden'));*/// hidden setting to trick WPML
45
+
46
+	$my_meta->addSelect($prefix . 'cat_schema',
47
+	/*
48 48
      * Allows you to add/filter the cat schema types.
49 49
      *
50 50
      * @since 1.5.7
51 51
      */
52
-        apply_filters('geodir_cat_schemas',array(
53
-            '' => __('Default (LocalBusiness)', 'geodirectory'),
54
-            'AccountingService' => 'AccountingService',
55
-            'Attorney' => 'Attorney',
56
-            'AutoBodyShop' => 'AutoBodyShop',
57
-            'AutoDealer' => 'AutoDealer',
58
-            'AutoPartsStore' => 'AutoPartsStore',
59
-            'AutoRental' => 'AutoRental',
60
-            'AutoRepair' => 'AutoRepair',
61
-            'AutoWash' => 'AutoWash',
62
-            'Bakery' => 'Bakery',
63
-            'BarOrPub' => 'BarOrPub',
64
-            'BeautySalon' => 'BeautySalon',
65
-            'BedAndBreakfast' => 'BedAndBreakfast',
66
-            'BikeStore' => 'BikeStore',
67
-            'BookStore' => 'BookStore',
68
-            'CafeOrCoffeeShop' => 'CafeOrCoffeeShop',
69
-            'ChildCare' => 'ChildCare',
70
-            'ClothingStore' => 'ClothingStore',
71
-            'ComputerStore' => 'ComputerStore',
72
-            'DaySpa' => 'DaySpa',
73
-            'Dentist' => 'Dentist',
74
-            'DryCleaningOrLaundry' => 'DryCleaningOrLaundry',
75
-            'Electrician' => 'Electrician',
76
-            'ElectronicsStore' => 'ElectronicsStore',
77
-            'EmergencyService' => 'EmergencyService',
78
-            'EntertainmentBusiness' => 'EntertainmentBusiness',
79
-            'Event' => 'Event',
80
-            'EventVenue' => 'EventVenue',
81
-            'ExerciseGym' => 'ExerciseGym',
82
-            'FinancialService' => 'FinancialService',
83
-            'Florist' => 'Florist',
84
-            'FoodEstablishment' => 'FoodEstablishment',
85
-            'FurnitureStore' => 'FurnitureStore',
86
-            'GardenStore' => 'GardenStore',
87
-            'GeneralContractor' => 'GeneralContractor',
88
-            'GolfCourse' => 'GolfCourse',
89
-            'HairSalon' => 'HairSalon',
90
-            'HardwareStore' => 'HardwareStore',
91
-            'HealthAndBeautyBusiness' => 'HealthAndBeautyBusiness',
92
-            'HobbyShop' => 'HobbyShop',
93
-            'HomeAndConstructionBusiness' => 'HomeAndConstructionBusiness',
94
-            'HomeGoodsStore' => 'HomeGoodsStore',
95
-            'Hospital' => 'Hospital',
96
-            'Hotel' => 'Hotel',
97
-            'HousePainter' => 'HousePainter',
98
-            'HVACBusiness' => 'HVACBusiness',
99
-            'InsuranceAgency' => 'InsuranceAgency',
100
-            'JewelryStore' => 'JewelryStore',
101
-            'LiquorStore' => 'LiquorStore',
102
-            'Locksmith' => 'Locksmith',
103
-            'LodgingBusiness' => 'LodgingBusiness',
104
-            'MedicalClinic' => 'MedicalClinic',
105
-            'MensClothingStore' => 'MensClothingStore',
106
-            'MobilePhoneStore' => 'MobilePhoneStore',
107
-            'Motel' => 'Motel',
108
-            'MotorcycleDealer' => 'MotorcycleDealer',
109
-            'MotorcycleRepair' => 'MotorcycleRepair',
110
-            'MovingCompany' => 'MovingCompany',
111
-            'MusicStore' => 'MusicStore',
112
-            'NailSalon' => 'NailSalon',
113
-            'NightClub' => 'NightClub',
114
-            'Notary' => 'Notary',
115
-            'OfficeEquipmentStore' => 'OfficeEquipmentStore',
116
-            'Optician' => 'Optician',
117
-            'PetStore' => 'PetStore',
118
-            'Physician' => 'Physician',
119
-            'Plumber' => 'Plumber',
120
-            'ProfessionalService' => 'ProfessionalService',
121
-            'RealEstateAgent' => 'RealEstateAgent',
122
-            'Residence' => 'Residence',
123
-            'Restaurant' => 'Restaurant',
124
-            'RoofingContractor' => 'RoofingContractor',
125
-            'RVPark' => 'RVPark',
126
-            'School' => 'School',
127
-            'SelfStorage' => 'SelfStorage',
128
-            'ShoeStore' => 'ShoeStore',
129
-            'SkiResort' => 'SkiResort',
130
-            'SportingGoodsStore' => 'SportingGoodsStore',
131
-            'SportsClub' => 'SportsClub',
132
-            'Store' => 'Store',
133
-            'TattooParlor' => 'TattooParlor',
134
-            'Taxi' => 'Taxi',
135
-            'TennisComplex' => 'TennisComplex',
136
-            'TireShop' => 'TireShop',
137
-            'TouristAttraction' => 'TouristAttraction',
138
-            'ToyStore' => 'ToyStore',
139
-            'TravelAgency' => 'TravelAgency',
140
-            'VeterinaryCare' => 'VeterinaryCare',
141
-            'WholesaleStore' => 'WholesaleStore',
142
-            'Winery' => 'Winery'
143
-        )),
144
-        array('name' => __('Schema Type', 'geodirectory'), 'desc' => __('Select the Schema to use for this category', 'geodirectory') . "", 'std' => array('selectkey2')));
145
-
146
-    /*$my_meta->addSelect($prefix.'cat_sort',array(''=>__('Default' , 'geodirectory'),
52
+		apply_filters('geodir_cat_schemas',array(
53
+			'' => __('Default (LocalBusiness)', 'geodirectory'),
54
+			'AccountingService' => 'AccountingService',
55
+			'Attorney' => 'Attorney',
56
+			'AutoBodyShop' => 'AutoBodyShop',
57
+			'AutoDealer' => 'AutoDealer',
58
+			'AutoPartsStore' => 'AutoPartsStore',
59
+			'AutoRental' => 'AutoRental',
60
+			'AutoRepair' => 'AutoRepair',
61
+			'AutoWash' => 'AutoWash',
62
+			'Bakery' => 'Bakery',
63
+			'BarOrPub' => 'BarOrPub',
64
+			'BeautySalon' => 'BeautySalon',
65
+			'BedAndBreakfast' => 'BedAndBreakfast',
66
+			'BikeStore' => 'BikeStore',
67
+			'BookStore' => 'BookStore',
68
+			'CafeOrCoffeeShop' => 'CafeOrCoffeeShop',
69
+			'ChildCare' => 'ChildCare',
70
+			'ClothingStore' => 'ClothingStore',
71
+			'ComputerStore' => 'ComputerStore',
72
+			'DaySpa' => 'DaySpa',
73
+			'Dentist' => 'Dentist',
74
+			'DryCleaningOrLaundry' => 'DryCleaningOrLaundry',
75
+			'Electrician' => 'Electrician',
76
+			'ElectronicsStore' => 'ElectronicsStore',
77
+			'EmergencyService' => 'EmergencyService',
78
+			'EntertainmentBusiness' => 'EntertainmentBusiness',
79
+			'Event' => 'Event',
80
+			'EventVenue' => 'EventVenue',
81
+			'ExerciseGym' => 'ExerciseGym',
82
+			'FinancialService' => 'FinancialService',
83
+			'Florist' => 'Florist',
84
+			'FoodEstablishment' => 'FoodEstablishment',
85
+			'FurnitureStore' => 'FurnitureStore',
86
+			'GardenStore' => 'GardenStore',
87
+			'GeneralContractor' => 'GeneralContractor',
88
+			'GolfCourse' => 'GolfCourse',
89
+			'HairSalon' => 'HairSalon',
90
+			'HardwareStore' => 'HardwareStore',
91
+			'HealthAndBeautyBusiness' => 'HealthAndBeautyBusiness',
92
+			'HobbyShop' => 'HobbyShop',
93
+			'HomeAndConstructionBusiness' => 'HomeAndConstructionBusiness',
94
+			'HomeGoodsStore' => 'HomeGoodsStore',
95
+			'Hospital' => 'Hospital',
96
+			'Hotel' => 'Hotel',
97
+			'HousePainter' => 'HousePainter',
98
+			'HVACBusiness' => 'HVACBusiness',
99
+			'InsuranceAgency' => 'InsuranceAgency',
100
+			'JewelryStore' => 'JewelryStore',
101
+			'LiquorStore' => 'LiquorStore',
102
+			'Locksmith' => 'Locksmith',
103
+			'LodgingBusiness' => 'LodgingBusiness',
104
+			'MedicalClinic' => 'MedicalClinic',
105
+			'MensClothingStore' => 'MensClothingStore',
106
+			'MobilePhoneStore' => 'MobilePhoneStore',
107
+			'Motel' => 'Motel',
108
+			'MotorcycleDealer' => 'MotorcycleDealer',
109
+			'MotorcycleRepair' => 'MotorcycleRepair',
110
+			'MovingCompany' => 'MovingCompany',
111
+			'MusicStore' => 'MusicStore',
112
+			'NailSalon' => 'NailSalon',
113
+			'NightClub' => 'NightClub',
114
+			'Notary' => 'Notary',
115
+			'OfficeEquipmentStore' => 'OfficeEquipmentStore',
116
+			'Optician' => 'Optician',
117
+			'PetStore' => 'PetStore',
118
+			'Physician' => 'Physician',
119
+			'Plumber' => 'Plumber',
120
+			'ProfessionalService' => 'ProfessionalService',
121
+			'RealEstateAgent' => 'RealEstateAgent',
122
+			'Residence' => 'Residence',
123
+			'Restaurant' => 'Restaurant',
124
+			'RoofingContractor' => 'RoofingContractor',
125
+			'RVPark' => 'RVPark',
126
+			'School' => 'School',
127
+			'SelfStorage' => 'SelfStorage',
128
+			'ShoeStore' => 'ShoeStore',
129
+			'SkiResort' => 'SkiResort',
130
+			'SportingGoodsStore' => 'SportingGoodsStore',
131
+			'SportsClub' => 'SportsClub',
132
+			'Store' => 'Store',
133
+			'TattooParlor' => 'TattooParlor',
134
+			'Taxi' => 'Taxi',
135
+			'TennisComplex' => 'TennisComplex',
136
+			'TireShop' => 'TireShop',
137
+			'TouristAttraction' => 'TouristAttraction',
138
+			'ToyStore' => 'ToyStore',
139
+			'TravelAgency' => 'TravelAgency',
140
+			'VeterinaryCare' => 'VeterinaryCare',
141
+			'WholesaleStore' => 'WholesaleStore',
142
+			'Winery' => 'Winery'
143
+		)),
144
+		array('name' => __('Schema Type', 'geodirectory'), 'desc' => __('Select the Schema to use for this category', 'geodirectory') . "", 'std' => array('selectkey2')));
145
+
146
+	/*$my_meta->addSelect($prefix.'cat_sort',array(''=>__('Default' , 'geodirectory'),
147 147
     'random'=>__('Random','geodirectory'),
148 148
     'az'=>__('Alphabetical' , 'geodirectory'),
149 149
     'newest'=>__('Newest','geodirectory'),
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
     'low_review'=>__('Lowest Reviews','geodirectory')),
155 155
     array('name'=> __('Sort By','geodirectory'),'desc' => __('Select the default sort option.' ,'geodirectory'), 'std'=> array('selectkey2')));*/
156 156
 
157
-    // Show options for placecategories only
158
-    /*	if(isset($_REQUEST['taxonomy']) && in_array($_REQUEST['taxonomy'],$config['pages']) ){
157
+	// Show options for placecategories only
158
+	/*	if(isset($_REQUEST['taxonomy']) && in_array($_REQUEST['taxonomy'],$config['pages']) ){
159 159
         // Exclude sort options
160 160
         $my_meta->addCheckbox($prefix.'cat_exclude_rating',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory')));
161 161
         $my_meta->addCheckbox($prefix.'cat_exclude_reviews',array('name'=> __('<b>Exclude</b> Reviews sort option','geodirectory')));
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 
168 168
         }*/
169 169
 
170
-    //Finish Meta Box Decleration
171
-    $my_meta->Finish();
170
+	//Finish Meta Box Decleration
171
+	$my_meta->Finish();
172 172
 }
173 173
 
174 174
 
@@ -177,86 +177,86 @@  discard block
 block discarded – undo
177 177
 ##############################################################
178 178
 $gd_taxonomies = geodir_get_taxonomies();
179 179
 if (!empty($gd_taxonomies)) {
180
-    foreach ($gd_taxonomies as $gd_taxonomy) {
180
+	foreach ($gd_taxonomies as $gd_taxonomy) {
181 181
 
182
-        add_filter('manage_edit-' . $gd_taxonomy . '_columns', 'addCat_column', 10, 2);
183
-        add_action('manage_' . $gd_taxonomy . '_custom_column', 'manage_category_custom_fields', 10, 3);
182
+		add_filter('manage_edit-' . $gd_taxonomy . '_columns', 'addCat_column', 10, 2);
183
+		add_action('manage_' . $gd_taxonomy . '_custom_column', 'manage_category_custom_fields', 10, 3);
184 184
 
185
-    }
185
+	}
186 186
 }
187 187
 
188 188
 function addCat_column($columns)
189 189
 {
190
-    // only edit the columns on the current taxonomy
191
-    /*if ( !isset($_GET['taxonomy']) && !in_array($_GET['taxonomy'],geodir_get_taxonomies()) )
190
+	// only edit the columns on the current taxonomy
191
+	/*if ( !isset($_GET['taxonomy']) && !in_array($_GET['taxonomy'],geodir_get_taxonomies()) )
192 192
     return $columns;
193 193
     */
194
-    if ($posts = $columns['description']) {
195
-        unset($columns['description']);
196
-    }
197
-
198
-    $columns['cat_icon'] = 'Icon';
199
-    $columns['cat_default_img'] = __('Default Image', 'geodirectory');
200
-    $columns['cat_ID_num'] = __('Cat ID', 'geodirectory');
201
-    return $columns;
194
+	if ($posts = $columns['description']) {
195
+		unset($columns['description']);
196
+	}
197
+
198
+	$columns['cat_icon'] = 'Icon';
199
+	$columns['cat_default_img'] = __('Default Image', 'geodirectory');
200
+	$columns['cat_ID_num'] = __('Cat ID', 'geodirectory');
201
+	return $columns;
202 202
 }
203 203
 
204 204
 #############################################################
205 205
 function manage_category_custom_fields($deprecated, $column_name, $term_id)
206 206
 {
207
-    if ($column_name == 'cat_ID_num')
208
-        echo $term_id;
207
+	if ($column_name == 'cat_ID_num')
208
+		echo $term_id;
209 209
 
210
-    if ($column_name == 'cat_icon') {
211
-        $term_icon_url = get_tax_meta($term_id, 'ct_cat_icon');
210
+	if ($column_name == 'cat_icon') {
211
+		$term_icon_url = get_tax_meta($term_id, 'ct_cat_icon');
212 212
 
213
-        if ($term_icon_url != '') {
213
+		if ($term_icon_url != '') {
214 214
 
215
-            $file_info = pathinfo($term_icon_url['src']);
215
+			$file_info = pathinfo($term_icon_url['src']);
216 216
 
217
-            if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..')
218
-                $sub_dir = $file_info['dirname'];
219
-            else{$sub_dir = '';}
217
+			if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..')
218
+				$sub_dir = $file_info['dirname'];
219
+			else{$sub_dir = '';}
220 220
 
221
-            $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs
222
-            $uploads_baseurl = $uploads['baseurl'];
223
-            $uploads_path = $uploads['path'];
221
+			$uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs
222
+			$uploads_baseurl = $uploads['baseurl'];
223
+			$uploads_path = $uploads['path'];
224 224
 
225
-            $file_name = $file_info['basename'];
225
+			$file_name = $file_info['basename'];
226 226
 
227
-            $sub_dir = str_replace($uploads_baseurl, '', $sub_dir);
227
+			$sub_dir = str_replace($uploads_baseurl, '', $sub_dir);
228 228
 
229
-            $uploads_url = $uploads_baseurl . $sub_dir;
229
+			$uploads_url = $uploads_baseurl . $sub_dir;
230 230
 
231
-            $term_icon_url['src'] = $uploads_url . '/' . $file_name;
232
-            echo '<img src="' . $term_icon_url['src'] . '" />';
231
+			$term_icon_url['src'] = $uploads_url . '/' . $file_name;
232
+			echo '<img src="' . $term_icon_url['src'] . '" />';
233 233
 
234
-        }
235
-    }
234
+		}
235
+	}
236 236
 
237
-    if ($column_name == 'cat_default_img') {
238
-        $cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img');
239
-        if ($cat_default_img != '')
240
-            echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>';
237
+	if ($column_name == 'cat_default_img') {
238
+		$cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img');
239
+		if ($cat_default_img != '')
240
+			echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>';
241 241
 
242
-    }
242
+	}
243 243
 }
244 244
 
245 245
 function geodir_get_default_catimage($term_id, $post_type = 'gd_place')
246 246
 {
247 247
 
248
-    if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type))
249
-        return $cat_default_img;
250
-    else
251
-        return false;
248
+	if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type))
249
+		return $cat_default_img;
250
+	else
251
+		return false;
252 252
 }
253 253
 
254 254
 //Clear custom fields
255 255
 add_action('in_admin_footer', 'geodir_tax_meta_clear_custom_field');
256 256
 function geodir_tax_meta_clear_custom_field()
257 257
 {
258
-    if (isset($_REQUEST['taxonomy']) && !empty($_REQUEST['taxonomy'])):
259
-        ?>
258
+	if (isset($_REQUEST['taxonomy']) && !empty($_REQUEST['taxonomy'])):
259
+		?>
260 260
         <script type="text/javascript">
261 261
             jQuery(document).ready(function () {
262 262
                 jQuery('#addtag #submit').click(function () {
@@ -277,5 +277,5 @@  discard block
 block discarded – undo
277 277
             });
278 278
         </script>
279 279
     <?php
280
-    endif;
280
+	endif;
281 281
 }
Please login to merge, or discard this patch.
geodirectory-functions/compatibility/Enfold.php 1 patch
Indentation   +147 added lines, -147 removed lines patch added patch discarded remove patch
@@ -1,100 +1,100 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Enfold theme compatibility functions.
4
- *
5
- * This file lets the GeoDirectory Plugin use the Enfold theme HTML wrappers to fit and work perfectly.
6
- *
7
- * @since 1.0.0
8
- * @package GeoDirectory
9
- */
3
+	 * Enfold theme compatibility functions.
4
+	 *
5
+	 * This file lets the GeoDirectory Plugin use the Enfold theme HTML wrappers to fit and work perfectly.
6
+	 *
7
+	 * @since 1.0.0
8
+	 * @package GeoDirectory
9
+	 */
10 10
 add_action('after_setup_theme', 'enfold_action_calls', 11);
11 11
 /**
12
- * Action calls for enfold theme compatibility.
13
- *
14
- * @since 1.0.0
15
- * @package GeoDirectory
16
- */
12
+	 * Action calls for enfold theme compatibility.
13
+	 *
14
+	 * @since 1.0.0
15
+	 * @package GeoDirectory
16
+	 */
17 17
 function enfold_action_calls()
18 18
 {
19 19
 
20
-    /* ACTIONS
20
+	/* ACTIONS
21 21
     ****************************************************************************************/
22 22
 
23
-    // Add body class for styling purposes
24
-    add_filter('body_class', 'wpgeo_enfold_body_class');
23
+	// Add body class for styling purposes
24
+	add_filter('body_class', 'wpgeo_enfold_body_class');
25 25
 
26
-    // Pages using the page-builder shouldn't redirect on successful payment
27
-    if (isset($_REQUEST['pay_action'])) {
28
-        add_action('init', 'geodir_allow_payment_urls_enfold', 15);
29
-    }
26
+	// Pages using the page-builder shouldn't redirect on successful payment
27
+	if (isset($_REQUEST['pay_action'])) {
28
+		add_action('init', 'geodir_allow_payment_urls_enfold', 15);
29
+	}
30 30
 
31
-    // LOCATION MANAGER MENU ACTIONS - set the location menu item before the Enfold search
32
-    if (function_exists('geodir_location_menu_items')) {
33
-        remove_filter('wp_nav_menu_items', 'geodir_location_menu_items', 110);
34
-        add_filter('wp_nav_menu_items', 'geodir_location_menu_items', 8, 2);
35
-    }
36
-    // GEODIR MENU ACTIONS - set the GeoDir menu items before the Enfold search
37
-    remove_filter('wp_nav_menu_items', 'geodir_menu_items', 100);
38
-    add_filter('wp_nav_menu_items', 'geodir_menu_items', 7, 2);
31
+	// LOCATION MANAGER MENU ACTIONS - set the location menu item before the Enfold search
32
+	if (function_exists('geodir_location_menu_items')) {
33
+		remove_filter('wp_nav_menu_items', 'geodir_location_menu_items', 110);
34
+		add_filter('wp_nav_menu_items', 'geodir_location_menu_items', 8, 2);
35
+	}
36
+	// GEODIR MENU ACTIONS - set the GeoDir menu items before the Enfold search
37
+	remove_filter('wp_nav_menu_items', 'geodir_menu_items', 100);
38
+	add_filter('wp_nav_menu_items', 'geodir_menu_items', 7, 2);
39 39
 
40
-    // HOME TOP SIDEBAR
41
-    remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
42
-    remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
43
-    //add_action( 'ava_after_main_container', 'enfold_home_sidebar' );
40
+	// HOME TOP SIDEBAR
41
+	remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
42
+	remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
43
+	//add_action( 'ava_after_main_container', 'enfold_home_sidebar' );
44 44
 
45 45
 
46
-    // WRAPPER OPEN ACTIONS
47
-    remove_action('geodir_wrapper_open', 'geodir_action_wrapper_open', 10);
48
-    add_action('geodir_wrapper_open', 'enfold_action_wrapper_open', 9);
49
-    add_action('geodir_wrapper_open', 'enfold_detail_title', 8, 2); // ADD GEODIR TITLE
46
+	// WRAPPER OPEN ACTIONS
47
+	remove_action('geodir_wrapper_open', 'geodir_action_wrapper_open', 10);
48
+	add_action('geodir_wrapper_open', 'enfold_action_wrapper_open', 9);
49
+	add_action('geodir_wrapper_open', 'enfold_detail_title', 8, 2); // ADD GEODIR TITLE
50 50
 
51 51
 
52
-    // WRAPPER CONTENT OPEN ACTIONS
53
-    remove_action('geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10);
54
-    add_action('geodir_wrapper_content_open', 'enfold_action_wrapper_content_open', 9, 3);
52
+	// WRAPPER CONTENT OPEN ACTIONS
53
+	remove_action('geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10);
54
+	add_action('geodir_wrapper_content_open', 'enfold_action_wrapper_content_open', 9, 3);
55 55
 
56 56
 
57
-    // SIDEBAR RIGHT OPEN ACTIONS
58
-    remove_action('geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10);
59
-    add_action('geodir_sidebar_right_open', 'enfold_action_sidebar_right_open', 10, 4);
57
+	// SIDEBAR RIGHT OPEN ACTIONS
58
+	remove_action('geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10);
59
+	add_action('geodir_sidebar_right_open', 'enfold_action_sidebar_right_open', 10, 4);
60 60
 
61
-    // SIDEBAR LEFT OPEN ACTIONS
62
-    remove_action('geodir_sidebar_left_open', 'geodir_action_sidebar_left_open', 10);
63
-    add_action('geodir_sidebar_left_open', 'enfold_action_sidebar_left_open', 10, 4);
61
+	// SIDEBAR LEFT OPEN ACTIONS
62
+	remove_action('geodir_sidebar_left_open', 'geodir_action_sidebar_left_open', 10);
63
+	add_action('geodir_sidebar_left_open', 'enfold_action_sidebar_left_open', 10, 4);
64 64
 
65 65
 
66
-    // HOME PAGE BREADCRUMBS
67
-    remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20);
68
-    remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20);
66
+	// HOME PAGE BREADCRUMBS
67
+	remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20);
68
+	remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20);
69 69
 
70
-    // LISTINGS PAGE BREADCRUMBS & TITLES
71
-    remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20);
72
-    remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10);
70
+	// LISTINGS PAGE BREADCRUMBS & TITLES
71
+	remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20);
72
+	remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10);
73 73
 
74
-    // DETAILS PAGE BREADCRUMBS & TITLES
75
-    remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20);
76
-    remove_action('geodir_details_main_content', 'geodir_action_page_title', 20);
74
+	// DETAILS PAGE BREADCRUMBS & TITLES
75
+	remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20);
76
+	remove_action('geodir_details_main_content', 'geodir_action_page_title', 20);
77 77
 
78
-    // SEARCH PAGE BREADCRUMBS & TITLES
79
-    remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20);
80
-    remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10);
78
+	// SEARCH PAGE BREADCRUMBS & TITLES
79
+	remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20);
80
+	remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10);
81 81
 
82
-    // AUTHOR PAGE BREADCRUMBS & TITLES
83
-    remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20);
84
-    remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10);
82
+	// AUTHOR PAGE BREADCRUMBS & TITLES
83
+	remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20);
84
+	remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10);
85 85
 
86
-    // DISABLE ENFOLD MAPS CALL
87
-    add_filter('avf_load_google_map_api', 'gd_enfold_remove_maps_api', 10, 1);
86
+	// DISABLE ENFOLD MAPS CALL
87
+	add_filter('avf_load_google_map_api', 'gd_enfold_remove_maps_api', 10, 1);
88 88
 
89
-    // make top section wide
90
-    remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
91
-    remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
92
-    remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10);
93
-    remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10);
94
-    remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10);
95
-    remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10);
89
+	// make top section wide
90
+	remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
91
+	remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
92
+	remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10);
93
+	remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10);
94
+	remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10);
95
+	remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10);
96 96
 
97
-    add_action('geodir_wrapper_open', 'gd_enfold_compat_add_top_section_back', 5);
97
+	add_action('geodir_wrapper_open', 'gd_enfold_compat_add_top_section_back', 5);
98 98
 
99 99
 } // Close enfold_action_calls
100 100
 
@@ -108,17 +108,17 @@  discard block
 block discarded – undo
108 108
 function gd_enfold_compat_add_top_section_back()
109 109
 {
110 110
 
111
-    if (is_page_geodir_home() || geodir_is_page('location')) {
112
-        add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_home_top', 8);
113
-    } elseif (geodir_is_page('listing')) {
114
-        add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_listings_top', 8);
115
-    } elseif (geodir_is_page('detail')) {
116
-        add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_detail_top', 8);
117
-    } elseif (geodir_is_page('search')) {
118
-        add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_search_top', 8);
119
-    } elseif (geodir_is_page('author')) {
120
-        add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_author_top', 8);
121
-    }
111
+	if (is_page_geodir_home() || geodir_is_page('location')) {
112
+		add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_home_top', 8);
113
+	} elseif (geodir_is_page('listing')) {
114
+		add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_listings_top', 8);
115
+	} elseif (geodir_is_page('detail')) {
116
+		add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_detail_top', 8);
117
+	} elseif (geodir_is_page('search')) {
118
+		add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_search_top', 8);
119
+	} elseif (geodir_is_page('author')) {
120
+		add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_author_top', 8);
121
+	}
122 122
 
123 123
 
124 124
 }
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
  */
138 138
 function wpgeo_enfold_body_class($classes)
139 139
 {
140
-    $classes[] = 'wpgeo-enfold';
141
-    return $classes;
140
+	$classes[] = 'wpgeo-enfold';
141
+	return $classes;
142 142
 }
143 143
 
144 144
 /**
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
  */
150 150
 function geodir_allow_payment_urls_enfold()
151 151
 {
152
-    global $builder;
153
-    remove_action('template_redirect', array($builder, 'template_redirect'), 1000);
152
+	global $builder;
153
+	remove_action('template_redirect', array($builder, 'template_redirect'), 1000);
154 154
 }
155 155
 
156 156
 
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
  */
163 163
 function enfold_action_wrapper_open()
164 164
 {
165
-    echo "<div class='container_wrap container_wrap_first main_color " . avia_layout_class('main', false) . "'>";
166
-    echo "<div class='container template-blog '>";
165
+	echo "<div class='container_wrap container_wrap_first main_color " . avia_layout_class('main', false) . "'>";
166
+	echo "<div class='container template-blog '>";
167 167
 }
168 168
 
169 169
 /**
@@ -177,38 +177,38 @@  discard block
 block discarded – undo
177 177
  */
178 178
 function enfold_detail_title($page, $class)
179 179
 {
180
-    //echo '###'.$page;
181
-    global $wp;
182
-    if (isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id() && !geodir_is_page('login')) {
183
-        add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
184
-        echo avia_title();
185
-    } elseif ($page == 'details-page') {
186
-        add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
187
-        echo avia_title();
188
-    } elseif ($page == 'listings-page' || $page == 'search-page') {
189
-        add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
190
-        ob_start(); // Start buffering;
191
-        geodir_action_listings_title();
192
-        $gd_title = ob_get_clean();
193
-        $title_p = explode('">', $gd_title);
194
-        $title = str_replace('</h1></header>', "", $title_p[2]);
195
-        //print_r($title_p);
196
-        echo avia_title(array('title' => $title));
197
-    } elseif ($page == 'author-page') {
198
-        add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
199
-        ob_start(); // Start buffering;
200
-        geodir_action_author_page_title();
201
-        $gd_title = ob_get_clean();
202
-        $gd_title = str_replace('<h1>', "", $gd_title);
203
-        $gd_title = str_replace('</h1>', "", $gd_title);
204
-        echo avia_title(array('title' => $gd_title));
205
-    } elseif ($page == 'add-listing-page') {
206
-        add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
207
-        echo avia_title();
208
-    } elseif ($page == 'add-listing-page') {
209
-        add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
210
-        echo avia_title();
211
-    }
180
+	//echo '###'.$page;
181
+	global $wp;
182
+	if (isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id() && !geodir_is_page('login')) {
183
+		add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
184
+		echo avia_title();
185
+	} elseif ($page == 'details-page') {
186
+		add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
187
+		echo avia_title();
188
+	} elseif ($page == 'listings-page' || $page == 'search-page') {
189
+		add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
190
+		ob_start(); // Start buffering;
191
+		geodir_action_listings_title();
192
+		$gd_title = ob_get_clean();
193
+		$title_p = explode('">', $gd_title);
194
+		$title = str_replace('</h1></header>', "", $title_p[2]);
195
+		//print_r($title_p);
196
+		echo avia_title(array('title' => $title));
197
+	} elseif ($page == 'author-page') {
198
+		add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
199
+		ob_start(); // Start buffering;
200
+		geodir_action_author_page_title();
201
+		$gd_title = ob_get_clean();
202
+		$gd_title = str_replace('<h1>', "", $gd_title);
203
+		$gd_title = str_replace('</h1>', "", $gd_title);
204
+		echo avia_title(array('title' => $gd_title));
205
+	} elseif ($page == 'add-listing-page') {
206
+		add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
207
+		echo avia_title();
208
+	} elseif ($page == 'add-listing-page') {
209
+		add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2);
210
+		echo avia_title();
211
+	}
212 212
 
213 213
 }
214 214
 
@@ -223,22 +223,22 @@  discard block
 block discarded – undo
223 223
  */
224 224
 function enfold_detail_breadcrum($trail, $args)
225 225
 {
226
-    ob_start(); // Start buffering;
227
-    geodir_breadcrumb();
228
-    $gd_crums = ob_get_clean();
229
-    if ($gd_crums) {
230
-        $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums);
231
-        $gd_crums = str_replace('</li></ul></div>', "", $gd_crums);
232
-        $gd_crums = str_replace('&nbsp;>&nbsp;', " > ", $gd_crums);
233
-        $gd_crums = str_replace('</li><li>', "", $gd_crums);
234
-        $gd_crums = explode(" > ", $gd_crums);
235
-        $trail_end = array_pop($gd_crums);
236
-        $gd_crums['trail_end'] = $trail_end;
237
-        //print_r($gd_crums);
238
-        //print_r($trail);
239
-        $trail = $gd_crums;
240
-    }
241
-    return $trail;
226
+	ob_start(); // Start buffering;
227
+	geodir_breadcrumb();
228
+	$gd_crums = ob_get_clean();
229
+	if ($gd_crums) {
230
+		$gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums);
231
+		$gd_crums = str_replace('</li></ul></div>', "", $gd_crums);
232
+		$gd_crums = str_replace('&nbsp;>&nbsp;', " > ", $gd_crums);
233
+		$gd_crums = str_replace('</li><li>', "", $gd_crums);
234
+		$gd_crums = explode(" > ", $gd_crums);
235
+		$trail_end = array_pop($gd_crums);
236
+		$gd_crums['trail_end'] = $trail_end;
237
+		//print_r($gd_crums);
238
+		//print_r($trail);
239
+		$trail = $gd_crums;
240
+	}
241
+	return $trail;
242 242
 }
243 243
 
244 244
 
@@ -253,12 +253,12 @@  discard block
 block discarded – undo
253 253
  */
254 254
 function enfold_action_wrapper_content_open($type = '', $id = '', $class = '')
255 255
 {
256
-    if (geodir_is_page('login')) {
257
-        echo "<main class='template-page content twelve alpha units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">";
258
-    } else {
259
-        echo "<main class='template-page content " . avia_layout_class('content', false) . " units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">";
260
-    }
261
-    echo '<div class="entry-content-wrapper">';
256
+	if (geodir_is_page('login')) {
257
+		echo "<main class='template-page content twelve alpha units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">";
258
+	} else {
259
+		echo "<main class='template-page content " . avia_layout_class('content', false) . " units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">";
260
+	}
261
+	echo '<div class="entry-content-wrapper">';
262 262
 }
263 263
 
264 264
 
@@ -274,9 +274,9 @@  discard block
 block discarded – undo
274 274
  */
275 275
 function enfold_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '')
276 276
 {
277
-    $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : "";
278
-    echo "<aside class='sidebar sidebar_right " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">";
279
-    echo "<div class='inner_sidebar extralight-border'>";
277
+	$sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : "";
278
+	echo "<aside class='sidebar sidebar_right " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">";
279
+	echo "<div class='inner_sidebar extralight-border'>";
280 280
 }
281 281
 
282 282
 /**
@@ -291,9 +291,9 @@  discard block
 block discarded – undo
291 291
  */
292 292
 function enfold_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '')
293 293
 {
294
-    $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : "";
295
-    echo "<aside class='sidebar sidebar_left " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">";
296
-    echo "<div class='inner_sidebar extralight-border'>";
294
+	$sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : "";
295
+	echo "<aside class='sidebar sidebar_left " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">";
296
+	echo "<div class='inner_sidebar extralight-border'>";
297 297
 }
298 298
 
299 299
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
  */
308 308
 function gd_enfold_remove_maps_api($call)
309 309
 {
310
-    return false;
310
+	return false;
311 311
 }
312 312
 
313 313
 
Please login to merge, or discard this patch.
geodirectory-functions/compatibility/Genesis.php 1 patch
Indentation   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -17,26 +17,26 @@  discard block
 block discarded – undo
17 17
 function gd_compat_php_genesis()
18 18
 {
19 19
 // REPLACE GENESIS BREADCRUMBS WITH GD BREADCRUMBS
20
-    remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20);
21
-    remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20);
22
-    remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20);
23
-    remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20);
24
-    remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20);
25
-    remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20);
20
+	remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20);
21
+	remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20);
22
+	remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20);
23
+	remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20);
24
+	remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20);
25
+	remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20);
26 26
 
27 27
 
28
-    // make top section wide
29
-    remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
30
-    remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
31
-    remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10);
32
-    remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10);
33
-    remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10);
34
-    remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10);
28
+	// make top section wide
29
+	remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
30
+	remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10);
31
+	remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10);
32
+	remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10);
33
+	remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10);
34
+	remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10);
35 35
 
36
-    // REMOVE PAGE TITLES
37
-    remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10);
38
-    remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10);
39
-    remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10);
36
+	// REMOVE PAGE TITLES
37
+	remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10);
38
+	remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10);
39
+	remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10);
40 40
 
41 41
 
42 42
 }
@@ -53,25 +53,25 @@  discard block
 block discarded – undo
53 53
 function gd_genesis_compat_left_sidebars()
54 54
 {
55 55
 
56
-    if (is_page_geodir_home()) {
57
-        remove_action('geodir_home_sidebar_left', 'geodir_action_home_sidebar_left', 10);
58
-        add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11);
59
-    } elseif (geodir_is_page('location')) {
60
-        remove_action('geodir_location_sidebar_left', 'geodir_action_home_sidebar_left', 10);
61
-        add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11);
62
-    } elseif (geodir_is_page('listing')) {
63
-        remove_action('geodir_listings_sidebar_left', 'geodir_action_listings_sidebar_left', 10);
64
-        add_action('geodir_wrapper_close', 'geodir_action_listings_sidebar_left', 11);
65
-    } elseif (geodir_is_page('detail') && get_option('geodir_detail_sidebar_left_section')) {
66
-        //remove_action( 'geodir_detail_sidebar', 'geodir_action_details_sidebar', 10 );
67
-        //add_action( 'geodir_wrapper_close', 'geodir_action_details_sidebar', 11 );
68
-    } elseif (geodir_is_page('search')) {
69
-        remove_action('geodir_search_sidebar_left', 'geodir_action_search_sidebar_left', 10);
70
-        add_action('geodir_wrapper_close', 'geodir_action_search_sidebar_left', 11);
71
-    } elseif (geodir_is_page('author')) {
72
-        remove_action('geodir_author_sidebar_left', 'geodir_action_author_sidebar_left', 10);
73
-        add_action('geodir_wrapper_close', 'geodir_action_author_sidebar_left', 11);
74
-    }
56
+	if (is_page_geodir_home()) {
57
+		remove_action('geodir_home_sidebar_left', 'geodir_action_home_sidebar_left', 10);
58
+		add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11);
59
+	} elseif (geodir_is_page('location')) {
60
+		remove_action('geodir_location_sidebar_left', 'geodir_action_home_sidebar_left', 10);
61
+		add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11);
62
+	} elseif (geodir_is_page('listing')) {
63
+		remove_action('geodir_listings_sidebar_left', 'geodir_action_listings_sidebar_left', 10);
64
+		add_action('geodir_wrapper_close', 'geodir_action_listings_sidebar_left', 11);
65
+	} elseif (geodir_is_page('detail') && get_option('geodir_detail_sidebar_left_section')) {
66
+		//remove_action( 'geodir_detail_sidebar', 'geodir_action_details_sidebar', 10 );
67
+		//add_action( 'geodir_wrapper_close', 'geodir_action_details_sidebar', 11 );
68
+	} elseif (geodir_is_page('search')) {
69
+		remove_action('geodir_search_sidebar_left', 'geodir_action_search_sidebar_left', 10);
70
+		add_action('geodir_wrapper_close', 'geodir_action_search_sidebar_left', 11);
71
+	} elseif (geodir_is_page('author')) {
72
+		remove_action('geodir_author_sidebar_left', 'geodir_action_author_sidebar_left', 10);
73
+		add_action('geodir_wrapper_close', 'geodir_action_author_sidebar_left', 11);
74
+	}
75 75
 
76 76
 
77 77
 }
@@ -88,65 +88,65 @@  discard block
 block discarded – undo
88 88
  */
89 89
 function geodir_set_body_scs($classes)
90 90
 {
91
-    $remove_class = false;
92
-    $new_class = '';
93
-    if (is_page_geodir_home() || geodir_is_page('location')) {
94
-        $remove_class = true;
95
-        if (get_option('geodir_show_home_left_section')) {
96
-            $new_class .= 'sidebar-';
97
-        }
98
-        if (get_option('geodir_show_home_contant_section')) {
99
-            $new_class .= 'content';
100
-        }
101
-        if (get_option('geodir_show_home_right_section')) {
102
-            $new_class .= '-sidebar';
103
-        }
104
-    } elseif (geodir_is_page('listing')) {
105
-        $remove_class = true;
106
-        if (get_option('geodir_show_listing_left_section')) {
107
-            $new_class .= 'sidebar-';
108
-        }
109
-        $new_class .= 'content';
110
-        if (get_option('geodir_show_listing_right_section')) {
111
-            $new_class .= '-sidebar';
112
-        }
113
-    } elseif (geodir_is_page('detail')) {
114
-        $remove_class = true;
115
-        if (get_option('geodir_detail_sidebar_left_section')) {
116
-            $new_class .= 'sidebar-content gd-details-sidebar-left';
117
-        } else {
118
-            $new_class .= 'content-sidebar';
119
-        }
120
-    } elseif (geodir_is_page('search')) {
121
-        $remove_class = true;
122
-        if (get_option('geodir_show_search_left_section')) {
123
-            $new_class .= 'sidebar-';
124
-        }
125
-        $new_class .= 'content';
126
-        if (get_option('geodir_show_search_right_section')) {
127
-            $new_class .= '-sidebar';
128
-        }
129
-    } elseif (geodir_is_page('author')) {
130
-        $remove_class = true;
131
-        if (get_option('geodir_show_author_left_section')) {
132
-            $new_class .= 'sidebar-';
133
-        }
134
-        $new_class .= 'content';
135
-        if (get_option('geodir_show_author_right_section')) {
136
-            $new_class .= '-sidebar';
137
-        }
138
-    } elseif (geodir_is_page('add-listing')) {
139
-        $remove_class = true;
140
-        $new_class .= 'content-sidebar';
141
-    }
142
-
143
-    if ($remove_class) {
144
-        $classes = array_diff($classes, array('content-sidebar', 'sidebar-content', 'content-sidebar-sidebar', 'sidebar-sidebar-content', 'sidebar-content-sidebar', 'full-width-content'));
145
-        //str_replace(array('content-sidebar','sidebar-content','content-sidebar-sidebar','sidebar-sidebar-content','sidebar-content-sidebar','full-width-content'),array('','','','','',''),$classes);
146
-        $classes[] = $new_class;
147
-    }
148
-
149
-    return $classes;
91
+	$remove_class = false;
92
+	$new_class = '';
93
+	if (is_page_geodir_home() || geodir_is_page('location')) {
94
+		$remove_class = true;
95
+		if (get_option('geodir_show_home_left_section')) {
96
+			$new_class .= 'sidebar-';
97
+		}
98
+		if (get_option('geodir_show_home_contant_section')) {
99
+			$new_class .= 'content';
100
+		}
101
+		if (get_option('geodir_show_home_right_section')) {
102
+			$new_class .= '-sidebar';
103
+		}
104
+	} elseif (geodir_is_page('listing')) {
105
+		$remove_class = true;
106
+		if (get_option('geodir_show_listing_left_section')) {
107
+			$new_class .= 'sidebar-';
108
+		}
109
+		$new_class .= 'content';
110
+		if (get_option('geodir_show_listing_right_section')) {
111
+			$new_class .= '-sidebar';
112
+		}
113
+	} elseif (geodir_is_page('detail')) {
114
+		$remove_class = true;
115
+		if (get_option('geodir_detail_sidebar_left_section')) {
116
+			$new_class .= 'sidebar-content gd-details-sidebar-left';
117
+		} else {
118
+			$new_class .= 'content-sidebar';
119
+		}
120
+	} elseif (geodir_is_page('search')) {
121
+		$remove_class = true;
122
+		if (get_option('geodir_show_search_left_section')) {
123
+			$new_class .= 'sidebar-';
124
+		}
125
+		$new_class .= 'content';
126
+		if (get_option('geodir_show_search_right_section')) {
127
+			$new_class .= '-sidebar';
128
+		}
129
+	} elseif (geodir_is_page('author')) {
130
+		$remove_class = true;
131
+		if (get_option('geodir_show_author_left_section')) {
132
+			$new_class .= 'sidebar-';
133
+		}
134
+		$new_class .= 'content';
135
+		if (get_option('geodir_show_author_right_section')) {
136
+			$new_class .= '-sidebar';
137
+		}
138
+	} elseif (geodir_is_page('add-listing')) {
139
+		$remove_class = true;
140
+		$new_class .= 'content-sidebar';
141
+	}
142
+
143
+	if ($remove_class) {
144
+		$classes = array_diff($classes, array('content-sidebar', 'sidebar-content', 'content-sidebar-sidebar', 'sidebar-sidebar-content', 'sidebar-content-sidebar', 'full-width-content'));
145
+		//str_replace(array('content-sidebar','sidebar-content','content-sidebar-sidebar','sidebar-sidebar-content','sidebar-content-sidebar','full-width-content'),array('','','','','',''),$classes);
146
+		$classes[] = $new_class;
147
+	}
148
+
149
+	return $classes;
150 150
 
151 151
 }
152 152
 
@@ -160,17 +160,17 @@  discard block
 block discarded – undo
160 160
 function gd_genesis_compat_add_top_section_back()
161 161
 {
162 162
 
163
-    if (is_page_geodir_home() || geodir_is_page('location')) {
164
-        geodir_action_geodir_sidebar_home_top();
165
-    } elseif (geodir_is_page('listing')) {
166
-        geodir_action_geodir_sidebar_listings_top();
167
-    } elseif (geodir_is_page('detail')) {
168
-        geodir_action_geodir_sidebar_detail_top();
169
-    } elseif (geodir_is_page('search')) {
170
-        geodir_action_geodir_sidebar_search_top();
171
-    } elseif (geodir_is_page('author')) {
172
-        geodir_action_geodir_sidebar_author_top();
173
-    }
163
+	if (is_page_geodir_home() || geodir_is_page('location')) {
164
+		geodir_action_geodir_sidebar_home_top();
165
+	} elseif (geodir_is_page('listing')) {
166
+		geodir_action_geodir_sidebar_listings_top();
167
+	} elseif (geodir_is_page('detail')) {
168
+		geodir_action_geodir_sidebar_detail_top();
169
+	} elseif (geodir_is_page('search')) {
170
+		geodir_action_geodir_sidebar_search_top();
171
+	} elseif (geodir_is_page('author')) {
172
+		geodir_action_geodir_sidebar_author_top();
173
+	}
174 174
 
175 175
 
176 176
 }
@@ -183,12 +183,12 @@  discard block
 block discarded – undo
183 183
  */
184 184
 function geodir_replace_breadcrumb()
185 185
 {
186
-    if (is_front_page() && get_option('geodir_set_as_home') && !geodir_is_page('login')) {
187
-    } else {
188
-        echo '<div class="geodir-breadcrumb-bar"><div class="wrap">';
189
-        geodir_breadcrumb();
190
-        echo '</div></div>';
191
-    }
186
+	if (is_front_page() && get_option('geodir_set_as_home') && !geodir_is_page('login')) {
187
+	} else {
188
+		echo '<div class="geodir-breadcrumb-bar"><div class="wrap">';
189
+		geodir_breadcrumb();
190
+		echo '</div></div>';
191
+	}
192 192
 }
193 193
 
194 194
 // Force Full Width on signup page
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
  */
202 202
 function geodir_genesis_meta()
203 203
 {
204
-    if (geodir_is_page('login')) {
205
-        add_filter('genesis_pre_get_option_site_layout', '__genesis_return_full_width_content');
206
-    }
204
+	if (geodir_is_page('login')) {
205
+		add_filter('genesis_pre_get_option_site_layout', '__genesis_return_full_width_content');
206
+	}
207 207
 }
208 208
 
209 209
 add_action('geodir_add_listing_page_title', 'geodir_add_listing_page_title_genesis_before', 8);
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 function geodir_add_listing_page_title_genesis_before()
217 217
 {
218 218
 
219
-    echo "<div class='entry' >";
219
+	echo "<div class='entry' >";
220 220
 }
221 221
 
222 222
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 function geodir_add_listing_form_genesis_after()
231 231
 {
232 232
 
233
-    echo "</div>";
233
+	echo "</div>";
234 234
 }
235 235
 
236 236
 
@@ -249,38 +249,38 @@  discard block
 block discarded – undo
249 249
 {
250 250
 
251 251
 
252
-    $title = '';
253
-    $subtitle = '';
254
-
255
-    if (geodir_is_page('listing')) {
256
-        echo '<div class="wrap gd-title-wrap">';
257
-        geodir_action_listings_title();
258
-        echo '</div>';
259
-    }
260
-
261
-    if (geodir_is_page('add-listing')) {
262
-        echo '<div class="wrap gd-title-wrap">';
263
-        geodir_action_add_listing_page_title();
264
-        echo '</div>';
265
-    }
266
-
267
-    if (geodir_is_page('author')) {
268
-        echo '<div class="wrap gd-title-wrap">';
269
-        geodir_action_author_page_title();
270
-        echo '</div>';
271
-    }
272
-
273
-    if (geodir_is_page('detail') || geodir_is_page('preview')) {
274
-        echo '<div class="wrap gd-title-wrap">';
275
-        echo get_the_title();
276
-        echo '</div>';
277
-    }
278
-
279
-    if (geodir_is_page('search')) {
280
-        echo '<div class="wrap gd-title-wrap">';
281
-        geodir_action_search_page_title();
282
-        echo '</div>';
283
-    }
252
+	$title = '';
253
+	$subtitle = '';
254
+
255
+	if (geodir_is_page('listing')) {
256
+		echo '<div class="wrap gd-title-wrap">';
257
+		geodir_action_listings_title();
258
+		echo '</div>';
259
+	}
260
+
261
+	if (geodir_is_page('add-listing')) {
262
+		echo '<div class="wrap gd-title-wrap">';
263
+		geodir_action_add_listing_page_title();
264
+		echo '</div>';
265
+	}
266
+
267
+	if (geodir_is_page('author')) {
268
+		echo '<div class="wrap gd-title-wrap">';
269
+		geodir_action_author_page_title();
270
+		echo '</div>';
271
+	}
272
+
273
+	if (geodir_is_page('detail') || geodir_is_page('preview')) {
274
+		echo '<div class="wrap gd-title-wrap">';
275
+		echo get_the_title();
276
+		echo '</div>';
277
+	}
278
+
279
+	if (geodir_is_page('search')) {
280
+		echo '<div class="wrap gd-title-wrap">';
281
+		geodir_action_search_page_title();
282
+		echo '</div>';
283
+	}
284 284
 }
285 285
 
286 286
 
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
  */
294 294
 function gd_genesis_listing_page_title_bar()
295 295
 {
296
-    geodir_action_listings_title();
297
-    //geodir_action_listings_description();
296
+	geodir_action_listings_title();
297
+	//geodir_action_listings_description();
298 298
 }
299 299
 
300 300
 
@@ -307,19 +307,19 @@  discard block
 block discarded – undo
307 307
  */
308 308
 function gd_compat_php_genesis_geo_1280_fix()
309 309
 {
310
-    if (function_exists('geo1280_search_bar')) {
311
-        remove_action('genesis_after_header', 'geo1280_search_bar', 20);
312
-        add_action('genesis_after_header', 'geo1280_search_bar_fix', 4);
310
+	if (function_exists('geo1280_search_bar')) {
311
+		remove_action('genesis_after_header', 'geo1280_search_bar', 20);
312
+		add_action('genesis_after_header', 'geo1280_search_bar_fix', 4);
313 313
 
314
-        //
314
+		//
315 315
 
316
-        remove_action('genesis_after_header', 'geodir_replace_breadcrumb', 20);
317
-        remove_action('genesis_before_content_sidebar_wrap', 'geodir_replace_breadcrumb', 20);
318
-        add_action('geodir_wrapper_open', 'geodir_replace_breadcrumb', 105);
316
+		remove_action('genesis_after_header', 'geodir_replace_breadcrumb', 20);
317
+		remove_action('genesis_before_content_sidebar_wrap', 'geodir_replace_breadcrumb', 20);
318
+		add_action('geodir_wrapper_open', 'geodir_replace_breadcrumb', 105);
319 319
 
320
-        remove_action('genesis_before_content_sidebar_wrap', 'geo1280_page_title', 10);
321
-        add_action('geodir_wrapper_open', 'geo1280_page_title', 101);
322
-    }
320
+		remove_action('genesis_before_content_sidebar_wrap', 'geo1280_page_title', 10);
321
+		add_action('geodir_wrapper_open', 'geo1280_page_title', 101);
322
+	}
323 323
 }
324 324
 
325 325
 /**
@@ -331,11 +331,11 @@  discard block
 block discarded – undo
331 331
 function geo1280_search_bar_fix()
332 332
 {
333 333
 
334
-    echo '<div class="geo1280-placeholder"></div>';
335
-    if (is_active_sidebar('search-bar')) {
336
-        genesis_widget_area('search-bar', array(
337
-            'before' => '<div class="search-bar widget-area"><div class="wrap">',
338
-            'after' => '</div></div>',
339
-        ));
340
-    }
334
+	echo '<div class="geo1280-placeholder"></div>';
335
+	if (is_active_sidebar('search-bar')) {
336
+		genesis_widget_area('search-bar', array(
337
+			'before' => '<div class="search-bar widget-area"><div class="wrap">',
338
+			'after' => '</div></div>',
339
+		));
340
+	}
341 341
 }
Please login to merge, or discard this patch.