Changeset 1675683
- Timestamp:
- 06/10/2017 09:55:14 PM (9 years ago)
- Location:
- wp-documentor/trunk
- Files:
-
- 1 added
- 9 edited
-
assets/css/wpdoc-main-style.css (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
submenus/cpts.php (modified) (4 diffs)
-
submenus/page-templates.php (added)
-
submenus/pdf-settings.php (modified) (1 diff)
-
submenus/plugins.php (modified) (4 diffs)
-
wpdoc-activation.php (modified) (1 diff)
-
wpdoc-main.php (modified) (1 diff)
-
wpdoc-options-page-main.php (modified) (1 diff)
-
wpdoc-pdf-generator.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-documentor/trunk/assets/css/wpdoc-main-style.css
r1659019 r1675683 1 .wp-documentor-notice { 2 color: #f00; 3 } 4 5 .wp-documentor-panel-no-labels .form-table th { 6 display: none; 7 } 8 9 .wp-documentor-panel-no-labels .form-table label { 10 display: inline-block; 11 font-weight: 600; 12 line-height: 1.3; 13 padding: 20px 10px 20px 0; 14 text-align: left; 15 vertical-align: top; 16 width: 200px; 17 } 18 19 .wp-documentor-panel-no-labels .form-table textarea { 20 margin: 15px 0; 21 } -
wp-documentor/trunk/readme.txt
r1659019 r1675683 8 8 9 9 == Description == 10 Ever start working on a site and wonder to yourself \"Why is that plugin installed, what does it do?\" Yeah, me too. This plugin enumerates the plugins and custom post types on a site, with a description blank for each. You can then output the descriptions to a PDF to give to your clients, so they know what\'s installed and why.10 Ever start working on a site and wonder to yourself "Why is that plugin installed, what does it do?" Yeah, me too. This plugin enumerates the plugins and custom post types on a site, with a description blank for each. You can then output the descriptions to a PDF to give to your clients, so they know what's installed and why. 11 11 12 12 == Installation == 13 13 1. Upload the plugin files to the `/wp-content/plugins/wp-documentor` directory, or install the plugin through the WordPress plugins screen directly. 14 1. Activate the plugin through the \'Plugins\' screen in WordPress.14 1. Activate the plugin through the 'Plugins' screen in WordPress. 15 15 16 16 == Changelog == -
wp-documentor/trunk/submenus/cpts.php
r1659019 r1675683 48 48 function wpdoc_cpt_description_render() { 49 49 $options = get_option( 'wpdoc_cpt_descriptions' ); 50 $built_in_cpts_objects = get_post_types( 51 array( 52 '_builtin' => true, 53 ), 54 'objects' 55 ); 56 $built_in_cpts_slugs = array_keys( $built_in_cpts_objects ); 57 50 58 $all_public_cpts = get_post_types( 51 59 array( … … 57 65 foreach( $all_public_cpts as $slug => $cpt_data ) { 58 66 $label = $cpt_data->label; 67 $status = ''; 68 69 if( in_array( $slug, $built_in_cpts_slugs ) ) { 70 $status = ' <span class="wp-documentor-notice">(Built-In)</span>'; 71 } 59 72 60 73 if( isset( $options[ $slug ][ 'description' ] ) ) { … … 65 78 ?> 66 79 67 <label><?php echo $label; ?></label><br />80 <label><?php echo $label; echo $status; ?></label> 68 81 <textarea cols='40' rows='5' name='wpdoc_cpt_descriptions[<?php echo $slug; ?>]'><?php echo $value; ?></textarea> 69 82 <br /> … … 122 135 // That form callback function we alluded to earlier? Wait no longer, here it is! 123 136 124 function wpdoc_cpts_form_output() { ?> 125 <form action='options.php' method='post'> 137 function wpdoc_cpts_form_output() { 138 settings_errors(); ?> 139 <form class="wp-documentor-panel wp-documentor-panel-no-labels" action='options.php' method='post'> 126 140 <h1>WP Documentor - Custom Post Types</h1> 127 141 <p>You can add descriptions for the custom post types which have been created for this site. You can also add descriptions for the built-in WordPress post types Posts, Pages, and Media.</p> -
wp-documentor/trunk/submenus/pdf-settings.php
r1659019 r1675683 129 129 130 130 function wpdoc_pdf_settings_form_output() { 131 $secret_key = get_option( 'wpdoc_secret_key' ); ?> 132 <form action='options.php' method='post'> 131 settings_errors(); 132 $secret_key = get_option( 'wpdoc_secret_key' ); 133 ?> 134 <form class="wp-documentor-panel" action='options.php' method='post'> 133 135 <h1>WP Documentor - PDF Settings</h1> 134 136 <p>You can set the defaults for your PDF below.</p> -
wp-documentor/trunk/submenus/plugins.php
r1659019 r1675683 53 53 foreach( $all_installed_plugins as $slug => $plugin_data ) { 54 54 $plugin_name = $plugin_data[ 'Name' ]; 55 $status = ''; 55 56 56 if( in_array( $slug, $active_plugins ) ) { 57 $status = ' (Active)'; 58 } else { 59 $status = ' (Inactive)'; 57 if( ! in_array( $slug, $active_plugins ) ) { 58 $status = ' <span class="wp-documentor-notice">(Inactive)</span>'; 59 } 60 61 if( is_multisite() ) { 62 if( is_plugin_active_for_network( $slug ) ) { 63 $status = ' (Network Activated)'; 64 } 60 65 } 61 66 … … 67 72 ?> 68 73 69 <label><?php echo $plugin_name; echo $status; ?></label> <br />74 <label><?php echo $plugin_name; echo $status; ?></label> 70 75 <textarea cols='40' rows='5' name='wpdoc_plugin_descriptions[<?php echo $slug; ?>]'><?php echo $value; ?></textarea> 71 76 <br /> … … 120 125 121 126 function wpdoc_plugins_form_output() { 122 do_action( 'before_testing_facade'); ?>123 <form action='options.php' method='post'>127 settings_errors(); ?> 128 <form class="wp-documentor-panel wp-documentor-panel-no-labels" action='options.php' method='post'> 124 129 <h1>WP Documentor - Plugins</h1> 125 130 <p>You can add descriptions for each plugin installed on this site. Plugins which are inactive are noted below.</p> … … 135 140 <?php 136 141 } 142 143 // Success message on save 144 145 function wpdoc_plugins_update_notice() { ?> 146 <div class="notice notice-success is-dismissible"> 147 <p><?php _e( 'Done!', 'sample-text-domain' ); ?></p> 148 </div> 149 <?php } 150 151 // add_action( 'admin_notices', 'wpdoc_plugins_update_notice' );/ -
wp-documentor/trunk/wpdoc-activation.php
r1659019 r1675683 1 1 <?php 2 3 // Time being, let's save this stuff to the options table.4 2 5 3 function wpdoc_activation() { 6 4 add_option( 'wpdoc_plugin_descriptions', array(), '', false ); 7 5 add_option( 'wpdoc_cpt_descriptions', array(), '', false ); 6 add_option( 'wpdoc_page_template_descriptions', array(), '', false ); 8 7 add_option( 'wpdoc_pdf_settings', array(), '', false ); 9 8 -
wp-documentor/trunk/wpdoc-main.php
r1659019 r1675683 9 9 * Author: Robert Gillmer 10 10 * Author URI: http://www.robertgillmer.com 11 * Version: 1. 0.011 * Version: 1.1.0 12 12 * Text Domain: wpdoc 13 13 * Domain Path: languages -
wp-documentor/trunk/wpdoc-options-page-main.php
r1659019 r1675683 24 24 include_once( __DIR__ . '/submenus/plugins.php' ); 25 25 include_once( __DIR__ . '/submenus/cpts.php' ); 26 include_once( __DIR__ . '/submenus/page-templates.php' ); 26 27 include_once( __DIR__ . '/submenus/pdf-settings.php' ); 27 28 -
wp-documentor/trunk/wpdoc-pdf-generator.php
r1659019 r1675683 18 18 $plugin_descriptions = get_option( 'wpdoc_plugin_descriptions' ); 19 19 $cpt_descriptions = get_option( 'wpdoc_cpt_descriptions' ); 20 $page_template_descriptions = get_option( 'wpdoc_page_template_descriptions' ); 20 21 21 22 $site_url_with_protocol = get_bloginfo( 'url' ); … … 73 74 </div> <?php 74 75 } 75 } ?> 76 } 77 78 if( isset( $page_template_descriptions ) && ! empty( $page_template_descriptions ) ) { 79 if( is_array( $page_template_descriptions ) ) { // It should always be an array, but just in case... ?> 80 <div class="wpdoc-section-wrapper"> 81 <h2>Custom Post Type Descriptions</h2> 82 <?php foreach( $page_template_descriptions as $page_template ) { ?> 83 <strong><?php echo $page_template[ 'name' ]; ?></strong><br /> 84 <p class="page-template-description"><?php echo $page_template[ 'description' ]; ?></p> 85 <?php } ?> 86 </div> <?php 87 } 88 } 89 90 ?> 76 91 </body><?php 77 92 $contents = ob_get_clean();
Note: See TracChangeset
for help on using the changeset viewer.