• Resolved hendosdad

    (@hendosdad)


    Great plugin!

    I’m wanting to change the heading “Task/Item” to “Role”.

    Is there a way to do this by adding some code to my theme’s functions.php?

    If so, a point in the right direction would be helpful.

    Thanks.

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

    (@dbar-productions)

    You can easily modify (or hide) almost all of the public side text, including those table headings, using the Customizer plugin (less than $10, and helps support further development):

    https://stephensherrardplugins.com/plugins/pta-volunteer-sign-up-sheets-customizer/

    If you would rather do it with your own PHP code, there is a public output filter used on all those text strings that the above customizer plugin taps into. You can scan the code in the class-pta_sus_public.php file to see those filters that have the filter hook ‘pta_sus_public_output’, with 2 variables pass to the filter: the first being the original text string, and the second being an identifier key string to let you know which specific text string is being output (so you only modify the one you want to change).

    Alternately, since all the strings are prepared for translation, you could use any type of translation management to “translate” those text strings to change them to whatever you want.

    Thread Starter hendosdad

    (@hendosdad)

    Thank you for your help.

    Just in case anyone else is wanting to do this, the code I implemented in functions.php of my child theme is provided below:

      add_filter( 'pta_sus_public_output', 'function_to_change_task_item_to_role');
      function function_to_change_task_item_to_role( $text ) {
          $text = str_replace(
              array( 'Task/Item' ),
              array( 'Role' ),
              $text
           );
           return $text;
    }
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Change Task/Item heading via PHP’ is closed to new replies.