Code Duplication    Length = 5-5 lines in 2 locations

Features/TinyMce/functions.php 2 locations

@@ 43-47 (lines=5) @@
40
    
41
    // Load Styleformat Dropdown and parse it into TinyMCE
42
    
43
    if (isset($options[0]) && isset($options[0]['styleformatsConfigPath'])) {
44
        $configPath = $options[0]['styleformatsConfigPath'];
45
    } else {
46
        $configPath = 'config/toolbars.json';
47
    }
48
49
    $filePath = get_template_directory() . '/Features/TinyMce/' . $configPath;
50
    if (file_exists($filePath)) {
@@ 75-79 (lines=5) @@
72
function getToolbarsFromJson()
73
{
74
    $options = Feature::getOptions('flynt-tiny-mce');
75
    if (isset($options[0]) && isset($options[0]['toolbarsConfigPath'])) {
76
        $configPath = $options[0]['toolbarsConfigPath'];
77
    } else {
78
        $configPath = 'config/toolbars.json';
79
    }
80
81
    $filePath = get_template_directory() . '/Features/TinyMce/' . $configPath;
82
    if (file_exists($filePath)) {