Plugin Directory

Changeset 2711757


Ignore:
Timestamp:
04/19/2022 09:11:10 PM (4 years ago)
Author:
pluginoptimizer
Message:

Tagging version trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugin-optimizer/trunk/includes/class-po-mu.php

    r2704634 r2711757  
    250250        }
    251251
    252 
    253252        //return $this->filtered_active_plugins;
    254253        return $active_plugins;
     
    438437        $editing_post_type = $this->is_editing_post_type( $this->current_wp_relative_url );
    439438
     439
    440440        // --- are we on any of the PO pages? yes, second boolean in the condition
    441441        if(
     
    472472            }
    473473
     474            if( $filter->filter_type !== '_endpoint' ){
     475
     476                $slug = str_replace('/', '', $this->current_wp_relative_url);
     477                global $wpdb;
     478                $post_type = $wpdb->get_var("SELECT `post_type` FROM `{$wpdb->prefix}posts` WHERE `post_name` = '{$slug}'");
     479
     480                if( $filter->filter_type == $post_type ){
     481                   
     482                    $this->use_filter($filter);
     483                   
     484                    continue;
     485                }
     486            }
     487
    474488            // Filter by URL
    475489            $endpoints = unserialize($filter->endpoints);
Note: See TracChangeset for help on using the changeset viewer.