Closed bobbingwide closed 4 years ago
I developed a prototype version that uses bw_get_posts to find the related blocks for a plugin. When applied to the full list of plugins it appeared quite slow. Consider using a query against post_meta.
Select count(*) from $wpdb->postmeta
where meta_key = ‘_oik_sc_plugin’ and meta_value = %d
Where the meta_value is the ID of the oik-plugin.
It needs to join the post_id of postmeta to posts where the post type is ‘block’, since _oik_sc_plugin
is the noderef for a number of different posts.
This is now released in v1.37.0 to wp-a2z.org. See
The logic using oiksc_maybe_get_current_post_id()
produced the wrong results on the home page.
Revert to using bw_current_post_id()
and only call oiksc_count_blocks_directly()
when the $id is set to other than 0.
This is now active on blocks.wp-a2z.org so can be closed.
Requirements
To see at a glance how many blocks have been catalogued for a particular plugin enabling us to compare it with the number we said we've done
Proposed solution
Add virtual field "Blocks Catalogued" with name
blocks_catalogued