get_registered_nav_menus

Definition:
function get_registered_nav_menus() {}

Returns an array of all registered navigation menus in a theme

Source code

function get_registered_nav_menus() {

	global $_wp_registered_nav_menus;

	if ( isset( $_wp_registered_nav_menus ) )

		return $_wp_registered_nav_menus;

	return array();

}

1659

get_real_file_to_edit

Definition:
function get_real_file_to_edit( $file ) {}

Get the real file system path to a file to edit within the admin
If the $file is index.php or .htaccess this function will assume it is relative to the install root, otherwise it is assumed the file is relative to the wp-content directory

Parameters

  • string $file: filesystem path relative to the WordPress install directory or to the wp-content directory

Return values

returns:full file system path to edit

Source code

function get_real_file_to_edit( $file ) {

	if ('index.php' == $file || '.htaccess' == $file ) {

		$real_file = get_home_path() . $file;

	} else {

		$real_file = WP_CONTENT_DIR . $file;

	}



	return $real_file;

}

1657

get_query_var

Definition:
function get_query_var($var) {}

Retrieve variable in the WP_Query class.

Parameters

  • string $var: The variable key to retrieve.

Source code

function get_query_var($var) {

	global $wp_query;



	return $wp_query->get($var);

}

1655

get_query_template

Definition:
function get_query_template( $type, $templates = array() {}

Retrieve path to a template
Used to quickly retrieve the path of a template without including the file extension. It will also check the parent theme, if the file exists, with the use of locate_template(). Allows for more generic template location without the use of the other get_*_template() functions.

Parameters

  • string $type: Filename without extension.
  • array $templates: An optional list of template candidates

Return values

returns:Full path to file.

Source code

function get_query_template( $type, $templates = array() ) {

	$type = preg_replace( '|[^a-z0-9-]+|', '', $type );



	if ( empty( $templates ) )

		$templates = array("{$type}.php");

1653

get_pung

Definition:
function get_pung($post_id) {}

Retrieve URLs already pinged for a post.

Parameters

  • int $post_id: Post ID.

Defined filters

  • get_pung
    apply_filters('get_pung', $pung)

Source code

function get_pung($post_id) {

	global $wpdb;

	$pung = $wpdb->get_var( $wpdb->prepare( "SELECT pinged FROM $wpdb->posts WHERE ID = %d", $post_id ));

	$pung = trim($pung);

	$pung = preg_split('/\s/', $pung);

	$pung = apply_filters('get_pung', $pung);

	return $pung;

}

1651