OceanWP settings are missing from Add New Post [closed]

It looks like you can hook into the ocean_main_metabox_capabilities filter: It is defined in /plugins/ocean-extra/includes/metabox/metabox.php: $capabilities = apply_filters( ‘ocean_main_metaboxes_capabilities’, ‘manage_options’ ); In your child theme or a custom plugin, try the following (for example, in /themes/mytheme/functions.php: add_filter( ‘ocean_main_metaboxes_capabilities’, ‘my_custom_metabox_role’ ); /** * Change the default role used to display the Ocean Extra metabox. * * … Read more

Send email with list of active plugins upon activation/deactivation

If you look here in /wp-admin/includes/plugin.php do_action( ‘deactivated_plugin’, $plugin, $network_deactivating ); } } if ( $do_blog ) update_option(‘active_plugins’, $current); if ( $do_network ) update_site_option( ‘active_sitewide_plugins’, $network_current ); The options aren’t updated until after the hook fires. You can get around this by using the first parameter to deactivated_plugin: function detect_plugin_change( $plugin, $network_activation ) { $url … Read more

PHP if statement with German umlauts [closed]

This is probably because of your database collation. There are numerous questions on StackOverflow about this sort of thing. Your question may get closed or migrated as it’s not on-topic for wordpress.stackexchange.com; Take a look at this question, or perhaps ask there instead. Also, why are you not using the WordPress WP_Query class to return … Read more

wp_redirect doen’t work

I think you understand wp_redirect incorrectly. This function redirects you to a different URL. It’s like sending header(‘Location: …’); On the other hand, it looks like you’re trying to pass local path as its param. So it won’t work – such path is not a valid URL address.

How can I load the css and jquery explicitly for the login screen

You can load scripts and styles on the login page using the login_enqueue_scripts hook. You can use the same enqueue functions for scripts and styles that you’d use for other pages but they’ll only load on the login page: function wpse_330353_login_scripts() { wp_enqueue_script( ‘handle’, ‘//example.com/url/to/script.js’ ); wp_enqueue_style( ‘handle’, ‘//example.com/url/to/style.css’ ); } add_action( ‘login_enqueue_scripts’, ‘wpse_330353_login_scripts’ ); … Read more

how do I secure my WP website from hackers? [closed]

Start in the Codex: https://codex.wordpress.org/Hardening_WordPress . Basically, strong passwords on all accounts (hosting, FTP, email, WP users), and ensuring updates on WP/Theme/Plugins are done regularly. Also, carefulness with themes and plugins you use. Look at the support areas of both for other’s issues. Consider avoiding themes/plugins that have not been updated lately, or don’t have … Read more