diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-content/plugins/portfolio/portfolio.php --- a/wp/wp-content/plugins/portfolio/portfolio.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-content/plugins/portfolio/portfolio.php Tue Dec 15 13:49:49 2020 +0100 @@ -6,13 +6,13 @@ Author: BestWebSoft Text Domain: portfolio Domain Path: /languages -Version: 2.51 +Version: 2.53 Author URI: https://bestwebsoft.com/ License: GPLv2 or later */ /* - @ Copyright 2019 BestWebSoft ( https://support.bestwebsoft.com ) + @ Copyright 2020 BestWebSoft ( https://support.bestwebsoft.com ) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as @@ -76,7 +76,7 @@ $prtfl_plugin_info = get_plugin_data( __FILE__ ); } /* Function check if plugin is compatible with current WP version */ - bws_wp_min_version_check( plugin_basename( __FILE__ ), $prtfl_plugin_info, '3.9' ); + bws_wp_min_version_check( plugin_basename( __FILE__ ), $prtfl_plugin_info, '4.5' ); $prtfl_boxes['Portfolio-Info'] = array( array( @@ -91,12 +91,12 @@ ), array( 'name' => '_prtfl_link', - 'title' => __( 'Link', 'portfolio' ), + 'title' => __( 'Project, URL', 'portfolio' ), 'type' => 'url' ), array( 'name' => '_prtfl_svn', - 'title' => __( 'SVN URL', 'portfolio' ), + 'title' => __( 'Source Files, URL', 'portfolio' ), 'type' => 'url' ) ); @@ -120,7 +120,7 @@ if ( ! function_exists( 'prtfl_admin_init' ) ) { function prtfl_admin_init() { - global $bws_plugin_info, $prtfl_plugin_info, $bws_shortcode_list, $wpdb; + global $bws_plugin_info, $prtfl_plugin_info, $bws_shortcode_list, $wpdb, $pagenow, $prtfl_options; if ( empty( $bws_plugin_info ) ) { $bws_plugin_info = array( 'id' => '74', 'version' => $prtfl_plugin_info["Version"] ); @@ -129,6 +129,13 @@ /* add Portfolio to global $bws_shortcode_list */ $bws_shortcode_list['prtfl'] = array( 'name' => 'Portfolio', 'js_function' => 'prtfl_shortcode_init' ); + if ( 'plugins.php' == $pagenow ) { + /* Install the option defaults */ + if ( function_exists( 'bws_plugin_banner_go_pro' ) ) { + register_prtfl_settings(); + bws_plugin_banner_go_pro( $prtfl_options, $prtfl_plugin_info, 'prtfl', 'portfolio', '56e6c97d1bca3199fb16cb817793a8f6', '74', 'portfolio' ); + } + } } } @@ -225,14 +232,15 @@ 'shrdescription_additional_field' => 1, 'description_additional_field' => 1, 'svn_additional_field' => 1, + 'svn_additional_field_for_non_logged' => 1, 'executor_additional_field' => 1, 'technologies_additional_field' => 1, 'link_additional_field_for_non_registered' => 1, 'date_text_field' => __( 'Date of completion:', 'portfolio' ), - 'link_text_field' => __( 'Link:', 'portfolio' ), + 'link_text_field' => __( 'Project, URL:', 'portfolio' ), 'shrdescription_text_field' => __( 'Short description:', 'portfolio' ), 'description_text_field' => __( 'Description:', 'portfolio' ), - 'svn_text_field' => __( 'SVN:', 'portfolio' ), + 'svn_text_field' => __( 'Source Files, URL:', 'portfolio' ), 'executor_text_field' => __( 'Executor:', 'portfolio' ), 'screenshot_text_field' => __( 'More screenshots:', 'portfolio' ), 'technologies_text_field' => __( 'Technologies:', 'portfolio' ), @@ -398,6 +406,8 @@ */ if ( ! function_exists( 'prtfl_settings_page' ) ) { function prtfl_settings_page() { + if ( ! class_exists( 'Bws_Settings_Tabs' ) ) + require_once( dirname( __FILE__ ) . '/bws_menu/class-bws-settings.php' ); require_once( dirname( __FILE__ ) . '/inc/class-prtfl-settings.php' ); $page = new Prtfl_Settings_Tabs( plugin_basename( __FILE__ ) ); ?>
@@ -903,11 +913,12 @@ $custom_content .= '

