<?php /* Get the relative path where the plugin is installed */ function get_renard_dir() { preg_match('/\\/wp-content\\/plugins\\/(.*)$/', htmlspecialchars(__FILE__), $matches); list($match, $relative_file) = $matches; $renard_dir = str_replace('/renard/includes', '', dirname($relative_file)); if ($renard_dir) { $renard_dir .= '/'; } return $renard_dir; } /* Set up stuff for internationalization */ $renard_domain = 'renard'; load_plugin_textdomain($renard_domain, 'wp-content/plugins/' . get_renard_dir() . 'renard/languages'); function _ez($str) { global $renard_domain; _e($str, $renard_domain); } function __z($str) { global $renard_domain; return __($str, $renard_domain); } /* Set up for binding custom tags */ $_renard_bind_array = array(); $_renard_unbind_array = array(); function renard_wind(&$content) {
function add_renard_admin_pages() { add_theme_page(__z('Renard Editor'), __z('Renard'), edit_themes, get_renard_dir() . 'renard/pages/renard-subpanel.php'); }
?> </a></li> <?php } } ?> </ul> <?php } ?> </div> <?php if (!$error) { ?> <form name="template" id="template" action="themes.php?page=<?php echo get_renard_dir(); ?> renard/pages/renard-subpanel.php" method="post"> <?php wp_nonce_field('edit-theme_' . $file . $theme); ?> <div> <textarea cols="<?php echo get_option('renard_editor_cols') ? get_option('renard_editor_cols') : 70; ?> " rows="<?php echo get_option('renard_editor_rows') ? get_option('renard_editor_rows') : 25; ?> " name="newcontent" id="newcontent" tabindex="1"><?php if ($file_is_php) { $content = std2ez($content);