Are orders of magnitude used for “Active Installs”?

I was curious and checked out the lists of popular plugins, newest plugins (not in the Plugin Directory menu), last updated plugins (not in the Plugin Directory menu). This seems to be the range for the active installs: 1+ million 900.000+ 800.000+ 700.000+ 600.000+ 500.000+ 400.000+ 300.000+ 200.000+ 100.000+ 90.000+ 80.000+ 70.000+ 60.000+ 50.000+ 40.000+ … Read more

How to handel multiple checkbox field in the admin settings page with Settings API

add_action( ‘admin_init’, ‘register_page_options’ ); function register_page_options() { if (false == get_option(‘aicp_settings_options’)) { add_option(‘aicp_settings_options’); } // Add Section for option fields add_settings_section( ‘aicp_section’, __( ‘….text here….’, ‘aicp’ ), ‘display_section’, ‘aicp_settings’ ); // id, title, display cb, page // Add Field for selecting countries for which you wanna ban ads add_settings_field( ‘aicp_country_list’, __( ‘Select the countries’, ‘aicp’ … Read more

How do I check what plugins are enabled via the database?

You can do it like this: SQL SELECT * FROM wp_options WHERE option_name=”active_plugins”; But for better approach will be the WordPress way: WordPress if ( ! function_exists( ‘get_plugins’ ) ) { require_once ABSPATH . ‘wp-admin/includes/plugin.php’; } $active_plugins = get_option(‘active_plugins’); $all_plugins = get_plugins(); $activated_plugins = array(); foreach ($active_plugins as $plugin){ if(isset($all_plugins[$plugin])){ array_push($activated_plugins, $all_plugins[$plugin]); } }

How to load different css file for different pages

You can achieve this using conditionals inside the function enqueuing your styles. function wpdocs_theme_name_scripts() { wp_enqueue_style( ‘global’, get_stylesheet_uri() ); if ( is_page(5) ) { wp_enqueue_style( ‘page-five’, get_stylesheet_uri() . ‘/page-five-styles.css’ ); } } add_action( ‘wp_enqueue_scripts’, ‘wpdocs_theme_name_scripts’ ); If you wanted more control over both the markup of your page and the CSS files you load, you … Read more

Can I list all installed plugins/versions and wp version from API

Yes, there is a way to get that information programmatically. WordPress Version Info The WordPress version exists as a global, but you can also get it using the get_bloginfo() function: global $wp_version; echo $wp_version; // OR $wordpress_version = get_bloginfo( ‘version’ ); echo $wordpress_version; Plugin Info For retrieving plugin info, use the get_plugins() function. You’ll need … Read more

Adding Featured Image in Post List

Yes, it can be done very easily. There is a great tutorial by Misha Rudrastyh on how to add Featured Images to Quick Edit. I recently applied it and can confirm that it works. You will be able to see the featured images in the admin area post lists and easily change them using Quick … Read more

How get list of updates of wp site?

When on the admin view you can use the following functions to get update data. get_plugin_updates() get_theme_updates() get_core_updates() If you want to build your own functions, then you can get update related data from site transients update_themes, update_plugins, and update_core. Then you can compare the plugin and theme transients with the theme and plugin arrays … Read more