PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 2.3.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v2.3.5
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
betterdocs / admin / wp-notice / Utils / Helper.php

Helper.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 2.3.5, at admin/wp-notice/Utils/Helper.php

37 lines 736 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace BetterDocs\WPNotice\Utils;
4
5 trait Helper {
6
7 public function is_installed( $plugin ){
8 if ( ! function_exists( 'get_plugins' ) ) {
9 require_once ABSPATH . 'wp-admin/includes/plugin.php';
10 }
11 $plugins = get_plugins();
12
13 return isset( $plugins[ $plugin ] ) ? $plugins[ $plugin ] : false;
14 }
15
16 /**
17 * Get current timestamp
18 * @return integer
19 */
20 public function time(){
21 return intval( current_time( 'timestamp' ) );
22 }
23
24 /**
25 * Make timestamp for a number
26 *
27 * @param string $time
28 * @return bool|int
29 */
30 public function strtotime( $time = '+7 day' ){
31 return intval( strtotime( date( 'r', $this->time() ) . " $time" ) );
32 }
33
34 public function date( $time ){
35 return date( 'd-m-Y h:i:s', $time );
36 }
37 }