Plugin Directory

Changeset 3491158


Ignore:
Timestamp:
03/25/2026 06:32:31 PM (5 days ago)
Author:
edward_plainview
Message:

Broadcast v52.03

Location:
threewp-broadcast/trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • threewp-broadcast/trunk/ThreeWP_Broadcast.php

    r3455980 r3491158  
    99Plugin Name:    Broadcast
    1010Plugin URI:     https://broadcast.plainviewplugins.com/
    11 Version:        52.02
     11Version:        52.03
    1212*/
    1313
    1414if ( ! defined( 'ABSPATH' ) ) exit;
    1515
    16 DEFINE( 'THREEWP_BROADCAST_VERSION', 52.02 );
     16DEFINE( 'THREEWP_BROADCAST_VERSION', 52.03 );
    1717
    1818require_once( __DIR__ . '/vendor/autoload.php' );
  • threewp-broadcast/trunk/readme.txt

    r3455980 r3491158  
    55Requires at least: 6.2
    66Requires PHP: 8.0
    7 Stable tag: 52.02
     7Stable tag: 52.03
    88Tags: multipost, sharing, duplicate, syndication, marketing
    99Tested up to: 6.9.1
     
    373373== Changelog ==
    374374
     375= 52.03 20260325 =
     376
     377* Fix: Prevent PHP timeouts during Broadcast Data maintenance checks by chunking the checks more efficiently. Thanks to mj@networker.de for the patch and testing.
     378* Dev: Add ->existing_child_post in the broadcasting_data to help the modify_post action see how the existing child post looks.
     379* Dev: Fix proper display of custom fields in view post info maintenance check.
     380
    375381= 52.02 20260207 =
    376382
  • threewp-broadcast/trunk/src/broadcasting_data.php

    r3445175 r3491158  
    121121    **/
    122122    public $dynamic_data = false;
     123
     124    /**
     125        @brief      The WP_Post of the existing child post on the child blog.
     126        @details    The post data is retrieved after switching to the child blog and reset to false after each switch.
     127                    Can be used in conjunction with the modify_post action to get the existing child post's data.
     128        @since      2026-03-12 16:42:09
     129    **/
     130    public $existing_child_post = false;
    123131
    124132    /**
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/check.php

    r3445175 r3491158  
    148148
    149149                if ( count( $bcd->get_linked_children() ) > 0 )
    150                     $this->data->unnecessary_children->set( $id, $bcd );
     150                    $this->data->unnecessary_children->set( $id, true );
    151151
    152152                // The parent blog + post must exist.
     
    311311        $r = '';
    312312
    313         $max = count( $this->data->ids_to_check );
    314         if ( $max < 1 )
     313        $query = sprintf(
     314            "SELECT * FROM `%s` WHERE `id` > %d ORDER BY `id` ASC LIMIT %d",
     315            $this->table,
     316            $this->data->last_id,
     317            data::$rows_per_step
     318        );
     319        $results = $this->broadcast()->query( $query );
     320
     321        if ( count( $results ) < 1 )
    315322        {
    316323            $r .= $this->broadcast()->p( __( 'Finished checking database rows. Now checking the actual broadcast data relations.', 'threewp-broadcast' ) );
     
    319326        }
    320327
    321 
     328        $remaining = max( 0, $this->data->total_rows - $this->data->checked_rows );
    322329        $r .= $this->broadcast()->p(
    323330            // Translators: NUMBER rows left to check
    324             __( '%d rows left to check...', 'threewp-broadcast' ),
    325             count( $this->data->ids_to_check )
     331            __( '%1$d of %2$d rows checked. %3$d left to check...', 'threewp-broadcast' ),
     332            $this->data->checked_rows,
     333            $this->data->total_rows,
     334            $remaining
    326335        );
    327336
    328         // Check the next ids
    329         $max = min( $max, data::$rows_per_step );
    330         $ids = [];
    331         for ( $counter = 0; $counter < $max; $counter++ )
    332         {
    333             $id = array_shift( $this->data->ids_to_check );
    334             $query = sprintf( "SELECT * FROM `%s` WHERE `id` = '%s'", $this->table, $id );
    335             $results = $this->broadcast()->query( $query );
    336             $result = reset( $results );
     337        foreach( $results as $result )
     338        {
     339            $id = (int) $result[ 'id' ];
     340            $this->data->last_id = max( $this->data->last_id, $id );
     341            $this->data->checked_rows++;
    337342
    338343            $bcd = BroadcastData::sql( $result );
     
    344349            if ( ! BroadcastData::unserialize_data( $result[ 'data' ] ) )
    345350            {
    346                 $this->data->broken_bcd->set( $id, $bcd );
     351                $this->data->broken_bcd->set( $id, true );
    347352                continue;
    348353            }
     
    356361            if ( $this->data->seen_blog_post->has( $key ) )
    357362            {
    358                 $this->data->duplicate_bcd->put( $id, $bcd );
     363                $this->data->duplicate_bcd->put( $id, true );
    359364                continue;
    360365            }
     
    366371            if ( ! $this->blog_and_post_exists( $blog_id, $post_id ) )
    367372            {
    368                 $this->data->missing_post->put( $id, $bcd );
     373                $this->data->missing_post->put( $id, [
     374                    'blog_id' => $blog_id,
     375                    'post_id' => $post_id,
     376                ] );
    369377                continue;
    370378            }
     
    403411
    404412        // Count the rows in the table.
    405         $query = sprintf( 'SELECT `id` FROM `%s`', $this->table );
     413        $query = sprintf( 'SELECT COUNT(*) AS row_count FROM `%s`', $this->table );
    406414        $results = $this->broadcast()->query( $query );
    407 
    408         $this->data->ids = [];
    409         foreach( $results as $result )
    410             $this->data->ids []= $result[ 'id' ];
    411 
    412         $this->data->ids_to_check = $this->data->ids;
     415        $row = is_array( $results ) ? reset( $results ) : null;
     416        $count = isset( $row[ 'row_count' ] ) ? intval( $row[ 'row_count' ] ) : 0;
     417
     418        $this->data->last_id = 0;
     419        $this->data->checked_rows = 0;
     420        $this->data->total_rows = $count;
    413421
    414422        $r = $this->broadcast()->p(
    415423            // Translators: NUMBER rows to check
    416424            __( 'Beginning to check broadcast data. %d rows to check.', 'threewp-broadcast' ),
    417             count( $this->data->ids_to_check )
     425            $count
    418426        );
    419427        $r .= $this->next_step( 'check_ids' );
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/data.php

    r3190117 r3491158  
    1313{
    1414    public static $rows_per_step = 500;
     15    public $last_id = 0;
     16    public $checked_rows = 0;
     17    public $total_rows = 0;
    1518
    1619    public function __construct()
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/traits/steps/step_results_fail_broken_bcd.php

    r1229100 r3491158  
    1515        if ( $button->pressed() )
    1616        {
    17             // Delete all of the missing post broadcast datas.
    18             foreach( $this->data->broken_bcd as $bcd )
     17            $batch_size = 200;
     18            $deleted = 0;
     19            foreach( $this->data->broken_bcd as $id => $ignore )
    1920            {
    20                 $o->bc->sql_delete_broadcast_data( $bcd->id );
    21                 $this->data->broken_bcd->forget( $bcd->id );
     21                $o->bc->sql_delete_broadcast_data( $id );
     22                $this->data->broken_bcd->forget( $id );
     23                $deleted++;
     24                if ( $deleted >= $batch_size )
     25                    break;
    2226            }
    23             $o->bc->message( 'The broadcast data objects that could not be read have been deleted.' );
     27            $remaining = count( $this->data->broken_bcd );
     28            if ( $remaining > 0 )
     29            {
     30                $o->bc->message( sprintf( 'Deleted %d corrupt broadcast data objects. %d remaining.', $deleted, $remaining ) );
     31                $o->r .= $this->next_step( 'results' );
     32            }
     33            else
     34            {
     35                $o->bc->message( 'The broadcast data objects that could not be read have been deleted.' );
     36            }
    2437            return;
    2538        }
     
    3346        $row->th()->text( 'Belonging to post' );
    3447
    35         foreach( $this->data->broken_bcd as $id => $bcd )
     48        foreach( $this->data->broken_bcd as $id => $ignore )
    3649        {
     50            $bcd = $this->data->broadcast_data->get( $id );
     51            if ( ! $bcd )
     52                continue;
    3753            $row = $table->body()->row();
    3854            $row->td()->text_( $id );
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/traits/steps/step_results_fail_child_is_unlinked.php

    r1229100 r3491158  
    1515        if ( $button->pressed() )
    1616        {
     17            $batch_size = 200;
     18            $processed = 0;
    1719            foreach( $this->data->child_is_unlinked as $id => $blog_post )
    1820            {
    1921                // Create a link from all of the child posts back to this parent.
    2022                $bcd = $this->data->broadcast_data->get( $id );
     23                if ( ! $bcd )
     24                {
     25                    $this->data->child_is_unlinked->forget( $id );
     26                    continue;
     27                }
    2128                $child_blog_id = key( $blog_post );
    2229                $child_post_id = reset( $blog_post );
     
    2532                $o->bc->set_post_broadcast_data( $child_blog_id, $child_post_id, $child_bcd );
    2633                $this->data->child_is_unlinked->forget( $id );
     34                $processed++;
     35                if ( $processed >= $batch_size )
     36                    break;
    2737            }
    28             $o->bc->message( 'The children now have links back to the parents.' );
     38            $remaining = count( $this->data->child_is_unlinked );
     39            if ( $remaining > 0 )
     40            {
     41                $o->bc->message( sprintf( 'Linked %d children. %d remaining.', $processed, $remaining ) );
     42                $o->r .= $this->next_step( 'results' );
     43            }
     44            else
     45            {
     46                $o->bc->message( 'The children now have links back to the parents.' );
     47            }
    2948            return;
    3049        }
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/traits/steps/step_results_fail_duplicate_bcd.php

    r1229100 r3491158  
    1515        if ( $button->pressed() )
    1616        {
    17             // Delete all of the duplicate post broadcast datas.
    18             foreach( $this->data->duplicate_bcd as $bcd )
     17            $batch_size = 200;
     18            $deleted = 0;
     19            foreach( $this->data->duplicate_bcd as $id => $ignore )
    1920            {
    20                 $o->bc->sql_delete_broadcast_data( $bcd->id );
    21                 $this->data->duplicate_bcd->forget( $bcd->id );
     21                $o->bc->sql_delete_broadcast_data( $id );
     22                $this->data->duplicate_bcd->forget( $id );
     23                $deleted++;
     24                if ( $deleted >= $batch_size )
     25                    break;
    2226            }
    23             $o->bc->message( 'The duplicate broadcast data objects have been deleted.' );
     27            $remaining = count( $this->data->duplicate_bcd );
     28            if ( $remaining > 0 )
     29            {
     30                $o->bc->message( sprintf( 'Deleted %d duplicate broadcast data objects. %d remaining.', $deleted, $remaining ) );
     31                $o->r .= $this->next_step( 'results' );
     32            }
     33            else
     34            {
     35                $o->bc->message( 'The duplicate broadcast data objects have been deleted.' );
     36            }
    2437            return;
    2538        }
     
    3346        $row->th()->text( 'Belonging to post' );
    3447
    35         foreach( $this->data->duplicate_bcd as $id => $bcd )
     48        foreach( $this->data->duplicate_bcd as $id => $ignore )
    3649        {
     50            $bcd = $this->data->broadcast_data->get( $id );
     51            if ( ! $bcd )
     52                continue;
    3753            $row = $table->body()->row();
    3854            $row->td()->text_( $id );
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/traits/steps/step_results_fail_missing_children.php

    r1229100 r3491158  
    1515        if ( $button->pressed() )
    1616        {
     17            $batch_size = 200;
     18            $processed = 0;
    1719            foreach( $this->data->missing_children as $id => $blog_post )
    1820            {
     
    2022                // Remove the link to this non-existent child.
    2123                $bcd = $this->data->broadcast_data->get( $id );
     24                if ( ! $bcd )
     25                {
     26                    $this->data->missing_children->forget( $id );
     27                    continue;
     28                }
    2229                $bcd->remove_linked_child( $child_blog_id );
    2330                $o->bc->set_post_broadcast_data( $bcd->blog_id, $bcd->post_id, $bcd );
    2431                $this->data->missing_children->forget( $id );
     32                $processed++;
     33                if ( $processed >= $batch_size )
     34                    break;
    2535            }
    26             $o->bc->message( 'The missing children have been removed from the broadcast data.' );
     36            $remaining = count( $this->data->missing_children );
     37            if ( $remaining > 0 )
     38            {
     39                $o->bc->message( sprintf( 'Removed %d missing children. %d remaining.', $processed, $remaining ) );
     40                $o->r .= $this->next_step( 'results' );
     41            }
     42            else
     43            {
     44                $o->bc->message( 'The missing children have been removed from the broadcast data.' );
     45            }
    2746            return;
    2847        }
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/traits/steps/step_results_fail_missing_parents.php

    r1229100 r3491158  
    1515        if ( $button->pressed() )
    1616        {
     17            $batch_size = 200;
     18            $processed = 0;
    1719            foreach( $this->data->missing_parents as $id => $ignore )
    1820            {
    1921                // Remove the link to this non-existent parent.
    2022                $bcd = $this->data->broadcast_data->get( $id );
     23                if ( ! $bcd )
     24                {
     25                    $this->data->missing_parents->forget( $id );
     26                    continue;
     27                }
    2128                $bcd->remove_linked_parent();
    2229                $o->bc->set_post_broadcast_data( $bcd->blog_id, $bcd->post_id, $bcd );
    2330                $this->data->missing_parents->forget( $id );
     31                $processed++;
     32                if ( $processed >= $batch_size )
     33                    break;
    2434            }
    25             $o->bc->message( 'The missing parents have been removed from the broadcast data.' );
     35            $remaining = count( $this->data->missing_parents );
     36            if ( $remaining > 0 )
     37            {
     38                $o->bc->message( sprintf( 'Removed %d missing parents. %d remaining.', $processed, $remaining ) );
     39                $o->r .= $this->next_step( 'results' );
     40            }
     41            else
     42            {
     43                $o->bc->message( 'The missing parents have been removed from the broadcast data.' );
     44            }
    2645            return;
    2746        }
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/traits/steps/step_results_fail_missing_post.php

    r1229100 r3491158  
    1515        if ( $button->pressed() )
    1616        {
    17             // Delete all of the missing post broadcast datas.
    18             foreach( $this->data->missing_post as $id => $bcd )
     17            // Delete missing post broadcast data in batches to avoid memory spikes.
     18            $batch_size = 200;
     19            $deleted = 0;
     20            foreach( $this->data->missing_post as $id => $info )
    1921            {
    20                 $o->bc->sql_delete_broadcast_data( $bcd->id );
    21                 $this->data->missing_post->forget( $bcd->id );
     22                $o->bc->sql_delete_broadcast_data( $id );
     23                $this->data->missing_post->forget( $id );
     24                $deleted++;
     25                if ( $deleted >= $batch_size )
     26                    break;
    2227            }
    23             $o->bc->message( 'The broadcast data objects without existing posts have been deleted.' );
     28            $remaining = count( $this->data->missing_post );
     29            if ( $remaining > 0 )
     30            {
     31                $o->bc->message( sprintf( 'Deleted %d broadcast data objects. %d remaining.', $deleted, $remaining ) );
     32                $o->r .= $this->next_step( 'results' );
     33            }
     34            else
     35            {
     36                $o->bc->message( 'The broadcast data objects without existing posts have been deleted.' );
     37            }
    2438            return;
    2539        }
     
    3347        $row->th()->text( 'Belonging to post' );
    3448
    35         foreach( $this->data->missing_post as $id => $bcd )
     49        foreach( $this->data->missing_post as $id => $info )
    3650        {
    3751            $row = $table->body()->row();
    3852            $row->td()->text_( $id );
    3953            $row->td()->text_( 'Post %s on %s',
    40                 $bcd->post_id,
    41                 $this->blogname( $bcd->blog_id )
     54                $info[ 'post_id' ],
     55                $this->blogname( $info[ 'blog_id' ] )
    4256            );
    4357        }
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/traits/steps/step_results_fail_parent_is_unlinked.php

    r1229100 r3491158  
    1515        if ( $button->pressed() )
    1616        {
     17            $batch_size = 200;
     18            $processed = 0;
    1719            foreach( $this->data->parent_is_unlinked as $id => $blog_post )
    1820            {
    1921                $bcd = $this->data->broadcast_data->get( $id );
     22                if ( ! $bcd )
     23                {
     24                    $this->data->parent_is_unlinked->forget( $id );
     25                    continue;
     26                }
    2027                $parent_blog_id = key( $blog_post );
    2128                $parent_post_id = reset( $blog_post );
     
    2431                $o->bc->set_post_broadcast_data( $parent_blog_id, $parent_post_id, $parent_bcd );
    2532                $this->data->parent_is_unlinked->forget( $id );
     33                $processed++;
     34                if ( $processed >= $batch_size )
     35                    break;
    2636            }
    27             $o->bc->message( 'The parents now have links back to the children.' );
     37            $remaining = count( $this->data->parent_is_unlinked );
     38            if ( $remaining > 0 )
     39            {
     40                $o->bc->message( sprintf( 'Linked %d parents. %d remaining.', $processed, $remaining ) );
     41                $o->r .= $this->next_step( 'results' );
     42            }
     43            else
     44            {
     45                $o->bc->message( 'The parents now have links back to the children.' );
     46            }
    2847            return;
    2948        }
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/traits/steps/step_results_fail_same_parent.php

    r1229100 r3491158  
    4747        if ( $button->pressed() )
    4848        {
     49            $batch_size = 50;
     50            $deleted = 0;
     51            $stop = false;
    4952            foreach( $this->data->same_parent as $blog_id => $blog )
    5053            {
     
    6568
    6669                        $posts->forget( $id );
     70                        $deleted++;
     71                        if ( $deleted >= $batch_size )
     72                        {
     73                            $stop = true;
     74                            break;
     75                        }
    6776                    }
    68                     $blog->forget( $post_id );
     77                    if ( $posts->count() < 1 )
     78                        $blog->forget( $post_id );
     79                    if ( $stop )
     80                        break;
    6981                }
    70                 $this->data->same_parent->forget( $blog_id );
     82                if ( $blog->count() < 1 )
     83                    $this->data->same_parent->forget( $blog_id );
     84                if ( $stop )
     85                    break;
    7186            }
    72             $o->bc->message( 'The orphaned children have been deleted.' );
     87
     88            $remaining = 0;
     89            foreach( $this->data->same_parent as $blog )
     90            {
     91                foreach( $blog as $posts )
     92                {
     93                    foreach( $posts as $post )
     94                        if ( ! isset( $post->link ) )
     95                            $remaining++;
     96                }
     97            }
     98
     99            if ( $remaining > 0 )
     100            {
     101                $o->bc->message( sprintf( 'Deleted %d orphaned children. %d remaining.', $deleted, $remaining ) );
     102                $o->r .= $this->next_step( 'results' );
     103            }
     104            else
     105            {
     106                $o->bc->message( 'The orphaned children have been deleted.' );
     107            }
    73108            return;
    74109        }
  • threewp-broadcast/trunk/src/maintenance/checks/broadcast_data/traits/steps/step_results_fail_unnecessary_children.php

    r1398263 r3491158  
    1515        if ( $button->pressed() )
    1616        {
    17             // Delete all of the missing post broadcast datas.
    18             foreach( $this->data->unnecessary_children as $id => $bcd )
     17            $batch_size = 200;
     18            $processed = 0;
     19            foreach( $this->data->unnecessary_children as $id => $ignore )
    1920            {
     21                $bcd = $this->data->broadcast_data->get( $id );
     22                if ( ! $bcd )
     23                {
     24                    $this->data->unnecessary_children->forget( $id );
     25                    continue;
     26                }
    2027                $bcd->remove_linked_children();
    2128                $o->bc->set_post_broadcast_data( $bcd->blog_id, $bcd->post_id, $bcd );
    2229                $this->data->unnecessary_children->forget( $id );
     30                $processed++;
     31                if ( $processed >= $batch_size )
     32                    break;
    2333            }
    24             $o->bc->message( 'The broadcast data has been cleared of unnecessary children.' );
     34            $remaining = count( $this->data->unnecessary_children );
     35            if ( $remaining > 0 )
     36            {
     37                $o->bc->message( sprintf( 'Removed unnecessary children for %d posts. %d remaining.', $processed, $remaining ) );
     38                $o->r .= $this->next_step( 'results' );
     39            }
     40            else
     41            {
     42                $o->bc->message( 'The broadcast data has been cleared of unnecessary children.' );
     43            }
    2544            return;
    2645        }
     
    3453        $row->th()->text( 'Belonging to post' );
    3554
    36         foreach( $this->data->unnecessary_children as $id => $bcd )
     55        foreach( $this->data->unnecessary_children as $id => $ignore )
    3756        {
     57            $bcd = $this->data->broadcast_data->get( $id );
     58            if ( ! $bcd )
     59                continue;
    3860            $row = $table->body()->row();
    3961            $row->td()->text_( $id );
  • threewp-broadcast/trunk/src/maintenance/checks/simple_broadcast_data/check.php

    r3445175 r3491158  
    5959        global $wpdb;
    6060        $table = $this->broadcast()->broadcast_data_table();
    61         $query = $wpdb->prepare( 'SELECT * FROM %i LIMIT %d OFFSET %d',
     61        $query = $wpdb->prepare( 'SELECT * FROM %i WHERE `id` > %d ORDER BY `id` LIMIT %d',
    6262        [
    6363            $table,
    64             $this->data->per_page,
    65             $this->data->counter
     64            $this->data->last_id,
     65            $this->data->per_page
    6666        ] );
    6767        // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- False positive. Prepared above.
    6868        $rows = $wpdb->get_results( $query );
    6969
    70         $r .= wpautop( sprintf( 'Checking from row %d.', $this->data->counter ) );
     70        if ( count( $rows ) < 1 )
     71        {
     72            $r .= wpautop( sprintf( 'Finished checking %d rows.', $this->data->checked_rows ) );
     73            return $r;
     74        }
     75
     76        $r .= wpautop( sprintf( 'Checking from row %d of %d.', $this->data->checked_rows, $this->data->count ) );
    7177
    7278        foreach( $rows as $row )
    7379        {
     80            $this->data->last_id = max( $this->data->last_id, (int) $row->id );
     81            $this->data->checked_rows++;
    7482            $delete_query = $wpdb->prepare( "DELETE FROM %i WHERE `id` = %d", [ $table, $row->id ] );
    7583
     
    109117        }
    110118
    111         if ( $this->data->counter > $this->data->count )
    112             $r .= wpautop( sprintf( 'Finished checking %d rows.', $this->data->counter ) );
     119        if ( count( $rows ) < $this->data->per_page )
     120            $r .= wpautop( sprintf( 'Finished checking %d rows.', $this->data->checked_rows ) );
    113121        else
    114         {
    115             $this->data->counter += $this->data->per_page;
    116122            $r .= $this->next_step( 'check_rows' );
    117         }
    118123
    119124        return $r;
     
    132137        $count = $wpdb->get_var( $query );
    133138
    134         $this->data->counter = 0;
     139        $this->data->last_id = 0;
     140        $this->data->checked_rows = 0;
    135141        $this->data->count = $count;
    136142        $this->data->per_page = 100;
  • threewp-broadcast/trunk/src/maintenance/checks/view_post_info/check.php

    r3445175 r3491158  
    7777            {
    7878                $json_decoded = json_decode( $value );
    79                 $maybe_unserialized = maybe_unserialize( $value );
     79                $maybe_unserialized = @ unserialize( $value );
    8080
    8181                $exportable = false;
    82                 if ( $json_decoded )
     82                if ( $json_decoded !== null )
    8383                    $exportable = $json_decoded;
    84                 if ( $maybe_unserialized )
    85                     $exportable = $maybe_unserialized;
     84                if ( ! $exportable )
     85                    if ( $maybe_unserialized !== false )
     86                        $exportable = $maybe_unserialized;
    8687
    8788                if ( $exportable )
    8889                    $value = var_export( $exportable, true );
    89                 else
    90                     $value = htmlspecialchars( $value );
     90
     91                $value = htmlspecialchars( $value );
     92
    9193                $metas [ $key ] []= $value;
    9294            }
  • threewp-broadcast/trunk/src/traits/broadcasting.php

    r3445175 r3491158  
    396396                $this->debug( "Ignoring post's parent." );
    397397
     398            $broadcasting_data->existing_child_post = false;
    398399            // Insert new? Or update? Depends on whether the parent post was linked before or is newly linked?
    399400            $need_to_insert_post = true;
     
    408409                    if ( is_a( $child_post, 'WP_Post' ) )
    409410                    {
     411                        $broadcasting_data->existing_child_post = $child_post;
    410412                        $temp_post_data = $bcd->new_post;
    411413                        $temp_post_data->ID = $child_post_id;
Note: See TracChangeset for help on using the changeset viewer.