WP_Rewrite::get_month_permastruct()

Retrieves the month permalink structure without day and with year.


Description

Gets the date permalink structure and strips out the day permalink structures. Keeps the year permalink structure.


Return

(false|string) False on failure. Year/Month structure on success.


Source

File: wp-includes/class-wp-rewrite.php

	public function get_month_permastruct() {
		$structure = $this->get_date_permastruct();

		if ( empty($structure) )
			return false;

		$structure = str_replace('%day%', '', $structure);
		$structure = preg_replace('#/+#', '/', $structure);

		return $structure;
	}


Changelog

Changelog
Version Description
WP-1.5.0 Introduced.