PHP

WordPress: A PHP Class which enables you to create/manage/update WordPress posts and pages

WordPress PostController This is a PHP Class which enables you to create/manage/update WordPress posts and pages. This require WordPress 2.9+ to run. Usage Include the class.postcontroller.php file in your WordPress plugin/theme. You now have access to the class and its… Baca selengkapnya WordPress: A PHP Class which enables you to create/manage/update WordPress posts and pages

PHP: __FILE__

Exact meaning of basename(dirname(__FILE__)) in PHP __FILE__ would give something like: “/home/httpd/html/modules/Your_Account/index.php” dirname(__FILE__) gives “/home/httpd/html/modules/Your_Account” basename(dirname(__FILE__)) gives “Your_Account”

WordPress: Remove query strings from static resources

This is normal code for remove query strings from static resources. Add the code below to your function.php. function _remove_script_version( $src ){ $parts = explode( ‘?’, $src ); return $parts[0]; } add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 ); add_filter( ‘style_loader_src’, ‘_remove_script_version’,… Baca selengkapnya WordPress: Remove query strings from static resources

Scroll to Top