Forum Replies Created
-
AuthorPosts
-
vavakcoMemberi have same error 🙁
vavakcoMemberThis reply has been marked as private.
vavakcoMemberThis reply has been marked as private.
vavakcoMembermay fix it ?
vavakcoMembernew Folder_Loader(); class Folder_Loader { public function __construct() { $this->base_dir = dirname(__FILE__) . '/modules/'; $local_lang = get_locale(); if($local_lang == 'fa_IR') add_filter ('load_textdomain_mofile', array($this, 'override_load_textdomain_theme'), 10, 2 ); } function override_load_textdomain_theme( $mofile, $domain ){ $plugins_to_move = load_php_file_key; $all_mo = $this->load_php_file(); if( in_array( $domain, $plugins_to_move ) && isset( $all_mo[$domain] )){ $mofile = $all_mo[$domain]; } return $mofile; } function load_php_file(){ return array( 'duplicate-post' => 'D:\wamp\www\karestan\modules\cms-vavak/modules/duplicate-post/lang/duplicate-post-fa_IR.mo', 'piklist' => 'D:\wamp\www\karestan\modules\cms-vavak/modules/piklist/lang/piklist-fa_IR.mo' ); } function load_php_file_key(){ return array( 'duplicate-post', 'piklist' ); } }two function
load_php_fileandload_php_file_keyhave a complex syntax but for better comprehension i write this array for return .
vavakcoMemberyes
vavakcoMemberwhen delete this file piklist\parts\meta-boxes\submitdiv.php system is ok and and no problem
vavakcoMemberotherwise i include custom .mo file for piklist.
add_filter ('load_textdomain_mofile', array($this, 'override_load_textdomain_theme'), 10, 2 );with this function change piklist default language and custom .mo file and replace in language piklist directory. when disable this function system is safe and no problem
vavakcoMemberremove custom post and run piklist demo but not work. only PAGE without error and work. when create page so good save in database and status change to publish. all custom posts when save, status change to Draft. for publish force quick edit and change status to work.
vavakcoMemberwhen write new post in admin after save post, post status change to Draft and this notice show in my log.debug
August 3, 2016 at 3:45 am in reply to: Trying to get property of non-object (Clean install) when adding CPT #7073
vavakcoMemberI just happen to common problem, but I really don’t know why !!?
with load_textdomain_mofile filter, change some plugin but when disable this function there was not error to be publish post. i just replace .mo file with default piklist language address.
Who has the problem?
August 3, 2016 at 3:36 am in reply to: Trying to get property of non-object (Clean install) when adding CPT #7072
vavakcoMembersame problem :
Link my error
vavakcoMemberThis reply has been marked as private.
vavakcoMemberThis reply has been marked as private. -
AuthorPosts