Plugin Directory

Changeset 3390753


Ignore:
Timestamp:
11/05/2025 11:31:33 PM (5 months ago)
Author:
wpsaad
Message:

Fixed issue #context undifined

Location:
alt-manager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • alt-manager/tags/1.7.9/inc/alm-empty-generator.php

    r3390345 r3390753  
    340340    $ID = get_the_ID();
    341341    $type = get_post_field( 'post_type', $ID );
     342    // Initialize context with a default value
     343    $context = '';
    342344    if ( is_front_page() || is_home() ) {
    343345        $context = 'home';
     
    346348    } elseif ( $type === 'page' ) {
    347349        $context = 'page';
     350    }
     351    // Skip processing if context is not set
     352    if ( empty( $context ) ) {
     353        return;
    348354    }
    349355    $replacements = [
  • alt-manager/trunk/inc/alm-empty-generator.php

    r3390345 r3390753  
    340340    $ID = get_the_ID();
    341341    $type = get_post_field( 'post_type', $ID );
     342    // Initialize context with a default value
     343    $context = '';
    342344    if ( is_front_page() || is_home() ) {
    343345        $context = 'home';
     
    346348    } elseif ( $type === 'page' ) {
    347349        $context = 'page';
     350    }
     351    // Skip processing if context is not set
     352    if ( empty( $context ) ) {
     353        return;
    348354    }
    349355    $replacements = [
Note: See TracChangeset for help on using the changeset viewer.