Code Duplication    Length = 5-5 lines in 2 locations

Features/TinyMce/functions.php 2 locations

@@ 26-30 (lines=5) @@
23
    
24
    // Load Styleformat Dropdown and parse it into TinyMCE
25
    $options = Feature::getOptions('flynt-tiny-mce');
26
    if (isset($options[0]) && isset($options[0]['styleformatsConfigPath'])) {
27
        $configPath = $options[0]['styleformatsConfigPath'];
28
    } else {
29
        $configPath = 'config/toolbars.json';
30
    }
31
32
    $filePath = get_template_directory() . '/Features/TinyMce/' . $configPath;
33
    if (file_exists($filePath)) {
@@ 57-61 (lines=5) @@
54
function getToolbarsFromJson()
55
{
56
    $options = Feature::getOptions('flynt-tiny-mce');
57
    if (isset($options[0]) && isset($options[0]['toolbarsConfigPath'])) {
58
        $configPath = $options[0]['toolbarsConfigPath'];
59
    } else {
60
        $configPath = 'config/toolbars.json';
61
    }
62
63
    $filePath = get_template_directory() . '/Features/TinyMce/' . $configPath;
64
    if (file_exists($filePath)) {