WordPress插件:如何添加单独的页面来编辑表单

时间:2012-07-04 07:48:44

标签: wordpress plugins

好的,所以我有一个插件,它有自己的设置页面和所有。在设置中,我有一个表单,将显示自定义表中的数据。它看起来像这样:

    <form method="post" action="">
        <table>
            <tbody>
                <tr>
                    <th>StringVal1</th>
                    <th>Checked</th>
                    <th>StringVal2</th>
                    <th>StringVal3</th>
                    <th>Configurations</th>
                </tr>

                <tr>
                    <td>
                        <?php echo "Value from table"; ?>
                    </td>
                    <td>
                        <?php
                            if ($row["Checked"] == 1) {
                                $checked = ' checked="checked" ';
                            }
                            echo "<input name='Checked' type='checkbox' " . $checked . " />";
                        ?>
                    </td>
                    <td>
                        <?php echo "Another value from table"; ?>
                    </td>
                    <td>
                        <?php echo "More value from table"; ?>
                    </td>
                    <th>
                        <div align="center">
                            <input name="EditButton" type="submit" class="edit-secondary" value="Edit">
                        </div>
                    </th>
                </tr>
            </tbody>
        </table>
    </form>

单击“编辑”按钮时,我想链接到另一个页面(例如/wp-admin/plugins.php?page=myplugin-settings/edit-form),以便编辑和插入删除行桌子。那么我该如何添加我需要的额外页面呢?

0 个答案:

没有答案
相关问题