…with the heading 'Fun Facts About Countries'. Before creating any components that can be rendered on the screen, we will create some classes and define some functions that make those components useful.In this tutorial, our focus will be on creating a Country class which will contain different properties whose value…
…with an existing class name.Let's start by displaying a basic admin notice, and then add to it to make it more useful. To create an admin notice, add the admin_notices hook to the init() function:add_action( 'admin_notices', array( $this, 'test_notice' ) );The hook includes a test_notice callback function which will be…
…with, let's create the Message model, which holds messages sent by users to each other. $php artisan make:model Message --migration We also need to add a few fields like to, from, and message to the messages table. So let's change the migration file before running the migrate command at database/migrations/XXXX_XX_XX_XXXXXX_create_messages_table.php.…
…with the channel name and event name. And finally, the web-socket server broadcasts that event to registered clients on that particular channel. Don't worry if it looks like too much in a single go; you will get the hang of it as we move through this article. Broadcast Configuration File…
…with four files inside it. For this app, we only need to be concerned with three files named home.component.ts, home.component.css, and home.component.html. The home.component.ts file will contain all the logic for the component, and the CSS and HTML files will control the appearance and structure of the component.Let's start by…
…with:/** * Output an admin notice on the plugin options page when settings have been saved. */ public function conditional_plugin_admin_notice() { $whitelist_admin_pages = array( 'settings_page_admin-notices/plugin-options' ); $admin_page = get_current_screen(); $current_user = wp_get_current_user(); if( in_array( $admin_page->base, $whitelist_admin_pages ) && isset( $_GET[ 'settings-updated' ] ) && $_GET[ 'settings-updated' ] ): ?> <div…
…with the a tag in the next tutorial.The CSS used is the same as that of the home.component.css file. The only difference is that we change the background color for each country block to green. Here is the complete CSS code:a { text-decoration: none; } *, *:after, *:before { box-sizing:…
…with an overview.We'll use a custom option to store the display status of our admin notice. On plugin activation, this option will be created/updated and set to true. The admin notice will then only display if the option is currently true.The key to this method is using Ajax to allow…
…with this tutorial, it is a good idea to summarize everything we have done so far in order to avoid any confusion and errors. If you have missed any of the steps from the last three tutorials, it is a good idea to go back and make the necessary changes.In…
…with creating a web app using Angular with MongoDB as the back end. You'll be using Node.js for running the server.Throughout the course of this tutorial, you'll be building a blogging application using Angular, Node.js, and MongoDB. In this tutorial, you'll see how to get started with setting up the…