This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html ng-app> | |
| <head> | |
| <base href="/jsonapi/"> | |
| <title>AngularJS Demo Theme</title> | |
| <?php wp_head(); ?> | |
| </head> | |
| <body> | |
| <header> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_scripts() { | |
| wp_register_script( | |
| 'angularjs', | |
| get_stylesheet_directory_uri() . '/bower_components/angular/angular.min.js' | |
| ); | |
| wp_register_script( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ul> | |
| <li ng-repeat="post in posts"> | |
| <a href="{{post.ID}}"> | |
| {{post.title}} | |
| </a> | |
| </li> | |
| </ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1>{{post.title}}</h1> | |
| {{post.content}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1>{{post.title}}</h1> | |
| <div ng-bind-html="post.content"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1>{{post.title}}</h1> | |
| <div ng-bind-html="post.content | toTrusted"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <search-form></search-form> | |
| <ul> | |
| <li ng-repeat="post in posts"> | |
| <a href="{{post.ID}}" ng-bind-html="post.title"></a> | |
| <div ng-bind-html="post.content"></div> | |
| </li> | |
| </ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Main controller | |
| app.controller('Main', ['$scope', '$http', function(a, b) { | |
| b.get('wp-json/posts/').success(function(res){ | |
| a.posts = res; | |
| }); | |
| }]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fail2ban-regex /var/www/vhosts/your.domain.here/logs/site-folder/access_ssl_log /etc/fail2ban/filter.d/wp-login.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_pre_get_posts( $query ) { | |
| if ( ! is_user_logged_in() ) { | |
| $query->set( 'post_type', '404' ); // Do something that you'll never get results | |
| return; | |
| } | |
| } | |
| add_action( 'pre_get_posts', 'my_pre_get_posts' ); |