Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Nova Year

    (@novayear)

    extra fix -> get posts fastes way with order by date last to old

    wp-content/copy-or-move-comments/copy_move_functions.php line 14-18

        $post_query = new WP_Query(array(
            'post_type'         => $post_type,
            'post_status'       => $post_status,
            'posts_per_page'    => 20,
            'order'          => 'DESC',
            'orderby'        => 'date'
        ));
    Thread Starter Nova Year

    (@novayear)

    Hello friend, I waited for an update, but when it did not arrive, I edited the codes manually.

    IndexNow v2.6.0: Manual changes…

    wp-content\plugins\mihdan-index-now\src\Hooks.php
    Replace line 35 with the code below or add // at the beginning:
    //add_action( ‘wp_insert_comment’, [ $this, ‘comment_updated’ ], 10, 2 );

    Add a new line between lines 35 and 36 and write this code:
    add_action( ‘transition_comment_status’, [ $this, ‘comment_status_updated’ ], 10, 3 );

    Lines 34,35, 36 and 37 should look like this:
    add_action( ‘transition_post_status’, [ $this, ‘post_updated’ ], 10, 3 );
    //add_action( ‘wp_insert_comment’, [ $this, ‘comment_updated’ ], 10, 2 );
    add_action( ‘transition_comment_status’, [ $this, ‘comment_status_updated’ ], 10, 3 );
    add_action( ‘saved_term’, [ $this, ‘term_updated’ ], 10, 3 );

    Add the last code before the line below.
    Line 106 : public function comment_updated( int $id, WP_Comment $comment ): void {
    Add this codes::
    public function comment_status_updated(string $new_status,string $old_status,WP_Comment $comment): void{
    if($new_status!==’approved’){return;}
    // Run only comment approved.
    if($old_status===’unapproved’ and $new_status===’approved’){
    // Delay.
    $last_update = (int) get_comment_meta($id,Utils::get_plugin_prefix().’_last_update’,true);
    if((current_time(‘timestamp’)-$last_update)<$this->ping_delay){return;}
    do_action(‘mihdan_index_now/comment_updated’,$comment->comment_post_ID,$comment);
    update_comment_meta($id,Utils::get_plugin_prefix().’_last_update’,current_time(‘timestamp’));
    }
    }

    If you can’t do it, you can get the codes of the entire page ready-made here:
    https://gist.github.com/NovaYear/52645febca60010f3ab124b4287e58a9

    Thread Starter Nova Year

    (@novayear)

    Hello again,
    Overall the plugin works very well. Is the content update notification only in the index-now service? Content updated feedback is not given in yandex and google webmaster services? For example, when a comment is written on an article, the index-now service is notified that the page about this article has been updated, but this update notification is not made in other services. In all services, when a new article / content is added, the notification is made, but the update notification is only in the index-now service, could it be an error in the codes? It caught my attention, I just wanted to ask. thanks good work.

    • This reply was modified 1 year, 7 months ago by Nova Year. Reason: in content wrong html tag fixing

    hi, @naiches

    admin top toolbar toggle button nice idea, but the button doesn’t need “Dark Mode Toggle” text, just a “??” (lamp icon). the text is too long it fills the whole toolbar so other icons disappear. Better to have single icon button on top toolbar. otherwise it’s useless and annoying. I hope you will consider my suggestion. In this way, it becomes more useful and functional.

    thx.

    Are you seeing any error in your log files?

    hi bro,
    after the update, it does not collect data or show what it collected. I checked the error logs. There is no problem on logs. but it hasn’t shown anything on the charts for hours. There may be an overlooked wrong code somewhere after the update. I checked, redis is running, I did a cache query, there are records. no problem with the cache working, just a problem with stats.

Viewing 5 replies - 1 through 5 (of 5 total)