0,'publish'=>0,'draft'=>0,'pending'=>0,'private'=>0); } $registered = wp_count_posts($post_type); $counts = array(); foreach (array('publish','draft','pending','private') as $status) { $counts[$status] = isset($registered->{$status}) ? max(0,(int)$registered->{$status}) : 0; } $counts['total'] = array_sum($counts); return $counts; } function azlinkpro_dashboard_config_status() { $settings = function_exists('azlinkpro_tbl_options') ? azlinkpro_tbl_options() : array(); $tag = isset($settings['tag']) ? trim((string)$settings['tag']) : ''; $id = isset($settings['client_id']) ? trim((string)$settings['client_id']) : ''; $secret = isset($settings['secret']) ? trim((string)$settings['secret']) : ''; return array( 'amazon_ready'=> $tag !== '' && $id !== '' && $secret !== '', 'has_tag' => $tag !== '', 'has_credentials' => $id !== '' && $secret !== '', 'conflict' => function_exists('azlinkpro_conflicting_plugins') && (bool)azlinkpro_conflicting_plugins(), ); } function azlinkpro_render_dashboard() { if (!current_user_can('edit_posts')) { return; } $modules = array( 'azlinkpro_table'=>array('title'=>'Comparison Tables', 'shortcode'=>'azlinkpro_table', 'detail'=>'Side-by-side comparisons', 'feature'=>''), 'azlinkpro_image'=>array('title'=>'Amazon Images', 'shortcode'=>'azlinkpro_amazon_image', 'detail'=>'Clickable product photos', 'feature'=>''), 'azlinkpro_showcase'=>array('title'=>'Product Showcases','shortcode'=>'azlinkpro_showcase','detail'=>'Individual product displays', 'feature'=>'showcase'), 'azlinkpro_proscons'=>array('title'=>'Pros & Cons','shortcode'=>'azlinkpro_pros_cons','detail'=>'Balanced review cards', 'feature'=>'pros_cons'), ); $summary = array(); foreach ($modules as $type=>$meta) { $summary[$type] = azlinkpro_dashboard_count($type); } $cfg = azlinkpro_dashboard_config_status(); $recent = get_posts(array( 'post_type'=>array_keys($modules), 'post_status'=>array('publish','draft','pending','private'), 'posts_per_page'=>7, 'orderby'=>'modified','order'=>'DESC', 'suppress_filters'=>false, )); ?>
Dashboard
Your publishing toolkit at a glance. Counts are from saved WordPress content on this site.
published drafts pending private
No saved Tables, Amazon Images, Showcases or Pros & Cons yet. Use Add new above to get started.
| Title | Type | Status | Shortcode |
|---|---|---|---|
| ID) ?: '(Untitled)'); ?> | |
Plan: · Plan and license
This page makes no network requests and never shows credentials. Amazon live connection shows the last test run from Settings or the setup wizard; changing your API keys resets it.
Check connectionProduct Link Audit: find the products in your tables and images that Amazon no longer sells or has out of stock, with a check every week. Included in the ' . esc_html(azlinkpro_feature_plans_label('link_audit')) . ' plans.
' . 'See plans' . 'Dismiss this message'; } add_action('azlinkpro_dashboard_top', 'azlinkpro_audit_teaser'); function azlinkpro_hide_audit_teaser() { check_admin_referer('azlinkpro_hide_audit_teaser'); if (current_user_can('edit_posts')) { update_user_meta(get_current_user_id(), 'azlinkpro_hide_audit_teaser', 1); } wp_safe_redirect(admin_url('admin.php?page=azlinkpro')); exit; } add_action('admin_post_azlinkpro_hide_audit_teaser', 'azlinkpro_hide_audit_teaser');