Display alt text as tool tip on page

It might be worth considering another plugin like http://wordpress.org/plugins/wp-supersized/ Otherwise I guess you might end up having to change the plugin (perhaps forking it on Github?) https://github.com/Myatu/Background-Manager-WP/blob/269fb907d652ac78e3f9fb0a402375f06ac449f9/resources/views/pub_footer.html.twig (Just realised your thread is related to another thread with more contributors: Display alt text as tool tip on page)

Plugin admin list pages as submenu

You do not post how you add the top level menu page, however I think when you click on a submenu item you have an url like: http://www.example.com/wp-admin/admin.php?page=theme_admin_{$pageid} So the id of page is in the $_GET[‘page’] variable with a fixed string prepended to it. So why don’t use something like: function display_page_test() { $id … Read more

Problem in register activation hook and Copying folder

You are defining the recurs_copy() function to perform the copy but you never execute it. Try: function hyperbolic_activate() { $src=”https://wordpress.stackexchange.com/questions/112547/includes/myTheme/”; $dst=”../themes/”; recurs_copy($src, $dst); } register_activation_hook( __FILE__, ‘hyperbolic_activate’ ); function recurs_copy($src,$dst) { $dir = opendir($src); @mkdir($dst); while(false !== ( $file = readdir($dir)) ) { if (( $file != ‘.’ ) && ( $file != ‘..’ )) … Read more

If no input don’t display?

<?php $bath=get_post_meta($post->ID, ‘wtf_bath’, true); if(!empty($bath) ) { ?> <div class=”propslist”><span>Băi – </span> <span class=”propval”> <?php echo $bath; ?></span></div> <?php } ?> Do something like this for each div !.. only display div if the data to be displayed in div is not empty !

How to set different users for different pages?

Create a subfolder in plugins folder, name it ‘MyRestict’. In This folder put the following php: <?php /** * Plugin Name: My Restict * Plugin URI: http://wordpress.stackexchange.com/questions/112566/how-to-set-different-users-for-different-pages * Author: G.M. */ function my_restict_template_filter( $template ) { if ( is_page() ) { $post = get_queried_object(); $allowed = (string) get_post_meta($post->ID, ‘allowed_users’, true); if ( $allowed ) $allowed … Read more

pagination custom post type on CP page

I’ve found the problem. Since I’m on a single (custom) post page, WP redirects back to the root of the URL. I’ve found the solution here. The solution (copied from the post on SO) was adding this to the functions.php: add_filter(‘redirect_canonical’,’pif_disable_redirect_canonical’); function pif_disable_redirect_canonical($redirect_url) { if( is_singular()) { $redirect_url = false; } return $redirect_url; } I’ve … Read more

Is there a way of retrieving the core WP capabilities?

As said in comment above is more easy remove the added capabilities. Below, as example, a simple implementation: class MyAwesomePlugin { static $capabilities = array(‘a_cap’=> true, ‘another_one’=> true, ‘third_cap’=> true); static $custom_roles = array(‘one_role’ => ‘One Role’, ‘second_role’ => ‘Second Role’); static $core_roles = array(‘administrator’, ‘editor’, ‘author’); static function install() { // add custom capabilities … Read more

WordPress link to show popup box

There is more to it do you think but here’s a simple popup message sample I’ve created. Have a look at it and let me know if you need further help. For future reference: This sort of question should be asked at Stack Overflow!