WordPress.org

Ready to get started?Download WordPress

Forums

Editing Plug in template files (1 post)

  1. danskkr
    Member
    Posted 2 years ago #

    I'm trying to edit thee template files of a plug in (easyrecipe) but nothing I do seems to make a jot of difference. Nothing fancy, I'm just trying to rearrane some of the DIVs, but all the templates are marked (inactive), and while an changes I make are saved, they don't have any effect. I've tried deactivating the plugin, editing the file offline and reuploading via ftp before reactivating the plugin but this didn't work.

    There is one template file which is maked (active) so I'm wondering if there is anything in it I can change to allow me to make edits to the plug in.

    <?php
    
      /*
        Plugin Name: Easy Recipe
        Plugin URI: http://www.orgasmicchef.com/easyrecipe/
        Description: Create, edit, display and print recipes with hRecipe microformat functionality
        Author: Orgasmic Chef
        Version: 2.2.1
        Author URI: http://www.orgasmicchef.com
       */
    
      // Make sure we don't expose any info if called directly
      if (!function_exists('add_action')) {
        echo "Hi there!  I'm just a plugin, not much I can do when called directly.";
        exit;
      }
    
      function easyrecipeNeedPHP5() {
        wp_die("Easy Recipe requires PHP 5+.  Your server is running PHP" . phpversion() . '<br /><a href="/wp-admin/plugins.php">Go back</a>');
      }
    
      function easyrecipeNeedDOM() {
        wp_die("Easy Recipe requires the PHP DOMDocument extension but it has been disabled in your server's PHP" . phpversion() . '<br /><a href="/wp-admin/plugins.php">Go back</a>');
      }
    
      if (phpversion() < '5') {
        register_activation_hook(__FILE__, "easyrecipeNeedPHP5");
        return;
      }
    
      if (!class_exists("DOMDocument")) {
        register_activation_hook(__FILE__, "easyrecipeNeedDOM");
        return;
      }
    
    //  register_activation_hook(__FILE__, "easyrecipeActivated");
      /*
       * If we're in admin, we only care about specific pages/actions
       * Don't waste time with stuff where the plugin isn't needed
       */
      if (is_admin()) {
        if ($GLOBALS["pagenow"] == "admin-ajax.php") {
          if (!isset($_REQUEST["action"]) || ($_REQUEST["action"] != "ERsendDiagnostics" && $_REQUEST["action"] != "customCSS")) {
            return;
          }
        }
      }
      if (!class_exists('EasyRecipe')) {
        require_once 'class-easyrecipe.php';
        $er = new EasyRecipe();
        register_activation_hook(__FILE__, array($er, "easyrecipeActivated"));
        register_deactivation_hook(__FILE__, array($er, "easyrecipeDeactivated"));
      }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic