# speechkit/4.2.4/src/Component/Post/Sidebar/Sidebar.php

BeyondWords – AI audio for publishers, version 4.2.4. 55 lines.

- Page: https://pluginprobe.com/plugins/speechkit/4.2.4/code/src/Component/Post/Sidebar/Sidebar.php
- Raw: https://pluginprobe.com/plugins/speechkit/4.2.4/raw/src/Component/Post/Sidebar/Sidebar.php
- Modified: 2023-11-15T21:11:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/speechkit/4.2.4/code/src/Component/Post/Sidebar/Sidebar.php#L10-L20`.

```php
<?php

declare(strict_types=1);

/**
 * BeyondWords Post Inspect Panel.
 *
 * Text Domain: beyondwords
 *
 * @package Beyondwords\Wordpress
 * @author  Stuart McAlpine <stu@beyondwords.io>
 * @since   3.0.0
 */

namespace Beyondwords\Wordpress\Component\Post\Sidebar;

use Beyondwords\Wordpress\Component\Settings\PostTypes\PostTypes;
use Beyondwords\Wordpress\Component\Settings\SettingsUtils;
use Beyondwords\Wordpress\Core\CoreUtils;

/**
 * Sidebar setup
 *
 * @since 3.0.0
 */
class Sidebar
{
    /**
     * Constructor
     */
    public function __construct()
    {
        add_action('enqueue_block_assets', array($this, 'enqueueBlockAssets'));
    }

    public function enqueueBlockAssets()
    {
        if (CoreUtils::isGutenbergPage()) {
            $postType = get_post_type();

            $postTypes = SettingsUtils::getSupportedPostTypes();

            if (in_array($postType, $postTypes)) {
                // Register the Block Editor "Sidebar" CSS
                wp_enqueue_style(
                    'beyondwords-Sidebar',
                    BEYONDWORDS__PLUGIN_URI . 'src/Component/Post/Sidebar/PostSidebar.css',
                    array(),
                    BEYONDWORDS__PLUGIN_VERSION
                );
            }
        }
    }
}

```
