Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author DBAR Productions

    (@dbar-productions)

    This is more of a feature request than a support issue, since the plugin is not broken and thus no “fix” is required.

    You should not have to modify my plugin directly, as there are many filter & action hooks in place to allow a huge amount of customization with just a tiny bit of PHP knowledge.

    If you don’t know about child themes, do a search and set up a child theme first. Then you can put your custom code in your child theme’s functions.php file and not have to worry about it getting wiped out if you update your theme, or my plugin.

    There is a filter in place for the display name, which you can find on line 769 in the class-pta_sus_public.php file in my plugin. It looks like this:

    $display_signup = apply_filters( 'pta_sus_display_signup_name', $display_signup, $signup );

    That filter passes two variables, the first being the formatted name ($display_signup), and the second is the $signup object, which has (among others) the two properties that you need for the name:
    $signup->firstname
    $signup->lastname

    So, if you want to always show the full names, you add a function like the following (not tested) to your child theme’s functions.php file:

    function pta_show_full_name($display_signup, $signup) {
       return esc_html($signup->first_name . ' ' . $signup->lastname);
    }
    add_filter('pta_sus_display_signup_name', 'pta_show_full_name', 10, 2);

    The above function will ALWAYS return the firstname, then a single space, then the last name.

    Thread Starter thedills

    (@thedills)

    Thanks…
    That worked. Only thing that needed to be changed was the first_name needed to be first name.

    One other question… if you don’t mind.

    How can I remove the “#1:” from the signup list? Since there is only one entry, that is not necessary.

    Thanks again.

    Plugin Author DBAR Productions

    (@dbar-productions)

    Yep, little typo there, glad you figured that out.

    As far as the “slot” numbers go, there is no filter on that part of the output. So, you either have to do a bit of javascript to find and hide that, or simply edit my plugin for now.

    You can find that on line 841 of the class-pta_sus_public.php file. Or search for:
    #’.$i.’: ‘
    You’ll need to leave the opening table cell <td> in there, so you can’t delete or comment on the whole line.

    Thread Starter thedills

    (@thedills)

    Thanks again. Also had to do the same on line 784 to remove from those spots already filled… but thanks. Would love to see this as a feature, but definitely not difficult to do after every update if necessary. Thanks again for a very useful plugin.

    Blessings!

    Plugin Author DBAR Productions

    (@dbar-productions)

    Please feel free to add that to the feature request section on my plugins site so I can keep track of things. It wouldn’t be very difficult at all to add another output filter on those numbers.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show full name on signup’ is closed to new replies.