' . $prtfl_options['link_text_field'] . ' ' . $post_meta['_prtfl_link'] . '

'; } } - if ( 0 != $user_id ) { + if ( 0 != $user_id || 0 == $prtfl_options['svn_additional_field_for_non_logged'] ) { if ( 1 == $prtfl_options['svn_additional_field'] && ! empty( $post_meta['_prtfl_svn'] ) ) { $custom_content .= '

' . $prtfl_options['svn_text_field'] . ' ' . $post_meta['_prtfl_svn'] . '

'; - } - + } + } + if ( 0 != $user_id ) { if ( 1 == $prtfl_options['executor_additional_field'] ) { $executors_profile = wp_get_object_terms( $post->ID, 'portfolio_executor_profile' ); if ( ! empty( $executors_profile ) ) { @@ -1103,10 +1114,8 @@ if( 1 < $custom_portfolio_row_count ) { - $prtfl_read_more = 'style="float:left"'; $prtfl_img_width = ''; }else{ - $prtfl_read_more = ""; $prtfl_img_width = 'style="width:165px"'; } @@ -1178,7 +1187,7 @@ } $content .= '
-
+
' . __( 'Read more', 'portfolio' ) . '
'; @@ -1285,24 +1294,25 @@ wp_enqueue_script( 'prtfl_fancyboxJs', plugins_url( 'fancybox/jquery.fancybox.min.js', __FILE__ ), array( 'jquery' ) ); /* Initialization of fancybox script */ - if ( ! empty( $image[0] ) ) { ?> - - bws_handle_demo_notice( $prtfl_options['display_demo_notice'] ); + + if ( isset( $_GET['page'] ) && 'portfolio.php' == $_GET['page'] ) { + $prtfl_BWS_demo_data->bws_handle_demo_notice( $prtfl_options['display_demo_notice'] ); + } if ( 'plugins.php' == $hook_suffix ) { - if ( isset( $prtfl_options['first_install'] ) && strtotime( '-1 week' ) > $prtfl_options['first_install'] ) { - bws_plugin_banner( $prtfl_plugin_info, 'prtfl', 'portfolio', '56e6c97d1bca3199fb16cb817793a8f6', '74', '//ps.w.org/portfolio/assets/icon-128x128.png' ); - } if ( ! is_network_admin() ) { bws_plugin_banner_to_settings( $prtfl_plugin_info, 'prtfl_options', 'portfolio', 'edit.php?post_type=portfolio&page=portfolio.php', 'Portfolio' ); } @@ -1713,7 +1718,7 @@ $_SESSION['prtfl_page_name'] = $prtfl_options['executor_text_field'] . " " . ( $term->name ); $_SESSION['prtfl_page_url'] = get_pagenum_link( $wp_query->query_vars['paged'] ); } else { - the_title( '

', '

' ); + the_title( '

', '

' ); } } } @@ -1722,7 +1727,7 @@ if ( ! function_exists( 'prtfl_post_template_title' ) ) { function prtfl_post_template_title() { $title = get_the_title(); - echo empty( $title ) ? '(' . __( 'No title', 'portfolio' ) . ')' : '

'. $title . '

' ; + echo empty( $title ) ? '(' . __( 'No title', 'portfolio' ) . ')' : '

'. $title . '

' ; } } @@ -1806,12 +1811,6 @@ $count_portfolio_row_block = 0; $prtfl_widht = 99 / $prtfl_options['custom_portfolio_row_count']; - if( 1 < $prtfl_options['custom_portfolio_row_count'] ){ - $prtfl_read_more = 'style="float:left"'; - }else{ - $prtfl_read_more = ""; - } - if ( ! empty( $post ) && ! empty( $post->post_content ) ) { $page_content = $post->post_content; if ( function_exists( 'mltlngg_the_content_filter' ) ) $page_content = mltlngg_the_content_filter( $page_content ); @@ -1850,7 +1849,7 @@
-
+
ID ); $image = wp_get_attachment_image_src( $post_thumbnail_id, $prtfl_options['image_size_album'] ); @@ -1914,7 +1913,7 @@