Nikomuse
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-DB-Table-Editor] Plugin translatableI saw the wordpress plugin update but it seems you forgot to add the new files : sprintf.js and the languages folder…
Forum: Plugins
In reply to: [WP-DB-Table-Editor] Plugin translatableOk, cool !
Thank you too for the plugin… ??Forum: Plugins
In reply to: [WP-DB-Table-Editor] Plugin translatableYes, I replaced this in the dbte_menu function of the db-table-editor.php file :
add_menu_page(‘DB Table Editor’, ‘DB Table Editor’
by
add_menu_page(__(‘DB Table Editor’, ‘wp-db-table-editor’), __(‘DB Table Editor’, ‘wp-db-table-editor’)
This broke the custom tables pages, so I think the “current” table as you said.
Forum: Plugins
In reply to: [WP-DB-Table-Editor] Plugin translatableI finished the plugin internationalization, except for the page_title and menu_title as I said in the previous post.
I added sprintf.js file in order to translate with replacements in js files.
You can check it and tell me if you agree with my code…Regards,
Nicolas Letellier.Forum: Plugins
In reply to: [WP-DB-Table-Editor] Plugin translatableThere is just an issue : I can’t translate the page_title and menu_title parameters of the add_menu_page function in your dbte_menu function. When I do it, it just display : No Database Table Configured to Edit (from dbte_render).
Do you know why ?Forum: Plugins
In reply to: [WP-DB-Table-Editor] Plugin translatableI started the plugin internationalization and commited first changes.
But It’s not full functionnal… I’ll let you know when it will be ok.Forum: Plugins
In reply to: [WP-DB-Table-Editor] Use db table editor in anotherThanks ?? !
Best regards.
Forum: Plugins
In reply to: [WP-DB-Table-Editor] Use db table editor in anotherActually, you could launch your plugin initialization and code here, but even if this method is empty, it allows other plugins to work once yours is loaded. Plugins that allows extensions do it this way, as woocommerce for example. There is a lot of extensions for it.
The constructor launch this :
add_action( ‘init’, array( $this, ‘init’ ), 0 );
And in the init method :
public function init() {
// Initialization code here
do_action( ‘woocommerce_init’ );
}So other plugins that are extensions launch this in the constructor :
add_action( ‘woocommerce_init’, array( $this, ‘load’ ) );In this way, extensions are sure to have the plugin loaded before executing their own code that depends on the plugin.
With our plugins : mine needs your plugin’s method add_db_table_editor to be loaded. This is the only way to get certain of that. Otherwise, the function does not exist, not yet…
I hope it’s clearer this time, as english is not my native language…
Regards.
Forum: Plugins
In reply to: [WP-DB-Table-Editor] Update problem with update_cb callback functionOk. Great, thanks !
Regards.
Forum: Plugins
In reply to: [WP-DB-Table-Editor] Update problem with update_cb callback functionIn the dbte_save_cb function of the db-table-editor.php file, in the condition at the line 349, you don’t send any id to $cur->update_cb function, but in the ‘else’ closure, id is well set in the $where variable.
If I may suggest this fix, l.350 :
call_user_func($cur->update_cb,$cur, $up, $cols, $idxs[$ridx], $id);Regards,
Nicolas.