• Resolved W2014


    Hallo, some parts of the design is embedded into the classes, how can i change these classes with overrides? i tried to make a peepso/overrides/classes folder but it does not work… i.e classes/general.php

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Matt Jaworski


    You can’t override the entire classes. Overrides only work for templates, CSS and assets.

    Hello Matt, thanks for the reply, i would like to suggest to you that this is a bad practice to put html inside classes, you should probably have the content inside of a separate file “appearance.php”, which you then call in your function, that would be better for changing appearance…for example, if i want to add “Hallo” to User, i cannot do that with overrides, so that is not flexible, although that would be so simple to change into a more flexible framework…

    For example, i can make that change in classes/general.php =>

    . 'Hallo '. $user->get_firstname(),,

    but it will be probably overwritten by the next update, i mean that part:

        public function init_navbar($navbar) {
            $user = PeepSoUser::get_instance(get_current_user_id());
                // Profile - avatar and name
                'profile-home' => array(
                    'class' => '',
                    'href' => $user->get_profileurl(),
                    'label' =>'<div class="ps-avatar ps-avatar--toolbar ps-avatar--xs"><img src="' . $user->get_avatar() . '" alt="' . $user->get_fullname(). ' avatar"></div> ' . 'Hallo '. $user->get_firstname(),
                    'title' => PeepSoUser::get_instance()->get_fullname(),
                    'primary'           => FALSE,
                    'secondary'         => TRUE,
                    'mobile-primary'    => FALSE,
                    'mobile-secondary'  => FALSE,
                    'widget'            => FALSE,

    Have a nice day

    Plugin Contributor Matt Jaworski


    That entire array is passed through peepso_navigation filter and you can modify it’s contents before it’s printed

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Classes overrides’ is closed to new replies.