How to know if a child theme is being used?

Read the stylesheet. A child stylesheet must have Template: somethemename to function as a child theme. Look in Appearance -> Themes. A child theme should have a notice about requiring a parent theme. Use code similar to this (note: debugging only): add_action( ‘wp_head’, function () { if (get_template_directory() === get_stylesheet_directory()) { echo ‘not a child’; … Read more

How to make native video player full width?

I added this to my style.css and now the video player is fully responsive! .wp-video, video.wp-video-shortcode, .mejs-container, .mejs-overlay.load { width: 100% !important; height: 100% !important; } .mejs-container { padding-top: 56.25%; } .wp-video, video.wp-video-shortcode { max-width: 100% !important; } video.wp-video-shortcode { position: relative; } .mejs-mediaelement { position: absolute; top: 0; right: 0; bottom: 0; left: 0; … Read more

Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?

Just an idea: Make a user called ‘Guest’ and look up the user ID When redirecting your potential clients to the admin page, redirect to a script that’s logging in your clients as the guest user (Code #1) Add an WordPress action to disallow the user when logged in as ‘Guest’ and not on customize.php … Read more

WP 3.4 – what action/hook is called when theme customisation is saved?

The settings are saved via ajax, with the action customize_save. In the wp-includes/class-wp-customize-manager.php class, the callback for this ajax method is the save method (see source) This triggers the customize_save action, prior to updating each of the settings. Each setting is actually an instance of the class WP_Customize_Setting and saving the setting triggers the action … Read more

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