Plugin Directory

Changeset 3832884


Ignore:
Timestamp:
11/29/2026 11:22:48 AM (6 hours ago)
Author:
soradigital
Message:

2.16.1: responsive Search Console tables (scrollable wrap, min-width, break-word)

Location:
soradigital-seo-optimizer/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • soradigital-seo-optimizer/trunk/modules/gsc.php

    r3829608 r3832884  
    712712        }
    713713        $with_history = is_array( $prev_positions );
    714         echo '<table class="widefat striped" style="max-width:980px;"><thead><tr><th>' . esc_html( $first_label ) . '</th><th style="width:90px;">' . esc_html__( 'Clicks', 'soradigital-seo-optimizer' ) . '</th><th style="width:90px;">' . esc_html__( 'Impressions', 'soradigital-seo-optimizer' ) . '</th><th style="width:80px;">CTR</th><th style="width:80px;">' . esc_html__( 'Position', 'soradigital-seo-optimizer' ) . '</th>';
     714        echo '<div class="sseo-table-wrap"><table class="widefat striped" style="max-width:980px;"><thead><tr><th>' . esc_html( $first_label ) . '</th><th style="width:90px;">' . esc_html__( 'Clicks', 'soradigital-seo-optimizer' ) . '</th><th style="width:90px;">' . esc_html__( 'Impressions', 'soradigital-seo-optimizer' ) . '</th><th style="width:80px;">CTR</th><th style="width:80px;">' . esc_html__( 'Position', 'soradigital-seo-optimizer' ) . '</th>';
    715715        if ( $with_history ) {
    716716                echo '<th style="width:80px;">' . esc_html__( 'Prev.', 'soradigital-seo-optimizer' ) . '</th><th style="width:130px;">' . esc_html__( 'Change', 'soradigital-seo-optimizer' ) . '</th>';
    … …  
    719719        foreach ( $rows as $row ) {
    720720                $label = isset( $row['keys'][0] ) ? (string) $row['keys'][0] : '';
    721                 echo '<tr><td style="word-break:break-all;">' . esc_html( $label ) . '</td>';
     721                echo '<tr><td style="word-break:break-word;">' . esc_html( $label ) . '</td>';
    722722                echo '<td>' . esc_html( sseo_gsc_fmt_int( isset( $row['clicks'] ) ? $row['clicks'] : 0 ) ) . '</td>';
    723723                echo '<td>' . esc_html( sseo_gsc_fmt_int( isset( $row['impressions'] ) ? $row['impressions'] : 0 ) ) . '</td>';
    … …  
    731731                echo '</tr>';
    732732        }
    733         echo '</tbody></table>';
     733        echo '</tbody></table></div>';
    734734}
    735735
    … …  
    853853                return;
    854854        }
    855         echo '<table class="widefat striped" style="max-width:980px;"><thead><tr><th>' . esc_html__( 'Snapshot', 'soradigital-seo-optimizer' ) . '</th><th style="width:140px;">' . esc_html__( 'Keywords', 'soradigital-seo-optimizer' ) . '</th></tr></thead><tbody>';
     855        echo '<div class="sseo-table-wrap"><table class="widefat striped" style="max-width:980px;"><thead><tr><th>' . esc_html__( 'Snapshot', 'soradigital-seo-optimizer' ) . '</th><th style="width:140px;">' . esc_html__( 'Keywords', 'soradigital-seo-optimizer' ) . '</th></tr></thead><tbody>';
    856856        foreach ( array_reverse( $history ) as $snapshot ) {
    857857                $count = isset( $snapshot['queries'] ) && is_array( $snapshot['queries'] ) ? count( $snapshot['queries'] ) : 0;
    858858                echo '<tr><td>' . esc_html( date_i18n( 'd M Y H:i', (int) $snapshot['taken'] ) ) . '</td><td>' . esc_html( (string) $count ) . '</td></tr>';
    859859        }
    860         echo '</tbody></table>';
     860        echo '</tbody></table></div>';
    861861
    862862        if ( count( $history ) < 2 ) {
    … …  
    875875                return;
    876876        }
    877         echo '<table class="widefat striped" style="max-width:980px;"><thead><tr><th>' . esc_html__( 'Keyword', 'soradigital-seo-optimizer' ) . '</th><th style="width:90px;">' . esc_html__( 'Prev.', 'soradigital-seo-optimizer' ) . '</th><th style="width:90px;">' . esc_html__( 'Position', 'soradigital-seo-optimizer' ) . '</th><th style="width:130px;">' . esc_html__( 'Change', 'soradigital-seo-optimizer' ) . '</th></tr></thead><tbody>';
     877        echo '<div class="sseo-table-wrap"><table class="widefat striped" style="max-width:980px;"><thead><tr><th>' . esc_html__( 'Keyword', 'soradigital-seo-optimizer' ) . '</th><th style="width:90px;">' . esc_html__( 'Prev.', 'soradigital-seo-optimizer' ) . '</th><th style="width:90px;">' . esc_html__( 'Position', 'soradigital-seo-optimizer' ) . '</th><th style="width:130px;">' . esc_html__( 'Change', 'soradigital-seo-optimizer' ) . '</th></tr></thead><tbody>';
    878878        foreach ( array( 'improved', 'dropped' ) as $group ) {
    879879                foreach ( $movers[ $group ] as $query => $d ) {
    880                         echo '<tr><td style="word-break:break-all;">' . esc_html( $query ) . '</td>';
     880                        echo '<tr><td style="word-break:break-word;">' . esc_html( $query ) . '</td>';
    881881                        echo '<td>' . esc_html( sseo_gsc_fmt_position( $d['previous'] ) ) . '</td>';
    882882                        echo '<td>' . esc_html( sseo_gsc_fmt_position( $d['current'] ) ) . '</td>';
    … …  
    884884                }
    885885        }
    886         echo '</tbody></table>';
     886        echo '</tbody></table></div>';
    887887}
    888888
    … …  
    899899                return;
    900900        }
    901         echo '<table class="widefat striped" style="max-width:980px;"><thead><tr><th>' . esc_html__( 'Title', 'soradigital-seo-optimizer' ) . '</th><th style="width:170px;">' . esc_html__( 'Index Status', 'soradigital-seo-optimizer' ) . '</th><th style="width:150px;">' . esc_html__( 'Last crawled', 'soradigital-seo-optimizer' ) . '</th><th style="width:110px;"></th></tr></thead><tbody>';
     901        echo '<div class="sseo-table-wrap"><table class="widefat striped" style="max-width:980px;"><thead><tr><th>' . esc_html__( 'Title', 'soradigital-seo-optimizer' ) . '</th><th style="width:170px;">' . esc_html__( 'Index Status', 'soradigital-seo-optimizer' ) . '</th><th style="width:150px;">' . esc_html__( 'Last crawled', 'soradigital-seo-optimizer' ) . '</th><th style="width:110px;"></th></tr></thead><tbody>';
    902902        foreach ( $posts as $recent ) {
    903903                $entry = sseo_gsc_get_inspect_cache( $recent->ID );
    904                 echo '<tr><td><a href="' . esc_url( get_edit_post_link( $recent->ID, 'raw' ) ) . '">' . esc_html( get_the_title( $recent ) ) . '</a><br><span style="color:#666;word-break:break-all;">' . esc_html( (string) get_permalink( $recent ) ) . '</span></td>';
     904                echo '<tr><td><a href="' . esc_url( get_edit_post_link( $recent->ID, 'raw' ) ) . '">' . esc_html( get_the_title( $recent ) ) . '</a><br><span style="color:#666;word-break:break-word;">' . esc_html( (string) get_permalink( $recent ) ) . '</span></td>';
    905905                if ( null === $entry ) {
    906906                        echo '<td>' . esc_html__( 'Not checked yet', 'soradigital-seo-optimizer' ) . '</td><td>–</td>';
    … …  
    915915                echo '<input type="hidden" name="sseo_gsc_action" value="inspect_one"><input type="hidden" name="sseo_gsc_post_id" value="' . esc_attr( (string) $recent->ID ) . '"><button class="button" type="submit">' . esc_html__( 'Check', 'soradigital-seo-optimizer' ) . '</button></form></td></tr>';
    916916        }
    917         echo '</tbody></table>';
     917        echo '</tbody></table></div>';
    918918}
    919919
    … …  
    10021002
    10031003/* Per-post panel: index status actions. */
     1004
     1005/** Enqueues the responsive table style on the Search Console page and post editor. */
     1006add_action( 'admin_enqueue_scripts', 'sseo_gsc_table_assets' );
     1007function sseo_gsc_table_assets( $hook_suffix ) {
     1008        $sseo_gsc_pages = array(
     1009                'soradigital-seo-optimizer_page_soradigital-seo-optimizer-gsc',
     1010                'post.php',
     1011                'post-new.php',
     1012        );
     1013        if ( ! in_array( $hook_suffix, $sseo_gsc_pages, true ) ) {
     1014                return;
     1015        }
     1016        wp_register_style( 'sseo-gsc-tables', false, array(), SSEO_VERSION );
     1017        wp_enqueue_style( 'sseo-gsc-tables' );
     1018        wp_add_inline_style( 'sseo-gsc-tables', '.sseo-table-wrap{overflow-x:auto;max-width:980px}.sseo-table-wrap table{min-width:640px}.sseo-table-wrap td:first-child,.sseo-table-wrap th:first-child{min-width:220px}' );
     1019}
    10041020
    10051021add_action( 'admin_enqueue_scripts', 'sseo_gsc_post_panel_js' );
  • soradigital-seo-optimizer/trunk/readme.txt

    r3832096 r3832884  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 2.16.0
     7Stable tag: 2.16.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    112112== Changelog ==
    113113
     114= 2.16.1 =
     115* Fix: Search Console page tables (Top Pages, Top Keywords, position history, index status) are now wrapped in a horizontally scrollable container with a minimum table width, so on narrow screens the URL/keyword column no longer squeezes into one character per line — the table keeps its shape and scrolls sideways instead. Desktop layout unchanged.
     116
    114117= 2.16.0 =
    115118* New: **llms.txt generator** — an optional Markdown site map at `/llms.txt` (llmstxt.org format) for AI crawlers and answer engines. Settings → llms.txt & RSS: enable toggle, post type and taxonomy sections, max items per section, and optional excerpts after each link. Served dynamically with a one-hour cache that refreshes when content changes; password-protected and noindex content is skipped. Off by default.
  • soradigital-seo-optimizer/trunk/soradigital-seo-optimizer.php

    r3832096 r3832884  
    44 * Plugin URI:        https://sora.ai.in/soraseo/
    55 * Description:       Complete SEO toolkit — meta & templates, 18 schema types, sitemaps, smart redirects + 404 monitor, multi-project Google Indexing API, IndexNow, and Search Console stats. Every feature is free.
    6  * Version:           2.16.0
     6 * Version:           2.16.1
    77 * Requires at least: 5.8
    88 * Requires PHP:      7.4
    … …  
    1818}
    1919
    20 define( 'SSEO_VERSION', '2.16.0' );
     20define( 'SSEO_VERSION', '2.16.1' );
    2121define( 'SSEO_OPTION_SETTINGS', 'sseo_settings' );
    2222define( 'SSEO_OPTION_DB_VERSION', 'sseo_db_version' );
Note: See TracChangeset for help on using the changeset viewer.