Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are bugs/wrong info in the documentation. How to fix/contribute to the docs #126

Open
kamalahmed opened this issue Jan 22, 2018 · 0 comments

Comments

@kamalahmed
Copy link

kamalahmed commented Jan 22, 2018

Hello there,
I really do not know if it is the right place to report the issue of the documentation of the vafpress. Because I did not find any other way to let the developer know about this issue. Because forum is dead.
By the way, I have found some wrong information in the docs that does not work or break things.
For example,
The usage of fonts awesome icon shown in the docs is wrong. And it is also wrong in the example in the docs.
For example docs says, ' fontawesome icon defined by this syntax fontawesome:icon-name'. this is worng. Correct should be " fontawesome icon defined by this syntax 'font-awesome:fa-iconname'. eg. 'font-awesome:fa-search'. or more detailed example:

'menus' => array(
    array(
        'title' => __('Special Controls', 'vp_textdomain'),
        'name' => 'menu_2',
        'icon' => 'font-awesome:fa-search',
        'controls' => array(
            ... collection of Sections and or Control Fields ...
        ),
    ),
)

in the example of original doc, it shows the usage of the fonts awesome icon in the following way.

array(
                'title' => __('Regular', 'vp_textdomain'),
                'name' => 'submenu_1',
                'icon' => 'font-awesome:icon-th-large',
                'controls' => array(
                    ... collection of Sections and or Control Fields ...
                ),
            ),

The above code will not work.
Correct code would be like the below code. (using 'icon' => 'font-awesome:fa-iconname' structure).

array(
                'title' => __('Regular', 'vp_textdomain'),
                'name' => 'submenu_1',
                'icon' => 'font-awesome:fa-home',
                'controls' => array(
                    ... collection of Sections and or Control Fields ...
                ),
            ),

Another big error I have found that caused error is the doc of the section grouping (http://vafpress.com/documentation/vafpress-framework/options/group.html)
Original docs did not mention the 'type' attribute. and also shows a wrong example like below:

'controls' => array(
    array(
        'title' => __('TextBox and TextArea', 'vp_textdomain'),
        'name' => 'section_1',
        'description' => __('TextBox and TextArea Showcase', 'vp_textdomain'),
        'fields' => array(
            ... collection of control fields ...
        ),
    ),
)

The above code will not work and through an error.
Correct Code will be like below using a type=section attribute.

'controls' => array(
    array(
        'type' => 'section',
        'title' => __('TextBox and TextArea', 'vp_textdomain'),
        'name' => 'section_1',
        'description' => __('TextBox and TextArea Showcase', 'vp_textdomain'),
        'fields' => array(
            ... collection of control fields ...
        ),
    ),
)

This kind of bugs/error in the docs give me so much pain to fix. I hope other users will not have to spend a lot of hours debugging this issue.
screen shot 2018-01-22 at 5 22 12 pm
screen shot 2018-01-22 at 5 05 27 pm
screen shot 2018-01-22 at 5 05 11 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant