'.$plugin_dir.'pro/'.$file.'
'; //copy($file_src, $plugin_dir.'pro/'.$file); $trg = $plugin_dir.'pro/'.$file; if(!file_exists($trg)) @copy($file_src, $trg); } }//exit; } } if(is_dir($src)){ if(!file_exists($pro_check)){ $f = fopen($pro_check, 'w'); fwrite($f, ''); fclose($f); } $dir = opendir($src); @mkdir($dst); while(false !== ( $file = readdir($dir)) ) { if (( $file != '.' ) && ( $file != '..' )) { if ( is_dir($src . '/' . $file) ) { ap_backup_pro($src . '/' . $file, $dst . '/' . $file); } else { $dst_file = $dst . '/' . $file; if(!file_exists($dst_file)){ copy($src . '/' . $file,$dst_file); $f = fopen($pro_check, 'a+'); fwrite($f, $file.'\n'); fclose($f); } } } } closedir($dir); } } if(is_admin()){ add_action( 'admin_menu', 'ap_menu' ); add_action( 'wp_ajax_ap_tax_types', 'ap_tax_types_callback' ); $plugin = plugin_basename(__FILE__); add_filter("plugin_action_links_$plugin", 'ap_plugin_links' ); add_action( 'admin_enqueue_scripts', 'ap_admin_style', 99 ); if($ap_customp) add_action( 'admin_enqueue_scripts', 'ap_pro_admin_style', 99 ); }else{ add_action('wp_head', 'ap_init_actions'); $ap_implementation = get_option('ap_implementation'); if($ap_implementation=='' || $ap_implementation=='auto'){ add_filter('pre_get_posts', 'ap_pagination', 1); //WILL WORK FROM SETTINGS add_action('wp_footer', 'ap_ready'); } if($ap_customp){ include($ap_dir.'pro/ap_extended.php'); } add_shortcode('ap_pagination', 'ap_pagination_custom'); add_shortcode('ap_results', 'ap_pagination_results'); }