Changeset 2355304
- Timestamp:
- 08/08/2020 06:00:26 PM (6 years ago)
- Location:
- wp-post-html-to-blocks
- Files:
-
- 3 added
- 5 edited
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-2.png (modified) (previous)
-
assets/screenshot-3.png (modified) (previous)
-
tags/1.1 (added)
-
tags/1.1/readme.txt (added)
-
tags/1.1/wp-post-html-to-blocks.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wp-post-html-to-blocks.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-post-html-to-blocks/trunk/readme.txt
r2037422 r2355304 3 3 Tags: html tags, surround, Gutenberg , html block 4 4 Requires at least: 5.0 5 Tested up to: 5. 15 Tested up to: 5.4.2 6 6 Requires PHP: 7.0 7 Stable tag: 1. 0.17 Stable tag: 1.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 39 39 * added default dashbaord styles to table and search form 40 40 41 = 1.1 = 42 * Fixed undefined index bugs 43 * new screenshots for readme 44 41 45 == Frequently Asked Questions == 42 46 … … 52 56 53 57 You have a choice to select the post with status you prefer. 58 54 59 55 60 == Screenshots == 56 61 57 1. For example converts these paragraph tags. (next image)58 2. ..into html blocks for use by Gutenberg editor.59 3. Selected post is already processed.62 1. Suppose you have a Wordpress post with paragraph lines from a classic editor 63 2. Using this plugin you search for post title select paragraph tags and press encapsulate html tags 64 3. This plugin converts html tags into html blocks in Gutenberg editor. 60 65 4. Location of plugin's configuration page. 61 66 5. Configuration page selecting a tag for searching through. -
wp-post-html-to-blocks/trunk/wp-post-html-to-blocks.php
r2014495 r2355304 4 4 Plugin URI: http://www.zdatatech.com/plugins/wp-post-html-to-blocks 5 5 Description: Admin options to surround line space, p tag, and div tag content with html Gutenberg Blocks 6 Version: 1. 06 Version: 1.1 7 7 Author: Zeshan 8 8 Author URI: http://zdatatech.com/about … … 12 12 */ 13 13 14 //stackoverflow undefined index https://stackoverflow.com/questions/4842759/php-undefined-index 15 14 16 if(is_admin()){ 15 17 16 17 18 /*Add Menu option for Admin*/ 18 19 add_action('admin_menu', 'wp_post_html_to_blocks_menu'); … … 246 247 global $wpdb; 247 248 248 $RequestSent = sanitize_text_field($_POST['RequestSent']); 249 $topPosts = sanitize_text_field($_POST['topPosts']); 250 $SearchPosts = sanitize_text_field($_POST['SearchPosts']); 251 $queryPostID = sanitize_text_field($_POST['queryPostID']); 252 $queryPostStatus = sanitize_text_field($_POST['queryPostStatus']); 253 $htmlSurroundTag = sanitize_text_field($_POST['htmlSurroundTag']); 249 $PostsQuery = (isset($PostsQuery) ? $PostsQuery : null); 250 $RequestSent = sanitize_text_field((isset($_POST['RequestSent']) ? $_POST['RequestSent'] : null)); 251 $topPosts = sanitize_text_field((isset($_POST['topPosts']) ? $_POST['topPosts'] : 1)); 252 $queryPostID = sanitize_text_field((isset($_POST['queryPostID']) ? $_POST['queryPostID'] : null)); 253 $queryPostStatus = sanitize_text_field((isset($_POST['queryPostStatus']) ? $_POST['queryPostStatus'] : null)); 254 $htmlSurroundTag = sanitize_text_field((isset($_POST['htmlSurroundTag']) ? $_POST['htmlSurroundTag'] : null)); 255 $SearchPosts = sanitize_text_field((isset($_POST['SearchPosts']) ? $_POST['SearchPosts'] : null)); 254 256 255 257 //if run query button pressed..to prevent performance tax on a wordpress install … … 277 279 278 280 279 ?> 281 ?> 282 283 <div class="welcome-panel" id="welcome-panel" > 280 284 <h2>About WP Post HTML to Blocks</h2> 281 285 282 <p>For content that is copy pasted into Gutenberg editor classic block. Purpose of this plugin is to allow a Wordpress publisher administrator to manually surround html tags such as p, div, br for interpretation by Gutenberg editor as html blocks.</p>286 <p>For content that is copy pasted into <strong>Gutenberg editor classic block</strong>. Purpose of this plugin is to allow a <strong>Wordpress publisher administrator</strong> to manually <strong>surround html tags</strong> such as p, div, br <strong>for interpretation</strong> by Gutenberg editor <strong>as html blocks.</strong></p> 283 287 284 288 <?php … … 330 334 331 335 <form target="_self" method="post"> 332 <label> Search Title Field of Posts </label><input type="text" name="SearchPosts" value="<?php if($SearchPosts){echo $SearchPosts;} ?>" /> 336 <div class="media-toolbar-primary search-form"> 337 338 <label> Search</label> 339 <input type="search" name="SearchPosts" placeholder="Terms from Post Titles" value="<?php if(isset($SearchPosts)){echo $SearchPosts;} ?>"/> 333 340 <label> Top</label> 334 <select name="topPosts" >341 <select name="topPosts" id="bulk-action-selector-bottom" class="postform"> 335 342 <option value="1" selected=selected>1</option> 336 343 <option value="5" >5</option> … … 340 347 <option value="30" >30</option> 341 348 </select> 342 <button >Search</button>349 <button class="button media-button" >Search</button> 343 350 <input type="hidden" name="RequestSent" value="RequestingPosts" /> 344 351 352 </div> 345 353 </form> 346 354 <?php … … 348 356 ?> 349 357 350 <table style="border-style:solid;border-width:2px;width:70%;"> 358 <table class="wp-list-table widefat fixed striped posts"> 359 <thead> 351 360 <tr > 352 <th style="border-style:solid;border-width:2px;"> ID</th>353 <th style="border-style:solid;border-width:2px;">Title</th>354 <th style="border-style:solid;border-width:2px;">Status</th>355 <th style="border-style:solid;border-width:2px;">Seek HTML Tag</th>356 <th style="border-style:solid;border-width:2px;">Surround HTML Tags with Blocks</th>361 <th> ID</th> 362 <th >Title</th> 363 <th >Status</th> 364 <th >Seek HTML Tag</th> 365 <th>Surround HTML Tags with Blocks</th> 357 366 </tr> 358 367 </thead> 368 <tbody> 359 369 <?php 360 370 foreach($PostsQuery as $QuriedPosts){ … … 363 373 <tr> 364 374 <form target="_self" method="post"> 365 <td style="border-style:solid;border-width:2px;"><?php echo $QuriedPosts->ID ?></td>366 <td style="border-style:solid;border-width:2px;"><?php echo $QuriedPosts->post_title ?></td>367 <td style="border-style:solid;border-width:2px;"><strong><?php echo $QuriedPosts->post_status ?></strong></td>368 <td style="border-style:solid;border-width:2px;">369 <select name="htmlSurroundTag" >375 <td ><?php echo $QuriedPosts->ID ?></td> 376 <td ><?php echo $QuriedPosts->post_title ?></td> 377 <td ><strong><?php echo $QuriedPosts->post_status ?></strong></td> 378 <td > 379 <select name="htmlSurroundTag" id="bulk-action-selector-top"> 370 380 <option value="LineSpace">Lines With Space (\n)</option> 371 381 <option value="p" selected=selected><p></p></option> … … 374 384 </select> 375 385 </td> 376 <td style="border-style:solid;border-width:2px;">377 <button >Encapsulate HTML tag</button>386 <td> 387 <button class="button action">Encapsulate HTML tag</button> 378 388 <input type="hidden" name="queryPostID" value="<?php echo $QuriedPosts->ID ?>" /> 379 389 <input type="hidden" name="queryPostStatus" value="<?php echo $QuriedPosts->post_status ?>" /> … … 381 391 </form> 382 392 </tr> 383 393 </tbody> 384 394 <?php 385 395 } //close foreach 386 396 387 397 ?> 388 389 398 <tfoot> 399 <tr > 400 <th>ID</th> 401 <th>Title</th> 402 <th>Status</th> 403 <th>Seek HTML Tag</th> 404 <th>Surround HTML Tags with Blocks</th> 405 </tr> 406 </tfoot> 390 407 </table> 391 408 … … 396 413 397 414 </div> 398 415 </div><!-- close welcome-panel --> 399 416 400 417 <?php
Note: See TracChangeset
for help on using the changeset viewer.