New Landing How can we help? Cardinal How to modify 'Install Required Plugins' functionality?

Viewing 6 posts - 16 through 21 (of 21 total)
  • Posted in: Cardinal
  • #107373
    FlawlessWeb
    Member
    Post count: 542

    Hi Ed,

    No, unfortunately that line of code breaks the site.

    Is the conclusion that I would need to edit the plugin-includes.php file in the main Cardinal folder each time (there is a theme update) and there is definitely nothing that can be done within the child theme?.

    Thanks.

    #107576
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    After putting this include_once(get_stylesheet_directory() . ‘/includes/plugin-includes.php’); in the functions.php of parent theme or child theme. Did you have this folder structure in the Child theme?? Did this file present in the child theme?? Enable the WP_DEBUG and could you pass us what error it says??

    Let us know,

    Thanks,
    laranz.

    #107684
    FlawlessWeb
    Member
    Post count: 542

    Got it to work 🙂

    I turned on wp debug as you directed and from that it indicated that I needed to include the following file in my child themes includes folder as well: class-tgm-plugin-activation.php

    So for anyone else looking to do the same.

    #1. Edit Cardinals functions.php file as follows on line 40:

    	/* include_once(SF_INCLUDES_PATH . '/plugin-includes.php'); */
    	include_once(get_stylesheet_directory() . '/includes/plugin-includes.php');

    #2. Create an includes folder within your child theme and copy both these files into it:
    plugin-includes.php
    class-tgm-plugin-activation.php

    #3. Edit those files as desired.

    So, considering what I have set up now, can you confirm that the only file I will need to continuously manually edit on theme updates is the functions.php file as out I laid out above? (there is definitely no way around this?)

    Thanks.

    #107719
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Glad you sort it out. Yes it the only way.

    Thanks,
    laranz.

    #169589
    Steve
    Member
    Post count: 54

    since recent updates here is a modified version for #1

    add_filter( 'get_user_metadata', function_disableNotice, 10, 4 );
    function function_disableNotice ($val, $object_id, $meta_key, $single) {
        if($meta_key === 'tgmpa_dismissed_notice_tgmpa') { return true; }
        else { return null; }
    }
    #169604
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Thanks for sharing that info.
    -Rui

Viewing 6 posts - 16 through 21 (of 21 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register