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 | |
/** | |
* Plugin Name: Books Custom Post Type V1.1 | |
* Plugin URI: | |
* Description: A plugin to create a custom post type for books. | |
* Version: 1.1 | |
* Text Domain: lwp-books | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
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 | |
/** | |
* Plugin Name: Books Custom Post Type | |
* Plugin URI: | |
* Description: A plugin to create a custom post type for books. | |
* Version: 1.0 | |
* Text Domain: lwp-books | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
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 | |
/** | |
* Plugin Name: LWP Announcement | |
* Description: LWP Announcement | |
* Version: 1.0.1 | |
* Author: Lax Mariappan | |
*/ | |
add_action('wp_head', 'my_announcement'); | |
/** |
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 | |
/** | |
* Plugin Name: Testing | |
*/ | |
// Exit if accessed directly. | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
// Hook into wp_footer to trigger the custom action |
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 | |
/** | |
* Plugin Name: WP Hooks Guide | |
* Description: A guide to WordPress hooks. | |
* Version: 1.0 | |
* Author: Your Name | |
* Author URI: http://yourwebsite.com | |
* License: GPL2 | |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
* Text Domain: wp-hooks-guide |
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 | |
function get_all_acf_fields_and_subfields($page_id) { | |
$all_fields = []; | |
// Get all field groups associated with the page | |
$field_groups = acf_get_field_groups(['post_id' => $page_id]); | |
if ($field_groups) { | |
foreach ($field_groups as $field_group) { |
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 | |
/** | |
* Plugin Name: WP Contact Form | |
* Description: WordPress Contact Form | |
* Version: 1.0.0 | |
* Author: Lax, Jon | |
* Plugin URI: https://github.com/lax-mariappan/wp-contact-form | |
* Requires at least: 5.8 | |
* Requires PHP: 8.0 | |
* License: MIT |
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 | |
/** | |
* Plugin Name: LWP Contact Form | |
* Description: A simple contact form plugin for WordPress. | |
* Version: 1.0.0 | |
* Author: Lax Mariappan | |
* Text Domain: lwp-contact-form | |
* | |
* @package lwp-contact-form | |
*/ |
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 | |
/** | |
* Downloads the publicly accessible videos. | |
* This is just a basic demo, can be improved with proper file handling. | |
* | |
* @param string $video_url Video URL. | |
* @param string $referer Referer site. | |
*/ | |
function download_video( $video_url, $referer ) { |
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 | |
use Inpsyde\WpContext; | |
// Instantiate the class | |
$context = WpContext::determine(); | |
// Use the WpContext::is() method to check context | |
if (!$context->is(WpContext::FRONTOFFICE, WpContext::BACKOFFICE)) { | |
return false; | |
} |
NewerOlder