WordPress.org

Plugin Directory

Changeset 617951


Ignore:
Timestamp:
10/27/12 04:15:49 (5 years ago)
Author:
jtallant
Message:

throw error message on activation if genesis not installed

Location:
genesis-bootstrap-carousel/tags/0.1.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • genesis-bootstrap-carousel/tags/0.1.1/genesis-bootstrap-carousel.php

    r609545 r617951  
    66    Author: jtallant 
    77    Author URI: http://justintallant.com 
     8    Text Domain: genesis-bootstrap-carousel 
    89 
    910    Version: 0.1.1 
     
    1415 
    1516define( 'GENESIS_BOOTSTRAP_CAROUSEL_SETTINGS_FIELD', 'genesis_bootstrap_carousel_settings' ); 
    16 define( 'GENESIS_BOOTSTRAP_CAROUSEL_VERSION', '0.1.0' ); 
     17define( 'GENESIS_BOOTSTRAP_CAROUSEL_VERSION', '0.1.1' ); 
     18 
     19register_activation_hook( __FILE__, 'genesis_bootstrap_carousel_activation' ); 
     20/** 
     21 * This function runs on plugin activation. It checks to make sure Genesis 
     22 * or a Genesis child theme is active. If not, it deactivates itself. 
     23 */ 
     24function genesis_bootstrap_carousel_activation() { 
     25 
     26    if ( !defined('GENESIS_LIB_DIR') ) { 
     27        genesis_bootstrap_carousel_deactivate(); 
     28    } 
     29} 
     30 
     31/** 
     32 * Deactivates Genesis Bootstrap Carousel 
     33 */ 
     34function genesis_bootstrap_carousel_deactivate() { 
     35 
     36    deactivate_plugins( plugin_basename( __FILE__ ) ); 
     37    wp_die( 'Sorry, you cannot run Genesis Bootstrap Carousel without <a href="http://www.studiopress.com/themes/genesis">Genesis</a>' ); 
     38} 
    1739 
    1840add_action( 'after_setup_theme', 'genesis_bootstrap_carousel_init', 15 ); 
     
    2345 
    2446    /** require Genesis */ 
    25     if ( ! function_exists( 'genesis_get_option' ) ) 
     47    if ( !defined('GENESIS_LIB_DIR') ) { 
     48        add_action('admin_init', 'genesis_bootstrap_carousel_deactivate'); 
    2649        return; 
     50    } 
    2751 
    2852    // translation support 
  • genesis-bootstrap-carousel/tags/0.1.1/languages/genesis-bootstrap-carousel.pot

    r609542 r617951  
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: Genesis Bootstrap Carousel 0.1.0\n" 
     5"Project-Id-Version: Genesis Bootstrap Carousel 0.1.1\n" 
    66"Report-Msgid-Bugs-To: http://wordpress.org/tag/genesis-bootstrap-carousel\n" 
    7 "POT-Creation-Date: 2012-10-08 11:08:16+00:00\n" 
     7"POT-Creation-Date: 2012-10-27 04:00:34+00:00\n" 
    88"MIME-Version: 1.0\n" 
    99"Content-Type: text/plain; charset=UTF-8\n" 
     
    260260msgstr "" 
    261261 
    262 #: genesis-bootstrap-carousel.php:217 
     262#: genesis-bootstrap-carousel.php:241 
    263263msgid "Displays a carousel inside a widget area" 
    264264msgstr "" 
    265265 
    266 #: genesis-bootstrap-carousel.php:386 
     266#: genesis-bootstrap-carousel.php:410 
    267267msgid "Title:" 
    268268msgstr "" 
    269269 
    270 #: genesis-bootstrap-carousel.php:387 
     270#: genesis-bootstrap-carousel.php:411 
    271271msgid "" 
    272272"To configure slider options, please go to the <a href=\"%s\">Carousel " 
Note: See TracChangeset for help on using the changeset viewer.