Skip to content

Commit

Permalink
Updated pavement file with new name. Added display name static proper…
Browse files Browse the repository at this point in the history
…ty to plugin class. Added description to path setting.
  • Loading branch information
xdissent committed Jan 17, 2010
1 parent 991612e commit add6420
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pavement.py
Expand Up @@ -166,7 +166,7 @@ def release(options):
package_dir = build_dir / 'wp-rest'
src_root.copytree(package_dir,
ignore=ignore_patterns('.gitignore', '*.less', 'vendor'))
archive_file = path('WP_reSt-%s.zip' % version)
archive_file = path('WordPreSt-%s.zip' % version)
archive = ZipFile(archive_file, 'w')
for filename in package_dir.walk():
if not path(filename).isdir():
Expand Down
4 changes: 4 additions & 0 deletions src/rest.css
Expand Up @@ -78,6 +78,10 @@
width:100%;
}

#rest-container p {
padding: 20px;
}

#rest-tool-emphasis {
font-style: italic;
}
Expand Down
23 changes: 13 additions & 10 deletions src/rest.php
@@ -1,9 +1,9 @@
<?php
/*
Plugin Name: reStructuredText
Plugin Name: WordPreSt
Version: 1.0
Plugin URI: http://xdissent.com
Description: A reStructuredText interface for WordPress.
Plugin URI: http://xdissent.com/projects/wprest/
Description: A reStructuredText editor enhancement for WordPress.
Author: Greg Thornton
Author URI: http://xdissent.com
*/
Expand All @@ -13,6 +13,8 @@
*/
class ReStPlugin
{
public static $display_name = 'WordPreSt';

/**
* Initializes the plugin, registering it the WordPress.
*
Expand All @@ -34,11 +36,11 @@ public static function init()
if (!function_exists('add_action')) {
return;
}

/**
* Activate plugin.
*/
register_activation_hook(__FILE__, array(__CLASS__, 'activatePlugin'));
add_action('activate_wp-rest/rest.php', array(__CLASS__, 'activatePlugin'));

/**
* Add the reSt interface to the "Edit Post" page editor.
Expand Down Expand Up @@ -464,7 +466,7 @@ public static function filterEditor($editor)
*/
$contents = '<p>No HTML convertor found! Please edit your <a href="';
$contents .= admin_url('options-general.php?page=rest-plugin-settings');
$contents .= '">reStructuredText Settings</a>.</p>';
$contents .= '">' . self::$display_name . ' Settings</a>.</p>';

} else {
/**
Expand Down Expand Up @@ -697,8 +699,8 @@ public static function render($data)
public static function addSettingsMenu()
{
add_options_page(
'reStructuredText Plugin Settings',
'reSt Plugin Settings',
self::$display_name . ' Settings',
self::$display_name . ' Settings',
'administrator',
'rest-plugin-settings',
array(__CLASS__, 'settingsPage')
Expand Down Expand Up @@ -727,7 +729,7 @@ public static function settingsPage()
?>

<div class="wrap">
<h2>reStructuredText Plugin Settings</h2>
<h2><?php echo self::$display_name ?> Settings</h2>

<form method="post" action="options.php">
<?php settings_fields('rest-settings-group'); ?>
Expand All @@ -736,14 +738,15 @@ public static function settingsPage()
<th scope="row">HTML Convertor Path</th>
<td>
<input type="text" name="rst2html_path" value="<?php echo get_option('rst2html_path'); ?>" />
<span class="description">The absolute path to the docutils rst2html.py script.</span>
</td>
</tr>
<tr valign="top">
<th scope="row">HTML Convertor Options</th>
<td>
<fieldset>
<legend class="screen-reader-text">
<span>reStructuredText settings</span>
<span><?php echo self::$display_name ?> settings</span>
</legend>

<?php foreach ($available_rst2html_options as $opt => $label) { ?>
Expand Down

0 comments on commit add6420

Please sign in to comment.