Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php // don't include this line in your functions.php, since it already starts with it.
- function _remove_team_members_si_toggl_import_entries( $time_entries = array() ) {
- foreach ( $time_entries as $key => $time_entry ) {
- if ( isset( $time_entry->tags ) ) { // it's likely not
- $tag_array = json_decode( $time_entry->tags );
- if ( ! in_array( 'filterTAG', $tag_array ) ) { // filterTAG is the tag you only want to import
- unset( $time_entries[$key] ); // remove
- }
- }
- }
- return $time_entries;
- }
- add_filter( 'si_toggl_import_entries', '_remove_team_members_si_toggl_import_entries' );
Add Comment
Please, Sign In to add comment