Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
7 | function b_waiting_wordpress_0($wp_num = '') |
||
8 | { |
||
9 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
10 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
11 | $ret = []; |
||
12 | $block = []; |
||
13 | |||
14 | // wordpress |
||
15 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix("wp{$wp_num}_comments") . " WHERE comment_approved='0'"); |
||
16 | if ($result) { |
||
17 | $block['adminlink'] = XOOPS_URL . "/modules/wordpress{$wp_num}/wp-admin/moderation.php"; |
||
18 | [$block['pendingnum']] = $xoopsDB->fetchRow($result); |
||
|
|||
19 | $block['lang_linkname'] = sprintf(_PI_WAITING_WAITINGS_FMT, $wp_num); |
||
20 | } |
||
21 | |||
22 | $ret[] = $block; |
||
23 | |||
24 | return $ret; |
||
25 | } |
||
37 |