Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #495956

    I am trying to integrate Enfold with WP Toolset Views. For this to work I need some information.

    The instructions to integrate WP Toolset Views with a theme is as follows:
    https://wp-types.com/documentation/user-guides/theme-frameworks-integration/

    This is the function I am supposed to add in my functions.php

    add_action( ‘init’, ‘prefix_register_framework_in_views’ );
    function prefix_register_framework_in_views() {
    $framework_id = ‘framework_slug’;
    $framework_data = array(
    ‘name’ => ‘The framework name’,
    ‘api_mode’ => ‘function|option’,
    ‘api_handler’ => ‘Function name|Option ID’
    );
    if ( function_exists( ‘wpv_api_register_framework’ ) ) {
    wpv_api_register_framework( $framework_id, $framework_data );
    }
    }

    The information I need is:
    1. The Framework slug for Enfold ( I suppose it has something to do with avia but can’t find a reference to the framework_slug

    2. api_mode
    (‘api_mode’ is a mandatory string that states the way that the framework gets the value for each of its options.
    Some frameworks have a dedicated function for this
    (so they should pass ‘function’ here as the value).
    Some other frameworks just store their data in a serialized array in the WordPress options, so they should pass ‘option’ here as the value.
    So, the value here can either ‘function’ or ‘option’)

    3. api_handler
    (‘api_handler’ is a mandatory string that complements the api_mode one.
    It should contain the relevant data on the selected mode.
    In case the framework has a dedicated function (‘function’ in ‘api_mode’) to get option values,
    api_handler should be that function’s name (example: ot_get_option).
    If the framework just accesses a serialized array stored as a WordPress option (‘option’ in ‘api_mode’),
    the key of that option should be passed here.)

    Thank you for your help and I am looking forward to your answer

    #496418

    Hey letobbe!

    I do not know. To me it seems like it’s just a unique identifier so the plugin knows which “theme” your using so perhaps you can place anything in there for #1, I would try just “enfold”.

    If that does not work then I would try contacting their support and ask them for more information.

    Cheers!
    Elliott

    #496420

    Okey thank you. That is for the framework_slug.

    How about the other two questions?

    2. api_mode
    (‘api_mode’ is a mandatory string that states the way that the framework gets the value for each of its options.
    Some frameworks have a dedicated function for this
    (so they should pass ‘function’ here as the value).
    Some other frameworks just store their data in a serialized array in the WordPress options, so they should pass ‘option’ here as the value.
    So, the value here can either ‘function’ or ‘option’)

    3. api_handler
    (‘api_handler’ is a mandatory string that complements the api_mode one.
    It should contain the relevant data on the selected mode.
    In case the framework has a dedicated function (‘function’ in ‘api_mode’) to get option values,
    api_handler should be that function’s name (example: ot_get_option).
    If the framework just accesses a serialized array stored as a WordPress option (‘option’ in ‘api_mode’),
    the key of that option should be passed here.)

    #496536

    Hey!

    No idea. Maybe “function” for #2 and “avia_get_option” for #3. I would contact their support for more info.

    Best regards,
    Elliott

    #563549

    Hi Letobbe, did you succeed in using “Views” content templates with Enfold ? I can’t find a solution at this point … Thanks

    • This reply was modified 4 years, 8 months ago by  ouranos3.
    #563768

    Hi @letobbe,

    Please share your solution if you ever came up with one.

    Thanks,
    Rikard

    #897678

    Hey guys,

    is there a solution which works? I’m trying this too ;)

    All the best,
    Chris

    #897903

    Hi Chris,

    I’m not aware of any solutions unfortunately.

    Best regards,
    Rikard

    #898103

    Hey Rikard,
    thx a lot for your reply. I found something more specific in the documentation of Toolset. Could you answer this question?:

    *** Content Templates modify the content when called from “the_content” function. Some themes don’t use that function and define an own one. If content templates doesn’t work in your theme, please insert the own function for calling “the_content” here. ***

    Do you have that perhaps?

    All the best,
    Chris

    #899327

    Hi,

    On an upcoming version we do take care of that compatibility.
    So please be patience and we will get it out for you.

    Best regards,
    Basilis

    #899328

    Hi Basilis,

    that sounds great! Thx a lot and have a nice weekend.

    All the best,
    Chris

    • This reply was modified 2 years, 8 months ago by  Chris.
    #901128
Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.