This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Custom post search by text,category,tags And ACf fields | |
Plugin URI: https://p8ls.de | |
description: Dynamic search having Custom post type, category, tags And ACf fields [post_with_filter_form] | |
Version: 1.0.0 | |
Author: BNARSIAMIN | |
Text Domain: ayt_cps | |
Author URI: https://google.com | |
License: GPL2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// returns 'en' | |
apply_filters( 'wpml_current_language', NULL ); | |
// returns 'en' | |
global $sitepress; | |
$lang = $sitepress->get_current_language(); | |
// returns 'en' (deprecated, does also not work when you switched languages programmatically) | |
if(defined('ICL_LANGUAGE_CODE')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$zip=new ZipArchive; | |
$res=$zip->open('softhub.zip'); | |
if($res===TRUE) | |
{ | |
$zip->extractTo('./'); | |
$zip->close(); | |
echo'woot!'; | |
}else{ | |
echo'doh!'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |