PHP code example of devgeniem / dustpress-comments
1. Go to this page and download the library: Download devgeniem/dustpress-comments library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
devgeniem / dustpress-comments example snippets
class CommentsModel extends \DustPress\Model {
public function get_comments_args( $post_id ) {
// This disables replying to comments.
$args['reply'] = false;
return $args;
}
public function get_form_args( $post_id ) {
$args['title_reply'] = __('Comment', 'POF');
$args['label_submit'] = __('Submit', 'POF');
$args['class_submit'] = 'button radius';
$args['remove_input'] = array( 'url' );
$args['input_class'] = 'radius';
return $args;
}
}