# wp-coder/4.5/classes/Publisher/Conditions.php

WP Coder – Insert &amp; Manage Code Snippets, version 4.5. 33 lines.

- Page: https://pluginprobe.com/plugins/wp-coder/4.5/code/classes/Publisher/Conditions.php
- Raw: https://pluginprobe.com/plugins/wp-coder/4.5/raw/classes/Publisher/Conditions.php
- Modified: 2026-02-14T05:39:58+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/wp-coder/4.5/code/classes/Publisher/Conditions.php#L10-L20`.

```php
<?php

namespace WPCoder\Publisher;


defined( 'ABSPATH' ) || exit;

class Conditions {

	public static function init( $result ): bool {
		$param = ! empty( $result->param ) ? maybe_unserialize( $result->param ) : [];
		$check = [
			'status'   => self::status( $result->status ),
			'mode'     => self::mode( $result->mode ),

		];

		if ( in_array( false, $check, true ) ) {
			return false;
		}

		return true;

	}

	private static function status( $status ): bool {
		return empty( $status );
	}

	private static function mode( $mode ): bool {
		return empty( $mode ) || current_user_can( 'administrator' );
	}
}
```
