PluginProbe ʕ •ᴥ•ʔ
Code Manager / 1.0.31
Code Manager v1.0.31
1.0.48 1.0.47 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.26 1.0.27 1.0.28 1.0.3 1.0.30 1.0.31 1.0.32 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.38 1.0.39 1.0.4 1.0.40 1.0.41 1.0.42 1.0.43 1.0.44 1.0.45 1.0.46 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9
code-manager / freemius / templates / debug / plugins-themes-sync.php
code-manager / freemius / templates / debug Last commit date
api-calls.php 2 years ago index.php 2 years ago logger.php 2 years ago plugins-themes-sync.php 2 years ago scheduled-crons.php 2 years ago
plugins-themes-sync.php
77 lines
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2015, Freemius, Inc.
5 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 * @since 1.1.7.3
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 $fs_options = FS_Options::instance( WP_FS__ACCOUNTS_OPTION_NAME, true );
14 $all_plugins = $fs_options->get_option( 'all_plugins' );
15 $all_themes = $fs_options->get_option( 'all_themes' );
16
17 /* translators: %s: time period (e.g. In "2 hours") */
18 $in_x_text = fs_text_inline( 'In %s', 'in-x' );
19 /* translators: %s: time period (e.g. "2 hours" ago) */
20 $x_ago_text = fs_text_inline( '%s ago', 'x-ago' );
21 $sec_text = fs_text_x_inline( 'sec', 'seconds' );
22 ?>
23 <h1><?php fs_esc_html_echo_inline( 'Plugins & Themes Sync', 'plugins-themes-sync' ) ?></h1>
24 <table class="widefat">
25 <thead>
26 <tr>
27 <th></th>
28 <th><?php fs_esc_html_echo_inline( 'Total', 'total' ) ?></th>
29 <th><?php fs_esc_html_echo_inline( 'Last', 'last' ) ?></th>
30 </tr>
31 </thead>
32 <tbody>
33 <?php if ( is_object( $all_plugins ) ) : ?>
34 <tr>
35 <td><?php fs_esc_html_echo_inline( 'Plugins', 'plugins' ) ?></td>
36 <td><?php echo count( $all_plugins->plugins ) ?></td>
37 <td><?php
38 if ( isset( $all_plugins->timestamp ) && is_numeric( $all_plugins->timestamp ) ) {
39 $diff = abs( WP_FS__SCRIPT_START_TIME - $all_plugins->timestamp );
40 $human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
41 $diff . ' ' . $sec_text :
42 human_time_diff( WP_FS__SCRIPT_START_TIME, $all_plugins->timestamp );
43
44 echo esc_html( sprintf(
45 ( ( WP_FS__SCRIPT_START_TIME < $all_plugins->timestamp ) ?
46 $in_x_text :
47 $x_ago_text ),
48 $human_diff
49 ) );
50 }
51 ?></td>
52 </tr>
53 <?php endif ?>
54 <?php if ( is_object( $all_themes ) ) : ?>
55 <tr>
56 <td><?php fs_esc_html_echo_inline( 'Themes', 'themes' ) ?></td>
57 <td><?php echo count( $all_themes->themes ) ?></td>
58 <td><?php
59 if ( isset( $all_themes->timestamp ) && is_numeric( $all_themes->timestamp ) ) {
60 $diff = abs( WP_FS__SCRIPT_START_TIME - $all_themes->timestamp );
61 $human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
62 $diff . ' ' . $sec_text :
63 human_time_diff( WP_FS__SCRIPT_START_TIME, $all_themes->timestamp );
64
65 echo esc_html( sprintf(
66 ( ( WP_FS__SCRIPT_START_TIME < $all_themes->timestamp ) ?
67 $in_x_text :
68 $x_ago_text ),
69 $human_diff
70 ) );
71 }
72 ?></td>
73 </tr>
74 <?php endif ?>
75 </tbody>
76 </table>
77