HEX
Server: Apache
System: Linux p3plzcpnl505785.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: xuvi7odgswsg (6947073)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: /home/xuvi7odgswsg/public_html/wp-content/themes/flex-multi-business/inc/controls.php
<?php

/**
 * excerpt lenth.
 */
if (!function_exists('flex_multi_business_custom_excerpt_length')) :
    function flex_multi_business_custom_excerpt_length($length)
    {
        if (is_admin()) {
            return $length;
        }

        $excpt_length = get_theme_mod('flex_multi_business_excerpt_general_section','55');
        if (!empty($excpt_length)) {
            return $excpt_length;
        }
        return 55;
    }
endif;
add_filter('excerpt_length', 'flex_multi_business_custom_excerpt_length');

function flex_multi_business_excerpt_more( $more ) {
	if ( is_admin() ) {
        return $more;
    }

    return '...';
}
add_filter('excerpt_more', 'flex_multi_business_excerpt_more');

function flex_multi_business_set_post_view() {
    $key = 'post_views_count';
    $post_id = get_the_ID();
    $count = (int) get_post_meta( $post_id, $key, true );
    $count++;
    update_post_meta( $post_id, $key, $count );
}
?>