This file contains 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
body: SingleChildScrollView( | |
child: Column( | |
children: <Widget>[ | |
Container( | |
child: GestureDetector( | |
child: | |
Image.network( | |
postOne.imageUrl, | |
fit: BoxFit.fitWidth, | |
height: MediaQuery |
This file contains 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_action('acf/init', function () { | |
if ( function_exists( 'acf_add_options_sub_page' ) ){ | |
acf_add_options_sub_page( array( | |
'title' => 'Photo Settings', | |
'parent' => 'edit.php?post_type=photo', | |
'capability' => 'manage_options', | |
'show_in_graphql' => true, | |
) ); | |
} | |
});. |
This file contains 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( 'the_content', 'airpets_terms_nav' ); | |
function airpets_terms_nav($content) { | |
if( is_page_template( 'page-terms.php' ) ): | |
$menu = '<div id="top" class="anchor-menu"><ul class="menu">'; | |
$blocks_arr = parse_blocks( get_the_content() ); | |
foreach( $blocks_arr as $block ): |
This file contains 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
<template> | |
<figure :class="classes"> | |
<div | |
class="sizer" | |
:style="sizerStyles" | |
> | |
<img | |
v-if="parsedSrc" | |
ref="img" | |
class="media media-image" |
This file contains 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( "gform_confirmation_anchor",function() {} ); | |
//For backwards compatibility, load wordpress if it hasn't been loaded yet | |
//Will be used if this file is being called directly | |
if(!class_exists("RGForms")){ | |
for ( $i = 0; $i < $depth = 10; $i++ ) { | |
$wp_root_path = str_repeat( '../', $i ); |
This file contains 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_action( 'graphql_register_types', function() { | |
register_graphql_connection([ | |
'fromType' => 'RootQuery', | |
'toType' => 'Post', | |
'fromFieldName' => 'popularPosts', | |
'connectionTypeName' => 'RootQueryToPopularPostsConnection', | |
'resolve' => function( $root, $args, \WPGraphQL\AppContext $context, $info ) { | |
$resolver = new \WPGraphQL\Data\Connection\PostObjectConnectionResolver( $root, $args, $context, $info ); |
This file contains 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( 'register_post_type_args', function( $args, $post_type ) { | |
if ( 'sfwd-courses' === $post_type ) { | |
$args['show_in_graphql'] = true; | |
$args['graphql_single_name'] = 'course'; | |
$args['graphql_plural_name'] = 'courses'; | |
} |
This file contains 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
/* | |
* How to make draft posts or posts in review accessible via full url / slug. | |
* Source: - https://wordpress.stackexchange.com/questions/218168/how-to-make-draft-posts-or-posts-in-review-accessible-via-full-url-slug | |
*/ | |
function auto_save_post_status( $post_id, $post, $update ) { | |
if( $post->post_status == "draft" && ! $post->post_name ) { | |
remove_action( 'save_post', 'auto_save_post_status', 20, 3 ); |
This file contains 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
// Display Tag code | |
function ahmedkaludi_structured_data_keyword() { | |
if ( is_single() ) { | |
$tags = '"keywords" : [' . strip_tags(get_the_tag_list('"','", "','"')) . ']'; | |
} else { } | |
echo $tags; | |
} | |
function ahmedkaludi_structured_data_output() { |
This file contains 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 | |
/** | |
* Config for WPGraphQL ACF | |
* | |
* @package wp-graphql-acf | |
*/ | |
namespace WPGraphQL\ACF; | |
use WPGraphQL\Data\DataSource; |
NewerOlder