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 | |
| /* | |
| Plugin Name: DCDC Docs Endpoint | |
| Description: Exposes the docs/v1 namespace and search endpoint for use by other VPA sites in the network | |
| Version: 0.1 | |
| Author: Joel Stransky | |
| Author URI: https://dcdc.coe.hawaii.edu/ | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { |
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
| // when I test this http://192.168.10.11/wp-json/docs/v1 | |
| // I get this. | |
| // I only registered this: register_rest_route( 'docs/v1/s' , array() ); | |
| // So where in the heck did "/docs/v1/terms/(?P<taxonomy>[\\w-]+)" come from!? | |
| { | |
| "namespace": "docs/v1", | |
| "routes": { | |
| "/docs/v1": { | |
| "namespace": "docs/v1", | |
| "methods": [ |
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
| setup_postdata( $field ); | |
| the_title(); | |
| the_content(); | |
| wp_reset_postdata(); |
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 | |
| // https://codex.wordpress.org/Creating_Options_Pages#Example_.232 | |
| class VpaMceSettingsPage | |
| { | |
| /** | |
| * Holds the values to be used in the fields callbacks | |
| */ | |
| private $options; | |
| /** |
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
| add_filter( 'wp_edit_nav_menu_walker', function() {remove_all_filters('wp_edit_nav_menu_walker' );}, 1 ); | |
| add_filter( 'wp_edit_nav_menu_walker', array( $this, 'acf_menu_edit_walker'), 1, 2 ); |
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 just prints the modified date of the published post for each revision | |
| <?php | |
| $args = array( | |
| 'offset' => 1, | |
| 'numberposts' => PHP_INT_MAX, | |
| ); | |
| $revisions = wp_get_post_revisions( get_the_id(), $args ); | |
| foreach ($revisions as $revision) { | |
| setup_postdata( $revision ); | |
| ?> |
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 | |
| use Roots\Sage\Assets; | |
| add_filter('wp_enqueue_scripts', 'forms_docs_scripts'); | |
| function forms_docs_scripts() { | |
| // var_dump(Assets\asset_path('scripts/forms-docs.ajax.js')); | |
| wp_enqueue_scripts( 'forms-docs-scripts', Assets\asset_path('scripts/forms-docs.ajax.js'), array('jquery') ); | |
| } |
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
| // http://imgur.com/LL2tUqW <- db snapshot | |
| SELECT SQL_CALC_FOUND_ROWS wp_posts.ID | |
| FROM wp_posts | |
| INNER JOIN wp_term_relationships | |
| ON (wp_posts.ID = wp_term_relationships.object_id) | |
| INNER JOIN wp_term_taxonomy | |
| ON (wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id) | |
| INNER JOIN wp_terms | |
| ON (wp_terms.term_id = wp_term_taxonomy.term_id) | |
| WHERE 1=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
| // Not unique table/alias: 'wp_term_relationships' | |
| SELECT SQL_CALC_FOUND_ROWS wp_posts.ID | |
| FROM wp_posts | |
| INNER JOIN wp_term_relationships | |
| ON (wp_posts.ID = wp_term_relationships.object_id) | |
| INNER JOIN wp_term_relationships | |
| ON wp_posts.ID = wp_term_relationships.object_id | |
| INNER JOIN wp_term_taxonomy | |
| ON wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id | |
| INNER JOIN wp_terms |
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
| 1. USB, set to Software Install | |
| 2. Launch Unity Remote | |
| 3. Launch Unity | |
| 4. Edit->Project Settings->Editor | |
| 5. Device: Any Android Device |