array( 'href' => array(), 'title' => array(), 'target' => array(), ), 'abbr' => array( 'title' => array() ), 'acronym' => array( 'title' => array() ), 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array(), ); $plugins_data = wpos_espbw_get_plugin_data(); $plugins_filter = wpos_espbw_plugins_filter(); // Check Plugin Install Permission if( ! current_user_can('install_plugins') ) { echo '

'. esc_html__( "Sorry, It looks like that you do not have permission to install the plugin.", "espbw") .'

'. esc_html__("You can take a look at our all plugins at", "espbw") .' '. esc_html__("here", "espbw") . '.

'; return; } ?>

Installs directly from wordpress.org repository

plugins ) ) { ?>
plugins as $plugin_key => $plugin_data) { if ( is_object( $plugin_data ) ) { $plugin_data = (array) $plugin_data; } // Taking some data $title = wp_kses( $plugin_data['name'], $plugins_allowedtags ); $version = wp_kses( $plugin_data['version'], $plugins_allowedtags ); $name = strip_tags( $title . ' ' . $version ); $description = strip_tags( $plugin_data['short_description'] ); $last_updated_timestamp = strtotime( $plugin_data['last_updated'] ); $author = wp_kses( $plugin_data['author'], $plugins_allowedtags ); $author = str_replace( "href=", 'target="_blank" href=', $author ); $requires_php = isset( $plugin['requires_php'] ) ? $plugin['requires_php'] : null; $requires_wp = isset( $plugin_data['requires'] ) ? $plugin_data['requires'] : null; $compatible_php = is_php_version_compatible( $requires_php ); $compatible_wp = is_wp_version_compatible( $requires_wp ); $tested_wp = ( empty( $plugin_data['tested'] ) || version_compare( get_bloginfo( 'version' ), $plugin_data['tested'], '<=' ) ); $details_link = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] . '&TB_iframe=true&width=600&height=550' ); $extra_class = ( ! empty( $plugins_filter[ $plugin_data['slug'] ]['class'] ) ) ? $plugins_filter[ $plugin_data['slug'] ]['class'] : ''; $plugin_tags = ( ! empty( $plugins_filter[ $plugin_data['slug'] ]['tags'] ) ) ? $plugins_filter[ $plugin_data['slug'] ]['tags'] : ''; // Author String if ( ! empty( $author ) ) { /* translators: %s: Plugin author. */ $author = ' ' . sprintf( __( 'By %s' ), $author ) . ''; } // Plugin Icon if ( ! empty( $plugin_data['icons']['svg'] ) ) { $plugin_icon_url = $plugin_data['icons']['svg']; } elseif ( ! empty( $plugin_data['icons']['2x'] ) ) { $plugin_icon_url = $plugin_data['icons']['2x']; } elseif ( ! empty( $plugin_data['icons']['1x'] ) ) { $plugin_icon_url = $plugin_data['icons']['1x']; } else { $plugin_icon_url = $plugin_data['icons']['default']; } // Plugin Action Links $action_links = array(); if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) { $status = install_plugin_install_status( $plugin_data ); switch ( $status['status'] ) { case 'install': if ( $status['url'] ) { if ( $compatible_php && $compatible_wp ) { $action_links[] = sprintf( '%s', esc_attr( $plugin_data['slug'] ), esc_url( $status['url'] ), /* translators: %s: Plugin name and version. */ esc_attr( sprintf( __( 'Install %s now' ), $name ) ), esc_attr( $name ), __( 'Install Now' ) ); } else { $action_links[] = sprintf( '', _x( 'Cannot Install', 'plugin' ) ); } } break; case 'update_available': if ( $status['url'] ) { if ( $compatible_php && $compatible_wp ) { $action_links[] = sprintf( '%s', esc_attr( $status['file'] ), esc_attr( $plugin_data['slug'] ), esc_url( $status['url'] ), /* translators: %s: Plugin name and version. */ esc_attr( sprintf( __( 'Update %s now' ), $name ) ), esc_attr( $name ), __( 'Update Now' ) ); } else { $action_links[] = sprintf( '', _x( 'Cannot Update', 'plugin' ) ); } } break; case 'latest_installed': case 'newer_installed': if ( is_plugin_active( $status['file'] ) ) { $action_links[] = sprintf( '', _x( 'Active', 'plugin' ) ); } elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) { $button_text = __( 'Activate' ); /* translators: %s: Plugin name. */ $button_label = _x( 'Activate %s', 'plugin' ); $activate_url = add_query_arg( array( '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $status['file'] ), 'action' => 'activate', 'plugin' => $status['file'], ), network_admin_url( 'plugins.php' ) ); if ( is_network_admin() ) { $button_text = __( 'Network Activate' ); /* translators: %s: Plugin name. */ $button_label = _x( 'Network Activate %s', 'plugin' ); $activate_url = add_query_arg( array( 'networkwide' => 1 ), $activate_url ); } $action_links[] = sprintf( '%3$s', esc_url( $activate_url ), esc_attr( sprintf( $button_label, $plugin_data['name'] ) ), $button_text ); } else { $action_links[] = sprintf( '', _x( 'Installed', 'plugin' ) ); } break; } } $action_links[] = sprintf( '%s', esc_url( $details_link ), /* translators: %s: Plugin name and version. */ esc_attr( sprintf( __( 'More information about %s' ), $name ) ), esc_attr( $name ), __( 'More Details' ) ); ?>

$plugin_data['rating'], 'type' => 'percent', 'number' => $plugin_data['num_ratings'], ) ); ?>
= 1000000 ) { $active_installs_millions = floor( $plugin_data['active_installs'] / 1000000 ); $active_installs_text = sprintf( /* translators: %s: Number of millions. */ _nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ), number_format_i18n( $active_installs_millions ) ); } elseif ( 0 == $plugin_data['active_installs'] ) { $active_installs_text = _x( 'Less Than 10', 'Active plugin installations' ); } else { $active_installs_text = number_format_i18n( $plugin_data['active_installs'] ) . '+'; } /* translators: %s: Number of installations. */ printf( __( '%s Active Installations' ), $active_installs_text ); ?>
' . __( 'Untested with your version of WordPress' ) . ''; } elseif ( ! $compatible_wp ) { echo '' . __( 'Incompatible with your version of WordPress' ) . ''; } else { echo '' . __( 'Compatible with your version of WordPress' ) . ''; } ?>

.