Plugin Directory

Changeset 3271799


Ignore:
Timestamp:
04/13/2025 12:44:52 PM (12 months ago)
Author:
lumiblog
Message:

2.0.0

  • Added: Red background color for better visibility of the admin bar notification
  • Added: External stylesheet (sebih_custom.css) for cleaner code and maintainability
  • Added: Versioned asset loading to solve browser cache issues
  • Updated: Plugin tested and confirmed to be compatible with PHP 8.4
  • Updated: Plugin tested and confirmed to be compatible with WordPress 6.8
Location:
search-engines-blocked-in-header
Files:
10 added
3 edited

Legend:

Unmodified
Added
Removed
  • search-engines-blocked-in-header/trunk/readme.txt

    r3183019 r3271799  
    1 
    21=== Search Engines Blocked in Header ===
    3 Contributors: lumiblog, divibanks
    4 Donate Link: https://wordpress.org/support/plugin/footnotes-made-easy/
    5 Tags: privacy, blocked, toolbar, seo, search engines blocked
    6 Requires PHP: 7.0
    7 Requires at least: 3.2
    8 Tested up to: 6.7
    9 Stable tag: 1.1.0
    10 License: GPLv2 or later
    11 License URI: https://www.gnu.org/licenses/gpl-2.0.html
     2Contributors: lumiblog, divibanks 
     3Donate Link: https://github.com/sponsors/divibanks 
     4Tags: privacy, blocked, toolbar, seo, search engines blocked 
     5Requires PHP: 7.0 
     6Requires at least: 3.2 
     7Tested up to: 6.
     8Stable tag: 2.0.0 
     9License: GPLv2 or later 
     10License URI: https://www.gnu.org/licenses/gpl-2.0.html 
    1211
    1312Display the 'Search Engines Discouraged' notification in the WordPress Toolbar if the blog_public option has been checked.
     
    2019
    2120* **Convenient Notification**: Keep track of your site's search engine visibility status directly in the WordPress Toolbar.
     21* **Visual Alert**: Red background styling ensures the message is highly visible and easy to notice.
    2222* **Seamless Integration**: The plugin seamlessly integrates with WordPress, providing a hassle-free experience.
     23* **Custom CSS**: Styles are now separated into an external stylesheet for better organization and maintainability.
     24* **Versioned Assets**: Ensures proper cache busting and fresh styles are always loaded.
    2325* **Easy Accessibility**: Instantly access the "Search Engines Discouraged" notification without navigating through multiple screens.
    2426* **Translation Support**: Easily translates the notification message to your preferred language to match your site's language.
     
    2628By simply activating this plugin, you'll have immediate access to vital information about whether search engines are discouraged from indexing your site. This is particularly useful for site administrators and super admins who need to monitor the visibility settings of their WordPress sites closely.
    2729
    28 See the demo:
    29 
    30 [youtube https://www.youtube.com/watch?v=hT6qMvC5SnU]
    31 
    3230== Installation ==
    3331
    34 1. Upload `search-engines-blocked-in-header` directory to the `/wp-content/plugins/` directory
    35 2. Activate the plugin through the 'Plugins' menu in WordPress
     321. Upload `search-engines-blocked-in-header` directory to the `/wp-content/plugins/` directory 
     332. Activate the plugin through the 'Plugins' menu in WordPress 
    36343. We're all done.
    3735
     
    4846== Screenshots ==
    4947
    50 1. Notification is shown on the admin bar
     481. **Go to Settings > Reading** to `Discourage search engines from indexing this site`
     492. Notification is shown on the admin bar
     50
    5151
    5252== Changelog ==
     53
     54= 2.0.0 =
     55* Added: Red background color for better visibility of the admin bar notification
     56* Added: External stylesheet (sebih_custom.css) for cleaner code and maintainability
     57* Added: Versioned asset loading to solve browser cache issues
     58* Updated: Plugin tested and confirmed to be compatible with PHP 8.4
     59* Updated: Plugin tested and confirmed to be compatible with WordPress 6.8
    5360
    5461= 1.1.0 =
     
    5865== Upgrade Notice ==
    5966
    60 = 1.1.0 =
    61 * Updated readme file
    62 * Updated compatibility with WordPress 6.7
     67= 2.0.0 =
     68* Added red styling and visual improvements
     69* Refactored CSS into external file for better maintenance
     70* Confirmed compatibility with PHP 8.4 and WordPress 6.8
  • search-engines-blocked-in-header/trunk/search-engines-blocked-in-header.php

    r3183019 r3271799  
    11<?php
    22/*
    3 Plugin Name: Search Engines Blocked in Header
    4 Plugin URI: https://github.com/divibanks/search-engines-blocked-in-header
    5 Description: Display the 'Search Engines Discouraged' (or any translation) notification in the WordPress Toolbar if blog_public option has been checked.
    6 Author: Patrick Lumumba
    7 Version: 1.1.0
    8 Author URI: https://lumumbas.blog
    9 Text Domain: search-engines-blocked-in-header
    10 Domain Path: /languages/
     3* Plugin Name: Search Engines Blocked in Header
     4* Plugin URI: https://github.com/divibanks/search-engines-blocked-in-header
     5* Description: Display the 'Search Engines Discouraged' notification in the WordPress Toolbar if blog_public option is unchecked.
     6* Author: Patrick Lumumba
     7* Version: 2.0.0
     8* Author URI: https://lumumbas.blog
     9* License: GPLv2 or later
     10* License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     11* Text Domain: search-engines-blocked-in-header
     12*
     13* @package search-engines-blocked-in-header
    1114*/
    1215
     
    1518}
    1619
    17 add_action( 'admin_bar_menu', 'nostromo_search_engines_blocked', 1000 );
    18 function nostromo_search_engines_blocked() {
    19     global $wp_admin_bar, $wpdb;
     20/**
     21 * Add notice to admin bar if search engines are discouraged
     22 */
     23add_action( 'admin_bar_menu', 'sebih_search_engines_blocked', 1000 );
     24function sebih_search_engines_blocked() {
     25    global $wp_admin_bar;
     26
    2027    if ( ! is_super_admin() || ! is_admin_bar_showing() ) {
    2128        return;
    2229    }
    23     $url = '/wp-admin/options-reading.php';
     30
    2431    if ( ! get_option( 'blog_public' ) ) {
    25         $wp_admin_bar->add_menu( array( 'id'    => 'search_engines_blocked',
    26                                         'title' => __( 'Search Engines Discouraged', 'search-engines-blocked-in-header' ),
    27                                         'href'  => $url
     32        $wp_admin_bar->add_menu( array(
     33            'id'    => 'search_engines_blocked',
     34            'title' => __( 'Search Engines Discouraged', 'search-engines-blocked-in-header' ),
     35            'href'  => admin_url( 'options-reading.php' ),
     36            'meta'  => array(
     37                'class' => 'sebih-toolbar-alert'
     38            )
    2839        ) );
    2940    }
    3041}
    3142
    32 /* Load Text Domain */
     43/**
     44 * Load plugin text domain
     45 */
    3346add_action( 'plugins_loaded', 'sebih_load_textdomain' );
    3447function sebih_load_textdomain() {
    3548    load_plugin_textdomain( 'search-engines-blocked-in-header', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    3649}
    37 ?>
     50
     51/**
     52 * Enqueue custom CSS
     53 */
     54add_action( 'admin_enqueue_scripts', 'sebih_enqueue_assets' );
     55function sebih_enqueue_assets() {
     56    if ( ! get_option( 'blog_public' ) && is_admin_bar_showing() ) {
     57        wp_enqueue_style(
     58            'sebih-custom-css',
     59            plugin_dir_url( __FILE__ ) . 'css/sebih_custom.css',
     60            array(),
     61            '1.0.0' // Version added to avoid caching issues
     62        );
     63    }
     64}
Note: See TracChangeset for help on using the changeset viewer.