onetone_get_breadcrumb
The Onetone onetone get breadcrumb function.
Description
onetone_get_breadcrumb( (array) $options = array() );
Parameters (1)
- 0. $options — Optional. (array) =>
array()
- The options.
Usage
if ( !function_exists( 'onetone_get_breadcrumb' ) ) { require_once '/includes/theme-functions.php'; } // The options. $options = array(); // NOTICE! Understand what this does before running. $result = onetone_get_breadcrumb($options);
Defined (1)
The function is defined in the following location(s).
- /includes/theme-functions.php
- function onetone_get_breadcrumb( $options = array()) {
- global $post, $wp_query ;
- $postid = isset($post->ID)?$post->ID:"";
- $show_breadcrumb = "";
- if ( 'page' == get_option( 'show_on_front' ) && ( '' != get_option( 'page_for_posts' ) ) && $wp_query->get_queried_object_id() == get_option( 'page_for_posts' ) ) {
- $postid = $wp_query->get_queried_object_id();
- }
- if(isset($postid) && is_numeric($postid)) {
- $show_breadcrumb = get_post_meta( $postid, '_onetone_show_breadcrumb', true );
- }
- if($show_breadcrumb == 'yes' || $show_breadcrumb=="") {
- onetone_breadcrumb_trail $options);
- }
- }