WordPress security [closed]

No, and what you want is DRM and not security. The base of any measure of security is that only you have “root” level access to the server as the root user will be able in the end to overcome any DRM measure you try to implement. If a contract will not stop him from … Read more

How to insert dash (-) into database using wpdb and new_to_publish hook?

When we call get_the_title(), then the post title is taken through the wptexturize() function via the the_title filter: add_filter( ‘the_title’, ‘wptexturize’ ); The en-dash and em-dash are replaced with /* translators: en dash */ $en_dash = _x( ‘–’, ‘en dash’ ); /* translators: em dash */ $em_dash = _x( ‘—’, ’em dash’ ); A simple … Read more

How can I show mysql locks?

See Marko’s link for InnoDB tables and the caveats. For MyISAM, there isn’t a dead easy “this is the offending query” solution. You should always start with a processlist. But be sure to include the full keyword so that the printed queries aren’t truncated: SHOW FULL PROCESSLIST; This will show you a list of all … Read more

Sql – Search with serialized Data / better database concept

Use the relational database for its intended purpose – create the separate table. The rich set of time/date functionality available in your SQL queries for this example, is well worth it. Sticking searchable/reportable data into a serialized column in the database should be the last resort not the first 😉

Buddypress avatar image in database [closed]

BuddyPress does not store the avatar path in the database. It loads avatars using the directory path – usually …/wp-content/uploads/avatars/. For example, the full sized avatar for a member might be …/wp-content/uploads/avatars/1/ef1e70a512662ea4fdca5b2efb6f76ab-bpfull.jpg where 1 is the user_id. Check your BP installation to find the exact path to the avatars.

Unkown meta_value in ACF

For every meta value saved there is a second row prefixed with _ that stores what field definition this value refers to. Do not delete it. Your example additionally is a repeater which makes it more complex but the docs has a nice explanation: $ParentName_$RowNumber_$ChildName So you have a repeater field called carousel which has … Read more

Regenerate user_nicename column

The obvious method would be to write a custom WP-CLI script to run through the table, extract the first and last names, use sanitize_title to create a new nicename and update the record. You’d also need to copy the first and last names in wp_usermeta as you mention, at the same time. I’m not sure … Read more