Plugin Directory

Changeset 1212986


Ignore:
Timestamp:
08/04/2015 11:31:17 PM (10 years ago)
Author:
pvigilante
Message:

Added footer blocks

Location:
hiilite-creative-group-branding/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • hiilite-creative-group-branding/trunk/index.php

    r1188277 r1212986  
    11<?php
    22/*
    3 Plugin Name: Hiilite Admin
    4 Plugin URI: http://hiilite.com
    5 Description: This plugin customizes the WordPress login screen to Hiilite branding.
    6 Version: 1.0.3
    7 Author: Hiilite Creative Group
    8 Author URI: http://hiilite.com/team/
    9 License: GPLv2
     3* Plugin Name: Hiilite Admin
     4* Plugin URI: http://hiilite.com
     5* Description: This plugin customizes the WordPress login screen to Hiilite branding.
     6* Version: 1.0.4
     7* Author: Hiilite Creative Group
     8* Author URI: http://hiilite.com/team/
     9* License: GPLv2
     10*
     11* @package Hiilite_admin
     12*
    1013*/
    1114
    12 // add a new logo to the login page
     15// If this file is called directly, then abort execution.
     16if ( ! defined( 'WPINC' ) ) {
     17    die( "Aren't you supposed to come here via WP-Admin?" );
     18}
     19
     20/**
     21 * Holds the filesystem directory path.
     22 */
     23define( 'HIILITE_DIR', dirname( __FILE__ ) );
     24
     25// Set the global variables for Better Search path and URL
     26$hiilite_path = plugin_dir_path( __FILE__ );
     27$hiilite_url = plugins_url() . '/' . plugin_basename( dirname( __FILE__ ) );
     28////////////////////////////////////
     29//
     30// Add a new logo to the login page
     31//
     32////////////////////////////////////
    1333function hiilite_login_logo() { ?>
    1434    <style type="text/css">
     
    5777add_action( 'login_enqueue_scripts', 'hiilite_login_logo' );
    5878
     79///////////////////////////////
     80//
    5981// add new dashboard widgets
     82//
     83//////////////////////////////
    6084function hiilite_add_dashboard_widgets() {
    6185    wp_add_dashboard_widget( 'hiilite_dashboard_welcome', 'Welcome', 'hiilite_add_welcome_widget' );
     
    7094<a href="tel:+18883033444">1.888.303.3444</a><br>
    7195</p><div id="social-icons">
    72 <a href="https://www.facebook.com/hiilite" target="_blank"><img src="http://www.hiilite.com/wordpress/wp-content/uploads/2014/11/Facebook-32.png" width="32" height="32" alt="Facebook" scale="0"></a><a href="https://twitter.com/hiilite" target="_blank"><img src="http://www.hiilite.com/wordpress/wp-content/uploads/2014/11/Twitter-Bird-32.png" width="32" height="32" alt="Twitter" scale="0"></a><a href="https://plus.google.com/u/0/b/107657092449987968512/107657092449987968512" target="_blank"><img src="http://www.hiilite.com/wordpress/wp-content/uploads/2014/11/Google-Plus-32.png" width="32" height="32" alt="Google" scale="0"></a>
     96<a href="https://www.facebook.com/hiilite" target="_blank"><img src="https://hiilite.com/wp-content/uploads/2014/11/Facebook-32.png" width="32" height="32" alt="Facebook" scale="0"></a><a href="https://twitter.com/hiilite" target="_blank"><img src="https://hiilite.com/wp-content/uploads/2014/11/Twitter-Bird-32.png" width="32" height="32" alt="Twitter" scale="0"></a><a href="https://plus.google.com/u/0/b/107657092449987968512/107657092449987968512" target="_blank"><img src="https://hiilite.com/wp-content/uploads/2014/11/Google-Plus-32.png" width="32" height="32" alt="Google" scale="0"></a>
    7397</div>
    7498 
     
    80104function hiilite_remove_dashboard_widgets() {
    81105    $user = wp_get_current_user();
    82    // if ( ! $user->has_cap( 'manage_options' ) ) {
    83         remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
    84         remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
    85         remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
    86         remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );
    87         remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );
    88    // }
     106    remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
     107    remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
     108    remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
     109    remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );
     110    remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );
    89111}
    90112add_action( 'wp_dashboard_setup', 'hiilite_remove_dashboard_widgets' );
     
    93115function hiilite_move_dashboard_widget() {
    94116    $user = wp_get_current_user();
    95     //if ( ! $user->has_cap( 'manage_options' ) ) {
    96117        global $wp_meta_boxes;
    97118        $widget = $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'];
     
    102123        unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity'] );
    103124        $wp_meta_boxes['dashboard']['side']['core']['dashboard_activity'] = $widget2;
    104     //}
     125
    105126}
    106127add_action( 'wp_dashboard_setup', 'hiilite_move_dashboard_widget' );
    107128
     129/////////////////////////////////////////////////////
     130//
    108131// let's start by enqueuing our styles correctly
     132//
     133////////////////////////////////////////////////////
    109134function hiilite_admin_styles() {
    110135    wp_register_style( 'hiilite_admin_stylesheet', plugins_url( '/css/style.css', __FILE__ ) );
     
    113138add_action( 'admin_enqueue_scripts', 'hiilite_admin_styles' );
    114139
    115 //change the footer text
     140function hiilite_front_scripts() {
     141    wp_register_style( 'hiilite_stylesheet', plugins_url( '/css/stylefixes.css', __FILE__ ) );
     142    wp_enqueue_style( 'hiilite_stylesheet');
     143
     144}
     145
     146add_action( 'wp_enqueue_scripts', 'hiilite_front_scripts' );
     147
     148//////////////////////////////////
     149//
     150//  Change the Admin footer text
     151//
     152//////////////////////////////////
    116153function hiilite_admin_footer_text () {
    117     echo '<a href="http://www.hiilite.com/marketing-strategy/"><img src="' . plugins_url( 'images/hiilite-logo-lettermark.png' , __FILE__ ) . '"> Marketing</a>, <a href="http://www.hiilite.com/seo-social-media/">SEO</a>, <a href="http://www.hiilite.com/website-design/">Web Design </a> by <a href="http://www.hiilite.com/">Hiilite Marketing + Web Design in Kelowna</a>';
     154    echo '<a href="https://hiilite.com/marketing-strategy/"><img src="' . plugins_url( 'images/hiilite-logo-lettermark.png' , __FILE__ ) . '"> Marketing</a>, <a href="https://hiilite.com/seo-social-media/">SEO</a>, <a href="https://hiilite.com/website-design/">Web Design </a> by <a href="https://hiilite.com/">Hiilite Marketing + Web Design in Kelowna</a>';
    118155    ?>
    119156    <!-- Start of hiilite Zendesk Widget script -->
     
    125162
    126163
     164
     165//////////////////////////////////
     166//
     167//  Change the Theme footer text
     168//
     169//////////////////////////////////
     170/**
     171 * Adds scripts to the footer. Filters `wp_footer`.
     172 */
     173function hiilite_addfooter() {
     174
     175    $hiilite_settings = hiilite_read_options();
     176
     177    $hiilite_other = stripslashes( $hiilite_settings['hiilite_other'] );
     178
     179    if ( '' != $hiilite_other ) {
     180        echo $hiilite_other;
     181    }
     182
     183}
     184add_action( 'wp_footer', 'hiilite_addfooter' );
     185
     186/**
     187 * Default options.
     188 *
     189 * @return array Array of default options
     190 */
     191function hiilite_default_options() {
     192    $hiilite_settings = array (
     193        'enable_plugin' => false,   // Enable plugin switch
     194        'disable_notice' => false,  // // Disable notice that is displayed when enable_plugin is false
     195        'hiilite_other' => '<div id="hiilite_admin_footer" style="width:100%;clear:both;background:#23282d;line-height:2em;color:white; text-align:center;">Copyright &copy; '.date('Y').' '.bloginfo('name').'. All rights reserved. <a style="color:white;" href="https://hiilite.com/">Kelowna Website Design</a>, <a style="color:white;" href="https://hiilite.com/marketing-strategy/">Strategic Marketing</a>, and <a style="color:white;" href="https://hiilite.com/seo-social-media/">SEO</a> by <a style="color:white;" href="https://hiilite.com/">Marketing and Web Agency Hiilite</a></div>'
     196    );
     197    return apply_filters( 'hiilite_default_options', $hiilite_settings );
     198}
     199
     200/**
     201 * Function to read options from the database and add any new ones.
     202 *
     203 * @return array Options from the database
     204 */
     205function hiilite_read_options() {
     206    $hiilite_settings_changed = false;
     207
     208    $defaults = hiilite_default_options();
     209
     210    $hiilite_settings = array_map( 'stripslashes', (array) get_option( 'hiilite_settings' ) );
     211    unset( $hiilite_settings[0] ); // produced by the (array) casting when there's nothing in the DB
     212
     213    // If there are any new options added to the Default Options array, let's add them
     214    foreach ( $defaults as $k=>$v ) {
     215        if ( ! isset( $hiilite_settings[ $k ] ) ) {
     216            $hiilite_settings[ $k ] = $v;
     217        }
     218        $hiilite_settings_changed = true;
     219    }
     220
     221    if ( true == $hiilite_settings_changed ) {
     222        update_option( 'hiilite_settings', $hiilite_settings );
     223    }
     224
     225    return apply_filters( 'hiilite_read_options', $hiilite_settings );
     226}
     227
     228
     229
     230/**
     231 *  Admin option
     232 *
     233 */
     234if ( is_admin() || strstr( $_SERVER['PHP_SELF'], 'wp-admin/' ) ) {
     235
     236    /**
     237     *  Load the admin pages if we're in the Admin.
     238     *
     239     */
     240    require_once( HIILITE_DIR . "/admin.inc.php" );
     241
     242    /**
     243     * Adding WordPress plugin action links.
     244     *
     245     * @param array $links
     246     * @return array
     247     */
     248    function hiilite_plugin_actions_links( $links ) {
     249
     250        return array_merge(
     251            array(
     252                'settings' => '<a href="' . admin_url( 'options-general.php?page=hiilite_options' ) . '">' . __( 'Settings', 'add-to-footer' ) . '</a>'
     253            ),
     254            $links
     255        );
     256
     257    }
     258    add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'hiilite_plugin_actions_links' );
     259
     260    /**
     261     * Add meta links on Plugins page.
     262     *
     263     * @param array $links
     264     * @param string $file
     265     * @return array
     266     */
     267    function hiilite_plugin_actions( $links, $file ) {
     268        static $plugin;
     269        if ( ! $plugin ) {
     270            $plugin = plugin_basename( __FILE__ );
     271        }
     272
     273        // create link
     274        if ( $file == $plugin ) {
     275            $links[] = '<a href="http://wordpress.org/support/plugin/better-search">' . __( 'Support', 'add-to-footer' ) . '</a>';
     276            $links[] = '<a href="http://ajaydsouza.com/donate/">' . __( 'Donate', 'add-to-footer' ) . '</a>';
     277        }
     278        return $links;
     279    }
     280    add_filter( 'plugin_row_meta', 'hiilite_plugin_actions', 10, 2 ); // only 2.8 and higher
     281
     282} // End admin.inc
     283
     284
     285
     286
     287
     288
     289
     290
     291//////////////////////////////////
     292//
     293//  Change Admin Menu Bar
     294//
     295//////////////////////////////////
    127296add_action( 'admin_bar_menu', 'modify_admin_bar', 999 );
    128297
     
    175344require_once dirname( __FILE__ ) . '/Plugin-Activation/class-tgm-plugin-activation.php';
    176345
    177 add_action( 'tgmpa_register', 'my_theme_register_required_plugins' );
     346add_action( 'tgmpa_register', 'hiilite_register_required_plugins' );
    178347
    179348
     
    190359 * TGM_Plugin_Activation class constructor.
    191360 */
    192 function my_theme_register_required_plugins() {
     361function hiilite_register_required_plugins() {
    193362
    194363    /**
     
    219388            'external_url'       => '', // If set, overrides default API URL and points to an external URL.
    220389        ),
    221 
    222         // This is an example of how to include a plugin from a private repo in your theme.
    223         /*
    224         array(
    225             'name'               => 'TGM New Media Plugin', // The plugin name.
    226             'slug'               => 'tgm-new-media-plugin', // The plugin slug (typically the folder name).
    227             'source'             => 'https://s3.amazonaws.com/tgm/tgm-new-media-plugin.zip', // The plugin source.
    228             'required'           => true, // If false, the plugin is only 'recommended' instead of required.
    229             'external_url'       => 'https://github.com/thomasgriffin/New-Media-Image-Uploader', // If set, overrides default API URL and points to an external URL.
    230         ),*/
     390        array(
     391            'name'               => 'Gravity Forms', // The plugin name.
     392            'slug'               => 'gravityforms', // The plugin slug (typically the folder name).
     393            'source'             => plugin_dir_path( __FILE__ ) . '/Plugin-Activation/plugins/gravityforms.zip', // The plugin source.
     394            'required'           => false, // If false, the plugin is only 'recommended' instead of required.
     395            'version'            => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher.
     396            'force_activation'   => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.
     397            'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.
     398            'external_url'       => '', // If set, overrides default API URL and points to an external URL.
     399        ),
     400        array(
     401            'name'               => 'Revolution Slider', // The plugin name.
     402            'slug'               => 'revslider', // The plugin slug (typically the folder name).
     403            'source'             => plugin_dir_path( __FILE__ ) . '/Plugin-Activation/plugins/revslider.zip', // The plugin source.
     404            'required'           => false, // If false, the plugin is only 'recommended' instead of required.
     405            'version'            => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher.
     406            'force_activation'   => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.
     407            'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins.
     408            'external_url'       => '', // If set, overrides default API URL and points to an external URL.
     409        ),
    231410
    232411        // This is an example of how to include a plugin from the WordPress Plugin Repository.
     
    235414            'slug'      => 'iwp-client',
    236415            'required'  => false,
     416        ),
     417        array(
     418            'name'      => 'WP SEO Redirect 301',
     419            'slug'      => 'wp-seo-redirect-301',
     420            'required'  => false,
    237421        ),
    238422        array(
     
    249433            'name'      => 'Sucuri Security - Auditing, Malware Scanner and Security Hardening',
    250434            'slug'      => 'sucuri-scanner',
     435            'required'  => false,
     436        ),
     437        array(
     438            'name'      => 'underConstruction',
     439            'slug'      => 'underconstruction',
     440            'required'  => false,
     441        ),
     442        array(
     443            'name'      => 'Limit Login Attempts',
     444            'slug'      => 'limit-login-attempts',
    251445            'required'  => false,
    252446        ),
     
    264458        'default_path' => '',                      // Default absolute path to pre-packaged plugins.
    265459        'menu'         => 'tgmpa-install-plugins', // Menu slug.
    266         'has_notices'  => true,                    // Show admin notices or not.
     460        'has_notices'  => false,                    // Show admin notices or not.
    267461        'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
    268462        'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
     
    270464        'message'      => '',                      // Message to output right before the plugins table.
    271465        'strings'      => array(
    272             'page_title'                      => __( 'Install Required Plugins', 'tgmpa' ),
    273             'menu_title'                      => __( 'Install Plugins', 'tgmpa' ),
    274             'installing'                      => __( 'Installing Plugin: %s', 'tgmpa' ), // %s = plugin name.
     466            'page_title'                      => __( 'Install Hiilite Recommended Plugins', 'tgmpa' ),
     467            'menu_title'                      => __( 'Install Hiilite Plugins', 'tgmpa' ),
     468            'installing'                      => __( 'Installing Hiilite Plugin: %s', 'tgmpa' ), // %s = plugin name.
    275469            'oops'                            => __( 'Something went wrong with the plugin API.', 'tgmpa' ),
    276470            'notice_can_install_required'     => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s).
  • hiilite-creative-group-branding/trunk/readme.txt

    r1188232 r1212986  
    44Requires at least: 3.0.1
    55Tested up to: 4.2.1
    6 Stable tag: 1.0.3
     6Stable tag: 1.0.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050
    5151* Added recommended plugins, including WordPress SEO by Yoast, WPBakery Visual Composer, Backup Buddy, Sucuri Security, InfiniteWP Client and Math Captcha
     52
     53= 1.0.4 =
     54
     55* Added recommended plugins and new footer text panel
     56
Note: See TracChangeset for help on using the changeset viewer.