Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For This:
- > WARNING: Found register_widget( in the file inc/widgets/class-popo-widgets-manager.php. Custom widgets are plugin territory.
- > Line 165: register_widget($class);
- > Line 172: register_widget($class);
- > WARNING: Found register_widget( in the file inc/shortcodes/class-popo-shortcodes-manager.php. Custom widgets are plugin territory.
- > Line 263: register_widget($shortcode['widget_class']);
- create a function in your theme plugins if you have a theme supported custom plugin, if not, so please create a custom plugin for your theme.
- Now create a function like
- function theme_name_function_name($class){
- register_widget($class);
- }
- and call into your theme
- if(function_exists('theme_name_function_name')){
- foreach($plugin_array as $plugin){
- theme_name_function_name( $plugin);
- }
- }
- for this:
- > WARNING: Found @file in the file inc/admin/class-popo-admin-importexport.php. Possible error suppression is being used.
- > Line 56: if (false === ($options_upload = @file_put_contents($xml_dir, $xml))) {
- > Line 57: $options_upload = @file_put_contents_fix($xml_dir, $xml);
- > Line 75: if (false === ($options_upload = @file_put_contents($options_dir, json_encode($popo_options)))) {
- > Line 76: $options_upload = @file_put_contents_fix($options_dir, json_encode($popo_options));
- > Line 196: if (false === ($json_options = @file_get_contents($fileurl))) {
- > Line 341: if (false === ($options_upload = @file_put_contents($json_dir, $response['body']))) {
- > Line 342: $options_upload = @file_put_contents_fix($json_dir, $response['body']);
- > Line 370: if (false === ($options_upload = @file_put_contents($revslider_dir, $response['body']))) {
- > Line 371: $options_upload = @file_put_contents_fix($revslider_dir, $response['body']);
- > Line 391: if (false === ($options_upload = @file_put_contents($content_dir, $response['body']))) {
- > Line 392: $options_upload = @file_put_contents_fix($content_dir, $response['body']);
- WARNING: fwrite was found in the file inc/popocore/functions.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 46: fwrite($fp, $filedata);
- WARNING: fopen was found in the file inc/popocore/parsers.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 481: $fp = $this->fopen($file, 'r');
- Line 735: public function fopen($filename, $mode = 'r')
- Line 740: return fopen($filename, $mode);
- WARNING: fopen was found in the file inc/popocore/functions.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 45: if ($fp = fopen($filename, 'wb')) {
- WARNING: file_put_contents was found in the file inc/admin/class-popo-admin-importexport.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 56: if (false === ($options_upload = @file_put_contents($xml_dir, $xml))) {
- Line 57: $options_upload = @file_put_contents_fix($xml_dir, $xml);
- Line 75: if (false === ($options_upload = @file_put_contents($options_dir, json_encode($popo_options)))) {
- Line 76: $options_upload = @file_put_contents_fix($options_dir, json_encode($popo_options));
- Line 341: if (false === ($options_upload = @file_put_contents($json_dir, $response['body']))) {
- Line 342: $options_upload = @file_put_contents_fix($json_dir, $response['body']);
- Line 370: if (false === ($options_upload = @file_put_contents($revslider_dir, $response['body']))) {
- Line 371: $options_upload = @file_put_contents_fix($revslider_dir, $response['body']);
- Line 391: if (false === ($options_upload = @file_put_contents($content_dir, $response['body']))) {
- Line 392: $options_upload = @file_put_contents_fix($content_dir, $response['body']);
- use WordPress default functions or class like this. it is our theme function with WP_Filesystem methods, you need to modified with your requirements.
- function file_errors() {
- $script
- = 'jQuery(document).ready(function($){
- alert("File system have an error. Please check your file system thank you.");
- });';
- wp_add_inline_script( 'crazyhour-script', $script );
- return;
- }
- function crazyhour_compress( $style = '', $files = array(), $file_types, $new_file ) {
- /**
- * On-the-fly CSS Compression
- * Copyright (c) 2017 and onwards, Abdul Hanna Ishfaq Ahmad.
- */
- require_once( ABSPATH . 'wp-admin/includes/file.php' );
- if ( file_exists( ABSPATH . 'wp-admin/includes/file.php' ) ) {
- $access_type = get_filesystem_method();
- if ( $access_type === 'direct' ) {
- /* you can safely run request_filesystem_credentials() without any issues and don't need to worry about passing in a URL */
- $creds = request_filesystem_credentials( CRAZYHOUR_R_, '', true, CRAZYHOUR_R_, array() );
- /* initialize the API */
- if ( ! WP_Filesystem( $creds ) ) {
- return false;
- }
- global $wp_filesystem;
- $Files = $files;
- /**
- * Ideally, you wouldn't need to change any code beyond this point.
- */
- $buffer = "";
- if ( is_array( $Files ) && ! empty( $Files ) ) {
- foreach ( $Files as $File ) {
- $buffer .= wp_remote_fopen( CRAZYHOUR_I_ . 'partial/' . $File );
- }
- } else {
- $buffer = $style;
- }
- $buffer = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer ); // Remove comments
- $buffer = str_replace( array(
- ': ',
- '; ',
- ' {',
- '} ',
- '} ',
- ' {',
- ), array(
- ':',
- ';',
- '{',
- '}',
- '}',
- '{',
- ), $buffer ); // Remove space after colons
- $buffer = str_replace( array(
- "\r\n",
- "\r",
- "\n",
- "\t",
- ' ',
- ' ',
- ' ',
- ), ' ', $buffer ); // Remove whitespace
- // Write everything out
- if ( $style != '' ) {
- if ( file_exists( CRAZYHOUR_R_ . 'assets/css/' . $new_file . $file_types ) ) {
- unlink( CRAZYHOUR_R_ . 'assets/css/' . $new_file . $file_types );
- $wp_filesystem->put_contents( CRAZYHOUR_R_ . 'assets/css/' . $new_file . $file_types, $buffer, FS_CHMOD_FILE // predefined mode settings for WP files
- );
- } else {
- $wp_filesystem->put_contents( CRAZYHOUR_R_ . 'partial/css/' . $new_file . $file_types, $buffer, FS_CHMOD_FILE // predefined mode settings for WP files
- );
- }
- } else {
- if ( file_exists( CRAZYHOUR_R_ . 'partial/css/' . $new_file . $file_types ) ) {
- $exist_file = wp_remote_fopen( CRAZYHOUR_I_ . 'partial/css/' . $new_file . $file_types );
- $exist_file_word = str_word_count( $exist_file );
- $new_file_word = str_word_count( $buffer );
- if ( $new_file_word > $exist_file_word || $exist_file_word > $new_file_word ) {
- unlink( CRAZYHOUR_R_ . 'partial/css/' . $new_file . $file_types );
- $wp_filesystem->put_contents( CRAZYHOUR_R_ . 'partial/css/' . $new_file . $file_types, $buffer, FS_CHMOD_FILE // predefined mode settings for WP files
- );
- }
- } else {
- $wp_filesystem->put_contents( CRAZYHOUR_R_ . 'partial/css/' . $new_file . $file_types, $buffer, FS_CHMOD_FILE // predefined mode settings for WP files
- );
- }
- }
- } else {
- add_action( 'wp_head', 'file_errors' );
- }
- }
- }
- for this use wp_remote_get();
- WARNING: file_get_contents was found in the file inc/popocore/parsers.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 73: $success = $dom->loadXML(file_get_contents($file));
- Line 312: if (! xml_parse($xml, file_get_contents($file), true)) {
- WARNING: file_get_contents was found in the file inc/admin/class-popo-admin-importexport.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 196: if (false === ($json_options = @file_get_contents($fileurl))) {
- WARNING: fclose was found in the file inc/popocore/parsers.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 527: $this->fclose($fp);
- Line 759: public function fclose($fp)
- Line 764: return fclose($fp);
- WARNING: fclose was found in the file inc/popocore/functions.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 47: fclose($fp);
- WARNING: curl_init was found in the file inc/popocore/functions.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 747: $curl = curl_init();
- WARNING: curl_init was found in the file inc/demos/configs.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 16: $ch = curl_init($url);
- WARNING: curl_init was found in the file inc/admin/class-popo-admin-importexport.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 144: if (!function_exists('curl_init')) {
- Line 197: $ch = curl_init();
- WARNING: curl_exec was found in the file inc/popocore/functions.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 753: $headers = explode('\n', curl_exec($curl));
- WARNING: curl_exec was found in the file inc/popocore/class-popocore-init.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 94: $rep = curl_exec($curl);
- WARNING: curl_exec was found in the file inc/popocore/class-popocore-commons.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 471: $rep = curl_exec($curl);
- WARNING: curl_exec was found in the file inc/demos/configs.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 20: $data = curl_exec($ch);
- WARNING: curl_exec was found in the file inc/admin/class-popo-admin-importexport.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
- Line 201: $json_options = curl_exec($ch);
- for this
- REQUIRED: Found base64_encode in the file template-parts/default/shortcodes/popo-map.php. base64_encode() is not allowed.
- create a function you cutom plugin like
- function theme_name_function_name($data){
- return base64_encode($data);
- }
- and call into your theme with exists condition.
- for this
- REQUIRED: Found admin_bar_menu in the file inc/popocore/class-popocore-custom-fonts.php. Themes must not add any entries to the admin bar.
- Line 57: self::set_admin_bar_menus();
- Line 105: public function set_admin_bar_menus()
- REQUIRED: Found admin_bar_menu in the file inc/popocore/class-popocore-admin-menus.php. Themes must not add any entries to the admin bar.
- Line 88: add_action('admin_bar_menu', array( $this, 'wp_admin_topbar_menu' ), 81);
- Line 105: self::set_admin_bar_menus();
- Line 151: public function set_admin_bar_menus()
- WARNING: Found remove_filter( in the file inc/popocore/functions/misc.php. Themes should not remove core filters. Ensure this is a valid use case.
- Line 111: * In order to use the core WordPress remove_filter() on a filter added with the callback
- Line 175: // WordPress 4.7+ use core remove_filter() since we found the class object
- Line 178: $fob->remove_filter($tag, $filter['function'], $priority);
- handle form custom plugin.
Add Comment
Please, Sign In to add comment