| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | if ( ! defined( 'ABSPATH' ) ) { |
| 14: | exit; |
| 15: | } |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | function epl_get_meta_boxes() { |
| 26: | |
| 27: | global $epl_settings; |
| 28: | |
| 29: | $opts_property_status = epl_get_property_status_opts(); |
| 30: | $opts_property_authority = epl_get_property_authority_opts(); |
| 31: | $opts_property_exclusivity = epl_get_property_exclusivity_opts(); |
| 32: | $opts_property_com_authority = epl_get_property_com_authority_opts(); |
| 33: | $opts_area_unit = epl_get_property_area_unit_opts(); |
| 34: | $opts_rent_period = epl_get_property_rent_period_opts(); |
| 35: | $opts_property_com_listing_type = epl_get_property_com_listing_type_opts(); |
| 36: | $opts_property_com_tenancy = epl_get_property_com_tenancy_opts(); |
| 37: | $opts_property_com_property_extent = epl_get_property_com_property_extent_opts(); |
| 38: | |
| 39: | $epl_meta_boxes = array( |
| 40: | |
| 41: | array( |
| 42: | 'id' => 'epl-property-listing-section-id', |
| 43: | 'label' => __( 'Listing Details', 'easy-property-listings' ), |
| 44: | 'post_type' => array( 'property', 'rural', 'rental', 'land', 'commercial', 'commercial_land', 'business' ), |
| 45: | 'context' => 'normal', |
| 46: | 'priority' => 'default', |
| 47: | 'groups' => array( |
| 48: | array( |
| 49: | 'id' => 'property_heading', |
| 50: | 'columns' => '1', |
| 51: | 'label' => '', |
| 52: | 'fields' => array( |
| 53: | array( |
| 54: | 'name' => 'property_heading', |
| 55: | 'label' => __( 'Heading', 'easy-property-listings' ), |
| 56: | 'type' => 'text', |
| 57: | 'maxlength' => '200', |
| 58: | 'class' => 'epl-property-heading', |
| 59: | ), |
| 60: | ), |
| 61: | ), |
| 62: | |
| 63: | array( |
| 64: | 'id' => 'listing_agents', |
| 65: | 'columns' => '1', |
| 66: | 'label' => __( 'Listing Agent(s)', 'easy-property-listings' ), |
| 67: | 'fields' => array( |
| 68: | array( |
| 69: | 'name' => 'property_office_id', |
| 70: | 'label' => __( 'Office ID', 'easy-property-listings' ), |
| 71: | 'type' => 'text', |
| 72: | 'maxlength' => '50', |
| 73: | 'class' => 'epl-property-office-id', |
| 74: | ), |
| 75: | |
| 76: | array( |
| 77: | 'name' => 'property_agent', |
| 78: | 'label' => __( 'Listing Agent', 'easy-property-listings' ), |
| 79: | 'type' => 'text', |
| 80: | 'maxlength' => '40', |
| 81: | 'help' => __( 'Search for primary agent.', 'easy-property-listings' ), |
| 82: | 'class' => 'epl-property-agent', |
| 83: | ), |
| 84: | |
| 85: | array( |
| 86: | 'name' => 'property_second_agent', |
| 87: | 'label' => __( 'Second Listing Agent', 'easy-property-listings' ), |
| 88: | 'type' => 'text', |
| 89: | 'maxlength' => '40', |
| 90: | 'help' => __( 'Search for secondary agent.', 'easy-property-listings' ), |
| 91: | 'class' => 'epl-property-second-agent', |
| 92: | ), |
| 93: | |
| 94: | array( |
| 95: | 'name' => 'property_third_agent', |
| 96: | 'label' => __( 'Third Listing Agent', 'easy-property-listings' ), |
| 97: | 'type' => 'text', |
| 98: | 'maxlength' => '40', |
| 99: | 'help' => __( 'Search for third agent.', 'easy-property-listings' ), |
| 100: | 'class' => 'epl-property-second-agent', |
| 101: | 'include' => array( 'business', 'commercial', 'commercial_land' ), |
| 102: | ), |
| 103: | |
| 104: | array( |
| 105: | 'name' => 'property_fourth_agent', |
| 106: | 'label' => __( 'Fourth Listing Agent', 'easy-property-listings' ), |
| 107: | 'type' => 'text', |
| 108: | 'maxlength' => '40', |
| 109: | 'help' => __( 'Search for fourth agent.', 'easy-property-listings' ), |
| 110: | 'class' => 'epl-property-second-agent', |
| 111: | 'include' => array( 'business', 'commercial', 'commercial_land' ), |
| 112: | ), |
| 113: | |
| 114: | array( |
| 115: | 'name' => 'property_agent_hide_author_box', |
| 116: | 'label' => __( 'Hide Author Box', 'easy-property-listings' ), |
| 117: | 'type' => 'checkbox_single', |
| 118: | 'opts' => array( |
| 119: | 'yes' => __( 'Hide Author Box', 'easy-property-listings' ), |
| 120: | ), |
| 121: | 'class' => 'epl-property-agent-hide-author-box', |
| 122: | ), |
| 123: | ), |
| 124: | ), |
| 125: | |
| 126: | array( |
| 127: | 'id' => 'listing_type', |
| 128: | 'columns' => '2', |
| 129: | 'label' => __( 'Listing Type', 'easy-property-listings' ), |
| 130: | 'width' => '2', |
| 131: | 'fields' => array( |
| 132: | array( |
| 133: | 'name' => 'property_status', |
| 134: | 'label' => __( 'Property Status', 'easy-property-listings' ), |
| 135: | 'type' => 'select', |
| 136: | 'opts' => $opts_property_status, |
| 137: | ), |
| 138: | |
| 139: | array( |
| 140: | 'name' => 'property_list_date', |
| 141: | 'label' => __( 'Date Listed', 'easy-property-listings' ), |
| 142: | 'type' => 'date', |
| 143: | 'maxlength' => '100', |
| 144: | 'autocomplete' => 'off', |
| 145: | ), |
| 146: | |
| 147: | array( |
| 148: | 'name' => 'property_authority', |
| 149: | 'label' => __( 'Authority', 'easy-property-listings' ), |
| 150: | 'type' => 'select', |
| 151: | 'opts' => $opts_property_authority, |
| 152: | 'exclude' => array( 'rental', 'commercial', 'commercial_land' ), |
| 153: | ), |
| 154: | |
| 155: | array( |
| 156: | 'name' => 'property_unique_id', |
| 157: | 'label' => __( 'Unique ID', 'easy-property-listings' ), |
| 158: | 'type' => 'text', |
| 159: | 'maxlength' => '50', |
| 160: | ), |
| 161: | |
| 162: | array( |
| 163: | 'name' => 'property_category', |
| 164: | 'label' => __( 'House Category', 'easy-property-listings' ), |
| 165: | 'type' => 'select', |
| 166: | 'opts' => epl_listing_load_meta_property_category(), |
| 167: | 'exclude' => array( 'land', 'commercial', 'commercial_land', 'business', 'rural' ), |
| 168: | ), |
| 169: | |
| 170: | array( |
| 171: | 'name' => 'property_rural_category', |
| 172: | 'label' => __( 'Rural Category', 'easy-property-listings' ), |
| 173: | 'type' => 'select', |
| 174: | 'opts' => epl_listing_load_meta_rural_category(), |
| 175: | 'include' => array( 'rural' ), |
| 176: | ), |
| 177: | |
| 178: | array( |
| 179: | 'name' => 'property_mod_date', |
| 180: | 'label' => __( 'XML Importer Mod Date', 'easy-property-listings' ), |
| 181: | 'type' => 'text', |
| 182: | 'maxlength' => '60', |
| 183: | 'autocomplete' => 'off', |
| 184: | ), |
| 185: | |
| 186: | array( |
| 187: | 'name' => 'property_images_mod_date', |
| 188: | 'label' => __( 'Image Modified Date', 'easy-property-listings' ), |
| 189: | 'type' => 'hidden', |
| 190: | 'maxlength' => '60', |
| 191: | ), |
| 192: | |
| 193: | array( |
| 194: | 'name' => 'property_floorplan_mod_date', |
| 195: | 'label' => __( 'Floor plan Modified Date', 'easy-property-listings' ), |
| 196: | 'type' => 'hidden', |
| 197: | 'maxlength' => '60', |
| 198: | ), |
| 199: | |
| 200: | array( |
| 201: | 'name' => 'property_com_authority', |
| 202: | 'label' => __( 'Commercial Authority', 'easy-property-listings' ), |
| 203: | 'type' => 'select', |
| 204: | 'opts' => $opts_property_com_authority, |
| 205: | 'include' => array( 'commercial', 'commercial_land', 'business' ), |
| 206: | ), |
| 207: | |
| 208: | array( |
| 209: | 'name' => 'property_com_exclusivity', |
| 210: | 'label' => __( 'Exclusivity', 'easy-property-listings' ), |
| 211: | 'type' => 'select', |
| 212: | 'opts' => $opts_property_exclusivity, |
| 213: | 'include' => array( 'commercial', 'commercial_land', 'business' ), |
| 214: | ), |
| 215: | |
| 216: | array( |
| 217: | 'name' => 'property_com_listing_type', |
| 218: | 'label' => __( 'Commercial Listing Type', 'easy-property-listings' ), |
| 219: | 'type' => 'select', |
| 220: | 'opts' => $opts_property_com_listing_type, |
| 221: | 'include' => array( 'commercial', 'commercial_land', 'business' ), |
| 222: | ), |
| 223: | |
| 224: | array( |
| 225: | 'name' => 'property_commercial_category', |
| 226: | 'label' => __( 'Commercial Category', 'easy-property-listings' ), |
| 227: | 'type' => 'select', |
| 228: | 'opts' => epl_listing_load_meta_commercial_category(), |
| 229: | 'include' => array( 'commercial', 'commercial_land' ), |
| 230: | ), |
| 231: | ), |
| 232: | ), |
| 233: | |
| 234: | array( |
| 235: | 'id' => 'display_details', |
| 236: | 'columns' => '2', |
| 237: | 'label' => __( 'Display Details', 'easy-property-listings' ), |
| 238: | 'fields' => array( |
| 239: | |
| 240: | array( |
| 241: | 'name' => 'property_inspection_times', |
| 242: | 'label' => __( 'Inspection Times', 'easy-property-listings' ), |
| 243: | 'type' => 'textarea', |
| 244: | 'maxlength' => '500', |
| 245: | ), |
| 246: | |
| 247: | array( |
| 248: | 'name' => 'property_featured', |
| 249: | 'label' => __( 'Featured Listing', 'easy-property-listings' ), |
| 250: | 'type' => 'checkbox_single', |
| 251: | 'opts' => array( |
| 252: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 253: | ), |
| 254: | 'import' => 'preserve', |
| 255: | ), |
| 256: | ), |
| 257: | ), |
| 258: | ), |
| 259: | ), |
| 260: | |
| 261: | array( |
| 262: | 'id' => 'epl-features-section-id', |
| 263: | 'label' => __( 'Listing Features', 'easy-property-listings' ), |
| 264: | 'post_type' => array( 'property', 'rural', 'rental' ), |
| 265: | 'context' => 'normal', |
| 266: | 'priority' => 'default', |
| 267: | 'groups' => array( |
| 268: | array( |
| 269: | 'id' => 'house_features', |
| 270: | 'columns' => '2', |
| 271: | 'width' => '2', |
| 272: | 'label' => __( 'House Features', 'easy-property-listings' ), |
| 273: | 'fields' => array( |
| 274: | array( |
| 275: | 'name' => 'property_bedrooms', |
| 276: | 'label' => __( 'Bedrooms', 'easy-property-listings' ), |
| 277: | 'type' => 'text', |
| 278: | 'class' => 'validate[custom[bedroom]]', |
| 279: | 'width' => '2', |
| 280: | ), |
| 281: | |
| 282: | array( |
| 283: | 'name' => 'property_bathrooms', |
| 284: | 'label' => __( 'Bathrooms', 'easy-property-listings' ), |
| 285: | 'type' => 'decimal', |
| 286: | 'maxlength' => '4', |
| 287: | ), |
| 288: | |
| 289: | array( |
| 290: | 'name' => 'property_toilet', |
| 291: | 'label' => __( 'Toilet', 'easy-property-listings' ), |
| 292: | 'type' => 'decimal', |
| 293: | 'maxlength' => '4', |
| 294: | ), |
| 295: | |
| 296: | array( |
| 297: | 'name' => 'property_ensuite', |
| 298: | 'label' => __( 'Ensuite', 'easy-property-listings' ), |
| 299: | 'type' => 'number', |
| 300: | 'maxlength' => '2', |
| 301: | ), |
| 302: | |
| 303: | array( |
| 304: | 'name' => 'property_garage', |
| 305: | 'label' => __( 'Garage', 'easy-property-listings' ), |
| 306: | 'type' => 'number', |
| 307: | 'maxlength' => '2', |
| 308: | ), |
| 309: | |
| 310: | array( |
| 311: | 'name' => 'property_carport', |
| 312: | 'label' => __( 'Carport', 'easy-property-listings' ), |
| 313: | 'type' => 'number', |
| 314: | 'maxlength' => '2', |
| 315: | ), |
| 316: | |
| 317: | array( |
| 318: | 'name' => 'property_open_spaces', |
| 319: | 'label' => __( 'Open Parking Spaces', 'easy-property-listings' ), |
| 320: | 'type' => 'number', |
| 321: | 'maxlength' => '2', |
| 322: | ), |
| 323: | |
| 324: | array( |
| 325: | 'name' => 'property_rooms', |
| 326: | 'label' => __( 'Rooms', 'easy-property-listings' ), |
| 327: | 'type' => 'number', |
| 328: | 'maxlength' => '3', |
| 329: | ), |
| 330: | |
| 331: | array( |
| 332: | 'name' => 'property_year_built', |
| 333: | 'label' => __( 'Year Built', 'easy-property-listings' ), |
| 334: | 'type' => 'text', |
| 335: | 'maxlength' => '4', |
| 336: | 'width' => '1', |
| 337: | 'import' => 'preserve', |
| 338: | ), |
| 339: | |
| 340: | array( |
| 341: | 'name' => 'property_new_construction', |
| 342: | 'label' => __( 'New Construction', 'easy-property-listings' ), |
| 343: | 'type' => 'checkbox_single', |
| 344: | 'opts' => array( |
| 345: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 346: | ), |
| 347: | 'include' => array( 'property', 'rental' ), |
| 348: | ), |
| 349: | |
| 350: | array( |
| 351: | 'name' => 'property_pool', |
| 352: | 'label' => __( 'Pool', 'easy-property-listings' ), |
| 353: | 'type' => 'checkbox_single', |
| 354: | 'opts' => array( |
| 355: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 356: | ), |
| 357: | ), |
| 358: | |
| 359: | array( |
| 360: | 'name' => 'property_air_conditioning', |
| 361: | 'label' => __( 'Air Conditioning', 'easy-property-listings' ), |
| 362: | 'type' => 'checkbox_single', |
| 363: | 'opts' => array( |
| 364: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 365: | ), |
| 366: | ), |
| 367: | |
| 368: | array( |
| 369: | 'name' => 'property_security_system', |
| 370: | 'label' => __( 'Security System', 'easy-property-listings' ), |
| 371: | 'type' => 'checkbox_single', |
| 372: | 'opts' => array( |
| 373: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 374: | ), |
| 375: | ), |
| 376: | |
| 377: | array( |
| 378: | 'name' => 'property_pet_friendly', |
| 379: | 'label' => __( 'Pet Friendly', 'easy-property-listings' ), |
| 380: | 'type' => 'checkbox_single', |
| 381: | 'include' => array( 'rental' ), |
| 382: | 'opts' => array( |
| 383: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 384: | ), |
| 385: | ), |
| 386: | ), |
| 387: | ), |
| 388: | |
| 389: | array( |
| 390: | 'id' => 'land_details', |
| 391: | 'columns' => '2', |
| 392: | 'label' => __( 'Land Details', 'easy-property-listings' ), |
| 393: | 'fields' => array( |
| 394: | array( |
| 395: | 'name' => 'property_land_area', |
| 396: | 'label' => __( 'Land Area', 'easy-property-listings' ), |
| 397: | 'type' => 'decimal', |
| 398: | 'maxlength' => '50', |
| 399: | 'width' => '2-3', |
| 400: | ), |
| 401: | |
| 402: | array( |
| 403: | 'name' => 'property_land_area_unit', |
| 404: | 'label' => __( 'Land Unit', 'easy-property-listings' ), |
| 405: | 'type' => 'select', |
| 406: | 'opts' => $opts_area_unit, |
| 407: | 'width' => '3', |
| 408: | ), |
| 409: | |
| 410: | array( |
| 411: | 'name' => 'property_building_area', |
| 412: | 'label' => __( 'Building Area', 'easy-property-listings' ), |
| 413: | 'type' => 'decimal', |
| 414: | 'maxlength' => '50', |
| 415: | 'width' => '2-3', |
| 416: | ), |
| 417: | |
| 418: | array( |
| 419: | 'name' => 'property_building_area_unit', |
| 420: | 'label' => __( 'Building Unit', 'easy-property-listings' ), |
| 421: | 'type' => 'select', |
| 422: | 'opts' => $opts_area_unit, |
| 423: | 'width' => '3', |
| 424: | ), |
| 425: | |
| 426: | array( |
| 427: | 'name' => 'property_energy_rating', |
| 428: | 'label' => __( 'Energy Rating', 'easy-property-listings' ), |
| 429: | 'type' => 'text', |
| 430: | 'maxlength' => '10', |
| 431: | 'exclude' => array( 'land', 'commercial_land' ), |
| 432: | ), |
| 433: | |
| 434: | array( |
| 435: | 'name' => 'property_land_fully_fenced', |
| 436: | 'label' => __( 'Fully Fenced', 'easy-property-listings' ), |
| 437: | 'type' => 'checkbox_single', |
| 438: | 'opts' => array( |
| 439: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 440: | ), |
| 441: | ), |
| 442: | ), |
| 443: | ), |
| 444: | ), |
| 445: | ), |
| 446: | |
| 447: | array( |
| 448: | 'id' => 'epl-additional-features-section-id', |
| 449: | 'label' => __( 'Additional Features', 'easy-property-listings' ), |
| 450: | 'post_type' => array( 'property', 'rural', 'rental' ), |
| 451: | 'context' => 'normal', |
| 452: | 'priority' => 'default', |
| 453: | 'groups' => array( |
| 454: | array( |
| 455: | 'id' => 'internal', |
| 456: | 'columns' => '3', |
| 457: | 'label' => __( 'Internal', 'easy-property-listings' ), |
| 458: | 'fields' => array( |
| 459: | |
| 460: | array( |
| 461: | 'name' => 'property_broadband', |
| 462: | 'label' => __( 'Broadband', 'easy-property-listings' ), |
| 463: | 'type' => 'checkbox_single', |
| 464: | 'opts' => array( |
| 465: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 466: | ), |
| 467: | ), |
| 468: | |
| 469: | array( |
| 470: | 'name' => 'property_built_in_robes', |
| 471: | 'label' => __( 'Built In Robes', 'easy-property-listings' ), |
| 472: | 'type' => 'checkbox_single', |
| 473: | 'opts' => array( |
| 474: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 475: | ), |
| 476: | ), |
| 477: | |
| 478: | array( |
| 479: | 'name' => 'property_dishwasher', |
| 480: | 'label' => __( 'Dishwasher', 'easy-property-listings' ), |
| 481: | 'type' => 'checkbox_single', |
| 482: | 'opts' => array( |
| 483: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 484: | ), |
| 485: | ), |
| 486: | |
| 487: | array( |
| 488: | 'name' => 'property_floor_boards', |
| 489: | 'label' => __( 'Floor Boards', 'easy-property-listings' ), |
| 490: | 'type' => 'checkbox_single', |
| 491: | 'opts' => array( |
| 492: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 493: | ), |
| 494: | ), |
| 495: | |
| 496: | array( |
| 497: | 'name' => 'property_gym', |
| 498: | 'label' => __( 'Gym', 'easy-property-listings' ), |
| 499: | 'type' => 'checkbox_single', |
| 500: | 'opts' => array( |
| 501: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 502: | ), |
| 503: | ), |
| 504: | |
| 505: | array( |
| 506: | 'name' => 'property_intercom', |
| 507: | 'label' => __( 'Intercom', 'easy-property-listings' ), |
| 508: | 'type' => 'checkbox_single', |
| 509: | 'opts' => array( |
| 510: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 511: | ), |
| 512: | ), |
| 513: | |
| 514: | array( |
| 515: | 'name' => 'property_pay_tv', |
| 516: | 'label' => __( 'Pay TV', 'easy-property-listings' ), |
| 517: | 'type' => 'checkbox_single', |
| 518: | 'opts' => array( |
| 519: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 520: | ), |
| 521: | ), |
| 522: | |
| 523: | array( |
| 524: | 'name' => 'property_remote_garage', |
| 525: | 'label' => __( 'Remote Garage', 'easy-property-listings' ), |
| 526: | 'type' => 'checkbox_single', |
| 527: | 'opts' => array( |
| 528: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 529: | ), |
| 530: | ), |
| 531: | |
| 532: | array( |
| 533: | 'name' => 'property_rumpus_room', |
| 534: | 'label' => __( 'Rumpus Room', 'easy-property-listings' ), |
| 535: | 'type' => 'checkbox_single', |
| 536: | 'opts' => array( |
| 537: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 538: | ), |
| 539: | ), |
| 540: | |
| 541: | array( |
| 542: | 'name' => 'property_secure_parking', |
| 543: | 'label' => __( 'Secure Parking', 'easy-property-listings' ), |
| 544: | 'type' => 'checkbox_single', |
| 545: | 'opts' => array( |
| 546: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 547: | ), |
| 548: | ), |
| 549: | |
| 550: | array( |
| 551: | 'name' => 'property_spa', |
| 552: | 'label' => __( 'Spa', 'easy-property-listings' ), |
| 553: | 'type' => 'checkbox_single', |
| 554: | 'opts' => array( |
| 555: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 556: | ), |
| 557: | ), |
| 558: | |
| 559: | array( |
| 560: | 'name' => 'property_study', |
| 561: | 'label' => __( 'Study', 'easy-property-listings' ), |
| 562: | 'type' => 'checkbox_single', |
| 563: | 'opts' => array( |
| 564: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 565: | ), |
| 566: | ), |
| 567: | |
| 568: | array( |
| 569: | 'name' => 'property_vacuum_system', |
| 570: | 'label' => __( 'Vacuum System', 'easy-property-listings' ), |
| 571: | 'type' => 'checkbox_single', |
| 572: | 'opts' => array( |
| 573: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 574: | ), |
| 575: | ), |
| 576: | |
| 577: | array( |
| 578: | 'name' => 'property_workshop', |
| 579: | 'label' => __( 'Workshop', 'easy-property-listings' ), |
| 580: | 'type' => 'checkbox_single', |
| 581: | 'opts' => array( |
| 582: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 583: | ), |
| 584: | ), |
| 585: | ), |
| 586: | ), |
| 587: | |
| 588: | array( |
| 589: | 'id' => 'external', |
| 590: | 'columns' => '3', |
| 591: | 'label' => __( 'External', 'easy-property-listings' ), |
| 592: | 'fields' => array( |
| 593: | |
| 594: | array( |
| 595: | 'name' => 'property_balcony', |
| 596: | 'label' => __( 'Balcony', 'easy-property-listings' ), |
| 597: | 'type' => 'checkbox_single', |
| 598: | 'opts' => array( |
| 599: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 600: | ), |
| 601: | ), |
| 602: | |
| 603: | array( |
| 604: | 'name' => 'property_courtyard', |
| 605: | 'label' => __( 'Courtyard', 'easy-property-listings' ), |
| 606: | 'type' => 'checkbox_single', |
| 607: | 'opts' => array( |
| 608: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 609: | ), |
| 610: | ), |
| 611: | |
| 612: | array( |
| 613: | 'name' => 'property_deck', |
| 614: | 'label' => __( 'Deck', 'easy-property-listings' ), |
| 615: | 'type' => 'checkbox_single', |
| 616: | 'opts' => array( |
| 617: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 618: | ), |
| 619: | ), |
| 620: | |
| 621: | array( |
| 622: | 'name' => 'property_outdoor_entertaining', |
| 623: | 'label' => __( 'Outdoor Entertaining', 'easy-property-listings' ), |
| 624: | 'type' => 'checkbox_single', |
| 625: | 'opts' => array( |
| 626: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 627: | ), |
| 628: | ), |
| 629: | |
| 630: | array( |
| 631: | 'name' => 'property_shed', |
| 632: | 'label' => __( 'Shed', 'easy-property-listings' ), |
| 633: | 'type' => 'checkbox_single', |
| 634: | 'opts' => array( |
| 635: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 636: | ), |
| 637: | ), |
| 638: | |
| 639: | array( |
| 640: | 'name' => 'property_tennis_court', |
| 641: | 'label' => __( 'Tennis Court', 'easy-property-listings' ), |
| 642: | 'type' => 'checkbox_single', |
| 643: | 'opts' => array( |
| 644: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 645: | ), |
| 646: | ), |
| 647: | ), |
| 648: | ), |
| 649: | |
| 650: | array( |
| 651: | 'id' => 'heating_cooling', |
| 652: | 'columns' => '3', |
| 653: | 'label' => __( 'Heating & Cooling', 'easy-property-listings' ), |
| 654: | 'fields' => array( |
| 655: | |
| 656: | array( |
| 657: | 'name' => 'property_ducted_cooling', |
| 658: | 'label' => __( 'Ducted Cooling', 'easy-property-listings' ), |
| 659: | 'type' => 'checkbox_single', |
| 660: | 'opts' => array( |
| 661: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 662: | ), |
| 663: | ), |
| 664: | |
| 665: | array( |
| 666: | 'name' => 'property_ducted_heating', |
| 667: | 'label' => __( 'Ducted Heating', 'easy-property-listings' ), |
| 668: | 'type' => 'checkbox_single', |
| 669: | 'opts' => array( |
| 670: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 671: | ), |
| 672: | ), |
| 673: | |
| 674: | array( |
| 675: | 'name' => 'property_evaporative_cooling', |
| 676: | 'label' => __( 'Evaporative Cooling', 'easy-property-listings' ), |
| 677: | 'type' => 'checkbox_single', |
| 678: | 'opts' => array( |
| 679: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 680: | ), |
| 681: | ), |
| 682: | |
| 683: | array( |
| 684: | 'name' => 'property_gas_heating', |
| 685: | 'label' => __( 'Gas Heating', 'easy-property-listings' ), |
| 686: | 'type' => 'checkbox_single', |
| 687: | 'opts' => array( |
| 688: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 689: | ), |
| 690: | ), |
| 691: | |
| 692: | array( |
| 693: | 'name' => 'property_hydronic_heating', |
| 694: | 'label' => __( 'Hydronic Heating', 'easy-property-listings' ), |
| 695: | 'type' => 'checkbox_single', |
| 696: | 'opts' => array( |
| 697: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 698: | ), |
| 699: | ), |
| 700: | |
| 701: | array( |
| 702: | 'name' => 'property_open_fire_place', |
| 703: | 'label' => __( 'Open Fire Place', 'easy-property-listings' ), |
| 704: | 'type' => 'checkbox_single', |
| 705: | 'opts' => array( |
| 706: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 707: | ), |
| 708: | ), |
| 709: | |
| 710: | array( |
| 711: | 'name' => 'property_reverse_cycle_aircon', |
| 712: | 'label' => __( 'Reverse Cycle Aircon', 'easy-property-listings' ), |
| 713: | 'type' => 'checkbox_single', |
| 714: | 'opts' => array( |
| 715: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 716: | ), |
| 717: | ), |
| 718: | |
| 719: | array( |
| 720: | 'name' => 'property_split_system_aircon', |
| 721: | 'label' => __( 'Split System Aircon', 'easy-property-listings' ), |
| 722: | 'type' => 'checkbox_single', |
| 723: | 'opts' => array( |
| 724: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 725: | ), |
| 726: | ), |
| 727: | |
| 728: | array( |
| 729: | 'name' => 'property_split_system_heating', |
| 730: | 'label' => __( 'Split System Heating', 'easy-property-listings' ), |
| 731: | 'type' => 'checkbox_single', |
| 732: | 'opts' => array( |
| 733: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 734: | ), |
| 735: | ), |
| 736: | ), |
| 737: | ), |
| 738: | ), |
| 739: | ), |
| 740: | |
| 741: | array( |
| 742: | 'id' => 'epl-features-section-id-single-column', |
| 743: | 'label' => __( 'Land Details', 'easy-property-listings' ), |
| 744: | 'post_type' => array( 'land', 'commercial', 'commercial_land', 'business' ), |
| 745: | 'context' => 'normal', |
| 746: | 'priority' => 'default', |
| 747: | 'groups' => array( |
| 748: | array( |
| 749: | 'id' => 'land_details', |
| 750: | 'columns' => '1', |
| 751: | 'label' => '', |
| 752: | 'fields' => array( |
| 753: | array( |
| 754: | 'name' => 'property_land_area', |
| 755: | 'label' => __( 'Land Area', 'easy-property-listings' ), |
| 756: | 'type' => 'decimal', |
| 757: | 'maxlength' => '50', |
| 758: | ), |
| 759: | |
| 760: | array( |
| 761: | 'name' => 'property_land_area_unit', |
| 762: | 'label' => __( 'Land Unit', 'easy-property-listings' ), |
| 763: | 'type' => 'select', |
| 764: | 'opts' => $opts_area_unit, |
| 765: | ), |
| 766: | |
| 767: | array( |
| 768: | 'name' => 'property_building_area', |
| 769: | 'label' => __( 'Building Area', 'easy-property-listings' ), |
| 770: | 'type' => 'decimal', |
| 771: | 'include' => array( 'commercial', 'business' ), |
| 772: | 'maxlength' => '40', |
| 773: | ), |
| 774: | |
| 775: | array( |
| 776: | 'name' => 'property_building_area_unit', |
| 777: | 'label' => __( 'Building Unit', 'easy-property-listings' ), |
| 778: | 'type' => 'select', |
| 779: | 'opts' => $opts_area_unit, |
| 780: | 'include' => array( 'commercial', 'business' ), |
| 781: | ), |
| 782: | |
| 783: | array( |
| 784: | 'name' => 'property_energy_rating', |
| 785: | 'label' => __( 'Energy Rating', 'easy-property-listings' ), |
| 786: | 'type' => 'decimal', |
| 787: | 'maxlength' => '6', |
| 788: | ), |
| 789: | |
| 790: | array( |
| 791: | 'name' => 'property_land_category', |
| 792: | 'label' => __( 'Land Category', 'easy-property-listings' ), |
| 793: | 'type' => 'select', |
| 794: | 'opts' => epl_listing_load_meta_land_category(), |
| 795: | 'include' => array( 'land' ), |
| 796: | ), |
| 797: | |
| 798: | array( |
| 799: | 'name' => 'property_land_fully_fenced', |
| 800: | 'label' => __( 'Fully Fenced', 'easy-property-listings' ), |
| 801: | 'type' => 'checkbox_single', |
| 802: | 'opts' => array( |
| 803: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 804: | ), |
| 805: | 'include' => array( 'land' ), |
| 806: | ), |
| 807: | ), |
| 808: | ), |
| 809: | ), |
| 810: | ), |
| 811: | |
| 812: | array( |
| 813: | 'id' => 'epl-property-address-section-id', |
| 814: | 'label' => __( 'Property Address', 'easy-property-listings' ), |
| 815: | 'post_type' => array( 'property', 'rural', 'rental', 'commercial', 'commercial_land', 'business', 'land', 'contact_listing' ), |
| 816: | 'context' => 'side', |
| 817: | 'priority' => 'core', |
| 818: | 'groups' => array( |
| 819: | apply_filters( |
| 820: | 'epl_listing_meta_address_block', |
| 821: | array( |
| 822: | 'id' => 'address_block', |
| 823: | 'columns' => '1', |
| 824: | 'label' => '', |
| 825: | 'fields' => array( |
| 826: | array( |
| 827: | 'name' => 'property_address_display', |
| 828: | 'label' => __( 'Display Street Address?', 'easy-property-listings' ), |
| 829: | 'type' => 'checkbox_single', |
| 830: | 'opts' => array( |
| 831: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 832: | ), |
| 833: | ), |
| 834: | |
| 835: | array( |
| 836: | 'name' => 'property_address_lot_number', |
| 837: | 'label' => __( 'Lot', 'easy-property-listings' ), |
| 838: | 'type' => 'text', |
| 839: | 'maxlength' => '40', |
| 840: | 'include' => array( 'land', 'commercial_land' ), |
| 841: | ), |
| 842: | |
| 843: | array( |
| 844: | 'name' => 'property_address_sub_number', |
| 845: | 'label' => __( 'Unit', 'easy-property-listings' ), |
| 846: | 'type' => 'text', |
| 847: | 'maxlength' => '40', |
| 848: | 'exclude' => array( 'land', 'commercial_land' ), |
| 849: | ), |
| 850: | |
| 851: | array( |
| 852: | 'name' => 'property_address_street_number', |
| 853: | 'label' => __( 'Street Number', 'easy-property-listings' ), |
| 854: | 'type' => 'text', |
| 855: | 'maxlength' => '40', |
| 856: | ), |
| 857: | |
| 858: | array( |
| 859: | 'name' => 'property_address_street', |
| 860: | 'label' => __( 'Street Name', 'easy-property-listings' ), |
| 861: | 'type' => 'text', |
| 862: | 'maxlength' => '80', |
| 863: | ), |
| 864: | |
| 865: | array( |
| 866: | 'name' => 'property_address_suburb', |
| 867: | 'label' => epl_labels( 'label_suburb' ), |
| 868: | 'type' => 'text', |
| 869: | 'maxlength' => '80', |
| 870: | ), |
| 871: | |
| 872: | array( |
| 873: | 'name' => 'property_com_display_suburb', |
| 874: | 'label' => __( 'Display', 'easy-property-listings' ) . ' ' . epl_labels( 'label_suburb' ), |
| 875: | 'type' => 'checkbox_single', |
| 876: | 'opts' => array( |
| 877: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 878: | ), |
| 879: | 'include' => array( 'commercial', 'commercial_land', 'business' ), |
| 880: | ), |
| 881: | |
| 882: | 'yes' === epl_get_option( 'epl_enable_city_field', 'no' ) ? |
| 883: | array( |
| 884: | 'name' => 'property_address_city', |
| 885: | 'label' => epl_labels( 'label_city' ), |
| 886: | 'type' => 'text', |
| 887: | 'maxlength' => '80', |
| 888: | ) : array(), |
| 889: | |
| 890: | array( |
| 891: | 'name' => 'property_address_state', |
| 892: | 'label' => epl_labels( 'label_state' ), |
| 893: | 'type' => 'text', |
| 894: | 'maxlength' => '80', |
| 895: | ), |
| 896: | |
| 897: | array( |
| 898: | 'name' => 'property_address_postal_code', |
| 899: | 'label' => epl_labels( 'label_postcode' ), |
| 900: | 'type' => 'text', |
| 901: | 'maxlength' => '30', |
| 902: | ), |
| 903: | |
| 904: | array( |
| 905: | 'name' => 'property_address_country', |
| 906: | 'label' => __( 'Country', 'easy-property-listings' ), |
| 907: | 'type' => 'text', |
| 908: | 'maxlength' => '40', |
| 909: | ), |
| 910: | |
| 911: | array( |
| 912: | 'name' => 'property_address_coordinates', |
| 913: | 'label' => __( 'Coordinates', 'easy-property-listings' ), |
| 914: | 'type' => 'text', |
| 915: | 'help' => __( 'Drag the pin to manually set listing coordinates', 'easy-property-listings' ), |
| 916: | 'geocoder' => 'true', |
| 917: | 'maxlength' => '40', |
| 918: | ), |
| 919: | array( |
| 920: | 'name' => 'property_address_hide_map', |
| 921: | 'label' => __( 'Hide Map', 'easy-property-listings' ), |
| 922: | 'type' => 'checkbox_single', |
| 923: | 'opts' => array( |
| 924: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 925: | ), |
| 926: | ), |
| 927: | ), |
| 928: | ) |
| 929: | ), |
| 930: | ), |
| 931: | ), |
| 932: | |
| 933: | array( |
| 934: | 'id' => 'epl-pricing-section-id', |
| 935: | 'label' => __( 'Pricing', 'easy-property-listings' ), |
| 936: | 'post_type' => array( 'property', 'rural', 'commercial', 'commercial_land', 'business', 'land' ), |
| 937: | 'context' => 'side', |
| 938: | 'priority' => 'core', |
| 939: | 'groups' => array( |
| 940: | array( |
| 941: | 'id' => 'pricing', |
| 942: | 'columns' => '1', |
| 943: | 'label' => '', |
| 944: | 'fields' => array( |
| 945: | |
| 946: | array( |
| 947: | 'name' => 'property_price_global', |
| 948: | 'label' => __( 'Global Price', 'easy-property-listings' ), |
| 949: | 'type' => 'hidden', |
| 950: | 'maxlength' => '50', |
| 951: | ), |
| 952: | |
| 953: | array( |
| 954: | 'name' => 'property_price_currency', |
| 955: | 'label' => __( 'Currency', 'easy-property-listings' ), |
| 956: | 'type' => 'hidden', |
| 957: | 'maxlength' => '10', |
| 958: | ), |
| 959: | |
| 960: | array( |
| 961: | 'name' => 'property_price', |
| 962: | 'label' => __( 'Search Price', 'easy-property-listings' ), |
| 963: | 'type' => apply_filters( 'epl_price_number_format', 'decimal' ), |
| 964: | 'maxlength' => '50', |
| 965: | ), |
| 966: | |
| 967: | array( |
| 968: | 'name' => 'property_price_view', |
| 969: | 'label' => __( 'Price Text', 'easy-property-listings' ), |
| 970: | 'type' => 'text', |
| 971: | 'maxlength' => '50', |
| 972: | ), |
| 973: | |
| 974: | array( |
| 975: | 'name' => 'property_auction', |
| 976: | 'label' => __( 'Auction Date', 'easy-property-listings' ), |
| 977: | 'type' => 'auction-date', |
| 978: | 'maxlength' => '100', |
| 979: | 'autocomplete' => 'off', |
| 980: | ), |
| 981: | |
| 982: | array( |
| 983: | 'name' => 'property_price_display', |
| 984: | 'label' => __( 'Display Price?', 'easy-property-listings' ), |
| 985: | 'type' => 'checkbox_single', |
| 986: | 'opts' => array( |
| 987: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 988: | ), |
| 989: | ), |
| 990: | |
| 991: | array( |
| 992: | 'name' => 'property_under_offer', |
| 993: | 'label' => epl_meta_under_offer_label(), |
| 994: | 'type' => 'checkbox_single', |
| 995: | 'opts' => array( |
| 996: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 997: | ), |
| 998: | ), |
| 999: | |
| 1000: | array( |
| 1001: | 'name' => 'property_is_home_land_package', |
| 1002: | 'label' => __( 'House and Land Package', 'easy-property-listings' ), |
| 1003: | 'type' => 'checkbox_single', |
| 1004: | 'opts' => array( |
| 1005: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 1006: | ), |
| 1007: | 'exclude' => array( 'land', 'rural', 'commercial', 'commercial_land', 'business' ), |
| 1008: | ), |
| 1009: | ), |
| 1010: | ), |
| 1011: | |
| 1012: | array( |
| 1013: | 'id' => 'sale_details', |
| 1014: | 'columns' => '1', |
| 1015: | 'label' => __( 'Sale Details', 'easy-property-listings' ), |
| 1016: | 'fields' => array( |
| 1017: | array( |
| 1018: | 'name' => 'property_sold_price', |
| 1019: | 'label' => __( 'Sale Price', 'easy-property-listings' ), |
| 1020: | 'type' => apply_filters( 'epl_price_number_format', 'decimal' ), |
| 1021: | 'maxlength' => '50', |
| 1022: | ), |
| 1023: | |
| 1024: | array( |
| 1025: | 'name' => 'property_sold_date', |
| 1026: | 'label' => __( 'Sale Date', 'easy-property-listings' ), |
| 1027: | 'type' => 'sold-date', |
| 1028: | 'maxlength' => '100', |
| 1029: | 'autocomplete' => 'off', |
| 1030: | ), |
| 1031: | |
| 1032: | array( |
| 1033: | 'name' => 'property_sold_price_display', |
| 1034: | 'label' => __( 'Display Sale Price', 'easy-property-listings' ), |
| 1035: | 'type' => 'checkbox_single', |
| 1036: | 'opts' => array( |
| 1037: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 1038: | ), |
| 1039: | ), |
| 1040: | ), |
| 1041: | ), |
| 1042: | ), |
| 1043: | ), |
| 1044: | |
| 1045: | array( |
| 1046: | 'id' => 'epl-property-rent-id', |
| 1047: | 'label' => __( 'Rental Pricing', 'easy-property-listings' ), |
| 1048: | 'post_type' => array( 'rental' ), |
| 1049: | 'context' => 'side', |
| 1050: | 'priority' => 'core', |
| 1051: | 'groups' => array( |
| 1052: | array( |
| 1053: | 'id' => 'rental_pricing', |
| 1054: | 'columns' => '1', |
| 1055: | 'label' => '', |
| 1056: | 'fields' => array( |
| 1057: | |
| 1058: | array( |
| 1059: | 'name' => 'property_price_global', |
| 1060: | 'label' => __( 'Global Price', 'easy-property-listings' ), |
| 1061: | 'type' => 'hidden', |
| 1062: | 'maxlength' => '50', |
| 1063: | ), |
| 1064: | |
| 1065: | array( |
| 1066: | 'name' => 'property_rent_currency', |
| 1067: | 'label' => __( 'Currency', 'easy-property-listings' ), |
| 1068: | 'type' => 'hidden', |
| 1069: | 'maxlength' => '10', |
| 1070: | ), |
| 1071: | |
| 1072: | array( |
| 1073: | 'name' => 'property_rent', |
| 1074: | 'label' => __( 'Rent Amount', 'easy-property-listings' ), |
| 1075: | 'type' => apply_filters( 'epl_price_number_format', 'decimal' ), |
| 1076: | 'maxlength' => '40', |
| 1077: | ), |
| 1078: | |
| 1079: | array( |
| 1080: | 'name' => 'property_rent_period', |
| 1081: | 'label' => __( 'Rent Period', 'easy-property-listings' ), |
| 1082: | 'type' => 'select', |
| 1083: | 'opts' => $opts_rent_period, |
| 1084: | ), |
| 1085: | |
| 1086: | array( |
| 1087: | 'name' => 'property_rent_view', |
| 1088: | 'label' => __( 'Rent Text', 'easy-property-listings' ), |
| 1089: | 'type' => 'text', |
| 1090: | 'maxlength' => '50', |
| 1091: | ), |
| 1092: | |
| 1093: | array( |
| 1094: | 'name' => 'property_rent_display', |
| 1095: | 'label' => __( 'Display Rent?', 'easy-property-listings' ), |
| 1096: | 'type' => 'checkbox_single', |
| 1097: | 'opts' => array( |
| 1098: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 1099: | ), |
| 1100: | ), |
| 1101: | |
| 1102: | array( |
| 1103: | 'name' => 'property_bond', |
| 1104: | 'label' => epl_labels( 'label_bond' ), |
| 1105: | 'type' => apply_filters( 'epl_bond_number_format', 'decimal' ), |
| 1106: | 'maxlength' => '40', |
| 1107: | ), |
| 1108: | |
| 1109: | array( |
| 1110: | 'name' => 'property_date_available', |
| 1111: | 'label' => __( 'Date Available', 'easy-property-listings' ), |
| 1112: | 'type' => 'date', |
| 1113: | 'maxlength' => '100', |
| 1114: | 'autocomplete' => 'off', |
| 1115: | ), |
| 1116: | |
| 1117: | array( |
| 1118: | 'name' => 'property_date_leased', |
| 1119: | 'label' => __( 'Leased Date', 'easy-property-listings' ), |
| 1120: | 'type' => 'date', |
| 1121: | 'maxlength' => '100', |
| 1122: | 'autocomplete' => 'off', |
| 1123: | ), |
| 1124: | |
| 1125: | array( |
| 1126: | 'name' => 'property_furnished', |
| 1127: | 'label' => __( 'Furnished', 'easy-property-listings' ), |
| 1128: | 'type' => 'checkbox_single', |
| 1129: | 'opts' => array( |
| 1130: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 1131: | ), |
| 1132: | ), |
| 1133: | |
| 1134: | array( |
| 1135: | 'name' => 'property_holiday_rental', |
| 1136: | 'label' => __( 'Holiday Rental', 'easy-property-listings' ), |
| 1137: | 'type' => 'checkbox_single', |
| 1138: | 'opts' => array( |
| 1139: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 1140: | ), |
| 1141: | 'exclude' => array( 'rental' ), |
| 1142: | ), |
| 1143: | ), |
| 1144: | ), |
| 1145: | ), |
| 1146: | ), |
| 1147: | |
| 1148: | array( |
| 1149: | 'id' => 'epl-rural-features-id', |
| 1150: | 'label' => __( 'Rural Features', 'easy-property-listings' ), |
| 1151: | 'post_type' => array( 'rural' ), |
| 1152: | 'context' => 'normal', |
| 1153: | 'priority' => 'default', |
| 1154: | 'groups' => array( |
| 1155: | array( |
| 1156: | 'id' => 'rural_features', |
| 1157: | 'columns' => '1', |
| 1158: | 'label' => '', |
| 1159: | 'fields' => array( |
| 1160: | array( |
| 1161: | 'name' => 'property_rural_fencing', |
| 1162: | 'label' => __( 'Fencing', 'easy-property-listings' ), |
| 1163: | 'type' => 'textarea', |
| 1164: | 'maxlength' => '65535', |
| 1165: | ), |
| 1166: | |
| 1167: | array( |
| 1168: | 'name' => 'property_rural_annual_rainfall', |
| 1169: | 'label' => __( 'Annual Rainfall', 'easy-property-listings' ), |
| 1170: | 'type' => 'textarea', |
| 1171: | 'maxlength' => '65535', |
| 1172: | ), |
| 1173: | |
| 1174: | array( |
| 1175: | 'name' => 'property_rural_soil_types', |
| 1176: | 'label' => __( 'Soil Types', 'easy-property-listings' ), |
| 1177: | 'type' => 'textarea', |
| 1178: | 'maxlength' => '65535', |
| 1179: | ), |
| 1180: | |
| 1181: | array( |
| 1182: | 'name' => 'property_rural_improvements', |
| 1183: | 'label' => __( 'Improvements', 'easy-property-listings' ), |
| 1184: | 'type' => 'textarea', |
| 1185: | 'maxlength' => '65535', |
| 1186: | ), |
| 1187: | |
| 1188: | array( |
| 1189: | 'name' => 'property_rural_council_rates', |
| 1190: | 'label' => __( 'Council Rates', 'easy-property-listings' ), |
| 1191: | 'type' => 'textarea', |
| 1192: | 'maxlength' => '65535', |
| 1193: | ), |
| 1194: | |
| 1195: | array( |
| 1196: | 'name' => 'property_rural_irrigation', |
| 1197: | 'label' => __( 'Irrigation', 'easy-property-listings' ), |
| 1198: | 'type' => 'textarea', |
| 1199: | 'maxlength' => '65535', |
| 1200: | ), |
| 1201: | |
| 1202: | array( |
| 1203: | 'name' => 'property_rural_carrying_capacity', |
| 1204: | 'label' => __( 'Carrying Capacity', 'easy-property-listings' ), |
| 1205: | 'type' => 'textarea', |
| 1206: | 'maxlength' => '65535', |
| 1207: | ), |
| 1208: | |
| 1209: | array( |
| 1210: | 'name' => 'property_rural_services', |
| 1211: | 'label' => __( 'Services', 'easy-property-listings' ), |
| 1212: | 'type' => 'textarea', |
| 1213: | 'maxlength' => '65535', |
| 1214: | ), |
| 1215: | ), |
| 1216: | ), |
| 1217: | ), |
| 1218: | ), |
| 1219: | |
| 1220: | array( |
| 1221: | 'id' => 'epl-commercial-leasing-id', |
| 1222: | 'label' => __( 'Leasing', 'easy-property-listings' ), |
| 1223: | 'post_type' => array( 'commercial', 'commercial_land', 'business' ), |
| 1224: | 'context' => 'normal', |
| 1225: | 'priority' => 'default', |
| 1226: | 'groups' => array( |
| 1227: | array( |
| 1228: | 'id' => 'commercial_leasing', |
| 1229: | 'columns' => '2', |
| 1230: | 'label' => '', |
| 1231: | 'fields' => array( |
| 1232: | array( |
| 1233: | 'name' => 'property_com_rent', |
| 1234: | 'label' => __( 'Commercial Rent', 'easy-property-listings' ), |
| 1235: | 'type' => 'decimal', |
| 1236: | 'maxlength' => '40', |
| 1237: | 'help' => __( 'Price Text in Pricing box over-rides displayed price', 'easy-property-listings' ) . '. <br>' . |
| 1238: | __( 'Select Display Price to show.', 'easy-property-listings' ), |
| 1239: | ), |
| 1240: | array( |
| 1241: | 'name' => 'property_com_rent_period', |
| 1242: | 'label' => __( 'Lease Period', 'easy-property-listings' ), |
| 1243: | 'type' => 'select', |
| 1244: | 'opts' => epl_listing_load_meta_commercial_rent_period(), |
| 1245: | ), |
| 1246: | array( |
| 1247: | 'name' => 'property_com_rent_range_min', |
| 1248: | 'label' => __( 'Rent Range Min', 'easy-property-listings' ), |
| 1249: | 'type' => 'number', |
| 1250: | 'maxlength' => '40', |
| 1251: | ), |
| 1252: | |
| 1253: | array( |
| 1254: | 'name' => 'property_com_rent_range_max', |
| 1255: | 'label' => __( 'Rent Range Max', 'easy-property-listings' ), |
| 1256: | 'type' => 'number', |
| 1257: | 'maxlength' => '40', |
| 1258: | ), |
| 1259: | |
| 1260: | array( |
| 1261: | 'name' => 'property_com_lease_end_date', |
| 1262: | 'label' => __( 'Lease End Date', 'easy-property-listings' ), |
| 1263: | 'type' => 'date', |
| 1264: | 'maxlength' => '100', |
| 1265: | 'autocomplete' => 'off', |
| 1266: | ), |
| 1267: | |
| 1268: | array( |
| 1269: | 'name' => 'property_com_property_extent', |
| 1270: | 'label' => __( 'Property Extent', 'easy-property-listings' ), |
| 1271: | 'type' => 'select', |
| 1272: | 'opts' => $opts_property_com_property_extent, |
| 1273: | ), |
| 1274: | ), |
| 1275: | ), |
| 1276: | |
| 1277: | array( |
| 1278: | 'id' => 'tenant_n_outgoings', |
| 1279: | 'columns' => '2', |
| 1280: | 'label' => '', |
| 1281: | 'fields' => array( |
| 1282: | array( |
| 1283: | 'name' => 'property_com_tenancy', |
| 1284: | 'label' => __( 'Tenant Status', 'easy-property-listings' ), |
| 1285: | 'type' => 'select', |
| 1286: | 'opts' => $opts_property_com_tenancy, |
| 1287: | 'include' => array( 'commercial' ), |
| 1288: | ), |
| 1289: | |
| 1290: | array( |
| 1291: | 'name' => 'property_com_outgoings', |
| 1292: | 'label' => __( 'Commercial Outgoings', 'easy-property-listings' ), |
| 1293: | 'type' => 'number', |
| 1294: | 'maxlength' => '40', |
| 1295: | 'exclude' => array( 'business' ), |
| 1296: | ), |
| 1297: | |
| 1298: | array( |
| 1299: | 'name' => 'property_com_plus_outgoings', |
| 1300: | 'label' => __( 'Plus Outgoings', 'easy-property-listings' ), |
| 1301: | 'type' => 'checkbox_single', |
| 1302: | 'opts' => array( |
| 1303: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 1304: | ), |
| 1305: | 'exclude' => array( 'business' ), |
| 1306: | ), |
| 1307: | |
| 1308: | array( |
| 1309: | 'name' => 'property_bus_takings', |
| 1310: | 'label' => __( 'Takings', 'easy-property-listings' ), |
| 1311: | 'type' => 'number', |
| 1312: | 'maxlength' => '40', |
| 1313: | 'include' => array( 'business' ), |
| 1314: | ), |
| 1315: | |
| 1316: | array( |
| 1317: | 'name' => 'property_bus_franchise', |
| 1318: | 'label' => __( 'Franchise', 'easy-property-listings' ), |
| 1319: | 'type' => 'checkbox_single', |
| 1320: | 'opts' => array( |
| 1321: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 1322: | ), |
| 1323: | 'include' => array( 'business' ), |
| 1324: | ), |
| 1325: | |
| 1326: | array( |
| 1327: | 'name' => 'property_com_return', |
| 1328: | 'label' => __( 'Return', 'easy-property-listings' ), |
| 1329: | 'type' => 'decimal', |
| 1330: | 'maxlength' => '6', |
| 1331: | ), |
| 1332: | |
| 1333: | array( |
| 1334: | 'name' => 'property_bus_terms', |
| 1335: | 'label' => __( 'Terms', 'easy-property-listings' ), |
| 1336: | 'type' => 'textarea', |
| 1337: | ), |
| 1338: | ), |
| 1339: | ), |
| 1340: | ), |
| 1341: | ), |
| 1342: | |
| 1343: | array( |
| 1344: | 'id' => 'epl-commercial-features-id', |
| 1345: | 'label' => __( 'Commercial Features', 'easy-property-listings' ), |
| 1346: | 'post_type' => array( 'commercial' ), |
| 1347: | 'context' => 'normal', |
| 1348: | 'priority' => 'default', |
| 1349: | 'groups' => array( |
| 1350: | array( |
| 1351: | 'id' => 'commercial_features', |
| 1352: | 'columns' => '1', |
| 1353: | 'label' => '', |
| 1354: | 'fields' => array( |
| 1355: | array( |
| 1356: | 'name' => 'property_com_further_options', |
| 1357: | 'label' => __( 'Further Options', 'easy-property-listings' ), |
| 1358: | 'type' => 'textarea', |
| 1359: | 'maxlength' => '65535', |
| 1360: | ), |
| 1361: | |
| 1362: | array( |
| 1363: | 'name' => 'property_com_zone', |
| 1364: | 'label' => __( 'Zone', 'easy-property-listings' ), |
| 1365: | 'type' => 'textarea', |
| 1366: | 'maxlength' => '150', |
| 1367: | ), |
| 1368: | |
| 1369: | array( |
| 1370: | 'name' => 'property_com_car_spaces', |
| 1371: | 'label' => __( 'Car Spaces', 'easy-property-listings' ), |
| 1372: | 'type' => 'textarea', |
| 1373: | 'maxlength' => '5', |
| 1374: | ), |
| 1375: | |
| 1376: | array( |
| 1377: | 'name' => 'property_com_highlight_1', |
| 1378: | 'label' => __( 'Highlight 1', 'easy-property-listings' ), |
| 1379: | 'type' => 'text', |
| 1380: | 'maxlength' => '40', |
| 1381: | ), |
| 1382: | |
| 1383: | array( |
| 1384: | 'name' => 'property_com_highlight_2', |
| 1385: | 'label' => __( 'Highlight 2', 'easy-property-listings' ), |
| 1386: | 'type' => 'text', |
| 1387: | 'maxlength' => '40', |
| 1388: | ), |
| 1389: | |
| 1390: | array( |
| 1391: | 'name' => 'property_com_highlight_3', |
| 1392: | 'label' => __( 'Highlight 3', 'easy-property-listings' ), |
| 1393: | 'type' => 'text', |
| 1394: | 'maxlength' => '40', |
| 1395: | ), |
| 1396: | |
| 1397: | array( |
| 1398: | 'name' => 'property_com_parking_comments', |
| 1399: | 'label' => __( 'Parking Comments', 'easy-property-listings' ), |
| 1400: | 'type' => 'text', |
| 1401: | 'maxlength' => '150', |
| 1402: | ), |
| 1403: | |
| 1404: | array( |
| 1405: | 'name' => 'property_com_is_multiple', |
| 1406: | 'label' => __( 'Is Multiple', 'easy-property-listings' ), |
| 1407: | 'type' => 'checkbox_single', |
| 1408: | 'opts' => array( |
| 1409: | 'yes' => __( 'Yes', 'easy-property-listings' ), |
| 1410: | ), |
| 1411: | ), |
| 1412: | ), |
| 1413: | ), |
| 1414: | ), |
| 1415: | ), |
| 1416: | |
| 1417: | array( |
| 1418: | 'id' => 'epl-attachments-section-id', |
| 1419: | 'label' => __( 'Files and Links', 'easy-property-listings' ), |
| 1420: | 'post_type' => array( 'property', 'rural', 'commercial', 'commercial_land', 'business', 'rental', 'land' ), |
| 1421: | 'context' => 'normal', |
| 1422: | 'priority' => 'default', |
| 1423: | 'groups' => array( |
| 1424: | array( |
| 1425: | 'id' => 'files_n_links', |
| 1426: | 'columns' => '2', |
| 1427: | 'label' => '', |
| 1428: | 'fields' => array( |
| 1429: | array( |
| 1430: | 'name' => 'property_video_url', |
| 1431: | 'label' => __( 'Video URL', 'easy-property-listings' ), |
| 1432: | 'type' => 'url', |
| 1433: | ), |
| 1434: | |
| 1435: | array( |
| 1436: | 'name' => 'property_external_link', |
| 1437: | 'label' => __( 'External Link', 'easy-property-listings' ), |
| 1438: | 'type' => 'url', |
| 1439: | 'width' => '2-3', |
| 1440: | ), |
| 1441: | |
| 1442: | array( |
| 1443: | 'name' => 'property_external_link_label', |
| 1444: | 'label' => __( 'Title', 'easy-property-listings' ), |
| 1445: | 'type' => 'text', |
| 1446: | 'maxlength' => '40', |
| 1447: | 'width' => '3', |
| 1448: | ), |
| 1449: | |
| 1450: | array( |
| 1451: | 'name' => 'property_external_link_2', |
| 1452: | 'label' => __( 'External Link 2', 'easy-property-listings' ), |
| 1453: | 'type' => 'url', |
| 1454: | 'width' => '2-3', |
| 1455: | ), |
| 1456: | |
| 1457: | array( |
| 1458: | 'name' => 'property_external_link_2_label', |
| 1459: | 'label' => __( 'Title', 'easy-property-listings' ), |
| 1460: | 'type' => 'text', |
| 1461: | 'maxlength' => '40', |
| 1462: | 'width' => '3', |
| 1463: | ), |
| 1464: | |
| 1465: | array( |
| 1466: | 'name' => 'property_external_link_3', |
| 1467: | 'label' => __( 'External Link 3', 'easy-property-listings' ), |
| 1468: | 'type' => 'url', |
| 1469: | 'width' => '2-3', |
| 1470: | ), |
| 1471: | |
| 1472: | array( |
| 1473: | 'name' => 'property_external_link_3_label', |
| 1474: | 'label' => __( 'Title', 'easy-property-listings' ), |
| 1475: | 'type' => 'text', |
| 1476: | 'maxlength' => '40', |
| 1477: | 'width' => '3', |
| 1478: | ), |
| 1479: | |
| 1480: | array( |
| 1481: | 'name' => 'property_com_mini_web', |
| 1482: | 'label' => __( 'Mini Website URL', 'easy-property-listings' ), |
| 1483: | 'type' => 'url', |
| 1484: | ), |
| 1485: | |
| 1486: | array( |
| 1487: | 'name' => 'property_com_mini_web_2', |
| 1488: | 'label' => __( 'Mini Website URL 2', 'easy-property-listings' ), |
| 1489: | 'type' => 'url', |
| 1490: | ), |
| 1491: | |
| 1492: | array( |
| 1493: | 'name' => 'property_com_mini_web_3', |
| 1494: | 'label' => __( 'Mini Website URL 3', 'easy-property-listings' ), |
| 1495: | 'type' => 'url', |
| 1496: | 'include' => array( 'commercial', 'business', 'commercial_land' ), |
| 1497: | ), |
| 1498: | ), |
| 1499: | ), |
| 1500: | |
| 1501: | array( |
| 1502: | 'id' => 'files_n_links_2', |
| 1503: | 'columns' => '2', |
| 1504: | 'label' => '', |
| 1505: | 'fields' => array( |
| 1506: | |
| 1507: | array( |
| 1508: | 'name' => 'property_floorplan', |
| 1509: | 'label' => __( 'Floor plan', 'easy-property-listings' ), |
| 1510: | 'type' => 'file', |
| 1511: | 'width' => '2-3', |
| 1512: | ), |
| 1513: | |
| 1514: | array( |
| 1515: | 'name' => 'property_floorplan_label', |
| 1516: | 'label' => __( 'Title', 'easy-property-listings' ), |
| 1517: | 'type' => 'text', |
| 1518: | 'maxlength' => '40', |
| 1519: | 'width' => '3', |
| 1520: | ), |
| 1521: | |
| 1522: | array( |
| 1523: | 'name' => 'property_floorplan_2', |
| 1524: | 'label' => __( 'Floor plan 2', 'easy-property-listings' ), |
| 1525: | 'type' => 'file', |
| 1526: | 'width' => '2-3', |
| 1527: | ), |
| 1528: | |
| 1529: | array( |
| 1530: | 'name' => 'property_floorplan_2_label', |
| 1531: | 'label' => __( 'Title', 'easy-property-listings' ), |
| 1532: | 'type' => 'text', |
| 1533: | 'maxlength' => '40', |
| 1534: | 'width' => '3', |
| 1535: | ), |
| 1536: | |
| 1537: | array( |
| 1538: | 'name' => 'property_energy_certificate', |
| 1539: | 'label' => __( 'Energy Certificate', 'easy-property-listings' ), |
| 1540: | 'type' => 'file', |
| 1541: | 'width' => '2-3', |
| 1542: | 'exclude' => array( 'land', 'commercial_land' ), |
| 1543: | ), |
| 1544: | |
| 1545: | array( |
| 1546: | 'name' => 'property_energy_certificate_label', |
| 1547: | 'label' => __( 'Title', 'easy-property-listings' ), |
| 1548: | 'type' => 'text', |
| 1549: | 'maxlength' => '40', |
| 1550: | 'width' => '3', |
| 1551: | 'exclude' => array( 'land', 'commercial_land' ), |
| 1552: | ), |
| 1553: | ), |
| 1554: | ), |
| 1555: | ), |
| 1556: | ), |
| 1557: | |
| 1558: | array( |
| 1559: | 'id' => 'epl-owner-listings-section-id', |
| 1560: | 'label' => __( 'Linked Contact', 'easy-property-listings' ), |
| 1561: | 'post_type' => array( 'property', 'rural', 'commercial', 'commercial_land', 'business', 'rental', 'land' ), |
| 1562: | 'context' => 'side', |
| 1563: | 'priority' => 'default', |
| 1564: | 'groups' => array( |
| 1565: | array( |
| 1566: | 'id' => 'owner_details', |
| 1567: | 'columns' => '1', |
| 1568: | 'label' => '', |
| 1569: | 'fields' => array( |
| 1570: | array( |
| 1571: | 'name' => 'property_owner', |
| 1572: | 'label' => __( 'Contact ID', 'easy-property-listings' ), |
| 1573: | 'type' => 'text', |
| 1574: | 'help' => __( 'Search for contact and update to save.', 'easy-property-listings' ), |
| 1575: | 'import' => 'preserve', |
| 1576: | ), |
| 1577: | ), |
| 1578: | ), |
| 1579: | ), |
| 1580: | ), |
| 1581: | ); |
| 1582: | |
| 1583: | if ( ! empty( $epl_meta_boxes ) ) { |
| 1584: | |
| 1585: | foreach ( $epl_meta_boxes as $box_index => &$epl_meta_box ) { |
| 1586: | $meta_box_block_id = str_replace( '-', '_', $epl_meta_box['id'] ); |
| 1587: | $epl_meta_box = apply_filters( 'epl_meta_box_block_' . $meta_box_block_id, $epl_meta_box ); |
| 1588: | if ( ! empty( $epl_meta_box['groups'] ) ) { |
| 1589: | foreach ( $epl_meta_box['groups'] as &$group ) { |
| 1590: | $group = apply_filters( 'epl_meta_groups_' . $group['id'], $group ); |
| 1591: | if ( ! empty( $group['fields'] ) ) { |
| 1592: | $group['fields'] = array_filter( $group['fields'] ); |
| 1593: | foreach ( $group['fields'] as &$fieldvalue ) { |
| 1594: | |
| 1595: | $fieldvalue = apply_filters( 'epl_meta_' . $fieldvalue['name'], $fieldvalue ); |
| 1596: | } |
| 1597: | } |
| 1598: | } |
| 1599: | } else { |
| 1600: | unset( $epl_meta_boxes[ $box_index ] ); |
| 1601: | } |
| 1602: | } |
| 1603: | } |
| 1604: | |
| 1605: | return apply_filters( 'epl_listing_meta_boxes', $epl_meta_boxes ); |
| 1606: | } |
| 1607: | |
| 1608: | |
| 1609: | |
| 1610: | |
| 1611: | |
| 1612: | |
| 1613: | |
| 1614: | function epl_get_meta_field_labels() { |
| 1615: | |
| 1616: | global $epl_meta_boxes; |
| 1617: | global $epl_meta_labels; |
| 1618: | |
| 1619: | if ( is_null( $epl_meta_boxes ) || empty( $epl_meta_boxes ) ) { |
| 1620: | |
| 1621: | $epl_meta_boxes = epl_get_meta_boxes(); |
| 1622: | } |
| 1623: | |
| 1624: | foreach ( $epl_meta_boxes as &$epl_meta_box ) { |
| 1625: | |
| 1626: | if ( ! empty( $epl_meta_box['groups'] ) ) { |
| 1627: | foreach ( $epl_meta_box['groups'] as &$group ) { |
| 1628: | if ( ! empty( $group['fields'] ) ) { |
| 1629: | $group['fields'] = array_filter( $group['fields'] ); |
| 1630: | foreach ( $group['fields'] as &$field ) { |
| 1631: | |
| 1632: | $epl_meta_labels[ $field['name'] ] = $field['label']; |
| 1633: | } |
| 1634: | } |
| 1635: | } |
| 1636: | } |
| 1637: | } |
| 1638: | |
| 1639: | return apply_filters( 'epl_meta_labels', $epl_meta_labels ); |
| 1640: | } |
| 1641: | |
| 1642: | |
| 1643: | |
| 1644: | |
| 1645: | |
| 1646: | |
| 1647: | |
| 1648: | |
| 1649: | |
| 1650: | function epl_get_meta_field_label( $key = '' ) { |
| 1651: | |
| 1652: | if ( empty( $key ) ) { |
| 1653: | return; |
| 1654: | } |
| 1655: | |
| 1656: | global $epl_meta_labels; |
| 1657: | |
| 1658: | if ( is_null( $epl_meta_labels ) || empty( $epl_meta_labels ) ) { |
| 1659: | |
| 1660: | $epl_meta_labels = epl_get_meta_field_labels(); |
| 1661: | } |
| 1662: | |
| 1663: | $label = isset( $epl_meta_labels[ $key ] ) ? $epl_meta_labels[ $key ] : ''; |
| 1664: | |
| 1665: | $filter_prefix = 'epl_front_meta_label_'; |
| 1666: | |
| 1667: | if ( is_admin() && ! wp_doing_ajax() ) { |
| 1668: | $filter_prefix = 'epl_admin_meta_label_'; |
| 1669: | } |
| 1670: | |
| 1671: | return apply_filters( $filter_prefix . $key, $label ); |
| 1672: | } |
| 1673: | |