RSS dashboard widget not showing visuals

I couldn’t manage to make wp_widget_rss_output to show the content without stripping HTML tags. Reference Q&A’s: WordPress SimplePie modifications Displaying images from external RSS feeds? But, using the function fetch_feed we can grab the full feed contents. Check also the SimplePie function reference. See comments for details: <?php /** * Plugin Name: RSS Dashboard Widget … Read more

How to exclude certain files from the plugin editor?

Ok I figured it out, there is just one filter hook in the wp-admin/plugin-editor.php that can be useful but it’s enough (otherwise one would probably need to mess with the output buffer). if(is_admin()){ add_filter(‘editable_extensions’, array($this, ‘my_editable_extensions’)); } and then function my_editable_extensions($editable_extensions){ if(empty($_POST[‘plugin’]) || (!empty($_POST[‘plugin’]) && $_POST[‘plugin’] !== “plugin-name/plugin-name.php”){ return $editable_extensions; }else{ return array_diff($editable_extensions, array(‘txt’, ‘html’)); … Read more

How to remove admin main menu name repetition

You can remove it from the submenu array: function add_my_menu(){ global $submenu; add_menu_page( ‘Main Menu’, ‘Main Menu’, ‘manage_options’, ‘main-menu-settings’, ‘main_menu_settings’); add_submenu_page( ‘main-menu-settings’, ‘Sub Menu’, ‘sub menu’, ‘manage_options’, ‘sub-menu’, ‘sub_menu_settings’); unset( $submenu[‘main-menu-settings’][0] ); } The parent item is added by add_submenu_page in plugin.php as the first link if the parent doesn’t already have a submenu, resulting … Read more

Can’t trigger an AJAX function with a submit button in the dashboard

Just remove type=”submit” from your button and let your jQuery ajax call be triggered first. Once you get the response then you can submit your form as well. Something like this; function your_action_javascript() { ?> <script type=”text/javascript” > jQuery(document).ready(function($) { $(‘.button’).on(‘click’, function () { var data = { ‘action’: ‘your_action’ }; // since 2.8 ajaxurl … Read more

WP admin user search doesn’t return all users

I don’t believe you are doing anything wrong, I think it is the way the get_users function works https://codex.wordpress.org/Function_Reference/get_users… search – Use this argument to search users by email address, URL, ID, username or display_name. Perhaps the phrases you are searching with do not match any of the above as it needs to be a … Read more

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