Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/chaty/views/admin
File: recommended-plugins.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Recommended Plugins
[2] Fix | Delete
*
[3] Fix | Delete
* @author : Premio <contact@premio.io>
[4] Fix | Delete
* @license : GPL2
[5] Fix | Delete
* */
[6] Fix | Delete
[7] Fix | Delete
if (defined('ABSPATH') === false) {
[8] Fix | Delete
exit;
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
?>
[12] Fix | Delete
<style>
[13] Fix | Delete
a.hide-recommended-btn {
[14] Fix | Delete
background: #1da1f4;
[15] Fix | Delete
display: block;
[16] Fix | Delete
float: right;
[17] Fix | Delete
color: #fff;
[18] Fix | Delete
text-decoration: none;
[19] Fix | Delete
padding: 5px 20px;
[20] Fix | Delete
font-size: 18px;
[21] Fix | Delete
/* font-weight: bold; */
[22] Fix | Delete
border-radius: 4px;
[23] Fix | Delete
}
[24] Fix | Delete
.ui-dialog-titlebar {
[25] Fix | Delete
background: none !important;
[26] Fix | Delete
}
[27] Fix | Delete
.ui-dialog {
[28] Fix | Delete
z-index: 999999;
[29] Fix | Delete
text-align: center;
[30] Fix | Delete
}
[31] Fix | Delete
.ui-dialog-buttonpane {
[32] Fix | Delete
border: none;
[33] Fix | Delete
background: transparent;
[34] Fix | Delete
padding-top: 0;
[35] Fix | Delete
}
[36] Fix | Delete
.ui-dialog .ui-dialog-buttonset{
[37] Fix | Delete
float:none;
[38] Fix | Delete
text-align: center;
[39] Fix | Delete
}
[40] Fix | Delete
.ui-dialog .ui-dialog-buttonpane .ui-button {
[41] Fix | Delete
margin: 0 10px;
[42] Fix | Delete
}
[43] Fix | Delete
.ui-dialog-buttonpane .ui-dialog-buttonset .red-btn,
[44] Fix | Delete
.ui-dialog-buttonpane .ui-dialog-buttonset .purple-btn,
[45] Fix | Delete
.ui-dialog-buttonpane .ui-dialog-buttonset .gray-btn {
[46] Fix | Delete
background-color: #ffffff;
[47] Fix | Delete
color: #fff;
[48] Fix | Delete
border-color: #1da1f4;
[49] Fix | Delete
line-height: 1.4;
[50] Fix | Delete
padding: 5px 0;
[51] Fix | Delete
height: auto;
[52] Fix | Delete
display: inline-block;
[53] Fix | Delete
vertical-align: top;
[54] Fix | Delete
font-size: 16px;
[55] Fix | Delete
min-width: 150px;
[56] Fix | Delete
color: #1da1f4;
[57] Fix | Delete
}
[58] Fix | Delete
.ui-dialog-buttonpane .ui-dialog-buttonset .red-btn {
[59] Fix | Delete
background-color: #1da1f4;
[60] Fix | Delete
border-color: #1da1f4;
[61] Fix | Delete
color: #ffffff;
[62] Fix | Delete
}
[63] Fix | Delete
</style>
[64] Fix | Delete
<?php
[65] Fix | Delete
wp_enqueue_style( 'wp-jquery-ui-dialog' );
[66] Fix | Delete
wp_enqueue_script( 'jquery-ui-dialog' );
[67] Fix | Delete
// You may comment this out IF you're sure the function exists.
[68] Fix | Delete
require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
[69] Fix | Delete
remove_all_filters('plugins_api');
[70] Fix | Delete
$pluginsAllowedTags = array(
[71] Fix | Delete
'a' => array(
[72] Fix | Delete
'href' => array(),
[73] Fix | Delete
'title' => array(),
[74] Fix | Delete
'target' => array(),
[75] Fix | Delete
),
[76] Fix | Delete
'abbr' => array( 'title' => array() ),
[77] Fix | Delete
'acronym' => array( 'title' => array() ),
[78] Fix | Delete
'code' => array(),
[79] Fix | Delete
'pre' => array(),
[80] Fix | Delete
'em' => array(),
[81] Fix | Delete
'strong' => array(),
[82] Fix | Delete
'ul' => array(),
[83] Fix | Delete
'ol' => array(),
[84] Fix | Delete
'li' => array(),
[85] Fix | Delete
'p' => array(),
[86] Fix | Delete
'br' => array(),
[87] Fix | Delete
);
[88] Fix | Delete
[89] Fix | Delete
$recommendedPlugins = array();
[90] Fix | Delete
/* Poptin Plugins */
[91] Fix | Delete
$args = [
[92] Fix | Delete
'slug' => 'poptin',
[93] Fix | Delete
'fields' => [
[94] Fix | Delete
'short_description' => true,
[95] Fix | Delete
'icons' => true,
[96] Fix | Delete
'reviews' => false, // excludes all reviews
[97] Fix | Delete
],
[98] Fix | Delete
];
[99] Fix | Delete
$data = plugins_api( 'plugin_information', $args );
[100] Fix | Delete
if ( $data && ! is_wp_error( $data ) ) {
[101] Fix | Delete
$recommendedPlugins['poptin'] = $data;
[102] Fix | Delete
$recommendedPlugins['poptin']->name = 'Poptin: Beautiful Pop Ups and Embedded Inline Contact Forms for Your Website';
[103] Fix | Delete
$recommendedPlugins['poptin']->short_description = 'Pop ups and contact forms builder for your website. Get more sales, leads, and subscribers with beautiful popups & inline forms templates, no coding skills required';
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
[107] Fix | Delete
/* Chatway Plugin */
[108] Fix | Delete
$args = [
[109] Fix | Delete
'slug' => 'chatway-live-chat',
[110] Fix | Delete
'fields' => [
[111] Fix | Delete
'short_description' => true,
[112] Fix | Delete
'icons' => true,
[113] Fix | Delete
'reviews' => false, // excludes all reviews
[114] Fix | Delete
],
[115] Fix | Delete
];
[116] Fix | Delete
$data = plugins_api( 'plugin_information', $args );
[117] Fix | Delete
if ( $data && ! is_wp_error( $data ) ) {
[118] Fix | Delete
$recommendedPlugins['chatway-live-chat'] = $data;
[119] Fix | Delete
$recommendedPlugins['chatway-live-chat']->name = 'Free Live Chat, WordPress Website Chat Plugin, Support Chat App: Chatway';
[120] Fix | Delete
$recommendedPlugins['chatway-live-chat']->short_description = 'Live chat with your website’s visitors through your WordPress website. With Chatway – live chat app, you can do just that and much more!';
[121] Fix | Delete
}
[122] Fix | Delete
[123] Fix | Delete
[124] Fix | Delete
/* Chaty Plugins */
[125] Fix | Delete
$args = [
[126] Fix | Delete
'slug' => 'chaty',
[127] Fix | Delete
'fields' => [
[128] Fix | Delete
'short_description' => true,
[129] Fix | Delete
'icons' => true,
[130] Fix | Delete
'reviews' => false, // excludes all reviews
[131] Fix | Delete
],
[132] Fix | Delete
];
[133] Fix | Delete
$data = plugins_api( 'plugin_information', $args );
[134] Fix | Delete
if ( $data && ! is_wp_error( $data ) ) {
[135] Fix | Delete
$recommendedPlugins['chaty'] = $data;
[136] Fix | Delete
$recommendedPlugins['chaty']->name = 'Chaty: WhatsApp, Facebook Messenger, and Many Other Chat Buttons For Your Website';
[137] Fix | Delete
$recommendedPlugins['chaty']->short_description = 'Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, Phone call, SMS and more with customizable chat & call bututons';
[138] Fix | Delete
}
[139] Fix | Delete
[140] Fix | Delete
/* Folders Plugins */
[141] Fix | Delete
$args = [
[142] Fix | Delete
'slug' => 'folders',
[143] Fix | Delete
'fields' => [
[144] Fix | Delete
'short_description' => true,
[145] Fix | Delete
'icons' => true,
[146] Fix | Delete
'reviews' => false, // excludes all reviews
[147] Fix | Delete
],
[148] Fix | Delete
];
[149] Fix | Delete
$data = plugins_api( 'plugin_information', $args );
[150] Fix | Delete
if ( $data && ! is_wp_error( $data ) ) {
[151] Fix | Delete
$recommendedPlugins['folders'] = $data;
[152] Fix | Delete
$recommendedPlugins['folders']->name = 'Folders: Organize Your Media Library, Posts, Pages, and Custom posts Using Drag and Drop';
[153] Fix | Delete
$recommendedPlugins['folders']->short_description = 'Folders is a powerful WordPress plugin that will help you quickly and easily organize and manage your Media library files, Pages, Posts, and Custom Posts in folders';
[154] Fix | Delete
}
[155] Fix | Delete
?>
[156] Fix | Delete
<div class="wrap mystickyelement-wrap recommended-plugins">
[157] Fix | Delete
<h2>
[158] Fix | Delete
<?php esc_html_e('Try out our recommended plugins', 'chaty'); ?>
[159] Fix | Delete
<a class="hide-recommended-btn" href="#" class=""><?php esc_html_e('Hide From Menu', 'chaty');?></a>
[160] Fix | Delete
</h2>
[161] Fix | Delete
</div>
[162] Fix | Delete
[163] Fix | Delete
<div class="wrap recommended-plugins">
[164] Fix | Delete
<div class="wp-list-table widefat plugin-install">
[165] Fix | Delete
<div class="the-list">
[166] Fix | Delete
<?php
[167] Fix | Delete
foreach ((array) $recommendedPlugins as $plugin) {
[168] Fix | Delete
if (is_object($plugin)) {
[169] Fix | Delete
$plugin = (array) $plugin;
[170] Fix | Delete
}
[171] Fix | Delete
[172] Fix | Delete
// Display the group heading if there is one.
[173] Fix | Delete
if (isset($plugin['group']) && $plugin['group'] != $group) {
[174] Fix | Delete
if (isset($this->groups[$plugin['group']])) {
[175] Fix | Delete
$group_name = $this->groups[$plugin['group']];
[176] Fix | Delete
if (isset($plugins_group_titles[$group_name])) {
[177] Fix | Delete
$group_name = $plugins_group_titles[$group_name];
[178] Fix | Delete
}
[179] Fix | Delete
} else {
[180] Fix | Delete
$group_name = $plugin['group'];
[181] Fix | Delete
}
[182] Fix | Delete
[183] Fix | Delete
// Starting a new group, close off the divs of the last one.
[184] Fix | Delete
if (! empty($group)) {
[185] Fix | Delete
echo '</div></div>';
[186] Fix | Delete
}
[187] Fix | Delete
[188] Fix | Delete
echo '<div class="plugin-group"><h3>'.esc_html($group_name).'</h3>';
[189] Fix | Delete
// Needs an extra wrapping div for nth-child selectors to work.
[190] Fix | Delete
echo '<div class="plugin-items">';
[191] Fix | Delete
[192] Fix | Delete
$group = $plugin['group'];
[193] Fix | Delete
}//end if
[194] Fix | Delete
[195] Fix | Delete
$title = wp_kses($plugin['name'], $pluginsAllowedTags);
[196] Fix | Delete
[197] Fix | Delete
// Remove any HTML from the description.
[198] Fix | Delete
$description = wp_strip_all_tags($plugin['short_description']);
[199] Fix | Delete
$version = wp_kses($plugin['version'], $pluginsAllowedTags);
[200] Fix | Delete
[201] Fix | Delete
$name = wp_strip_all_tags($title.' '.$version);
[202] Fix | Delete
[203] Fix | Delete
$author = wp_kses($plugin['author'], $pluginsAllowedTags);
[204] Fix | Delete
if (! empty($author)) {
[205] Fix | Delete
// translators: %s: Plugin author.
[206] Fix | Delete
$author = ' <cite>'.sprintf(esc_html__( 'By %s', "chaty"), $author).'</cite>';
[207] Fix | Delete
}
[208] Fix | Delete
[209] Fix | Delete
$requires_php = isset($plugin['requires_php']) ? $plugin['requires_php'] : null;
[210] Fix | Delete
$requires_wp = isset($plugin['requires']) ? $plugin['requires'] : null;
[211] Fix | Delete
[212] Fix | Delete
$compatible_php = is_php_version_compatible($requires_php);
[213] Fix | Delete
$compatible_wp = is_wp_version_compatible($requires_wp);
[214] Fix | Delete
$tested_wp = ( empty($plugin['tested']) || version_compare(get_bloginfo('version'), $plugin['tested'], '<=') );
[215] Fix | Delete
[216] Fix | Delete
$action_links = [];
[217] Fix | Delete
[218] Fix | Delete
if (current_user_can('install_plugins') || current_user_can('update_plugins')) {
[219] Fix | Delete
$status = install_plugin_install_status($plugin);
[220] Fix | Delete
[221] Fix | Delete
switch ($status['status']) {
[222] Fix | Delete
case 'install':
[223] Fix | Delete
if ($status['url']) {
[224] Fix | Delete
if ($compatible_php && $compatible_wp) {
[225] Fix | Delete
$action_links[] = sprintf(
[226] Fix | Delete
'<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
[227] Fix | Delete
esc_attr($plugin['slug']),
[228] Fix | Delete
esc_url($status['url']),
[229] Fix | Delete
// translators: %s: Plugin name and version.
[230] Fix | Delete
esc_attr(sprintf(esc_html__('Install %s now', 'chaty'), $name)),
[231] Fix | Delete
esc_attr($name),
[232] Fix | Delete
esc_html__( 'Install Now', "chaty")
[233] Fix | Delete
);
[234] Fix | Delete
} else {
[235] Fix | Delete
$action_links[] = sprintf(
[236] Fix | Delete
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
[237] Fix | Delete
esc_html__('Cannot Install', 'chaty')
[238] Fix | Delete
);
[239] Fix | Delete
}
[240] Fix | Delete
}
[241] Fix | Delete
break;
[242] Fix | Delete
[243] Fix | Delete
case 'update_available':
[244] Fix | Delete
if ($status['url']) {
[245] Fix | Delete
if ($compatible_php && $compatible_wp) {
[246] Fix | Delete
$action_links[] = sprintf(
[247] Fix | Delete
'<a class="update-now button aria-button-if-js" data-plugin="%s" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
[248] Fix | Delete
esc_attr($status['file']),
[249] Fix | Delete
esc_attr($plugin['slug']),
[250] Fix | Delete
esc_url($status['url']),
[251] Fix | Delete
// translators: %s: Plugin name and version.
[252] Fix | Delete
esc_attr(sprintf(esc_html__('Update %s now', 'chaty'), $name)),
[253] Fix | Delete
esc_attr($name),
[254] Fix | Delete
esc_html__( 'Update Now', "chaty")
[255] Fix | Delete
);
[256] Fix | Delete
} else {
[257] Fix | Delete
$action_links[] = sprintf(
[258] Fix | Delete
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
[259] Fix | Delete
esc_html__('Cannot Update', 'chaty')
[260] Fix | Delete
);
[261] Fix | Delete
}
[262] Fix | Delete
}
[263] Fix | Delete
break;
[264] Fix | Delete
[265] Fix | Delete
case 'latest_installed':
[266] Fix | Delete
case 'newer_installed':
[267] Fix | Delete
if (is_plugin_active($status['file'])) {
[268] Fix | Delete
$action_links[] = sprintf(
[269] Fix | Delete
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
[270] Fix | Delete
esc_html__('Active', 'chaty')
[271] Fix | Delete
);
[272] Fix | Delete
} else if (current_user_can('activate_plugin', $status['file'])) {
[273] Fix | Delete
$button_text = esc_html__( 'Activate', "chaty");
[274] Fix | Delete
// translators: %s: Plugin name.
[275] Fix | Delete
$button_label = esc_html__('Activate %s', 'chaty');
[276] Fix | Delete
$activate_url = add_query_arg(
[277] Fix | Delete
[
[278] Fix | Delete
'_wpnonce' => wp_create_nonce('activate-plugin_'.$status['file']),
[279] Fix | Delete
'action' => 'activate',
[280] Fix | Delete
'plugin' => $status['file'],
[281] Fix | Delete
],
[282] Fix | Delete
network_admin_url('plugins.php')
[283] Fix | Delete
);
[284] Fix | Delete
[285] Fix | Delete
if (is_network_admin()) {
[286] Fix | Delete
$button_text = esc_html__( 'Network Activate', "chaty");
[287] Fix | Delete
// translators: %s: Plugin name.
[288] Fix | Delete
$button_label = esc_html__('Network Activate %s', 'chaty');
[289] Fix | Delete
$activate_url = add_query_arg([ 'networkwide' => 1 ], $activate_url);
[290] Fix | Delete
}
[291] Fix | Delete
[292] Fix | Delete
$action_links[] = sprintf(
[293] Fix | Delete
'<a href="%1$s" class="button activate-now" aria-label="%2$s">%3$s</a>',
[294] Fix | Delete
esc_url($activate_url),
[295] Fix | Delete
esc_attr(sprintf($button_label, $plugin['name'])),
[296] Fix | Delete
$button_text
[297] Fix | Delete
);
[298] Fix | Delete
} else {
[299] Fix | Delete
$action_links[] = sprintf(
[300] Fix | Delete
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
[301] Fix | Delete
esc_html__('Installed', 'chaty')
[302] Fix | Delete
);
[303] Fix | Delete
}//end if
[304] Fix | Delete
break;
[305] Fix | Delete
}//end switch
[306] Fix | Delete
}//end if
[307] Fix | Delete
[308] Fix | Delete
$details_link = self_admin_url(
[309] Fix | Delete
'plugin-install.php?tab=plugin-information&amp;plugin='.$plugin['slug'].'&amp;TB_iframe=true&amp;width=600&amp;height=550'
[310] Fix | Delete
);
[311] Fix | Delete
[312] Fix | Delete
$action_links[] = sprintf(
[313] Fix | Delete
'<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>',
[314] Fix | Delete
esc_url($details_link),
[315] Fix | Delete
// translators: %s: Plugin name and version.
[316] Fix | Delete
esc_attr(sprintf(esc_html__( 'More information about %s', "chaty"), $name)),
[317] Fix | Delete
esc_attr($name),
[318] Fix | Delete
esc_html__( 'More Details', "chaty")
[319] Fix | Delete
);
[320] Fix | Delete
[321] Fix | Delete
if (! empty($plugin['icons']['svg'])) {
[322] Fix | Delete
$plugin_icon_url = $plugin['icons']['svg'];
[323] Fix | Delete
} else if (! empty($plugin['icons']['2x'])) {
[324] Fix | Delete
$plugin_icon_url = $plugin['icons']['2x'];
[325] Fix | Delete
} else if (! empty($plugin['icons']['1x'])) {
[326] Fix | Delete
$plugin_icon_url = $plugin['icons']['1x'];
[327] Fix | Delete
} else {
[328] Fix | Delete
$plugin_icon_url = $plugin['icons']['default'];
[329] Fix | Delete
}
[330] Fix | Delete
[331] Fix | Delete
/*
[332] Fix | Delete
* Filters the install action links for a plugin.
[333] Fix | Delete
*
[334] Fix | Delete
* @since 2.7.0
[335] Fix | Delete
*
[336] Fix | Delete
* @param string[] $action_links An array of plugin action links. Defaults are links to Details and Install Now.
[337] Fix | Delete
* @param array $plugin The plugin currently being listed.
[338] Fix | Delete
*/
[339] Fix | Delete
$action_links = apply_filters('plugin_install_action_links', $action_links, $plugin);
[340] Fix | Delete
[341] Fix | Delete
$last_updated_timestamp = strtotime($plugin['last_updated']);
[342] Fix | Delete
?>
[343] Fix | Delete
<div class="plugin-card plugin-card-<?php echo sanitize_html_class($plugin['slug']); ?>">
[344] Fix | Delete
<?php
[345] Fix | Delete
if (! $compatible_php || ! $compatible_wp) {
[346] Fix | Delete
echo '<div class="notice inline notice-error notice-alt"><p>';
[347] Fix | Delete
if (! $compatible_php && ! $compatible_wp) {
[348] Fix | Delete
esc_html_e('This plugin doesn&#8217;t work with your versions of WordPress and PHP.', 'chaty');
[349] Fix | Delete
if (current_user_can('update_core') && current_user_can('update_php')) {
[350] Fix | Delete
printf(
[351] Fix | Delete
// translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page.
[352] Fix | Delete
' '.esc_html__( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.', "chaty"),
[353] Fix | Delete
esc_url(self_admin_url('update-core.php')),
[354] Fix | Delete
esc_url(wp_get_update_php_url())
[355] Fix | Delete
);
[356] Fix | Delete
wp_update_php_annotation('</p><p><em>', '</em>');
[357] Fix | Delete
} else if (current_user_can('update_core')) {
[358] Fix | Delete
printf(
[359] Fix | Delete
// translators: %s: URL to WordPress Updates screen.
[360] Fix | Delete
' '.esc_html__( '<a href="%s">Please update WordPress</a>.', "chaty"),
[361] Fix | Delete
esc_url(self_admin_url('update-core.php'))
[362] Fix | Delete
);
[363] Fix | Delete
} else if (current_user_can('update_php')) {
[364] Fix | Delete
printf(
[365] Fix | Delete
// translators: %s: URL to Update PHP page.
[366] Fix | Delete
' '.esc_html__( '<a href="%s">Learn more about updating PHP</a>.', "chaty"),
[367] Fix | Delete
esc_url(wp_get_update_php_url())
[368] Fix | Delete
);
[369] Fix | Delete
wp_update_php_annotation('</p><p><em>', '</em>');
[370] Fix | Delete
}//end if
[371] Fix | Delete
} else if (! $compatible_wp) {
[372] Fix | Delete
esc_html_e('This plugin doesn&#8217;t work with your version of WordPress.', "chaty");
[373] Fix | Delete
if (current_user_can('update_core')) {
[374] Fix | Delete
printf(
[375] Fix | Delete
// translators: %s: URL to WordPress Updates screen.
[376] Fix | Delete
' '.esc_html__( '<a href="%s">Please update WordPress</a>.', "chaty"),
[377] Fix | Delete
esc_url(self_admin_url('update-core.php'))
[378] Fix | Delete
);
[379] Fix | Delete
}
[380] Fix | Delete
} else if (! $compatible_php) {
[381] Fix | Delete
esc_html_e('This plugin doesn&#8217;t work with your version of PHP.', 'chaty');
[382] Fix | Delete
if (current_user_can('update_php')) {
[383] Fix | Delete
printf(
[384] Fix | Delete
// translators: %s: URL to Update PHP page.
[385] Fix | Delete
' '.esc_html__( '<a href="%s">Learn more about updating PHP</a>.', "chaty"),
[386] Fix | Delete
esc_url(wp_get_update_php_url())
[387] Fix | Delete
);
[388] Fix | Delete
wp_update_php_annotation('</p><p><em>', '</em>');
[389] Fix | Delete
}
[390] Fix | Delete
}//end if
[391] Fix | Delete
[392] Fix | Delete
echo '</p></div>';
[393] Fix | Delete
}//end if
[394] Fix | Delete
?>
[395] Fix | Delete
<div class="plugin-card-top">
[396] Fix | Delete
<div class="name column-name">
[397] Fix | Delete
<h3>
[398] Fix | Delete
<a href="<?php echo esc_url($details_link); ?>" class="thickbox open-plugin-details-modal">
[399] Fix | Delete
<?php echo esc_attr($title); ?>
[400] Fix | Delete
<img src="<?php echo esc_attr($plugin_icon_url); ?>" class="plugin-icon" alt="" />
[401] Fix | Delete
</a>
[402] Fix | Delete
</h3>
[403] Fix | Delete
</div>
[404] Fix | Delete
<div class="action-links">
[405] Fix | Delete
<?php
[406] Fix | Delete
if ($action_links) {
[407] Fix | Delete
echo '<ul class="plugin-action-buttons"><li>'.implode('</li><li>', $action_links).'</li></ul>';
[408] Fix | Delete
}
[409] Fix | Delete
?>
[410] Fix | Delete
</div>
[411] Fix | Delete
<div class="desc column-description">
[412] Fix | Delete
<p><?php echo esc_attr($description); ?></p>
[413] Fix | Delete
<p class="authors"><?php echo wp_kses($author, $pluginsAllowedTags); ?></p>
[414] Fix | Delete
</div>
[415] Fix | Delete
</div>
[416] Fix | Delete
<div class="plugin-card-bottom">
[417] Fix | Delete
<div class="vers column-rating">
[418] Fix | Delete
<?php
[419] Fix | Delete
wp_star_rating(
[420] Fix | Delete
[
[421] Fix | Delete
'rating' => $plugin['rating'],
[422] Fix | Delete
'type' => 'percent',
[423] Fix | Delete
'number' => $plugin['num_ratings'],
[424] Fix | Delete
]
[425] Fix | Delete
);
[426] Fix | Delete
?>
[427] Fix | Delete
<span class="num-ratings" aria-hidden="true">(<?php echo esc_attr(number_format_i18n($plugin['num_ratings'])); ?>)</span>
[428] Fix | Delete
</div>
[429] Fix | Delete
<div class="column-updated">
[430] Fix | Delete
<strong><?php esc_html_e('Last Updated:', "chaty"); ?></strong>
[431] Fix | Delete
<?php
[432] Fix | Delete
// translators: %s: Human-readable time difference.
[433] Fix | Delete
printf(esc_html__( '%s ago', "chaty"), esc_attr(human_time_diff($last_updated_timestamp)));
[434] Fix | Delete
?>
[435] Fix | Delete
</div>
[436] Fix | Delete
<div class="column-downloaded">
[437] Fix | Delete
<?php
[438] Fix | Delete
if ($plugin['active_installs'] >= 1000000) {
[439] Fix | Delete
$active_installs_millions = floor(($plugin['active_installs'] / 1000000));
[440] Fix | Delete
$active_installs_text = sprintf(
[441] Fix | Delete
// translators: %s: Number of millions.
[442] Fix | Delete
_nx('%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations', 'chaty'),
[443] Fix | Delete
number_format_i18n($active_installs_millions)
[444] Fix | Delete
);
[445] Fix | Delete
} else if (0 == $plugin['active_installs']) {
[446] Fix | Delete
$active_installs_text = esc_html__('Less Than 10', 'chaty');
[447] Fix | Delete
} else {
[448] Fix | Delete
$active_installs_text = number_format_i18n($plugin['active_installs']).'+';
[449] Fix | Delete
}
[450] Fix | Delete
[451] Fix | Delete
// translators: %s: Number of installations.
[452] Fix | Delete
printf(esc_html__( '%s Active Installations', "chaty"), esc_attr($active_installs_text));
[453] Fix | Delete
?>
[454] Fix | Delete
</div>
[455] Fix | Delete
<div class="column-compatibility">
[456] Fix | Delete
<?php
[457] Fix | Delete
if (! $tested_wp) {
[458] Fix | Delete
echo '<span class="compatibility-untested">'.esc_html__( 'Untested with your version of WordPress', "chaty").'</span>';
[459] Fix | Delete
} else if (! $compatible_wp) {
[460] Fix | Delete
echo '<span class="compatibility-incompatible">'.wp_kses( '<strong>Incompatible</strong> with your version of WordPress', $pluginsAllowedTags).'</span>';
[461] Fix | Delete
} else {
[462] Fix | Delete
echo '<span class="compatibility-compatible">'.wp_kses( '<strong>Compatible</strong> with your version of WordPress', $pluginsAllowedTags).'</span>';
[463] Fix | Delete
}
[464] Fix | Delete
?>
[465] Fix | Delete
</div>
[466] Fix | Delete
</div>
[467] Fix | Delete
</div>
[468] Fix | Delete
<?php
[469] Fix | Delete
}//end foreach
[470] Fix | Delete
?>
[471] Fix | Delete
</div>
[472] Fix | Delete
</div>
[473] Fix | Delete
<div id="hide-recommeded-plugins" style="display:none;" title="<?php esc_html_e('Are you sure?', 'chaty');?>">
[474] Fix | Delete
<p><?php esc_html_e("If you hide the recommended plugins page from your menu, it won't appear there again. Are you sure you'd like to do it?", 'chaty');?></p>
[475] Fix | Delete
</div>
[476] Fix | Delete
[477] Fix | Delete
</div>
[478] Fix | Delete
[479] Fix | Delete
<script>
[480] Fix | Delete
( function( $ ) {
[481] Fix | Delete
"use strict";
[482] Fix | Delete
$(document).ready(function(){
[483] Fix | Delete
$('a.hide-recommended-btn').on('click',function(event){
[484] Fix | Delete
event.preventDefault();
[485] Fix | Delete
$( "#hide-recommeded-plugins" ).dialog({
[486] Fix | Delete
resizable: false,
[487] Fix | Delete
modal: true,
[488] Fix | Delete
draggable: false,
[489] Fix | Delete
height: 'auto',
[490] Fix | Delete
width: 400,
[491] Fix | Delete
open: function (event, ui) {
[492] Fix | Delete
$(".ui-widget-overlay").click(function () {
[493] Fix | Delete
$('#hide-recommeded-plugins').dialog('close');
[494] Fix | Delete
});
[495] Fix | Delete
},
[496] Fix | Delete
buttons: {
[497] Fix | Delete
"Hide it": {
[498] Fix | Delete
click: function () {
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function