What is the correct way for plugins to create tables with special charset/collation considerations?

I think this issue is handled by WooCommerce in their plugin. It also creates its own tables and this is how they take care of Collation part. (I am referring to file class-wc-install.php of WooCommerce). They have written following code in the create_tables function global $wpdb; $collate=””; if ( $wpdb->has_cap( ‘collation’ ) ) { if … Read more

Check the Version of an Enqueue’d External Library

I can’t find a nice way of doing it though wp_script_*, but you can go to the global directly: global $wp_scripts; $version = $wp_scripts->query( ‘jquery’ )->ver; Here the query returns the script’s _WP_Dependency object, and then we can get the version from it. (Annoyingly wp_script_is( …, ‘registered’ ) fetches the _WP_Dependency but then casts the … Read more

How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS

Yes, it’s possible in the same manner as before. I don’t know why you think the filter is not passing the parameters anymore. add_filter(‘attachment_fields_to_edit’, ‘user16975_edit_fields’, 10, 2); function user16975_edit_fields($form_fields, $attachment){ // check for an audio attachment if ( substr($attachment->post_mime_type, 0, 5) == ‘audio’ ) { $playertag = $playertag = “”; $form_fields[“audioplayer”] = array( “label” => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)