# wpsso/22.7.0/lib/admin-head-suggest.php

WPSSO Core – Complete Schema Markup and Meta Tags, version 22.7.0. 73 lines.

- Page: https://pluginprobe.com/plugins/wpsso/22.7.0/code/lib/admin-head-suggest.php
- Raw: https://pluginprobe.com/plugins/wpsso/22.7.0/raw/lib/admin-head-suggest.php
- Modified: 2026-03-25T12:08: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/wpsso/22.7.0/code/lib/admin-head-suggest.php#L10-L20`.

```php
<?php
/*
 * License: GPLv3
 * License URI: https://www.gnu.org/licenses/gpl.txt
 * Copyright 2012-2026 Jean-Sebastien Morisset (https://wpsso.com/)
 */

if ( ! defined( 'ABSPATH' ) ) {

	die( 'These aren\'t the droids you\'re looking for.' );
}

if ( ! defined( 'WPSSO_PLUGINDIR' ) ) {

	die( 'Do. Or do not. There is no try.' );
}

if ( ! class_exists( 'WpssoAdminHeadSuggest' ) ) {

	class WpssoAdminHeadSuggest {

		private $p;	// Wpsso class object.

		/*
		 * Instantiated by WpssoAdminHead->__construct().
		 */
		public function __construct( &$plugin ) {

			$this->p =& $plugin;

			if ( $this->p->debug->enabled ) {

				$this->p->debug->mark();
			}

			add_action( 'admin_head', array( $this, 'suggest' ), 100, 0 );
		}

		public function suggest( $suggest_max = 2 ) {

			if ( $this->p->debug->enabled ) {

				$this->p->debug->log_args( array(
					'suggest_max' => $suggest_max,
				) );
			}

			$suggested = 0;

			/*
			 * Suggest options, addons, and attributes, in that order.
			 */
			foreach ( array( 'options', 'addons', 'attributes' ) as $suffix ) {

				require_once WPSSO_PLUGINDIR . 'lib/admin-head-suggest-' . $suffix . '.php';

				$classname   = 'wpssoadminheadsuggest' . $suffix;
				$suggest_obj = new $classname( $this->p );
				$suggested   = $suggested + $suggest_obj->suggest( $suggest_max - $suggested );

				if ( $suggested >= $suggest_max ) break;
			}

			if ( $this->p->debug->enabled ) {

				$this->p->debug->log( 'return suggested = ' . $suggested );
			}

			return $suggested;
		}
	}
}

```
