soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
314 stars 29 forks source link

Wp rocket criticalcss CPT #902

Open wpsumo opened 4 years ago

wpsumo commented 4 years ago

Describe the bug

Wp Rock specifically look for public post types when generating criticalcss: https://github.com/wp-media/wp-rocket/blob/master/inc/classes/optimization/CSS/class-critical-css.php#L156

Set public to false for templates and blocks so WP rocket doesn't have to try to create criticalcss for something that isn't public for the website users and not in the use of criticalcss.

    $args = array(
        'exclude_from_search' => true, 
        'labels'             => $labels,
        'public'             => true,
        'publicly_queryable' => true,
        'has_archive'        => true,
        'show_ui'            => true,
        'show_in_menu'       => 'ct_template',
        'rewrite'            => false,
        'query_var'          => true,
        'capability_type'    => 'post',
        'hierarchical'       => false,
        'menu_position'      => null,
        'supports'           => array( 'title' )
    );

Does oxygen need to have the CPTs set to public? If so WP rocket have an exclude list we should have oxygen builder CPTs included in.

Takkster commented 4 years ago

Having the same issue!