Skip to content

Commit 97b8664

Browse files
Merge pull request #3 from EugeneKyale/feature/string-localization
Feature/string localization
2 parents e25d75a + 2e8babf commit 97b8664

10 files changed

Lines changed: 814 additions & 825 deletions

File tree

assets/admin/css/style.css

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
ul.tree-list,
2-
ul.tree-list ul,
3-
ul.tree-list li {
4-
margin : 0;
5-
padding : 0;
6-
list-style-type: none;
7-
}
8-
9-
ul.tree-list ul {
10-
padding-left: 0.3em;
11-
}
12-
ul.tree-list li {
13-
border-left : 1px dotted #000;
14-
padding-left: 13px;
15-
background : url('../images/dotted.gif') scroll no-repeat 1px 0.8em;
16-
}
17-
ul.tree-list ul > li:last-child {
18-
border-left-width: 0;
19-
padding-left : 14px;
20-
background : url('../images/dottedangle.gif') scroll no-repeat left top;
21-
}
22-
ul.tree-list a {
23-
text-decoration: none;
24-
}
25-
ul.tree-list a:hover {
26-
text-decoration: underline;
27-
}
28-
29-
ul.tree-list li {
30-
text-align : justify;
31-
line-height: 25px;
32-
}
33-
34-
.file-list {
35-
border : 1px solid #cccccc40;
36-
padding : 10px;
37-
border-radius: 5px;
38-
background : #fbfbfb;
1+
ul.tree-list,
2+
ul.tree-list ul,
3+
ul.tree-list li {
4+
margin : 0;
5+
padding : 0;
6+
list-style-type: none;
7+
}
8+
9+
ul.tree-list ul {
10+
padding-left: 0.3em;
11+
}
12+
ul.tree-list li {
13+
border-left : 1px dotted #000;
14+
padding-left: 13px;
15+
background : url('../images/dotted.gif') scroll no-repeat 1px 0.8em;
16+
}
17+
ul.tree-list ul > li:last-child {
18+
border-left-width: 0;
19+
padding-left : 14px;
20+
background : url('../images/dottedangle.gif') scroll no-repeat left top;
21+
}
22+
ul.tree-list a {
23+
text-decoration: none;
24+
}
25+
ul.tree-list a:hover {
26+
text-decoration: underline;
27+
}
28+
29+
ul.tree-list li {
30+
text-align : justify;
31+
line-height: 25px;
32+
}
33+
34+
.file-list {
35+
border : 1px solid #cccccc40;
36+
padding : 10px;
37+
border-radius: 5px;
38+
background : #fbfbfb;
3939
}

assets/admin/js/main.js

Lines changed: 198 additions & 198 deletions
Large diffs are not rendered by default.

assets/banner-772x250.png

20 KB
Loading

assets/icon-256x256.png

24.3 KB
Loading

drophtml.php

Lines changed: 100 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,100 @@
1-
<?php
2-
/**
3-
* Plugin Name: DropHTML
4-
* Description: Simply drop static HTML zip files and see the magic!
5-
* Version: 1.0.0
6-
* Requires at least: 5.2
7-
* License: GPL v2 or later
8-
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
9-
* Text Domain: drop
10-
**/
11-
12-
if ( ! defined( 'ABSPATH' ) ) {
13-
exit;
14-
} // Exit if accessed directly
15-
16-
define( 'DROPHTML__FILE__', __FILE__ );
17-
18-
/**
19-
* DropHtml check PHP version.
20-
*
21-
* Check when the site doesn't have the minimum required PHP version.
22-
*
23-
* @since 1.3.1
24-
*
25-
* @return void
26-
*/
27-
function drop_html_is_php_version_compatible() {
28-
if ( ! version_compare( PHP_VERSION, '5.4', '>=' ) ) {
29-
return false;
30-
}
31-
return true;
32-
}
33-
34-
if ( ! drop_html_is_php_version_compatible() ) {
35-
add_action( 'admin_notices', 'drop_html_fail_php_version' );
36-
} else {
37-
require plugin_dir_path( DROPHTML__FILE__ ) . 'includes/plugin.php';
38-
}
39-
40-
/**
41-
* Show in WP Dashboard notice about the plugin is not activated.
42-
*
43-
* @since 1.0.0
44-
*
45-
* @return void
46-
*/
47-
function drop_html_fail_php_version() {
48-
$message = esc_html__( 'DropHtml requires PHP version 5.4+, plugin is currently NOT ACTIVE.', 'drop_html' );
49-
$html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
50-
echo wp_kses_post( $html_message );
51-
}
52-
53-
/**
54-
* Helper function for writing to log file.
55-
*
56-
* @since 1.0.0
57-
*
58-
* @param log data to log
59-
* @param type log or export
60-
*/
61-
function drop_html_write_log( $log, $type = '1' ) {
62-
if ( true === WP_DEBUG ) {
63-
if ( is_array( $log ) || is_object( $log ) ) {
64-
if ( $type === '1' ) {
65-
error_log( print_r( $log, true ) );
66-
} else {
67-
error_log( var_export( $log, true ) );
68-
}
69-
} else {
70-
error_log( $log );
71-
}
72-
}
73-
}
74-
75-
/**
76-
* The main function responsible for returning the one true DropHtml Instance
77-
* to functions everywhere.
78-
*
79-
* Use this function like you would a global variable, except without needing
80-
* to declare the global.
81-
*
82-
* Example: <?php $drop_html = drop_html(); ?>
83-
*
84-
* @since 1.0.0
85-
*
86-
* @return The one true DropHtml Instance
87-
*/
88-
function drop_html() {
89-
if ( ! drop_html_is_php_version_compatible() ) {
90-
return;
91-
}
92-
// In tests we run the instance manually.
93-
return DropHtml\Plugin::instance();
94-
}
95-
96-
if ( ! defined( 'QAZANA_TESTS' ) ) {
97-
drop_html();
98-
}
1+
<?php
2+
/**
3+
* Plugin Name: DropHTML
4+
* Description: Simply drop static HTML zip files and see the magic!
5+
* Version: 1.0.0
6+
* Requires at least: 4.8
7+
* License: GPL v2 or later
8+
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
9+
* Text Domain: drop
10+
* Author URI: https://expresstech.io/
11+
* Plugin URI: https://expresstech.io/
12+
**/
13+
14+
if ( ! defined( 'ABSPATH' ) ) {
15+
exit;
16+
} // Exit if accessed directly
17+
18+
define( 'DROPHTML__FILE__', __FILE__ );
19+
20+
/**
21+
* DropHtml check PHP version.
22+
*
23+
* Check when the site doesn't have the minimum required PHP version.
24+
*
25+
* @since 1.3.1
26+
*
27+
* @return void
28+
*/
29+
function drop_html_is_php_version_compatible() {
30+
if ( ! version_compare( PHP_VERSION, '5.4', '>=' ) ) {
31+
return false;
32+
}
33+
return true;
34+
}
35+
36+
if ( ! drop_html_is_php_version_compatible() ) {
37+
add_action( 'admin_notices', 'drop_html_fail_php_version' );
38+
} else {
39+
require plugin_dir_path( DROPHTML__FILE__ ) . 'includes/plugin.php';
40+
}
41+
42+
/**
43+
* Show in WP Dashboard notice about the plugin is not activated.
44+
*
45+
* @since 1.0.0
46+
*
47+
* @return void
48+
*/
49+
function drop_html_fail_php_version() {
50+
$message = esc_html__( 'DropHtml requires PHP version 5.4+, plugin is currently NOT ACTIVE.', 'drophtml' );
51+
$html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
52+
echo wp_kses_post( $html_message );
53+
}
54+
55+
/**
56+
* Helper function for writing to log file.
57+
*
58+
* @since 1.0.0
59+
*
60+
* @param log data to log
61+
* @param type log or export
62+
*/
63+
function drop_html_write_log( $log, $type = '1' ) {
64+
if ( true === WP_DEBUG ) {
65+
if ( is_array( $log ) || is_object( $log ) ) {
66+
if ( $type === '1' ) {
67+
error_log( print_r( $log, true ) );
68+
} else {
69+
error_log( var_export( $log, true ) );
70+
}
71+
} else {
72+
error_log( $log );
73+
}
74+
}
75+
}
76+
77+
/**
78+
* The main function responsible for returning the one true DropHtml Instance
79+
* to functions everywhere.
80+
*
81+
* Use this function like you would a global variable, except without needing
82+
* to declare the global.
83+
*
84+
* Example: <?php $drop_html = drop_html(); ?>
85+
*
86+
* @since 1.0.0
87+
*
88+
* @return The one true DropHtml Instance
89+
*/
90+
function drop_html() {
91+
if ( ! drop_html_is_php_version_compatible() ) {
92+
return;
93+
}
94+
// In tests we run the instance manually.
95+
return DropHtml\Plugin::instance();
96+
}
97+
98+
if ( ! defined('DROPHTML_TESTS' ) ) {
99+
drop_html();
100+
}

0 commit comments

Comments
 (0)