Plugin Directory

Changeset 2792828


Ignore:
Timestamp:
10/01/2022 11:05:45 AM (3 years ago)
Author:
finnj
Message:

Version 6.0.0 supporting WP 6.0.2 & PHP 8

Location:
frontier-post/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • frontier-post/trunk/frontier-post.php

    r2290873 r2792828  
    44Plugin URI: http://wordpress.org/extend/plugins/frontier-post/
    55Description: Simple, Fast & Secure frontend management of posts - Add, Edit, Delete posts from frontend - My Posts Widget.
    6 Version: 5.1.6
     6Version: 6.0.0
    77Author: finnj
    88Author URI: http://wpfrontier.com
     
    1212
    1313// define constants
    14 define('FRONTIER_POST_VERSION', "5.1.6");
     14define('FRONTIER_POST_VERSION', "6.0.0");
    1515
    1616define('FRONTIER_POST_DIR', dirname( __FILE__ )); //an absolute path to this directory
     
    237237       
    238238            // 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')
    240241                $post_task = "new";
    241242       
     
    248249                }
    249250           
     251            //error_log("post_task: ".$post_task." - post_mode: ".$frontier_mode);
     252
    250253            ob_start();
    251254       
     
    590593        }
    591594   
    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
    593603    if ( $tmp_post_type == "page" && !current_user_can('frontier_post_can_page') )
    594604        return $url;
    595        
     605
     606
    596607    if ( current_user_can( 'frontier_post_redir_edit' ) )
    597608        {
  • frontier-post/trunk/include/frontier_post_util.php

    r2277295 r2792828  
    88//*********************************************************************************
    99
     10function 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
    1041function frontier_post_cache_expiration($tmp_type = "NONE")
    1142    {
     
    1748function frontier_get_tax_lists($tmp_page_id = 0, $tmp_parent_tax = 0, $fp_cache_time = 0)
    1849    {
     50    //fp_get_all_transients();
     51
    1952    $fp_cache_name      = "frontier_post_tax_cache_".$tmp_page_id;
    2053    //$fp_cache_time        = frontier_post_cache_expiration();
     
    84117    }
    85118   
     119   
    86120
    87121
    88122//********************************************************************************
    89123// 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)
     128function 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       
    94136    if ( !empty($tmp_tax_name) )
    95137        {
     
    557599//********************************************************************************
    558600// 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 = '')
     604function 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        }
    562610    if ( $tmp_plink == "default" )
    563611        {
     
    575623//********************************************************************************
    576624// 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 = '')
     629function frontier_post_edit_link(object $fp_post, bool $fp_show_icons,  string $tmp_plink = "default", string $tmp_class = '' )
     630
    580631    {
    581632    $fp_return = '';
     
    599650//********************************************************************************
    600651// 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 = '')
     656function frontier_post_delete_link(object $fp_post, $fp_show_icons = true,  string $tmp_plink = "default", string $tmp_class = '')
    604657    {
    605658    $fp_return = '';
     
    622675//********************************************************************************
    623676// 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
     680function frontier_post_approve_link(object $fp_post, bool $fp_show_icons,  string $tmp_plink = "default", string $tmp_class = '')
    627681    {
    628682    $fp_return = '';
     
    647701//********************************************************************************
    648702
    649 function frontier_post_clone_link($fp_post, $fp_show_icons = true, $tmp_plink, $tmp_class = '')
     703function frontier_post_clone_link(object $fp_post, bool $fp_show_icons,  string $tmp_plink = "default", string $tmp_class = '')
    650704    {
    651705    $fp_return = '';
     
    670724//********************************************************************************
    671725
    672 function frontier_post_preview_link($fp_post, $fp_show_icons = true, $tmp_plink, $tmp_class = '')
     726function frontier_post_preview_link(object $fp_post, bool $fp_show_icons,  string $tmp_plink = "default", string $tmp_class = '')
    673727    {
    674728   
     
    784838   
    785839    // 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 )
    787843        {
    788844        $editor_type        = fp_get_option("fps_default_editor", "full");
  • frontier-post/trunk/readme.txt

    r2290873 r2792828  
    44Tags: frontier, frontend, frontend post, frontend edit, frontier, post, widget, posts, taxonomy
    55Requires at least: 3.4.0
    6 Tested up to: 5.4
     6Tested up to: 6.0
    77Stable tag: 5.1.5
    88License: GPL v3 or later
     
    2424* Add/Edit/Delete Posts and Pages with media directly from frontend
    2525* Create posts using PressThis, and edit them in Frontier Post
    26 * My Posts Widget
     26* My Posts Widget.
    2727* My Approvals Widget
    2828* Capabilities are aligned with Wordpress standard.
     
    102102
    103103== 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
    104115
    105116== 5.1.6 ==
Note: See TracChangeset for help on using the changeset viewer.