ewwink
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Image Sizes] Warning: trim() expects parameter 1 to be string,replace
$attachment_id = (int) $attachment_id; $size_name = trim($size_name);
with
$attachment_id = (int) $attachment_id; if(!is_string($size_name)) $size_name= 'thumbnail'; $size_name = trim($size_name);
Forum: Fixing WordPress
In reply to: add code to htaccess through theme activationyou need to include misc.php and no need to check file exist or permission since it already defined in insert_with_markers function.
/*** insert_with_markers example by ewwink ***/ /**** Theme Activation ***/ function themeaktif($oldname, $oldtheme=false) { require_once(ABSPATH.'/wp-admin/includes/misc.php'); $rules = array(); $rules[] = 'ExpiresActive On'; $rules[] = 'ExpiresByType application/x-font-woff A604800'; $htaccess_file = ABSPATH.'.htaccess'; insert_with_markers($htaccess_file, 'Custom Expires header', (array) $rules); } /**** Theme DeActivation ***/ function themedeaktif($newname, $newtheme) { require_once(ABSPATH.'/wp-admin/includes/misc.php'); $htaccess_file = ABSPATH.'.htaccess'; insert_with_markers($htaccess_file, 'Custom Expires header', ""); } add_action("after_switch_theme", "themeaktif", 10 , 2); add_action("switch_theme", "themedeaktif", 10 , 2);
Forum: Plugins
In reply to: [Google Break Dance] Google Break Dance V 0.6 Failed to WorksHi Esmi, Thanks for your concern, it’s not problem because I’m speak English and Bahasa.
ebeasiswa, di versi 0.7 sudah dibenerin.
Forum: Plugins
In reply to: [Google Break Dance] Plugin Update V 0.5 gak Work dan Errorudah dibenerin di versi 0.7 ada yg kelupaan dikodenya jadi error.
Forum: Plugins
In reply to: [Google Break Dance] Google Break Dance – one issuehi beggers,
it browser cache issue, try to add custom “no-cache” header in the .htaccess
<filesMatch ".(jpg|jpeg|gif|png)$"> FileETag None <ifModule mod_headers.c> Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" </ifModule> </filesMatch>
however your server should have mod_headers enabled
Forum: Plugins
In reply to: [Google Break Dance] Works but with an errorHi,
please edit your .htaccess like below:
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} wp-content/uploads/.*\.(gif|jpg|jpeg|png)$ [NC] RewriteCond %{HTTP_USER_AGENT} !.*bot.* [NC] RewriteCond %{HTTP_REFERER} !^$ [NC] RewriteCond %{HTTP_REFERER} !^https://www.google.[a-z]{2,4}(.[a-z]{2,4})?/blank.html$ [NC] RewriteCond %{HTTP_REFERER} !^https://(www.)?example.com/.*$ [NC] RewriteRule ^(.*)$ /get_image?$1 [R=302,L] # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
Forum: Networking WordPress
In reply to: "Plugin Check" every minutes Causing Slow Performancethanks all, running manually wp-cron.php it not good because it will do all previously blocked pending cron at once but now it resolved by completely disable cron and creating custom plugin to ping update service and submit sitemap to google and bing webmaster tools when new post created.
Forum: Fixing WordPress
In reply to: did WP remove "Category" from the url?that is default wp config, to remove “category” base from url try
wpcoding.wordpress.com/2012/05/04/removing-category-base-from-wordpress-urls/
Forum: Plugins
In reply to: How to Strip_Tags The_Contentthanks stvwlf its work
Forum: Fixing WordPress
In reply to: Fatal error: Call to undefined function is_user_member_of_blog()version 1.2.1. fix the problem.
thanksForum: Fixing WordPress
In reply to: Fatal error: Call to undefined function is_user_member_of_blog()thanks for your respond adeptris, maybe the authors will fix it soon.
Forum: Fixing WordPress
In reply to: Fatal error: Call to undefined function is_user_member_of_blog()so P2 theme is for WPMU not for common WP?
and thanksForum: Fixing WordPress
In reply to: Cannot edit theme on version 2.8@rocketllama
before you try my trick, you need to chmod your theme file to 666 or 777.Forum: Fixing WordPress
In reply to: Cannot edit theme on version 2.8Fixed Now, you need to disable javascript when editing the file and for fast switching to enable/disable javascript use firefox addon WebDeveloper.
Forum: Fixing WordPress
In reply to: duplicate “Category Name” with “category slug”thanks iridiax, moshu, Otto42 its really help me.