Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : Post.php
<?php
namespace AIOSEO\Plugin\Addon\LocalBusiness\Models;

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class Post
 *
 * @since 1.1.3
 */
class Post {
	/**
	 * Returns a JSON object with default local seo options.
	 *
	 * @since 1.1.3
	 *
	 * @param  string $existingOptions The existing options in JSON.
	 * @return string                  The existing options with defaults added in JSON.
	 */
	public static function parseLocalSeoOptions( $existingOptions = '' ) {
		$defaults = [
			'locations'    => [
				'business' => [
					'name'         => '',
					'businessType' => '',
					'image'        => '',
					'areaServed'   => '',
					'urls'         => [
						'website'     => '',
						'aboutPage'   => '',
						'contactPage' => ''
					],
					'address'      => [
						'streetLine1'   => '',
						'streetLine2'   => '',
						'zipCode'       => '',
						'city'          => '',
						'state'         => '',
						'country'       => '',
						'addressFormat' => "#streetLineOne\n#streetLineTwo\n#city, #state #zipCode"
					],
					'contact'      => [
						'email'          => '',
						'phone'          => '',
						'phoneFormatted' => '',
						'fax'            => '',
						'faxFormatted'   => ''
					],
					'ids'          => [
						'vat'               => '',
						'tax'               => '',
						'chamberOfCommerce' => ''
					],
					'payment'      => [
						'priceRange'         => '',
						'currenciesAccepted' => '',
						'methods'            => ''
					],
				],
			],
			'openingHours' => [
				'useDefaults'  => true,
				'show'         => true,
				'alwaysOpen'   => false,
				'use24hFormat' => false,
				'timezone'     => '',
				'labels'       => [
					'closed'     => '',
					'alwaysOpen' => ''
				],
				'days'         => [
					'monday'    => [
						'open24h'   => false,
						'closed'    => false,
						'openTime'  => '09:00',
						'closeTime' => '17:00'
					],
					'tuesday'   => [
						'open24h'   => false,
						'closed'    => false,
						'openTime'  => '09:00',
						'closeTime' => '17:00'
					],
					'wednesday' => [
						'open24h'   => false,
						'closed'    => false,
						'openTime'  => '09:00',
						'closeTime' => '17:00'
					],
					'thursday'  => [
						'open24h'   => false,
						'closed'    => false,
						'openTime'  => '09:00',
						'closeTime' => '17:00'
					],
					'friday'    => [
						'open24h'   => false,
						'closed'    => false,
						'openTime'  => '09:00',
						'closeTime' => '17:00'
					],
					'saturday'  => [
						'open24h'   => false,
						'closed'    => false,
						'openTime'  => '09:00',
						'closeTime' => '17:00'
					],
					'sunday'    => [
						'open24h'   => false,
						'closed'    => false,
						'openTime'  => '09:00',
						'closeTime' => '17:00'
					]
				]
			],
			'maps'         => [
				'mapOptions'   => [
					'center'    => [
						'lat' => 47.6205063, // Space Needle, Seattle - WA
						'lng' => - 122.3492774
					],
					'zoom'      => 16,
					'mapTypeId' => 'roadmap'
				],
				'customMarker' => '',
				'placeId'      => ''
			]
		];

		if ( empty( $existingOptions ) ) {
			return $defaults;
		}

		if ( ! aioseo()->helpers->isJsonString( $existingOptions ) ) {
			$existingOptions = wp_json_encode( $existingOptions );
		}

		// Decode as an array to merge with the defaults.
		$existingOptions = json_decode( $existingOptions, true );

		return array_replace_recursive( $defaults, $existingOptions );
	}
}
© 2026 GrazzMean-Shell