Function Reference: geodir_action_listings_description

Summary

Outputs the listings page description HTML.

Global Values

$wp_query
(object) (required) WordPress Query object.

Default: None

Package

GeoDirectory

Change Log

Since: 1.0.0

Filters

‘the_content’ [Line: 1742]

Source File

geodir_action_listings_description() is located in geodirectory_template_actions.php [Line: 1714]

Source Code

function geodir_action_listings_description()
{
    global $wp_query;
    $current_term = $wp_query->get_queried_object();

    $gd_post_type = geodir_get_current_posttype();
    if (isset($current_term->term_id) && $current_term->term_id != '') {

        $term_desc = term_description($current_term->term_id, $gd_post_type . '_tags');
        $saved_data = stripslashes(geodir_get_tax_meta($current_term->term_id, 'ct_cat_top_desc', false, $gd_post_type));
        if ($term_desc && !$saved_data) {
            $saved_data = $term_desc;
        }

        // stop payment manager filtering content length
        $filter_priority = has_filter( 'the_content', 'geodir_payments_the_content' );
        if ( false !== $filter_priority ) {
            remove_filter( 'the_content', 'geodir_payments_the_content', $filter_priority );
        }

        /**
         * Apply the core filter `the_content` filter to the variable string.
         *
         * This is a WordPress core filter that does many things.
         *
         * @since 1.0.0
         * @param string $var The string to apply the filter to.
         */
        $cat_description = apply_filters('the_content', $saved_data);


        if ( false !== $filter_priority ) {
            add_filter( 'the_content', 'geodir_payments_the_content', $filter_priority );
        }

        if ($cat_description) {
            ?>