Code Duplication    Length = 21-22 lines in 2 locations

geodirectory-functions/general_functions.php 2 locations

@@ 2287-2307 (lines=21) @@
2284
 * @param string|array $params Image parameters.
2285
 * @return int Large size width.
2286
 */
2287
function geodir_media_image_large_width($default = 800, $params = '')
2288
{
2289
    $large_size_w = get_option('large_size_w');
2290
    $large_size_w = $large_size_w > 0 ? $large_size_w : $default;
2291
    $large_size_w = absint($large_size_w);
2292
2293
    if (!get_option('geodir_use_wp_media_large_size')) {
2294
        $large_size_w = 800;
2295
    }
2296
2297
    /**
2298
     * Filter large image width.
2299
     *
2300
     * @since 1.0.0
2301
     * @param int $large_size_w Large image width.
2302
     * @param int $default Default width.
2303
     * @param string|array $params Image parameters.
2304
     */
2305
    $large_size_w = apply_filters('geodir_filter_media_image_large_width', $large_size_w, $default, $params);
2306
    return $large_size_w;
2307
}
2308
2309
/**
2310
 * WP media large height.
@@ 2318-2339 (lines=22) @@
2315
 * @param string $params Image parameters.
2316
 * @return int Large size height.
2317
 */
2318
function geodir_media_image_large_height($default = 800, $params = '')
2319
{
2320
    $large_size_h = get_option('large_size_h');
2321
    $large_size_h = $large_size_h > 0 ? $large_size_h : $default;
2322
    $large_size_h = absint($large_size_h);
2323
2324
    if (!get_option('geodir_use_wp_media_large_size')) {
2325
        $large_size_h = 800;
2326
    }
2327
2328
    /**
2329
     * Filter large image height.
2330
     *
2331
     * @since 1.0.0
2332
     * @param int $large_size_h Large image height.
2333
     * @param int $default Default height.
2334
     * @param string|array $params Image parameters.
2335
     */
2336
    $large_size_h = apply_filters('geodir_filter_media_image_large_height', $large_size_h, $default, $params);
2337
2338
    return $large_size_h;
2339
}
2340
2341
/**
2342
 * Sanitize location name.