Changeset 2792828
- Timestamp:
- 10/01/2022 11:05:45 AM (3 years ago)
- Location:
- frontier-post/trunk
- Files:
-
- 3 edited
-
frontier-post.php (modified) (5 diffs)
-
include/frontier_post_util.php (modified) (10 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
frontier-post/trunk/frontier-post.php
r2290873 r2792828 4 4 Plugin URI: http://wordpress.org/extend/plugins/frontier-post/ 5 5 Description: Simple, Fast & Secure frontend management of posts - Add, Edit, Delete posts from frontend - My Posts Widget. 6 Version: 5.1.66 Version: 6.0.0 7 7 Author: finnj 8 8 Author URI: http://wpfrontier.com … … 12 12 13 13 // define constants 14 define('FRONTIER_POST_VERSION', " 5.1.6");14 define('FRONTIER_POST_VERSION', "6.0.0"); 15 15 16 16 define('FRONTIER_POST_DIR', dirname( __FILE__ )); //an absolute path to this directory … … 237 237 238 238 // if mode is add, go directly to show form - enables use directly on several pages 239 if ($frontier_mode == "add" && $post_task != 'delete') 239 //if (($frontier_mode == "add" || $frontier_mode == "new") && $post_task != 'delete') 240 if ($frontier_mode == "add" && $post_task != 'delete') 240 241 $post_task = "new"; 241 242 … … 248 249 } 249 250 251 //error_log("post_task: ".$post_task." - post_mode: ".$frontier_mode); 252 250 253 ob_start(); 251 254 … … 590 593 } 591 594 592 // Do not change edit link if page and user camt edit page using Frontier Post 595 // Check if user can edit the post based on Frontier Post settings. 596 $thispost = get_post($post_id); 597 if ( frontier_can_edit($thispost) ) 598 { 599 return $url; 600 } 601 602 // Do not change edit link if page and user cant edit page using Frontier Post 593 603 if ( $tmp_post_type == "page" && !current_user_can('frontier_post_can_page') ) 594 604 return $url; 595 605 606 596 607 if ( current_user_can( 'frontier_post_redir_edit' ) ) 597 608 { -
frontier-post/trunk/include/frontier_post_util.php
r2277295 r2792828 8 8 //********************************************************************************* 9 9 10 function fp_get_all_transients() 11 { 12 global $wpdb; 13 $transients = $wpdb->get_results( 14 "SELECT option_name AS name, option_value AS value FROM $wpdb->options 15 WHERE option_name LIKE '_transient_%'" 16 ); 17 18 error_log(print_r($transients, true)); 19 20 // echo print_r($transients, true); 21 /* 22 $sql = "SELECT `option_name` AS `name`, `option_value` AS `value` 23 FROM $wpdb->options 24 WHERE `option_name` LIKE '%transient_%' 25 ORDER BY `option_name`"; 26 27 $results = $wpdb->get_results( $sql ); 28 $transients = array(); 29 30 foreach ( $results as $result ) 31 { 32 33 if ( 0 !== strpos( $result->name, '_transient_timeout_') ) 34 $transients['transient'][ $result->name ] = maybe_unserialize( $result->value ); 35 } 36 37 return $transients; 38 */ 39 } 40 10 41 function frontier_post_cache_expiration($tmp_type = "NONE") 11 42 { … … 17 48 function frontier_get_tax_lists($tmp_page_id = 0, $tmp_parent_tax = 0, $fp_cache_time = 0) 18 49 { 50 //fp_get_all_transients(); 51 19 52 $fp_cache_name = "frontier_post_tax_cache_".$tmp_page_id; 20 53 //$fp_cache_time = frontier_post_cache_expiration(); … … 84 117 } 85 118 119 86 120 87 121 88 122 //******************************************************************************** 89 123 // Output taxonomy html 90 //******************************************************************************** 91 92 function frontier_tax_input($tmp_post_id, $tmp_tax_name, $input_type = 'checkbox', $tmp_selected = array(), $tmp_shortcode_parms, $tmp_tax_list) 93 { 124 // Sep-2022 php 8 fix: Required parameter ??? follows optional parameter 125 //******************************************************************************** 126 127 //function frontier_tax_input($tmp_post_id, $tmp_tax_name, $input_type = 'checkbox', $tmp_selected = array(), $tmp_shortcode_parms, $tmp_tax_list) 128 function frontier_tax_input(int $tmp_post_id, string $tmp_tax_name, string $input_type , array $tmp_selected , array $tmp_shortcode_parms, array $tmp_tax_list) 129 { 130 if (empty($input_type)) 131 { 132 $input_type = 'checkbox'; 133 } 134 135 94 136 if ( !empty($tmp_tax_name) ) 95 137 { … … 557 599 //******************************************************************************** 558 600 // Display Frontier Post Icon or Link 559 //******************************************************************************** 560 function frontier_post_display_links($fp_post, $fp_show_icons = true, $tmp_plink = "default", $tmp_class = '') 561 { 601 // Sep-2022 php 8 fix: Required parameter ??? follows optional parameter 602 //******************************************************************************** 603 //function frontier_post_display_links($fp_post, $fp_show_icons = true, $tmp_plink = "default", $tmp_class = '') 604 function frontier_post_display_links(object $fp_post, bool $fp_show_icons = true, string $tmp_plink = "default", string $tmp_class = '') 605 { 606 if (empty($tmp_plink)) 607 { 608 $tmp_plink = "default"; 609 } 562 610 if ( $tmp_plink == "default" ) 563 611 { … … 575 623 //******************************************************************************** 576 624 // Display edit Icon or Link 577 //******************************************************************************** 578 579 function frontier_post_edit_link($fp_post, $fp_show_icons = true, $tmp_plink, $tmp_class = '') 625 // Sep-2022 php 8 fix: Required parameter ??? follows optional parameter 626 //******************************************************************************** 627 628 //function frontier_post_edit_link($fp_post, $fp_show_icons = true, $tmp_plink, $tmp_class = '') 629 function frontier_post_edit_link(object $fp_post, bool $fp_show_icons, string $tmp_plink = "default", string $tmp_class = '' ) 630 580 631 { 581 632 $fp_return = ''; … … 599 650 //******************************************************************************** 600 651 // Display DELETE Icon or Link 601 //******************************************************************************** 602 603 function frontier_post_delete_link($fp_post, $fp_show_icons = true, $tmp_plink, $tmp_class = '') 652 // Sep-2022 php 8 fix: Required parameter ??? follows optional parameter 653 //******************************************************************************** 654 655 //function frontier_post_delete_link(object $fp_post, $fp_show_icons = true, $tmp_plink, $tmp_class = '') 656 function frontier_post_delete_link(object $fp_post, $fp_show_icons = true, string $tmp_plink = "default", string $tmp_class = '') 604 657 { 605 658 $fp_return = ''; … … 622 675 //******************************************************************************** 623 676 // Display APPROVE Icon or Link 624 //******************************************************************************** 625 626 function frontier_post_approve_link($fp_post, $fp_show_icons = true, $tmp_plink, $tmp_class = '') 677 // Sep-2022 php 8 fix: Required parameter ??? follows optional parameter 678 //******************************************************************************** 679 680 function frontier_post_approve_link(object $fp_post, bool $fp_show_icons, string $tmp_plink = "default", string $tmp_class = '') 627 681 { 628 682 $fp_return = ''; … … 647 701 //******************************************************************************** 648 702 649 function frontier_post_clone_link( $fp_post, $fp_show_icons = true, $tmp_plink,$tmp_class = '')703 function frontier_post_clone_link(object $fp_post, bool $fp_show_icons, string $tmp_plink = "default", string $tmp_class = '') 650 704 { 651 705 $fp_return = ''; … … 670 724 //******************************************************************************** 671 725 672 function frontier_post_preview_link( $fp_post, $fp_show_icons = true, $tmp_plink,$tmp_class = '')726 function frontier_post_preview_link(object $fp_post, bool $fp_show_icons, string $tmp_plink = "default", string $tmp_class = '') 673 727 { 674 728 … … 784 838 785 839 // If capabilities is managed from other plugin, use default setting for all profiles 786 if ( fp_get_option_bool("frontier_post_external_cap") ) 840 // 29 July 2022: editor_type should be set, even if capabilities are managed externally 841 // if ( ffp_get_option_bool("frontier_post_external_cap") ) 842 if ( false ) 787 843 { 788 844 $editor_type = fp_get_option("fps_default_editor", "full"); -
frontier-post/trunk/readme.txt
r2290873 r2792828 4 4 Tags: frontier, frontend, frontend post, frontend edit, frontier, post, widget, posts, taxonomy 5 5 Requires at least: 3.4.0 6 Tested up to: 5.46 Tested up to: 6.0 7 7 Stable tag: 5.1.5 8 8 License: GPL v3 or later … … 24 24 * Add/Edit/Delete Posts and Pages with media directly from frontend 25 25 * Create posts using PressThis, and edit them in Frontier Post 26 * My Posts Widget 26 * My Posts Widget. 27 27 * My Approvals Widget 28 28 * Capabilities are aligned with Wordpress standard. … … 102 102 103 103 == Changelog == 104 105 == 6.0.0 == 106 * Tested with WP version 6.0.2 107 * Tested with PHP 8.0.23 108 * Enabled editor control for Capabilities managed externally 109 * php 8 fix: Required parameter ??? follows optional parameter in utilities 110 * Updated redir link (edit link in buttom af post), not allowing to go to edit screen if user is not allowed to edit post 111 112 113 == 5.1.7 == 114 * Tested with WP 5.8 104 115 105 116 == 5.1.6 ==
Note: See TracChangeset
for help on using the changeset viewer.