Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter polprats

    (@polprats)

    I’m gonna share the changes i made to finally make it work.

    would be nice if you add it, i think is useful and don’t need much things.

    In the only PHP file “collapse-o-matic.php” , in the constructor of the only class “WP_Collapse_O_Matic” i add this 2 lines of code:

    add_action( ‘admin_enqueue_scripts’, array( $this, ‘collapsTronicInit’ ));
    add_action( ‘admin_head’, array( $this, ‘colomat_js_vars’ ) );

    here u can see the hole constructor:
    /**
    * PHP5 constructor
    */
    function __construct() {
    // set option values
    $this->_set_options();

    // load text domain for translations
    load_plugin_textdomain( ‘jquery-collapse-o-matic’ );

    //load the script and style if viewing the front-end
    add_action(‘wp_enqueue_scripts’, array( $this, ‘collapsTronicInit’ ) );
    //PPF
    add_action( ‘admin_enqueue_scripts’, array( $this, ‘collapsTronicInit’ ) );
    //FI PPF

    // add actions
    add_action( ‘admin_menu’, array( $this, ‘admin_menu’ ) );
    add_action( ‘plugin_action_links_’ . plugin_basename(__FILE__), array( $this, ‘plugin_actions’ ) );
    add_action( ‘admin_init’, array( $this, ‘admin_init’ ) );
    //PPF
    add_action( ‘admin_head’, array( $this, ‘colomat_js_vars’ ) );
    //FI PPF
    if($this->options[‘script_location’] == ‘footer’ ){
    add_action( ‘wp_footer’, array( $this, ‘colomat_js_vars’ ) );
    }
    else{
    add_action(‘wp_head’, array( $this, ‘colomat_js_vars’ ) );
    }
    add_shortcode(‘expand’, array($this, ‘shortcode’));

    //add expandsub shortcodes
    for ($i=1; $i<30; $i++) {
    add_shortcode(‘expandsub’.$i, array($this, ‘shortcode’));
    }

    // Add shortcode support for widgets
    add_filter(‘widget_text’, ‘do_shortcode’);
    }

    Same problem as lovings. Fresh install too, and no more plugins on it.

    anyone knows anything about how to solve it?

    thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)