Code Duplication    Length = 13-13 lines in 2 locations

shortcodely-v1.0.0/shortcodely.php 1 location

@@ 37-49 (lines=13) @@
34
*/
35
36
add_action('in_widget_form', 'shortcodely_spice_get_widget_id');
37
function shortcodely_spice_get_widget_id($widget_instance)
38
{
39
    /*
40
         * Main function to get widget id
41
         *
42
         */
43
    echo '<p><strong>To use as shortcode with id:</strong> ';
44
    if ('__i__' == $widget_instance->number) {
45
        echo 'Save the widget first!</p>';
46
    } else {
47
        echo '[do_widget id=' . $widget_instance->id . ']</p>';
48
    }
49
}
50
51
/**
52
 * @return callable

shortcodely.php 1 location

@@ 37-49 (lines=13) @@
34
*/
35
36
add_action('in_widget_form', 'shortcodely_spice_get_widget_id');
37
function shortcodely_spice_get_widget_id($widget_instance)
38
{
39
    /*
40
         * Main function to get widget id
41
         *
42
         */
43
    echo '<p><strong>To use as shortcode with id:</strong> ';
44
    if ('__i__' == $widget_instance->number) {
45
        echo 'Save the widget first!</p>';
46
    } else {
47
        echo '[do_widget id=' . $widget_instance->id . ']</p>';
48
    }
49
}
50
51
/**
52
 * @return callable