Jobs and Expert Hooks

I want to change the completion date and Campaign Opening time, is there a filter to do that?

  • Katya Tsihotska

    Hi Bo

    Hope you're having a great day!

    Since this is dealing with more advanced coding topics, I'm going to ping our SLS Team (code experts) to get their valuable feedback on this issue. One of our SLS members will reply back here as soon as more information is available.

    Please keep in mind that our SLS Team deals with more complicated issues, thus it may take a little longer for them to reply here. Thank you for your patience while we look into this further.

    Kind regards,
    Katya

  • Bo

    thank you, a solution or documentation of some kind would be VERY helpful. We need to make a number of custom changes to the Jobs&Expert plugin and the membership plugin. We want to be able to make all these changes properly so we can still allow updates, but we cant do that without using all the proper hooks.

    Will will be adding additional fields to the add a post form, changes to the post end date calendar, post open for, and number of other random edits needed.

    Also would like to move the invitation code from join membership page to the registration page. This would require the users to input the invitation code before they create an account. This would eliminate a lot of ghost account being created.

  • Ivan

    Hi Bo !

    There is a filter for the Job Open time and please, add the following changes to the plugin for adding a filter for the Completion Date ( I'll add these changes to the next versions of the plugin ):
    1. Please open {wordpress_flder}/wp-content/plugins/jobs-plus/app/views/job-form/main.php file via FTP
    2. Find this code (approximately line 161)
    <?php $form->text( "dead_line", array( "attributes" => array( "class" => "form-control datepicker" ) ) ) ?>
    3. Replace this code to this one

    <?php $attributes = apply_filters( 'je_completion_date_attributes', array( "attributes" => array( "class" => "form-control datepicker" ) ) ) ?>
    <?php $form->text( "dead_line", $attributes ) ?>

    After that, you could try adding the following snippet in a MU plugin ( more info about MU plugins is here )

    <?php
    
    add_filter( 'je_open_days_limit', function( $data ) {
    	unset( $data[7] );
    	$data[30] = __( '1 Month' );
    	return $data;
    } );
    
    add_filter( 'je_completion_date_attributes', function( $data ) {
    	$data['value'] = date( "Y-m-d", strtotime( '+ 1 month' ) );
    	return $data;
    } );

    In the first part it removes a week option and add a month one. In the second part it sets default value for the Completion Date (it will be dynamic value current date plus one month, for this example)

    Best,
    Ivan.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.