芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/ycreate.jp/wp-content/plugins/snow-monkey-blocks/App/Model/JsonLd.php
data[ $type ][] = $data; } /** * Generate JSON-LD. * * @return array */ public static function generate() { $data = static::$singleton->data; $newdata = array(); foreach ( $data as $type => $dataset ) { $newdata[ $type ]['@context'] = 'https://schema.org'; $newdata[ $type ]['@type'] = $type; foreach ( $dataset as $value ) { if ( ! $value ) { continue; } $newdata[ $type ] = array_merge_recursive( $newdata[ $type ], $value ); } } return $newdata; } /** * Output JSON-LD. */ public static function output() { $data = static::generate(); foreach ( $data as $dataset ) { ?>