From d46e7a723f21ec4111b484912cd3490eb6e995fa Mon Sep 17 00:00:00 2001 From: odudename Date: Sat, 26 Oct 2024 08:51:55 +0545 Subject: [PATCH] 4.26 --- README.txt | 6 +- admin/partials/dashboard.php | 5 +- flexi.php | 6 +- includes/addon/class-flexi-buddypress.php | 146 ++++++++++-------- includes/addon/class-flexi-conflict.php | 69 +++++---- includes/addon/class-flexi-custom-field.php | 4 +- includes/addon/class-flexi-ffmpeg.php | 4 +- includes/addon/class-flexi-mime-type.php | 85 +++++----- .../addon/class-flexi-shortcode-holder.php | 5 +- includes/addon/class-flexi-standalone.php | 2 +- .../addon/class-flexi-ultimate-member.php | 5 +- includes/class-flexi-detail.php | 18 ++- includes/class-flexi-links.php | 2 +- includes/class-flexi-settings.php | 14 +- .../class-flexi-user-dashboard.php | 120 +++++++------- 15 files changed, 262 insertions(+), 229 deletions(-) diff --git a/README.txt b/README.txt index 4ec1972..213d1fa 100644 --- a/README.txt +++ b/README.txt @@ -4,8 +4,8 @@ Donate link: https://odude.com/ Tags: gallery, photo gallery, image gallery, video gallery, Frontend, visitor Requires at least: 5.0.0 Requires PHP: 5.5 -Tested up to: 6.0 -Stable tag: 4.25 +Tested up to: 6.6.2 +Stable tag: 4.26 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -189,7 +189,7 @@ At Flexi Settings all configuration are ready, but do check all automatically cr == Changelog == -= 4.25 = += 4.26 = * No features added. Only made it compatible to work with latest version of wordpress = 4.24 = diff --git a/admin/partials/dashboard.php b/admin/partials/dashboard.php index 952b43c..7fa7b0a 100644 --- a/admin/partials/dashboard.php +++ b/admin/partials/dashboard.php @@ -26,10 +26,9 @@
" . __('Post files', 'flexi') . "" ?> " . __('View Gallery', 'flexi') . "" ?> - - + diff --git a/flexi.php b/flexi.php index 59f28ec..fc4bfc1 100644 --- a/flexi.php +++ b/flexi.php @@ -9,14 +9,14 @@ * that starts the plugin. * * @link https://odude.com/ - * @since 4.25 + * @since 4.26 * @package Flexi * * @wordpress-plugin * Plugin Name: Flexi - Guest Submit * Plugin URI: https://odude.com/ * Description: User submitted images/video into gallery - * Version: 4.25 + * Version: 4.26 * Author: ODude * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt @@ -37,7 +37,7 @@ // The current version of the plugin if (!defined('FLEXI_VERSION')) { - define('FLEXI_VERSION', '4.25'); + define('FLEXI_VERSION', '4.26'); } define('FLEXI_FOLDER', dirname(plugin_basename(__FILE__))); define('FLEXI_PLUGIN_URL', content_url('/plugins/' . FLEXI_FOLDER)); diff --git a/includes/addon/class-flexi-buddypress.php b/includes/addon/class-flexi-buddypress.php index 4ebab5c..08bdf33 100644 --- a/includes/addon/class-flexi-buddypress.php +++ b/includes/addon/class-flexi-buddypress.php @@ -1,4 +1,5 @@ '; - - public function __construct() { - - add_filter( 'flexi_settings_sections', array( $this, 'add_section' ) ); - add_filter( 'flexi_settings_fields', array( $this, 'add_fields' ) ); - add_action( 'bp_setup_nav', array( $this, 'add_flexi_buddypress_tab' ) ); - add_action( 'flexi_submit_complete', array( $this, 'add_into_activity' ), 10, 1 ); - add_filter( 'flexi_settings_fields', array( $this, 'add_extension' ) ); +class Flexi_Addon_BuddyPress +{ + private $help = ' '; + + public function __construct() + { + + add_filter('flexi_settings_sections', array($this, 'add_section')); + add_filter('flexi_settings_fields', array($this, 'add_fields')); + add_action('bp_setup_nav', array($this, 'add_flexi_buddypress_tab')); + add_action('flexi_submit_complete', array($this, 'add_into_activity'), 10, 1); + add_filter('flexi_settings_fields', array($this, 'add_extension')); } // add_filter flexi_settings_tabs - public function add_tabs( $new ) { + public function add_tabs($new) + { $tabs = array(); - $new = array_merge( $tabs, $new ); + $new = array_merge($tabs, $new); return $new; } // Add Section title - public function add_section( $new ) { - $enable_addon = flexi_get_option( 'enable_buddypress', 'flexi_extension', 0 ); - if ( '1' == $enable_addon ) { + public function add_section($new) + { + $enable_addon = flexi_get_option('enable_buddypress', 'flexi_extension', 0); + if ('1' == $enable_addon) { $sections = array( array( 'id' => 'flexi_buddypress_settings', - 'title' => __( 'BuddyPress', 'flexi' ), - 'description' => __( 'If you have installed BuddyPress plugin, user can see own submitted images at their profile page. https://wordpress.org/plugins/buddypress/', 'flexi' ) . ' ' . $this->help, + 'title' => __('BuddyPress', 'flexi'), + 'description' => __('If you have installed BuddyPress plugin, user can see own submitted images at their profile page. https://wordpress.org/plugins/buddypress/', 'flexi') . ' ' . $this->help, 'tab' => 'gallery', ), ); - $new = array_merge( $new, $sections ); + $new = array_merge($new, $sections); } return $new; } // Add enable/disable option at extension tab - public function add_extension( $new ) { + public function add_extension($new) + { - $enable_addon = flexi_get_option( 'enable_buddypress', 'flexi_extension', 0 ); - if ( '1' == $enable_addon ) { + $enable_addon = flexi_get_option('enable_buddypress', 'flexi_extension', 0); + if ('1' == $enable_addon) { - $description = ' '; + $description = ' '; } else { $description = ''; } @@ -59,8 +65,8 @@ public function add_extension( $new ) { 'flexi_extension' => array( array( 'name' => 'enable_buddypress', - 'label' => __( 'Enable BuddyPress', 'flexi' ), - 'description' => __( 'Displays tab on user profile page of BuddyPress members page.', 'flexi' ) . ' ' . $this->help . ' ' . $description, + 'label' => __('Enable BuddyPress', 'flexi'), + 'description' => __('Displays tab on user profile page of BuddyPress members page.', 'flexi') . ' ' . $this->help . ' ' . $description, 'type' => 'checkbox', 'sanitize_callback' => 'intval', @@ -68,29 +74,30 @@ public function add_extension( $new ) { ), ); - $new = array_merge_recursive( $new, $fields ); + $new = array_merge_recursive($new, $fields); return $new; } // Add section fields - public function add_fields( $new ) { - $enable_addon = flexi_get_option( 'enable_buddypress', 'flexi_extension', 0 ); - if ( '1' == $enable_addon ) { + public function add_fields($new) + { + $enable_addon = flexi_get_option('enable_buddypress', 'flexi_extension', 0); + if ('1' == $enable_addon) { $fields = array( 'flexi_buddypress_settings' => array( array( 'name' => 'buddypress_tab_name', - 'label' => __( 'Tab name', 'flexi' ), - 'description' => __( 'Name of the tab displays on profile page', 'flexi' ), + 'label' => __('Tab name', 'flexi'), + 'description' => __('Name of the tab displays on profile page', 'flexi'), 'type' => 'text', 'size' => 'medium', 'sanitize_callback' => 'sanitize_text_field', ), array( 'name' => 'enable_buddypress_activity', - 'label' => __( 'Enable BuddyPress Activity', 'flexi' ), - 'description' => __( 'Displays activity when any flexi post is posted.', 'flexi' ), + 'label' => __('Enable BuddyPress Activity', 'flexi'), + 'description' => __('Displays activity when any flexi post is posted.', 'flexi'), 'type' => 'checkbox', 'sanitize_callback' => 'intval', @@ -98,70 +105,75 @@ public function add_fields( $new ) { ), ); - $new = array_merge( $new, $fields ); + $new = array_merge($new, $fields); } return $new; } - public function add_flexi_buddypress_tab( $tabs ) { - $enable_addon = flexi_get_option( 'enable_buddypress', 'flexi_extension', 0 ); - if ( '1' == $enable_addon && function_exists( 'bp_get_displayed_user_username' ) ) { + public function add_flexi_buddypress_tab($tabs) + { + $enable_addon = flexi_get_option('enable_buddypress', 'flexi_extension', 0); + if ('1' == $enable_addon && function_exists('bp_get_displayed_user_username')) { global $bp; - $yourtab = flexi_get_option( 'buddypress_tab_name', 'flexi_buddypress_settings', 'Gallery' ); + $yourtab = flexi_get_option('buddypress_tab_name', 'flexi_buddypress_settings', 'Gallery'); bp_core_new_nav_item( array( - 'name' => $yourtab, - 'slug' => 'flexi', - 'screen_function' => array( $this, 'flexi_buddypress_yourtab_screen' ), - 'position' => 40, - 'parent_url' => $bp->displayed_user->domain, - 'parent_slug' => $bp->profile->slug, - 'default_subnav_slug' => 'flexi', - ) - ); + 'name' => $yourtab, + 'slug' => 'flexi', + 'screen_function' => array($this, 'flexi_buddypress_yourtab_screen'), + 'position' => 40, + 'parent_url' => $bp->displayed_user->domain, + 'parent_slug' => $bp->profile->slug, + 'default_subnav_slug' => 'flexi', + ) + ); } } - public function flexi_buddypress_yourtab_screen() { + public function flexi_buddypress_yourtab_screen() + { // Add title and content here - last is to call the members plugin.php template. - add_action( 'bp_template_title', array( $this, 'flexi_buddypress_yourtab_title' ) ); - add_action( 'bp_template_content', array( $this, 'flexi_buddypress_yourtab_content' ) ); - if ( function_exists( 'bp_get_displayed_user_username' ) ) { - bp_core_load_template( 'buddypress/members/single/plugins' ); + add_action('bp_template_title', array($this, 'flexi_buddypress_yourtab_title')); + add_action('bp_template_content', array($this, 'flexi_buddypress_yourtab_content')); + if (function_exists('bp_get_displayed_user_username')) { + bp_core_load_template('buddypress/members/single/plugins'); } } - public function flexi_buddypress_yourtab_title() { + public function flexi_buddypress_yourtab_title() + { // echo flexi_get_option('buddypress_tab_name', 'flexi_buddypress_settings', 'Gallery'); } - public function flexi_buddypress_yourtab_content() { + public function flexi_buddypress_yourtab_content() + { - if ( function_exists( 'bp_get_displayed_user_username' ) ) { + if (function_exists('bp_get_displayed_user_username')) { $user_info = bp_get_displayed_user_username(); - echo do_shortcode( '[flexi-profile-toolbar]' ); - echo do_shortcode( '[flexi-gallery user="' . $user_info . '" ] ' ); + echo do_shortcode('[flexi-profile-toolbar]'); + echo do_shortcode('[flexi-gallery user="' . $user_info . '" ] '); } } // Add it into buddypress activity - public function add_into_activity( $post_id ) { - $enable_addon = flexi_get_option( 'enable_buddypress', 'flexi_extension', 0 ); - $enable_activity = flexi_get_option( 'enable_buddypress_activity', 'flexi_buddypress_settings', 1 ); - if ( '1' == $enable_addon && '1' == $enable_activity && function_exists( 'bp_core_get_userlink' ) ) { - if ( is_user_logged_in() ) { - $link = get_permalink( flexi_get_option( 'primary_page', 'flexi_image_layout_settings', 0 ) ); + public function add_into_activity($post_id) + { + $enable_addon = flexi_get_option('enable_buddypress', 'flexi_extension', 0); + $enable_activity = flexi_get_option('enable_buddypress_activity', 'flexi_buddypress_settings', 1); + if ('1' == $enable_addon && '1' == $enable_activity && function_exists('bp_core_get_userlink')) { + if (is_user_logged_in()) { + $link = get_permalink(flexi_get_option('primary_page', 'flexi_image_layout_settings', 0)); $author = wp_get_current_user(); - $link = add_query_arg( 'flexi_user', $author->user_login, $link ); - $flexi_post = get_post( $post_id ); - $content = '
'; + $link = add_query_arg('flexi_user', $author->user_login, $link); + $flexi_post = get_post($post_id); + $content = '
'; $buddy_post = array( 'id' => false, // Pass an existing activity ID to update an existing entry. - 'action' => sprintf( __( '%1$s has posted: %3$s', 'flexi' ), bp_core_get_userlink( bp_loggedin_user_id() ), esc_url( $link ), esc_attr( get_the_title( $post_id ) ) ), + 'action' => sprintf(__('%1$s has posted: %3$s', 'flexi'), bp_core_get_userlink(bp_loggedin_user_id()), esc_url($link), esc_attr(get_the_title($post_id))), // The activity action - e.g. "Jon Doe posted an update" 'content' => $content, 'component' => 'flexi', @@ -184,7 +196,7 @@ public function add_into_activity( $post_id ) { // Is this activity item to be marked as spam? ); - return bp_activity_add( $buddy_post ); + return bp_activity_add($buddy_post); } } } diff --git a/includes/addon/class-flexi-conflict.php b/includes/addon/class-flexi-conflict.php index 80a1922..46ab966 100644 --- a/includes/addon/class-flexi-conflict.php +++ b/includes/addon/class-flexi-conflict.php @@ -1,4 +1,5 @@ '; +class Flexi_Addon_Conflict +{ + private $help = ' '; - public function __construct() { + public function __construct() + { - add_filter( 'flexi_settings_sections', array( $this, 'add_section' ) ); - add_filter( 'flexi_settings_fields', array( $this, 'add_extension' ) ); - add_filter( 'flexi_settings_fields', array( $this, 'add_fields' ) ); + add_filter('flexi_settings_sections', array($this, 'add_section')); + add_filter('flexi_settings_fields', array($this, 'add_extension')); + add_filter('flexi_settings_fields', array($this, 'add_fields')); } // add_filter flexi_settings_tabs - public function add_tabs( $new ) { + public function add_tabs($new) + { $tabs = array(); - $new = array_merge( $tabs, $new ); + $new = array_merge($tabs, $new); return $new; } // Add Section title & description - public function add_section( $new ) { - $enable_addon = flexi_get_option( 'enable_conflict_fixes', 'flexi_extension', 0 ); - if ( '1' == $enable_addon ) { + public function add_section($new) + { + $enable_addon = flexi_get_option('enable_conflict_fixes', 'flexi_extension', 0); + if ('1' == $enable_addon) { $sections = array( array( 'id' => 'flexi_conflict_settings', - 'title' => __( 'Conflict & Fixes', 'flexi' ), - 'description' => __( 'Try to fix the conflicts occurred with other plugins & theme.', 'flexi' ) . ' ' . $this->help, + 'title' => __('Conflict & Fixes', 'flexi'), + 'description' => __('Try to fix the conflicts occurred with other plugins & theme.', 'flexi') . ' ' . $this->help, 'tab' => 'general', ), ); - $new = array_merge( $new, $sections ); + $new = array_merge($new, $sections); } return $new; } // Add enable/disable option at extension tab - public function add_extension( $new ) { - $enable_addon = flexi_get_option( 'enable_conflict_fixes', 'flexi_extension', 0 ); - if ( '1' == $enable_addon ) { + public function add_extension($new) + { + $enable_addon = flexi_get_option('enable_conflict_fixes', 'flexi_extension', 0); + if ('1' == $enable_addon) { - $description = ' '; + $description = ' '; } else { $description = ''; } @@ -56,51 +62,52 @@ public function add_extension( $new ) { 'flexi_extension' => array( array( 'name' => 'enable_conflict_fixes', - 'label' => __( 'Conflict & Fixes', 'flexi' ), - 'description' => __( 'Try to fix the conflicts occurred with other plugins & theme.', 'flexi' ) . ' ' . $this->help . ' ' . $description, + 'label' => __('Conflict & Fixes', 'flexi'), + 'description' => __('Try to fix the conflicts occurred with other plugins & theme.', 'flexi') . ' ' . $this->help . ' ' . $description, 'type' => 'checkbox', 'sanitize_callback' => 'intval', ), ), ); - $new = array_merge_recursive( $new, $fields ); + $new = array_merge_recursive($new, $fields); return $new; } // Add section fields - public function add_fields( $new ) { - $enable_addon = flexi_get_option( 'enable_conflict_fixes', 'flexi_extension', 0 ); - if ( '1' == $enable_addon ) { + public function add_fields($new) + { + $enable_addon = flexi_get_option('enable_conflict_fixes', 'flexi_extension', 0); + if ('1' == $enable_addon) { $fields = array( 'flexi_conflict_settings' => array( array( 'name' => 'conflict_disable_fancybox', - 'label' => __( 'Disable FancyBox Lightbox', 'flexi' ), - 'description' => __( 'Disable it,
if fancyBox v3.5.7 is used by other plugins & theme. So that, only one instance of it is available.
If you are not using lightbox at all.', 'flexi' ), + 'label' => __('Disable FancyBox Lightbox', 'flexi'), + 'description' => __('Disable it,
if fancyBox v3.5.7 is used by other plugins & theme. So that, only one instance of it is available.
If you are not using lightbox at all.', 'flexi'), 'type' => 'checkbox', 'sanitize_callback' => 'intval', ), array( 'name' => 'conflict_disable_godude', - 'label' => __( 'Disable godude Lightbox', 'flexi' ), - 'description' => __( 'Disable it,
if godude.js is used by other plugins & theme. So that, only one instance of it is available.', 'flexi' ), + 'label' => __('Disable godude Lightbox', 'flexi'), + 'description' => __('Disable it,
if godude.js is used by other plugins & theme. So that, only one instance of it is available.', 'flexi'), 'type' => 'checkbox', 'sanitize_callback' => 'intval', ), array( 'name' => 'conflict_disable_fontawesome', - 'label' => __( 'Disable Font Awesome Free 5.3.1', 'flexi' ), - 'description' => __( 'Disable it,
if fontawesome.js is used by other plugins & theme.', 'flexi' ) . ' https://fontawesome.com/', + 'label' => __('Disable Font Awesome Free 5.3.1', 'flexi'), + 'description' => __('Disable it,
if fontawesome.js is used by other plugins & theme.', 'flexi') . ' https://fontawesome.com/', 'type' => 'checkbox', 'sanitize_callback' => 'intval', ), ), ); - $new = array_merge( $new, $fields ); + $new = array_merge($new, $fields); } return $new; } diff --git a/includes/addon/class-flexi-custom-field.php b/includes/addon/class-flexi-custom-field.php index b57f7e3..8dd66d0 100644 --- a/includes/addon/class-flexi-custom-field.php +++ b/includes/addon/class-flexi-custom-field.php @@ -11,7 +11,7 @@ */ class Flexi_Addon_Custom_Fields { - private $help = ' '; + private $help = ' '; public function __construct() { add_filter('manage_flexi_posts_columns', array($this, 'new_column'), 10, 2); @@ -199,4 +199,4 @@ public function add_fields($new) } // Ultimate Member: Setting at Flexi & Tab at profile page -$captcha = new Flexi_Addon_Custom_Fields(); \ No newline at end of file +$captcha = new Flexi_Addon_Custom_Fields(); diff --git a/includes/addon/class-flexi-ffmpeg.php b/includes/addon/class-flexi-ffmpeg.php index b352bd8..b24b50b 100644 --- a/includes/addon/class-flexi-ffmpeg.php +++ b/includes/addon/class-flexi-ffmpeg.php @@ -12,7 +12,7 @@ class Flexi_Addon_FFMPEG { - private $help = ' '; + private $help = ' '; public function __construct() { @@ -273,4 +273,4 @@ public function make_jpg($input, $output, $ffmpegpath, $palette, $ffmpeg_process } // FFMPEG settings -$conflict = new Flexi_Addon_FFMPEG(); \ No newline at end of file +$conflict = new Flexi_Addon_FFMPEG(); diff --git a/includes/addon/class-flexi-mime-type.php b/includes/addon/class-flexi-mime-type.php index 506e7cb..24a1df2 100644 --- a/includes/addon/class-flexi-mime-type.php +++ b/includes/addon/class-flexi-mime-type.php @@ -1,4 +1,5 @@ '; + private $help = ' '; - public function __construct() { + public function __construct() + { - add_filter( 'flexi_settings_sections', array( $this, 'add_section' ) ); - add_filter( 'flexi_settings_fields', array( $this, 'add_extension' ) ); - add_filter( 'flexi_settings_fields', array( $this, 'add_fields' ) ); + add_filter('flexi_settings_sections', array($this, 'add_section')); + add_filter('flexi_settings_fields', array($this, 'add_extension')); + add_filter('flexi_settings_fields', array($this, 'add_fields')); } // add_filter flexi_settings_tabs - public function add_tabs( $new ) { + public function add_tabs($new) + { $tabs = array(); - $new = array_merge( $tabs, $new ); + $new = array_merge($tabs, $new); return $new; } // Add Section title - public function add_section( $new ) { - $enable_addon = flexi_get_option( 'enable_mime_type', 'flexi_extension', 0 ); - if ( '1' == $enable_addon ) { + public function add_section($new) + { + $enable_addon = flexi_get_option('enable_mime_type', 'flexi_extension', 0); + if ('1' == $enable_addon) { $sections = array( array( 'id' => 'flexi_mime_type', - 'title' => __( 'Manage Mime Type', 'flexi' ), - 'description' => __( 'Add new file type to upload.', 'flexi' ) . ' ' . $this->help, + 'title' => __('Manage Mime Type', 'flexi'), + 'description' => __('Add new file type to upload.', 'flexi') . ' ' . $this->help, 'tab' => 'form', ), ); - $new = array_merge( $new, $sections ); + $new = array_merge($new, $sections); } return $new; } // Add enable/disable option at extension tab - public function add_extension( $new ) { + public function add_extension($new) + { - $enable_addon = flexi_get_option( 'enable_mime_type', 'flexi_extension', 0 ); - if ( '1' == $enable_addon ) { + $enable_addon = flexi_get_option('enable_mime_type', 'flexi_extension', 0); + if ('1' == $enable_addon) { - $description = ' '; + $description = ' '; } else { $description = ''; } @@ -57,59 +63,60 @@ public function add_extension( $new ) { 'flexi_extension' => array( array( 'name' => 'enable_mime_type', - 'label' => __( 'Enable Mime Type', 'flexi' ), - 'description' => __( 'Select the list of file type user is allowed to upload.', 'flexi' ) . ' ' . $this->help . ' ' . $description, + 'label' => __('Enable Mime Type', 'flexi'), + 'description' => __('Select the list of file type user is allowed to upload.', 'flexi') . ' ' . $this->help . ' ' . $description, 'type' => 'checkbox', 'sanitize_callback' => 'intval', ), ), ); - $new = array_merge_recursive( $new, $fields ); + $new = array_merge_recursive($new, $fields); return $new; } // Add section fields - public function add_fields( $new ) { + public function add_fields($new) + { - $enable_addon = flexi_get_option( 'enable_mime_type', 'flexi_extension', 0 ); - if ( '1' == $enable_addon ) { + $enable_addon = flexi_get_option('enable_mime_type', 'flexi_extension', 0); + if ('1' == $enable_addon) { $fields = array( 'flexi_mime_type' => array( // https://developer.wordpress.org/reference/functions/wp_get_mime_types/ array( 'name' => 'flexi_mime_type_list', - 'label' => __( 'Select allowed file type', 'flexi' ), + 'label' => __('Select allowed file type', 'flexi'), 'description' => 'The selection will be only valid for Flexi plugin.', 'type' => 'multicheck', 'options' => array( - 'image/jpeg' => __( 'Image format', 'flexi' ) . ' - jpeg', - 'image/gif' => __( 'Image format', 'flexi' ) . ' - gif', - 'image/png' => __( 'Image format', 'flexi' ) . ' - png', - 'video/mpeg' => __( 'Video format', 'flexi' ) . ' - mpeg,mpg,mpe', - 'video/mp4' => __( 'Video format', 'flexi' ) . ' - mp4,m4v', - 'video/webm' => __( 'Video format', 'flexi' ) . ' - webm', - 'text/plain' => __( 'Text format', 'flexi' ) . ' - txt,asc,c,cc,h,srt', - 'text/csv' => __( 'Text format', 'flexi' ) . ' - csv', - 'audio/mpeg' => __( 'Audio format', 'flexi' ) . ' - mp3,m4a,m4b', - 'application/pdf' => __( 'Portable Document Format (PDF)', 'flexi' ) . ' - pdf', - 'application/msword' => __( 'Word Document (DOC)', 'flexi' ) . ' - doc', + 'image/jpeg' => __('Image format', 'flexi') . ' - jpeg', + 'image/gif' => __('Image format', 'flexi') . ' - gif', + 'image/png' => __('Image format', 'flexi') . ' - png', + 'video/mpeg' => __('Video format', 'flexi') . ' - mpeg,mpg,mpe', + 'video/mp4' => __('Video format', 'flexi') . ' - mp4,m4v', + 'video/webm' => __('Video format', 'flexi') . ' - webm', + 'text/plain' => __('Text format', 'flexi') . ' - txt,asc,c,cc,h,srt', + 'text/csv' => __('Text format', 'flexi') . ' - csv', + 'audio/mpeg' => __('Audio format', 'flexi') . ' - mp3,m4a,m4b', + 'application/pdf' => __('Portable Document Format (PDF)', 'flexi') . ' - pdf', + 'application/msword' => __('Word Document (DOC)', 'flexi') . ' - doc', ), ), array( 'name' => 'flexi_extra_mime', 'type' => 'textarea', - 'label' => __( 'Extra Mime type', 'flexi' ), - 'description' => __( 'Add extra file type if not listed above separated with comma.
Eg. video/avi,video/3gpp,audio/midi
Required Flexi-PRO', 'flexi' ), + 'label' => __('Extra Mime type', 'flexi'), + 'description' => __('Add extra file type if not listed above separated with comma.
Eg. video/avi,video/3gpp,audio/midi
Required Flexi-PRO', 'flexi'), ), ), ); // print_r($fields); - $new = array_merge( $new, $fields ); + $new = array_merge($new, $fields); } return $new; } diff --git a/includes/addon/class-flexi-shortcode-holder.php b/includes/addon/class-flexi-shortcode-holder.php index 24dc5db..6fe00c9 100644 --- a/includes/addon/class-flexi-shortcode-holder.php +++ b/includes/addon/class-flexi-shortcode-holder.php @@ -1,4 +1,5 @@ '; + private $help = ' '; public function __construct() { @@ -162,4 +163,4 @@ public function flexi_execute_element_callback($value) } // Ultimate Member: Setting at Flexi & Tab at profile page -$buddypress = new Flexi_Addon_Shortcode_Holder(); \ No newline at end of file +$buddypress = new Flexi_Addon_Shortcode_Holder(); diff --git a/includes/addon/class-flexi-standalone.php b/includes/addon/class-flexi-standalone.php index 0fc03b5..bb64bde 100644 --- a/includes/addon/class-flexi-standalone.php +++ b/includes/addon/class-flexi-standalone.php @@ -11,7 +11,7 @@ */ class Flexi_Addon_Standalone { - private $help = ' '; + private $help = ' '; public function __construct() { diff --git a/includes/addon/class-flexi-ultimate-member.php b/includes/addon/class-flexi-ultimate-member.php index 5730bf7..6855435 100644 --- a/includes/addon/class-flexi-ultimate-member.php +++ b/includes/addon/class-flexi-ultimate-member.php @@ -1,4 +1,5 @@ '; + private $help = ' '; public function __construct() { @@ -136,4 +137,4 @@ public function um_profile_content_flexi_default($args) } // Ultimate Member: Setting at Flexi & Tab at profile page -$ultimate_member = new Flexi_Addon_Ultimate_Member(); \ No newline at end of file +$ultimate_member = new Flexi_Addon_Ultimate_Member(); diff --git a/includes/class-flexi-detail.php b/includes/class-flexi-detail.php index 74a39dc..aa3b59f 100644 --- a/includes/class-flexi-detail.php +++ b/includes/class-flexi-detail.php @@ -1,4 +1,5 @@ '; +class Flexi_Public_Detail +{ + private $help = ' '; - public function __construct() { + public function __construct() + { add_filter('flexi_settings_fields', array($this, 'add_fields')); // } @@ -23,7 +26,8 @@ public function __construct() { * @param string $content Content of the current post. * @return string $content Modified Content. */ - public function the_content($content) { + public function the_content($content) + { if (is_singular('flexi') && in_the_loop() && is_main_query()) { global $post; @@ -44,7 +48,8 @@ public function the_content($content) { } //Add section fields at Flexi Setting > Icons & user access settings - public function add_fields($new) { + public function add_fields($new) + { $fields = array( 'flexi_icon_settings' => array( @@ -64,7 +69,8 @@ public function add_fields($new) { } //Add icons at user grid - public function add_icon($icon, $post = null) { + public function add_icon($icon, $post = null) + { if (null == $post) { global $post; } diff --git a/includes/class-flexi-links.php b/includes/class-flexi-links.php index f475ca8..27d5f40 100644 --- a/includes/class-flexi-links.php +++ b/includes/class-flexi-links.php @@ -38,7 +38,7 @@ public function plugin_links_extra($links, $file) // $more_links[] = '' . __('Rate the plugin', 'wp-upg') . ' ★★★★★'; $more_links[] = 'Version ' . FLEXI_VERSION; - $more_links[] = '' . __('Docs & FAQs', 'flexi') . ''; + $more_links[] = '' . __('Docs & FAQs', 'flexi') . ''; $links = $more_links + $links; return $links; } diff --git a/includes/class-flexi-settings.php b/includes/class-flexi-settings.php index b0f563d..24dc26b 100644 --- a/includes/class-flexi-settings.php +++ b/includes/class-flexi-settings.php @@ -114,7 +114,7 @@ public function get_tabs() */ public function get_sections() { - $category_help = ' '; + $category_help = ' '; $sections = array( array( @@ -191,11 +191,11 @@ public function get_fields() $file_size_limit = 100; } - $primary_help = ' '; - $popup_help = ' '; - $submission_help = ' '; - $edit_help = ' '; - $category_help = ' '; + $primary_help = ' '; + $popup_help = ' '; + $submission_help = ' '; + $edit_help = ' '; + $category_help = ' '; //Import layout page link $layout_page = admin_url('admin.php?page=flexi'); @@ -1239,4 +1239,4 @@ public function get_option($option, $section, $default = '') return $default; } -} \ No newline at end of file +} diff --git a/includes/user_dashboard/class-flexi-user-dashboard.php b/includes/user_dashboard/class-flexi-user-dashboard.php index fd28449..a108661 100644 --- a/includes/user_dashboard/class-flexi-user-dashboard.php +++ b/includes/user_dashboard/class-flexi-user-dashboard.php @@ -11,7 +11,7 @@ */ class Flexi_User_Dashboard { - private $help = ' '; + private $help = ' '; public function __construct() { @@ -196,80 +196,80 @@ public function flexi_user_dashboard() $style_text_color = flexi_get_option('flexi_style_text_color', 'flexi_app_style_settings', ''); ?> -
-
-
-
- user_login)); ?> -
- - "> +
+
+
+ user_login)); ?> +
+ + -
-
- -
-

- - -

-

- - - -

-
- -
-
- - +
+ +
+

+ + +

+

+ + + +

+
+ +
+
+ + -
+
-
-
+
+
-
-
- -
- + + + + + + + +
+ +
+ +
+
+
+
-
-
- -