function render_settings_admin_page() { include_once Postmatic_Social::get_plugin_dir('/templates/settings-intro.php'); $default_settings = $this->get_default_settings(); $settings = $this->get_settings(); echo '<table class="form-table"><tbody>'; echo '</tbody></table>'; }
function maybe_fontawesome() { global $wp_styles; $registered_handle = ''; foreach ($wp_styles->registered as $handle => $style) { if ('font-awesome.' == substr($style->src, 0, 13)) { $registered_handle = $handle; } } if (!$registered_handle or !wp_script_is($registered_handle, 'enqueued')) { wp_enqueue_style('postmatic-social-font-awesome', Postmatic_Social::get_plugin_url('/css/font-awesome.min.css'), array(), '20151102'); } }
function wp_enqueue_scripts() { wp_enqueue_script('postmatic-social-login', Postmatic_Social::get_plugin_url('/js/postmatic-social-login.js'), array('jquery'), '20151125', true); //styles wp_enqueue_style('postmatic-social-font-awesome', Postmatic_Social::get_plugin_url('/css/font-awesome.min.css'), array(), '20151102'); wp_enqueue_style('postmatic-social-login', Postmatic_Social::get_plugin_url('/css/postmatic-social-login.css'), array('postmatic-social-font-awesome'), '20151102'); }
/** * Return the URL to the admin panel page. * * Return the URL to the admin panel page. * * @since 1.0.0 * @access static * * @return string URL to the admin panel page. */ public static function get_url() { $url = self::$url; if (empty($url)) { if (is_multisite()) { $url = add_query_arg(array('page' => 'postmatic-social'), network_admin_url('options-general.php')); } else { $url = add_query_arg(array('page' => 'postmatic-social'), admin_url('options-general.php')); } self::$url = $url; } return $url; }
function maybe_fontawesome() { global $wp_styles; // Get all styles $style_paths = wp_list_pluck($wp_styles->registered, 'src'); // Get basename $styles = array_map('basename', $style_paths); // Enqueue if missing if (!in_array('font-awesome.css', $styles) && !in_array('font-awesome.min.css', $styles)) { wp_enqueue_style('postmatic-social-font-awesome', Postmatic_Social::get_plugin_url('/css/font-awesome.min.css'), array(), '20151102'); } }