Support » Plugin: My Custom CSS PHP & ADS » Annunce: End support and maintenance

  • Anonymous User 357386

    (@anonymized-357386)


    I want inform all my Custom CSS users of an important decision…
    I’ve just now uninstalled my custom css from my blog, and put a simple php file in mu-plugin.

    This offer me best result and flexibility (i can put code just for logged user, in specific page, etc). Impossible with My Custom CSS.

    This is a ./mu-plugins/_my_custom_css.php example:

    <?php
    /*
     * Plugin Name: My Custom CSS
     * Description: /mu-plugins/_my_custom_css.php
     * Author: Salvatore Noschese
    */
    
    defined( 'ABSPATH' ) or exit;
    
    # style css in header
    add_action( 'wp_head', '_my_custom_css', 999999 );
    
    function _my_custom_css()
    {
    	$fixcacheid = hash( 'crc32', $_SERVER['REQUEST_URI'] );
    ?>
    <style type='text/css' id='<?php echo $fixcacheid; ?>'>
    
    /* global css here */
    ....
    
    <?php if ( is_admin_bar_showing() ) { ?>
    /* fix adminbar */
    ... fix in admin bar (eg, put as fixed)
    <?php } ?>
    
    <?php if ( comments_open() ) { ?>
    /* fix commentform / tinymce frontend */
    ... fix in comment form (if comment form is open - otherwise isn't useful).
    <?php } ?>
    
    <?php if ( is_bbpress() ) { ?>
    /* bbpress forum fix */
    ... customization in bbpress
    <?php } ?>
    
    <?php if ( !bp_is_blog_page() ) { ?>
    /* fix buddypress */
    ... customization in buddypress
    <?php } ?>
    
    <?php if ( is_page(50) ) { ?>
    /* fix page id 50 */
    ... css in page id 50
    <?php } ?>
    
    <?php if ( in_array( 'specific-classinbody', get_body_class() ) ) { ?>
    /* fix classinbody */
    ... fix if exist "classinbody"
    <?php } ?>
    
    <?php if ( is_user_logged_in() ) { ?>
    /* fix directory button in directory homepage */
    ... if user is logged in {or:  if ( !is_user_logged_in() ) for guest }
    <?php } ?>
    
    </style>
    <?php
    }

    More simply and powerful.
    Then, no sense to continue dev with this plugin.

    Thanks for donation (no more, but appreciated), support, replies and time to work with me and this plugin.

    Kind regards,
    Salvatore Noschese (laltroweb.it) 🙂

    • This topic was modified 7 years, 3 months ago by Anonymous User 357386. Reason: hash( 'crc32' ) instead of base64!
  • The topic ‘Annunce: End support and maintenance’ is closed to new replies.