Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets.corals.io/wp-content/plugins/co-authors-plus/php/integrations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets.corals.io/wp-content/plugins/co-authors-plus/php/integrations/amp.php
<?php

add_action( 'pre_amp_render_post', 'cap_add_amp_actions' );
function cap_add_amp_actions() {
	add_filter( 'amp_post_template_metadata', 'cap_update_amp_json_metadata', 10, 2 );
	add_filter( 'amp_post_template_file', 'cap_set_amp_author_meta_template', 10, 3 );
}

function cap_update_amp_json_metadata( $metadata, $post ) {
	$authors = get_coauthors( $post->ID );

	$authors_json = array();
	foreach ( $authors as $author ) {
		$authors_json[] = array(
			'@type' => 'Person',
			'name'  => $author->display_name,
		);
	}
	$metadata['author'] = $authors_json;

	return $metadata;
}

function cap_set_amp_author_meta_template( $file, $type, $post ) {
	if ( 'meta-author' === $type ) {
		$file = dirname( __FILE__ ) . '/amp/meta-author.php';
	}
	return $file;
}

Spamworldpro Mini