Plugin Directory

Changeset 3467596


Ignore:
Timestamp:
02/23/2026 11:14:36 AM (5 weeks ago)
Author:
eugenezolo
Message:

Release version 1.0.6 - Added Squirrly SEO plugin support

Location:
outrank
Files:
19 added
3 edited

Legend:

Unmodified
Added
Removed
  • outrank/trunk/libs/api.php

    r3449532 r3467596  
    278278    }
    279279
     280    // Squirrly SEO - update wp_qss table if it exists
     281    $sq_table = $wpdb->prefix . 'qss';
     282    // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
     283    if ($wpdb->get_var("SHOW TABLES LIKE '{$sq_table}'") === $sq_table) {
     284        $post_url = get_permalink($post_id);
     285        $url_hash = md5(strval($post_id));
     286        $sq_meta_description = sanitize_text_field($params['meta_description'] ?? '');
     287        $sq_focus_keyword = sanitize_text_field($params['focus_keyword'] ?? $params['focus_keyphrase'] ?? '');
     288
     289        $sq_defaults = array(
     290            'doseo' => 1, 'noindex' => 0, 'nofollow' => 0, 'nositemap' => 0,
     291            'title' => '', 'description' => '', 'keywords' => '',
     292            'canonical' => '', 'primary_category' => '',
     293            'redirect' => '', 'redirect_type' => 301,
     294            'robots' => null, 'focuspage' => null,
     295            'tw_media' => '', 'tw_title' => '', 'tw_description' => '', 'tw_type' => '',
     296            'og_title' => '', 'og_description' => '', 'og_author' => '', 'og_type' => '', 'og_media' => '',
     297            'jsonld' => '', 'jsonld_types' => array(), 'fpixel' => '',
     298            'patterns' => null, 'sep' => null, 'optimizations' => null, 'innerlinks' => null,
     299        );
     300
     301        // Check if entry already exists and preserve user-configured fields
     302        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
     303        $existing = $wpdb->get_row($wpdb->prepare(
     304            "SELECT id, seo FROM {$sq_table} WHERE url_hash = %s",
     305            $url_hash
     306        ));
     307
     308        if ($existing) {
     309            $seo_data = maybe_unserialize($existing->seo);
     310            if (!is_array($seo_data)) {
     311                $seo_data = $sq_defaults;
     312            }
     313        } else {
     314            $seo_data = $sq_defaults;
     315        }
     316
     317        // Set our values (title, description, keywords)
     318        $seo_data['title'] = $title ?? '';
     319        $seo_data['description'] = $sq_meta_description;
     320        $seo_data['keywords'] = $sq_focus_keyword;
     321        $seo_data['doseo'] = 1;
     322
     323        if ($existing) {
     324            // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
     325            $wpdb->update($sq_table, array(
     326                'seo'       => serialize($seo_data),
     327                'date_time' => current_time('mysql'),
     328            ), array('id' => $existing->id));
     329        } else {
     330            $post_obj = serialize(array(
     331                'ID' => $post_id, 'post_type' => 'post', 'term_id' => 0, 'taxonomy' => '',
     332            ));
     333            // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
     334            $wpdb->insert($sq_table, array(
     335                'blog_id'   => get_current_blog_id(),
     336                'post'      => $post_obj,
     337                'URL'       => $post_url,
     338                'url_hash'  => $url_hash,
     339                'seo'       => serialize($seo_data),
     340                'date_time' => current_time('mysql'),
     341            ));
     342        }
     343    }
     344
    280345    return new WP_REST_Response(['success' => true, 'post_id' => $post_id], 200);
    281346}
  • outrank/trunk/outrank.php

    r3449532 r3467596  
    66 * Plugin URI: https://outrank.so
    77 * Description: Get traffic and outrank competitors with automatic SEO-optimized content generation published to your WordPress site.
    8  * Version: 1.0.5
     8 * Version: 1.0.6
    99 * Author: Outrank
    1010 * License: GPLv2 or later
     
    255255    if (strpos($hook_suffix, 'outrank') === false) return; // Only enqueue on outrank pages
    256256
    257     wp_enqueue_style('outrank-style', OUTRANK_PLUGIN_URL . 'css/manage.css', [], '1.0.5');
    258     wp_enqueue_style('outrank-home-style', OUTRANK_PLUGIN_URL . 'css/home.css', [], '1.0.5');
    259 
    260     wp_enqueue_script('outrank-script', OUTRANK_PLUGIN_URL . 'script/manage.js', ['jquery'], '1.0.5', true);
     257    wp_enqueue_style('outrank-style', OUTRANK_PLUGIN_URL . 'css/manage.css', [], '1.0.6');
     258    wp_enqueue_style('outrank-home-style', OUTRANK_PLUGIN_URL . 'css/home.css', [], '1.0.6');
     259
     260    wp_enqueue_script('outrank-script', OUTRANK_PLUGIN_URL . 'script/manage.js', ['jquery'], '1.0.6', true);
    261261}
    262262
  • outrank/trunk/readme.txt

    r3449532 r3467596  
    55Tested up to: 6.8 
    66Requires PHP: 8.0 
    7 Stable tag: 1.0.
     7Stable tag: 1.0.6
    88License: GPLv2 or later 
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html 
     
    7171== Changelog ==
    7272
     73= 1.0.6 =
     74* Added Squirrly SEO plugin support for SEO meta data (title, description, keywords)
     75
    7376= 1.0.5 =
    7477* Added full WordPress Multisite support
Note: See TracChangeset for help on using the changeset viewer.