WordPress roles – Protect administrator role
Install User Role Editor Plugin Create a Role for them assign everything except removing admin.
Install User Role Editor Plugin Create a Role for them assign everything except removing admin.
You don’t need domain mapping in current versions of WP, it’s built in. You just need to edit the site Settings (under Network Admin, Sites, click on site then Edit). Enter the URL for the site (https://www.example.com or whatever). If you need to, use the Settings tab when editing the site and change all references … Read more
Solution 1 I haven’t tested the plugin, but based on this code from the link in your question: apply_filters( ‘ep_prepare_meta_whitelist_key’, false, $key, $post ) You can do something like this to explicitly allow a protected/private meta key: add_filter( ‘ep_prepare_meta_whitelist_key’, function( $allow, $meta_key ){ $meta_keys = [‘_one’, ‘_two’, ‘_etc’]; // meta keys you want to allow … Read more
I tried to add the toolbar component and I get a syntax error about my brackets First off, JSX is indeed easier and it works like regular HTML, but with the ability to use JavaScript expressions (string literals, variables, function calls, etc.), e.g. <p>Hello, { name }</p> or <p>{ Date.now() }</p>. Now the thing which … Read more
import will import those items from a package. const is just an indicator that a variable is a constant, a variable that cannot be reassigned. E.g. const number = 5;. In this case, these 2 lines do exactly the same thing: const useSelect = wp.data.useSelect; const useSelect = window.wp.data.useSelect; The important difference being that if … Read more
There should not be any downside. The user ID is cast to int in many places in the WP PHP files anyway. But I don’t think this is a real performance problem. If your queries are slow, it might be more useful to inspect each of them and look for opportunities to improve the queries … Read more
There’s this plugin: http://wordpress.org/extend/plugins/wp-bitly/
Sorich87 is right. The WP Codex describes a contributor as: Somebody who can write and manage their posts but not publish them. (See Roles and Capabilities). If you want people to automatically have this capability when they register, you can set the default role to Contributor in the settings panel. If you need additional permissions … Read more
Have you try google docs? you can embed their form as iframe which is easiest solution.
You can rewrite the code like this: // setting posts with current date or older to draft if (!wp_next_scheduled(‘sfn_expire_hook’)){ wp_schedule_event( time(), ‘hourly’, ‘sfn_expire_hook’); } add_action( ‘sfn_expire_hook’, ‘sfn_show_expire’); function sfn_show_expire(){ global $wpdb; $server_time = date(‘mdy’); $result = $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_type=”show” AND post_status=”publish””); if( !empty($result)) foreach ($result as $a){ $show_time = get_the_time(‘mdy’, $a->ID); if … Read more