/** * Adds the page builder button to the WordPress admin bar. * * @since 1.0 * @param object $wp_admin_bar An instance of the WordPress admin bar. * @return void */ public static function admin_bar_menu($wp_admin_bar) { global $wp_the_query; if (FLBuilderModel::is_post_editable()) { $wp_admin_bar->add_node(array('id' => 'fl-builder-frontend-edit-link', 'title' => '<style> #wp-admin-bar-fl-builder-frontend-edit-link .ab-icon:before { content: "\\f116" !important; top: 2px; margin-right: 3px; } </style><span class="ab-icon"></span>' . FLBuilderModel::get_branding(), 'href' => FLBuilderModel::get_edit_url($wp_the_query->post->ID))); } }