# extendify/3.2.1/app/SiteVisibility.php

Extendify, version 3.2.1. 56 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.2.1/code/app/SiteVisibility.php
- Raw: https://pluginprobe.com/plugins/extendify/3.2.1/raw/app/SiteVisibility.php
- Modified: 2026-09-16T19:34: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/extendify/3.2.1/code/app/SiteVisibility.php#L10-L20`.

```php
<?php

/**
 * Controls whether the site is publicly visible
 */

namespace Extendify;

defined('ABSPATH') || die('No direct access.');

/**
 * This class reads and writes the site's public visibility.
 */

class SiteVisibility
{
    /**
     * The option holding the visibility state
     *
     * @var string
     */
    // phpcs:ignore PSR12.Properties.ConstantVisibility.NotFound -- 7.0 floor: no const visibility
    const OPTION = 'extendify_site_visibility';

    /**
     * Whether the site is visible to anonymous visitors.
     *
     * @return boolean
     */
    public static function isPublished()
    {
        // A site with no marker predates the partner flag, so it stays public.
        return \get_option(self::OPTION) !== 'unpublished';
    }

    /**
     * Hide the site from anonymous visitors until the owner publishes it.
     *
     * @return void
     */
    public static function markUnpublished()
    {
        \update_option(self::OPTION, 'unpublished');
    }

    /**
     * Make the site visible to anonymous visitors.
     *
     * @return void
     */
    public static function markPublished()
    {
        \update_option(self::OPTION, 'published');
    }
}

```
