TinyMCE custom button retrieve value from custom field

Rather than finding the custom field value when the user hits the button, change the [custom field value] to a shortcode name (perhaps “[mkay_subscription_button_value]”?) and then create a shortcode that can replace the value of that key with the post’s custom meta. Something like this: function 246286_display_custom_field( $atts ) { $data = get_post_meta( get_the_ID(), ‘mkay_custom_field’, … Read more

How do I change the hover (focus) color of admin bar from frontend?

switch your hook to [‘admin_bar_menu’] and make things !important. add_action( ‘admin_bar_menu’, ‘change_bar_color1’ ); function change_bar_color1() { ?> <style> #wpadminbar .ab-empty-item, #wpadminbar a.ab-item, #wpadminbar > #wp-toolbar span.ab-label, #wpadminbar > #wp-toolbar span.noticon { color: #FFFFFF !important; } #wpadminbar { background: #ff6000 !important; border-top: 2px solid #000000; border-bottom: 2px solid #000000; border-left: 2px solid #ff6000; border-right: 2px solid … Read more

Get current session in WP admin

Google is your friend. How to use session_start in WordPress? and How to use session in wordpress in plugin development It looks like your mistake is that you didn’t capitalise “Session” when you declare the variable. Instead of $_session[‘wp_nonce’], try $_SESSION[‘wp_nonce’].

Displaying Title in Title Tag on Edit page?

I found my the solution (filter hook admin_title) in Change page title in admin area function my_admin_title($admin_title, $title) { global $post, $action; if($action == ‘edit’ ) { $admin_title_tag = ‘* ‘ . $post->post_title; return $admin_title_tag; } } add_filter(‘admin_title’, ‘my_admin_title’, 10, 2);

Add element to widgetpage

You can use @kudratullah’s suggestion to hook into the widgets page. The downside is that this allows insertion of a piece of html only in one specific place. If that location is ok, use that solution. Otherwise, there are two other possibilities. The first is to use jquery. Examine the source to identify the html … Read more

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