Settings_Submodule_Trait::get_options()

Retrieves the values for all submodule options.

Description

Return

(array) Associative array of <code>$key => $value</code> pairs for every option that is set.

Source

File: src/modules/settings-submodule-trait.php

	public function get_options() {
		$settings = $this->module->get_options();

		$prefix = $this->get_settings_identifier() . '__';

		$options = array();
		foreach ( $settings as $key => $value ) {
			if ( 0 !== strpos( $key, $prefix ) ) {
				continue;
			}

			$key = substr( $key, strlen( $prefix ) );
			$options[ $key ] = $value;
		}

		return $options;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.