Plugin Directory

Changeset 2714465


Ignore:
Timestamp:
04/25/2022 04:11:26 PM (4 years ago)
Author:
npagazani
Message:

Updated to comply with WordPress Extra coding standard, added a settings page.

Location:
wpjm-jooble-feed/trunk
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • wpjm-jooble-feed/trunk/readme.txt

    r2316970 r2714465  
    33Contributors: npagazani
    44Tags: WP Job Manager, XML Feed, Jooble
    5 Tested up to: 5.4.1
     5Requires at least: 4.7
     6Tested up to: 5.9.3
     7Requires PHP: 7.0
    68License: GPLv2+
    7 Stable tag: 1.0
     9Stable tag: 2.0
    810
    911Creates a custom rss/xml feed for WP Job Manager compatible with Jooble feed requirements.
    1012
    1113== Description ==
    12 This plugin generates a custom xml job feed that is compatible with Jooble.org\'s xml feed requirements for listing jobs on their site.
    13 WP Job Manager\'s default job feed uses the standard WordPress RSS feed template which is not compatible with Jooble. This plugin solves that problem.
    14 The plugin has no settings. Simply install the plugin and activate it, and then access your custom feed at yourdomain.com/feed/jooble
     14This plugin generates a custom xml job feed that is compatible with Jooble.org's xml feed requirements for listing jobs on their site.
     15WP Job Manager's default job feed uses the standard WordPress RSS feed template which is not compatible with Jooble. This plugin solves that problem.
     16The plugin has only one setting - the number of jobs to show in the feed. The minimum value is 1, the maximum is 250. After installing and activating the plugin, you can access the Jooble feed at yourdomain.com/feed/jooble
     17
    1518Note: This plugin requires WP Job Manager to be installed and activated to work properly.
    1619
     
    1821An activated install of the WP Job Manager plugin on your site is required for this plugin to work. You can download it here: https://wordpress.org/plugins/wp-job-manager/
    1922
    20 No further setup is required, just install and activate the plugin under Plugins > Add New to activate your custom Jooble compatible job feed.
     23No further setup is required, just install and activate the plugin under Plugins > Add New to activate your Jooble compatible job feed.
    2124
    2225== Frequently Asked Questions ==
    2326
    24 = Where are the plugin\'s settings? =
    25 There are none. Install and activate the plugin to create the custom feed.
     27= Where are the plugin's settings? =
     28You'll find the only plugin setting in **Settings > Jooble RSS Feed**.
    2629
    2730= How do I access the job feed? =
    2831You can view the feed at yourdomain.com/feed/jooble
    29 Make sure to replace \"yourdomain.com\" with your actual domain name.
     32Make sure to replace "yourdomain.com" with your actual domain name.
    3033
    3134= Why does my custom feed fail validation when using common online feed validators? =
    32 Jooble\'s feed requirements do not use standard rss feed elements, so the custom feed will not pass on these validators.
     35Jooble's feed requirements do not use standard rss feed elements, so the custom feed will not pass on these validators.
    3336
    3437= My feed doesn't work, I see a "Page not Found" error?
     
    3740== Changelog ==
    3841
     42= 2.0 =
     43* Use default query instead of "query_posts"
     44* Added settings to customize the number of jobs in feed
     45* Updated to meet WordPress Extra coding standards
     46* Added translation capability
     47
    3948= 1.0 =
    4049* Initial plugin release.
     50
     51== Upgrade Notice ==
     52
     53= 2.0 =
     54More efficient code execution, fewer potential conflicts, adjustable size feed.
  • wpjm-jooble-feed/trunk/wpjm-jooble-feed.php

    r2316970 r2714465  
    1 <?php
     1<?php
     2
     3/**
     4* Plugin Name: WPJM Jooble Feed
     5* Description: Creates a custom rss/xml feed for WP Job Manager compatible with Jooble feed requirements.
     6* Version: 2.0
     7* Author: Nick Pagazani
     8* Author URI: https://nickpagazani.com
     9* License: GPL v2 or later
     10* Text Domain: wpjmjooblefeed
     11* Domain Path: /languages
     12*/
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    exit; // Exit if accessed directly
     16}
    217
    318/*
    4 Plugin Name:    WPJM Jooble Feed
    5 Description:    Creates a custom rss/xml feed for WP Job Manager compatible with Jooble feed requirements.
    6 Version: 1.0
    7 Author: Nick Pagazani
    8 Author URI: https://nickpagazani.com
    9 License:    GPL v2 or later
    10 */
    11 
    12 function jooble_rss_feed(){
    13     header( 'Content-Type: application/rss+xml; charset=' . get_option( 'blog_charset' ), true );
    14     // header( 'Content-Type: text/html' );
    15     include_once( dirname( __FILE__ ) . '/rss-jooble.php' );
    16     // add_filter('pre_option_rss_use_excerpt', '__return_zero');
    17     // load_template( PATHTEMPLATEFILE . '/rss-jooble1.php' );
    18     // get_template_part('rss', 'jooble');
    19 }
    20 
    21 /* This code initializes the custom Jooble RSS Feed*/
    22 add_action( 'init', 'JoobleCustomRSS' );
    23 function JoobleCustomRSS(){
    24    add_feed( 'jooble', 'jooble_rss_feed' );
    25 }
    26 
    27 
    28 
    29 function jooble_feed_type( $content_type, $type ) {
    30         if ( 'jooble' === $type ) {
    31                 return feed_content_type( 'rss2' );
    32         }
    33 
    34         return $content_type;
    35 }
    36 
    37 add_filter( 'feed_content_type', 'jooble_feed_type', 10, 2 );
     19 * Required functions
     20 */
     21require_once plugin_dir_path( __FILE__ ) . 'class-wpjm-jooble-rss-feed.php';
Note: See TracChangeset for help on using the changeset viewer.