Report problem modifcation
In Classipress the report-problem icon is not hidden when when you only want logged-in users to be able to report problems.
If you want to change the report problem bullhorn icon (which people do not understand anyway) by a text like 'report problem' and at the same time only want logged in users to be able to report a problem the following code works:
/**
* Displays report listing form.
* @since 3.4
*
* @return void
*/
function cp_report_listing_button() {
global $post;
if ( ! is_singular( array( APP_POST_TYPE ) ) || !current_theme_supports( 'app-reports' ) ) {
return;
}
if ( get_current_user_id() && get_current_user_id() === (int) get_post()->post_author && ! current_user_can( 'manage_options' ) ) {
return;
}
$form = appthemes_get_reports_form( $post->ID, 'post' );
if ( ! $form ) {
$content = '';
} else {
$close = '<button class="close-button" data-close aria-label="' . esc_attr__( 'Close modal', APP_TD ) . '" type="button"><span aria-hidden="true">×</span></button>';
$content = '<a href="#" data-open="reports_modal_form"class="reports_form_link listing-icon" title="' . esc_attr__( 'Report problem', APP_TD ) . '"><span class="screen-reader-text">' . __( 'Report problem', APP_TD ) . '</span>meld een probleem</i><span class="screen-reader-text">' . __( 'Report problem', APP_TD ) . '</span></a>';
$content .= '<div class="report-form reveal" id="reports_modal_form" data-reveal>' . $form . $close .'</div>';
}
echo $content;
}
It replaces the code in classipress > includes > actions.php starting where it says
/**
* Displays report listing form.
* @since 3.4
and ends with
echo $content;
}
Just copy and paste, and replace 'meld een probleem' with the text you want.