WordPress.org

Plugin Directory

Changeset 1637218


Ignore:
Timestamp:
04/13/17 23:13:29 (11 days ago)
Author:
mbis
Message:

Dev version 1.0.4

Location:
permalink-manager
Files:
22 added
1 edited

Legend:

Unmodified
Added
Removed
  • permalink-manager/trunk/includes/core/permalink-manager-admin-functions.php

    r1615226 r1637218  
    1313        add_action( 'admin_menu', array($this, 'add_menu_page') ); 
    1414        add_action( 'admin_init', array($this, 'init') ); 
     15        add_action( 'admin_notices', array($this, 'custom_admin_notices') ); 
    1516    } 
    1617 
     
    165166                    $fields .= "</p>"; 
    166167                } 
     168            break; 
     169 
     170            case 'single_checkbox' : 
     171                $fields .= '<div class="checkboxes">'; 
     172                $checked = ($value == 1) ? "checked='checked'" : ""; 
     173                $checkbox_label = (isset($args['checkbox_label'])) ? $args['checkbox_label'] : ''; 
     174 
     175                $fields .= "<label for='{$input_name}'><input type='checkbox' {$input_class} value='1' name='{$input_name}' {$checked} /> {$checkbox_label}</label>"; 
     176                $fields .= '</div>'; 
    167177            break; 
    168178 
     
    332342        $output = "<div id=\"permalink-manager\" class=\"wrap\">"; 
    333343 
    334         // Display alerts and another content if needed and the plugin header 
    335         $output .= $permalink_manager_before_sections_html; 
     344        // Display alerts [moved to custom_admin_notices() function] and another content if needed and the plugin header 
     345        // $output .= $permalink_manager_before_sections_html; 
    336346        $output .= "<h2 id=\"plugin-name-heading\">" . PERMALINK_MANAGER_PLUGIN_NAME . " <a href=\"" . PERMALINK_MANAGER_WEBSITE ."\" target=\"_blank\">" . __('by Maciej Bis', 'permalink-manager') . "</a></h2>"; 
    337347 
     
    451461    } 
    452462 
     463    function custom_admin_notices() { 
     464        global $permalink_manager_before_sections_html; 
     465        echo $permalink_manager_before_sections_html; 
     466    } 
     467 
    453468} 
Note: See TracChangeset for help on using the changeset viewer.