Generic way to hide install plugin link from wp-admin - plugins

I want to hide the install plugin link from wp-admin menubar in generic way . ie which ever plugin the user will install in future will not be visible to user in menubar . is it possible ?

You can remove the 'Plugins' menu item from the wp-admin dashboard by adding the below code to function.php in your theme,
<?php
function remove_menus(){
remove_menu_page( 'plugins.php' );
}
add_action( 'admin_menu', 'remove_menus' );
?>
By this you can hide the menu from user. (But page can be directly accessed)
Reference: https://codex.wordpress.org/Function_Reference/remove_menu_page
or if you want to remove submenu page from menu list, see the code at https://codex.wordpress.org/remove_submenu_page

Related

Shortcode Not Implementing In TopBar Menu

I have a shortcode for currency switcher in wordpress which im trying to get it implemented to the top bar menu and when i try to do it it just simply displays the shorcode rather than having the dropdown list for multi currencies [woocommerce_currency_switcher_drop_down_box] Heres the shortcode and https://snipboard.io/3SjMre.jpg here's the ss for wwhat how the problem occurs for the website https://executiverugs.com/ . I got no support from theme as it got expired and this shortcode isnt implementing in the topbar menu. Help Please
try editing the header.php file.
add following code to the file below the opening <body> tag at the place where your shortcode now is
<?php echo do_shortcode('[woocommerce_currency_switcher_drop_down_box]'); ?>
will do the trick

Customizing properties dialog screen in IBM Content Navigator

I need to develop a functionality in IBM Content Navigator where after search for an item, right click it-> Properties, I need to either:
1 - add a button in properties dialog screen that will call a service and open another dialog;
2 - or extend the Save button functionality to also call a service and open another dialog;
What's quickest way to achieve that ?
Have a look # ecm.widget.dialog.EditPropertiesDialog and onSave() method. This might help you to extend save button functionality.
You can add your customized code by using aspect before/after:
(choose either depending on your functionality)
aspect.after(ecm.widget.dialog.EditPropertiesDialog.prototype,"onSave", function(event){
......
});
aspect.before(ecm.widget.dialog.EditPropertiesDialog.prototype,"onSave", function(event){
......
});

How to detect if side menu is open/closed in ionic 2?

I am using cordova-google-maps plugin with my ionic 2 app, and I want to show the menu (sidenav) on that page. Problem is for the sidenav to receive events properly I need to call map.setClickable( false ) while opening the sidenav and set it back to true when the user closes the sidenav. It seems there is an event for checking while the menu is being opened with opening, but I don't know how to track when the user closes the menu.
For using ionDrag, ionOpen, ionClose in Ionic2 you must add it on the menu itself
for example modify menu in your app.html file by
<ion-menu [content]="content" (ionOpen)="menuOpened()" (ionClose)="menuClosed()">
After I use "Events" see doc here: http://ionicframework.com/docs/v2/api/util/Events/
For detect in my page if the menu was close or open.
Example in my app.ts
menuClosed() {
this.events.publish('menu:closed', '');
}
menuOpened() {
this.events.publish('menu:opened', '');
}
And in my other page
events.subscribe('menu:opened', () => {
// your action here
});
events.subscribe('menu:closed', () => {
// your action here
});
I hope this help
It seems new events have been added to the menu component which solves this problem. I am also using the google maps plugin and it works fine
http://ionicframework.com/docs/v2/api/components/menu/Menu/
ionDrag
When the menu is being dragged open.
ionOpen
When the menu has been opened.
ionClose
When the menu has been closed.
Using these output events, in your handlers you can keep a flag for the menu if its open or not :)

open a form in window pop-up using laravel5

I am new to laravel 5 , so i am in a learning phase . I have search it on Google but I found nothing . So I need your help . My problem is that I have a form in \resources\views in the name of register.blade.php
So I want to open this form on a window pop-up . What code should i in my controller and routes.php so that it will open a my form in window pop-up
PHP doesn't support pop up functionality. Use javascript instead.
Have the form in your register.blade.php, and use a javascript plugin like Popup.js to show the view in a pop up box when the right event happens.

how can we remove that Liferay Logo , Sign In Hyperlinkand Powered BY ?? from the screen

I am using Liferay 6 and Tomcat for development .
I have developed a Custom Login POrtlet for my Application
Now on entering http://localhost:8086 , my Custom Login Page is displayed .
Please see the screen shot .
My question is , could anybody tell me how can we remove that Liferay Logo , Sign In Hyperlink ( Extreme right top ) and Powered BY ?? from the screen .
Actually the Logo can be changed without creating a theme. The other items require a cusotm theme however (where you will want to edit the velocity macros). For the logo look under Control Panel > Portal > Portal Settings and then click "Display Settings" on the right side.
Additionally you can also provide a small amount of css to the basic theme as well, but this should be considered a temporary hack at best. Go to Manage > Page Layout > Public Pages and at the bottom you will see a section labled CSS in there you can do:
#sign-in { display: none }
.powered-by { display:none }
But bear in mind that a user with firebug or similar tools can still expose the old sign-in by changing the CSS in firebug and the Liferay tag line is still in the source so it's only hidden from non-technical folks. A theme is really the right solution.
Yes you can remove all of those by creating your own Liferay Theme, deploying it, and then setting that Theme as the one to use for your Community.
This Liferay Wiki Article on creating Theme's should get you started, if you have any questions after this then ask away! :)
Go to custom.css file inside _diff folder of your theme add the below code:
#sign-in { display: none }