ballhogjoni
Member
Posted 8 months ago #
SELECT count(*) as c FROM wp_posts WHERE ID IN (SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id = 18562) AND ID IN (SELECT post_id FROM wp_postmeta WHERE meta_key = '_menu_item_menu_item_parent' AND meta_value = '40138') ORDER BY menu_order;
Looks like some code generated by a theme or plugin, rather than core. But I would think it is difficult to tell.
ballhogjoni
Member
Posted 3 months ago #
Anybody know anything about this?
This query looks like the one from WPtouch Pro plugin, see wptouch_wordpress_menu_has_children() function in wptouch-pro/include/template-tags/wordpress-menu.php:
$sql = $wpdb->prepare( "SELECT count(*) as c FROM {$wpdb->base_prefix}posts WHERE ID IN (SELECT object_id FROM {$wpdb->base_prefix}term_relationships WHERE term_taxonomy_id = %d) AND ID IN (SELECT post_id FROM {$wpdb->base_prefix}postmeta WHERE meta_key = '_menu_item_menu_item_parent' AND meta_value = '%d') ORDER BY menu_order", $settings->custom_menu_name, $parent );
It's a premium plugin, not available in WP.org directory.