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 | |
| add_filter( 'hwp_display_notification', function( $show_it, $box_id, $post_id ) { | |
| if( $post_id == '12' && $box_id == '234' ) | |
| $show_it = true; | |
| // you should not return false unless you want to override all other filters. It's best to either return true, or just return $show_it | |
| return $show_it; |
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
| <!-- This will display side menu links. If you are using a tab menu, change pages.menus.items on line 4 to pages.tab_menu.items --> | |
| <ion-grid> | |
| <ion-row> | |
| <ion-col col-6 *ngFor="let p of pages.menus.items" [ngClass]="p.extra_classes"> | |
| <ion-card (click)="pushPage(p)" class="menu-card"> | |
| <div class="card-title"><ion-icon *ngIf="p.class" name="{{p.class}}"></ion-icon></div> | |
| <div class="card-subtitle">{{p.title}}</div> | |
| </ion-card> | |
| </ion-col> | |
| </ion-row> |
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
| <!-- upload an image to your offline assets --> | |
| <img src="assets/my-image.png" /> | |
| <ion-list> | |
| <button ion-item icon-right (click)="pushPage(pages.menus.items[0])">What's New <ion-icon name="arrow-forward"></ion-icon></button> | |
| <button ion-item icon-right (click)="pushPage(pages.menus.items[1])">Edinburgh <ion-icon name="arrow-forward"></ion-icon></button> | |
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
| <!-- A bunch of random sample code you can use in custom HTML pages --> | |
| <!-- Just a normal card --> | |
| <ion-card> | |
| <ion-card-header> | |
| Card Header | |
| </ion-card-header> | |
| <ion-card-content> | |
| <p>My Custom demo page</p> |
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 | |
| /* | |
| * This code goes in a WordPress plugin or child theme functions.php file | |
| * Customize the HTML tags on line 43 if you want, then add custom CSS in the app customizer, for example: | |
| .comment { | |
| clear:both; | |
| overflow:hidden; | |
| width: 100%; |
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 appp_redirect() { | |
| global $wp; | |
| $current_url = home_url( $wp->request ); | |
| $string = apply_filters( 'ap3_bp_me_url', '/me/' ); | |
| $me = stripos( $current_url, $string ); |
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
| // we have an array of objects, we want to remove one object using only the id property | |
| const apps = [{id:34,name:'My App',another:'thing'},{id:37,name:'My New App',another:'things'}]; | |
| // get index of object with id of 37 | |
| const removeIndex = apps.findIndex( item => item.id === 37 ); | |
| // remove object | |
| apps.splice( removeIndex, 1 ); | |
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 | |
| // This code would go in a custom plugin or theme functions.php file | |
| add_action( 'publish_post', 'send_my_push', 10, 2 ); | |
| function send_my_push( $post_id, $post ) { | |
| // Put conditions here to only send notification for the posts you want | |
| if( $post->post_author != 'Scott' ) | |
| return; |
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
| <!-- | |
| Linking to other app pages with AppPresser 3. | |
| The 0 refers to the order in the menu, 0 is first, 1 is second item, etc. | |
| --> | |
| <!-- Link to another app page with a back button --> | |
| <button ion-button (click)="pushPage(pages.menus.items[0])"> | |
| Visit Page | |
| </button> |
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
| <!-- This is the proper formatting --> | |
| <gap:plugin name="cordova-plugin-camera" source="npm"> | |
| <param name="CAMERA_USAGE_DESCRIPTION" value="This app allows you to upload photos." /> | |
| <param name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="This app allows you to upload photos." /> | |
| </gap:plugin> |