PHP code example of upstatement / ups-editorial-wp-plugin

1. Go to this page and download the library: Download upstatement/ups-editorial-wp-plugin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

upstatement / ups-editorial-wp-plugin example snippets



/**
 * Configuration for the ups-editorial plugin.
 */

return array(
  'author_panel'         => true,
  'article_topper_panel' => true,
  'attachment_credit'    => true,
  'extended_blocks'      => array(
		'cover',
		'file',
		'gallery',
		'image-layout',
		'related-articles',
		'table',
		'video',
	),
  'enable_block_styles'  => array(),
);

array(
  'cover',
  'file',
  'gallery',
  'image-layout',
  'related-articles',
  'table',
  'video',
)

if ( function_exists( 'Upstatement\Editorial\get_post_authors' ) ) {
  $authors = \Upstatement\Editorial\get_post_authors();
  ...

get_post_authors( WP_Post $post = null, string $field = null) : array | null

get_post_overline( WP_Post $post = null ) : WP_Term | null
html
Block validation: Block validation failed for `ups/image` Content generated by `save` function:

<figure class="wp-block-image">
  <img src="/good-image.png" alt="A good image" />
  <figcaption>This is the caption</figcaption>
  <cite>This is a new citation</cite>
</figure>

Content retrieved from post body:

<figure class="wp-block-image">
  <img src="/good-image.png" alt="A good image" />
  <figcaption>This is the caption</figcaption>
</figure>