I found a way,lazy as always
Go to /oc-content/plugins/backoffice_manager/function/republish.php
Find republish_link function on line 108 and replace
<?php function republish_link($item_id, $link_title = NULL, $target = '_blank') { $link = republish_link_raw($item_id); $link_title = ($link_title == '' ? __('Republish now!', 'backoffice_manager') : $link_title); if($link) { echo '<a style="color:green;font-weight:bold;" href="' . $link . '" target="' . $target . '" title="' . __('This listing is about expire or has expired. Click to republish this item if it is still valid', 'backoffice_manager') . '">' . $link_title . '</a>'; }}?>
to this
<?php function republish_link($item_id, $link_title = NULL, $target = '_blank') { $link = republish_link_raw($item_id); $link_title = ($link_title == '' ? __('Republish now!', 'backoffice_manager') : $link_title); //Republish once per day or more $datenow = new DateTime('NOW'); $itemdate = new DateTime(substr(osc_item_field('dt_pub_date'),0,10)); $diffdate = date_diff($itemdate,$datenow); // Days to wait before item can be republished.Change 1 with yours if($link && $diffdate->days >= 1) { echo '<a style="color:green;font-weight:bold;" href="' . $link . '" target="' . $target . '" title="' . __('This listing is about expire or has expired. Click to republish this item if it is still valid', 'backoffice_manager') . '">' . $link_title . '</a>'; } else { //echo something else when republish link does not show up }}?>
You must check "Allow users to republish listing anytime, not only when listing is about expire."
Remove php tags...
Sharing is caring...