Plugin Directory

Changeset 3240787


Ignore:
Timestamp:
02/14/2025 07:28:15 PM (14 months ago)
Author:
topirank
Message:

Init version 1.0.7

Location:
topirank-integration
Files:
32 added
4 edited

Legend:

Unmodified
Added
Removed
  • topirank-integration/trunk/includes/resource-cleaner.php

    r3220350 r3240787  
    11<?php
     2if (!defined('ABSPATH')) exit;
    23
    3 if (! defined('ABSPATH')) exit;
     4function topirank_delete_page_images($post_id)
     5{
     6  $page = get_post($post_id);
     7  if ($page->post_type !== 'page') {
     8    return;
     9  }
    410
    5 function topirank_delete_post_images($post_id)
    6 {
    711  $featured_image_id = get_post_thumbnail_id($post_id);
    812  if ($featured_image_id) {
     
    1216  $post_content = get_post_field('post_content', $post_id);
    1317  if ($post_content) {
    14 
    1518    preg_match_all('/<img[^>]+src=["\']([^"\']+)["\']/i', $post_content, $matches);
    1619    if (!empty($matches[1])) {
     
    2427  }
    2528}
    26 
    27 add_action('before_delete_post', 'topirank_delete_post_images');
     29add_action('before_delete_post', 'topirank_delete_page_images');
  • topirank-integration/trunk/includes/update-content-and-seo.php

    r3236026 r3240787  
    55function topirank_update_post_content($post_id, $file, $archive_name, $selected_style)
    66{
    7   topirank_delete_post_images($post_id);
     7  topirank_delete_page_images($post_id);
    88
    99  $wp_filesystem = topirank_get_filesystem();
  • topirank-integration/trunk/readme.txt

    r3237927 r3240787  
    44Requires at least: 6.0
    55Tested up to: 6.7.1
    6 Stable tag: 1.0.6
     6Stable tag: 1.0.7
    77Requires PHP: 7.3
    88License: GPLv2 or later
     
    5858== Changelog ==
    5959
     60= 1.0.7 =
     61* Improved work with media
     62
    6063= 1.0.6 =
    6164* Improved update posts functionality.
  • topirank-integration/trunk/topirank-integration.php

    r3237927 r3240787  
    33Plugin Name: Topirank Integration
    44Description: Plugin for parsing pages
    5 Version: 1.0.6
     5Version: 1.0.7
    66Author: Topirank
    77License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.