Boldgrid简码错误

时间:2019-02-15 23:13:55

标签: wordpress collapsable wordpress-shortcode

我正在使用Boldgrid for Wordpress,并且使用了简码来折叠Collapse-O-Matic插件中页面上的文本。除1)扩展标题的文本与简码中的文本正文不匹配外,它可以正常工作。可以更改吗?

这是代码:

    // Removes the Node with the given index
    public void remove(int current) {

        Node previous = head;
        for (int i = 0; i < current - 1; i++) {
            if (null == previous) {
                System.out.println("the given position doesn't exist");
                return;
            }
            previous = previous.next;
        }
        if (current == 0) {
            head = head.next;
        } else if (previous.next == null) {
            System.out.println("the given position is after the end - nothing to do!");
        } else {
            previous.next = previous.next.next;
        }
    }

然后2)我在图标和标题之后进行了此设置。单击可折叠文本时,图标会切换。我可以进入并修复视觉提示,以将图标对准不会切换的位置,但是然后我的文本与图标和标题不对齐。

这是完整的代码部分,其中图标是固定的,但是文本与图标和标题不一致:

   // Removes the Node with the given data
    public void remove(int data) {
        Node previous = head;
        if(head == null){
            System.out.println("Empty list - nothing to remove!");
            return;
        } if (head.data == data){
            head = head.next;
            return;
        }

        while(previous.next != null && previous.next.data != data){
            previous = previous.next;
        }
        if (previous.next == null) {
            System.out.println("the given element was not found - nothing to do!");
        } else {
            previous.next = previous.next.next;
        }
    }

0 个答案:

没有答案