File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,14 +17,10 @@ class Helpers extends Plugin {
1717 */
1818 public static function show_notice ($ msg , $ type = 'error ' , $ is_dismissible = false ) {
1919
20- if ( is_admin () ) {
20+ $ class = 'notice notice- ' . $ type . ( $ is_dismissible ? ' is-dismissible ' : '' );
21+ $ msg = __ ( $ msg , self ::$ settings ['data ' ]['TextDomain ' ] );
2122
22- $ class = 'notice notice- ' .$ type .($ is_dismissible ? ' is-dismissible ' : '' );
23- $ msg = __ ( $ msg , self ::$ settings ['data ' ]['TextDomain ' ] );
24-
25- printf ( '<div class="%1$s"><p>%2$s</p></div> ' , $ class , $ msg );
26-
27- }
23+ printf ( '<div class="%1$s"><p>%2$s</p></div> ' , $ class , $ msg );
2824
2925 }
3026
Original file line number Diff line number Diff line change @@ -52,11 +52,11 @@ public function load_plugin() {
5252 */
5353 private function verify_dependencies () {
5454
55- $ php_required = new \WPUpdatePhp ( self ::$ settings ['deps ' ]['php ' ] );
56- $ php_required ->does_it_meet_required_php_version ();
5755 $ error = null ;
5856
59- if (!defined ('\\Carbon_Fields \\VERSION ' )) {
57+ if ( version_compare ( phpversion (), self ::$ settings ['deps ' ]['php ' ], '< ' ) ) {
58+ $ error = '<strong> ' . self ::$ settings ['data ' ]['Name ' ] . ':</strong> ' . __ ('This plugin is not supported on versions of PHP under ' . ' ' . self ::$ settings ['deps ' ]['php ' ] . '. ' );
59+ } else if (!defined ('\\Carbon_Fields \\VERSION ' )) {
6060 $ error = '<strong> ' . self ::$ settings ['data ' ]['Name ' ] . ':</strong> ' . __ ('A fatal error occurred while trying to load dependencies. ' );
6161 } else if ( version_compare ( \Carbon_Fields \VERSION , self ::$ settings ['deps ' ]['carbon_fields ' ], '< ' ) ) {
6262 $ error = '<strong> ' . self ::$ settings ['data ' ]['Name ' ] . ':</strong> ' . __ ('Unable to load. An outdated version of Carbon Fields has been loaded: ' . ' ' . \Carbon_Fields \VERSION ) . ' (>= ' .self ::$ settings ['deps ' ]['carbon_fields ' ] . ' ' . __ ('required ' ) . ') ' ;
Original file line number Diff line number Diff line change 3939 "mnsami/composer-custom-directory-installer" : " ^1.1.0" ,
4040 "htmlburger/carbon-fields" : " ^2.0.0" ,
4141 "jjgrainger/posttypes" : " dev-master" ,
42- "wpupdatephp/wp-update-php" : " ^1.1" ,
4342 "jashkenas/underscore" : " >=1.8.0" ,
4443 "composer/installers" : " ~1.3.0"
4544 },
5251 "autoload" : {
5352 "psr-4" : {
5453 "Nimbium\\ MyPlugin\\ " : " app/"
55- },
56- "files" : [" vendor/wpupdatephp/wp-update-php/src/WPUpdatePhp.php" ]
54+ }
5755 },
5856 "scripts" : {
5957 "pre-autoload-dump" : [
You can’t perform that action at this time.
0 commit comments