Changeset 3205703
- Timestamp:
- 12/10/2024 02:10:43 PM (14 months ago)
- Location:
- laci-link-cluster
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
laci-link-cluster/tags/1.0.4/includes/Controllers/MetaBoxMainCategoryController.php
r3202824 r3205703 158 158 update_post_meta( $post_id, 'laci_main_category_id', $main_category ); 159 159 160 $outbound_links = array_merge( InternalLinksController::get_outbound_internal_links( $post_id ), WPILCustomTableManager::get_meta_value( $post_id, 'outbound_links' ) ); 160 // Fetch outbound links 161 $outbound_internal_links = InternalLinksController::get_outbound_internal_links( $post_id ); 162 $meta_outbound_links = WPILCustomTableManager::get_meta_value( $post_id, 'outbound_links' ); 163 164 // Ensure both are arrays 165 if ( ! is_array( $outbound_internal_links ) ) { 166 $outbound_internal_links = []; 167 } 168 169 if ( ! is_array( $meta_outbound_links ) ) { 170 $meta_outbound_links = []; 171 } 172 173 // Merge the arrays 174 $outbound_links = array_merge( $outbound_internal_links, $meta_outbound_links ); 161 175 162 176 $unique_outbound_links = array_map( -
laci-link-cluster/trunk/includes/Controllers/MetaBoxMainCategoryController.php
r3166563 r3205703 158 158 update_post_meta( $post_id, 'laci_main_category_id', $main_category ); 159 159 160 $outbound_links = array_merge( InternalLinksController::get_outbound_internal_links( $post_id ), WPILCustomTableManager::get_meta_value( $post_id, 'outbound_links' ) ); 160 // Fetch outbound links 161 $outbound_internal_links = InternalLinksController::get_outbound_internal_links( $post_id ); 162 $meta_outbound_links = WPILCustomTableManager::get_meta_value( $post_id, 'outbound_links' ); 163 164 // Ensure both are arrays 165 if ( ! is_array( $outbound_internal_links ) ) { 166 $outbound_internal_links = []; 167 } 168 169 if ( ! is_array( $meta_outbound_links ) ) { 170 $meta_outbound_links = []; 171 } 172 173 // Merge the arrays 174 $outbound_links = array_merge( $outbound_internal_links, $meta_outbound_links ); 161 175 162 176 $unique_outbound_links = array_map(
Note: See TracChangeset
for help on using the changeset viewer.