Function Reference: geodir_detail_page_sidebar_content_sorting

Summary

Builds an array of elements for the details (post) page sidebar.

Description

Builds an array of functions to be called in the details page (post) sidebar, this array can be changed via hook or filter.

Package

GeoDirectory

Change Log

Since: 1.0.0

Filters

‘geodir_detail_page_sidebar_content’ [Line: 349]

Source File

geodir_detail_page_sidebar_content_sorting() is located in geodirectory_hooks_actions.php [Line: 347]

Source Code

function geodir_detail_page_sidebar_content_sorting()
{
    $arr_detail_page_sidebar_content =
        /**
         * An array of functions to be called to be displayed on the details (post) page sidebar.
         *
         * This filter can be used to remove sections of the details page sidebar,
         * add new sections or rearrange the order of the sections.
         *
         * @param array array('geodir_social_sharing_buttons','geodir_share_this_button','geodir_detail_page_google_analytics','geodir_edit_post_link','geodir_detail_page_review_rating','geodir_detail_page_more_info') The array of functions that will be called.
         * @since 1.0.0
         */
        apply_filters('geodir_detail_page_sidebar_content',
            array('geodir_social_sharing_buttons',
                'geodir_detail_page_google_analytics',
                'geodir_edit_post_link',
                'geodir_detail_page_review_rating',
                'geodir_detail_page_more_info'
            ) // end of array 
        ); // end of apply filter
    if (!empty($arr_detail_page_sidebar_content)) {
        foreach ($arr_detail_page_sidebar_content as $content_function) {
            if (function_exists($content_function)) {
                add_action('geodir_detail_page_sidebar', $content_function);
            }
        }
    }
}